:root {
  --bg: #FAF8F5; --surface: #FFFFFF; --sunk: #F3EEE7;
  --ink: #1F1D1B; --muted: #6B635B; --line: #E8E0D5;
  --wine: #722F37; --wine-ink: #FDF8F3; --wine-soft: #F6EAE8;
  --gold: #B8924A; --gold-soft: #EBD9B0; --sage: #93A283;
  /* couleurs fixes des illustrations */
  --i-wine: #722F37; --i-gold: #C79B4B; --i-golds: #E7C98A; --i-sage: #93A283; --i-paper: #FFFDF9;
  --i-ink: #2A2623; --i-rose: #E3A9A0; --i-plum: #4A2740; --i-wood: #A47148; --i-line: #2A2623;
  --shadow: 0 1px 2px rgba(31,29,27,.04), 0 10px 28px -14px rgba(31,29,27,.16);
  --r: 22px;
  --title: "Gloock", "Iowan Old Style", Georgia, serif;
  --text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --out: cubic-bezier(.2,.8,.2,1);
  --spring: cubic-bezier(.34,1.45,.55,1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171412; --surface: #221D1A; --sunk: #1C1816; --ink: #F3ECE2; --muted: #AFA396; --line: #3A322D;
    --wine: #C9707B; --wine-ink: #1D0E10; --wine-soft: #3A2226; --gold: #D2AE68; --gold-soft: #4A3C22; --sage: #9FAE8F;
    --i-wine: #A8434F; --i-paper: #F3ECE2; --i-ink: #100E0D; --i-line: #E9DFD2; --i-plum: #7A4A6E;
    --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--text); overflow-x: hidden; }
.wrap { max-width: 560px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) 18px calc(120px + env(safe-area-inset-bottom)); }
.enter { animation: rise .28s var(--out); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.enter .stagger > * { animation: rise .32s var(--out) backwards; }
.enter .stagger > :nth-child(2) { animation-delay: .04s; } .enter .stagger > :nth-child(3) { animation-delay: .08s; }
.enter .stagger > :nth-child(4) { animation-delay: .12s; } .enter .stagger > :nth-child(n+5) { animation-delay: .16s; }

h1, h2, h3 { font-family: var(--title); font-weight: 400; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: 2.35rem; margin: 4px 0 8px; }
h2 { font-size: 1.5rem; margin: 40px 0 14px; }
h3 { font-size: 1.2rem; margin: 0 0 6px; }
p { margin: 0 0 12px; }
a { color: var(--wine); text-underline-offset: 3px; }
.over { font-size: .88rem; font-weight: 600; color: var(--gold); }
:root .over { color: #8A6A2C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .over { color: var(--gold); } }
.muted { color: var(--muted); } .small { font-size: .9rem; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.stack > * + * { margin-top: 12px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

/* Illustrations */
svg .w { fill: var(--i-wine); } svg .g { fill: var(--i-gold); } svg .gs { fill: var(--i-golds); } svg .s { fill: var(--i-sage); }
svg .p { fill: var(--i-paper); } svg .k { fill: var(--i-ink); } svg .r { fill: var(--i-rose); } svg .m { fill: var(--i-plum); } svg .b { fill: var(--i-wood); }
svg .l { stroke: var(--i-line); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
svg .kl { stroke: var(--i-ink); stroke-width: 2.4; stroke-linecap: round; } svg .gl { stroke: var(--i-gold); stroke-width: 2.8; stroke-linecap: round; } svg .pl { stroke: var(--i-paper); stroke-width: 2; stroke-linecap: round; }
svg .n { fill: none; } svg .n2 { fill: none; stroke: var(--i-paper); stroke-width: 1.4; stroke-linecap: round; } svg .thin { stroke-width: 1.4; } svg .o { opacity: .75; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.logo { width: 44px; height: 44px; } .logo.big { width: 148px; height: 148px; display: block; margin: 12px 0 18px -14px; }

/* En-tête */
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; min-height: 48px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding-right: 12px; color: var(--ink); text-decoration: none; font-weight: 500; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--title); font-size: 1.15rem; }
.who { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 0; min-height: 48px; cursor: pointer; font: 500 .92rem var(--text); color: var(--ink); }
.ava { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 400 1rem var(--title); color: #FFFDF9; background: #722F37; flex: none; }
.ava.c1 { background: #8A6A2C; } .ava.c2 { background: #66775A; } .ava.c3 { background: #4A2740; } .ava.c4 { background: #8C5A37; } .ava.c5 { background: #8F4A50; }

/* Cartes et boutons */
.card { background: var(--surface); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); color: inherit; text-decoration: none; display: block; width: 100%; border: 0; text-align: left; font: inherit; transition: transform .2s var(--spring); }
a.card, button.card { cursor: pointer; } a.card:active, button.card:active { transform: scale(.98); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 22px; border-radius: 26px; border: 1.5px solid var(--wine); background: var(--wine); color: var(--wine-ink); font: 600 1rem var(--text); text-decoration: none; cursor: pointer; transition: transform .22s var(--spring), background .2s, border-color .2s; }
.btn:active { transform: scale(.96); } .btn:hover { filter: brightness(1.06); }
.btn.quiet { background: transparent; border-color: var(--line); color: var(--ink); font-weight: 500; } .btn.quiet:hover { border-color: var(--wine); filter: none; }
.btn.ghost { background: transparent; color: var(--wine); } .btn.block { width: 100%; } .btn[disabled] { opacity: .45; }
.btn.round { width: 52px; padding: 0; flex: none; }
.linkbtn { background: none; border: 0; color: var(--wine); font: inherit; cursor: pointer; padding: 12px 0; text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 2px; }

/* Formulaires */
label { display: block; font-weight: 600; margin: 22px 0 8px; } label .muted { font-weight: 400; }
input[type=text], input[type=number], input[type=date], input[type=password], input[type=file], select, textarea { width: 100%; min-height: 52px; font: 1rem var(--text); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 13px 16px; transition: border-color .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--wine); }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--wine); } textarea { min-height: 104px; resize: vertical; }
.pin { font-size: 1.8rem !important; letter-spacing: .5em; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.slide { flex-wrap: nowrap; overflow-x: auto; margin: 0 -18px; padding: 4px 18px 10px; scrollbar-width: none; } .chips.slide .chip { flex: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 8px 17px; border-radius: 23px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 500 .96rem var(--text); cursor: pointer; text-decoration: none; transition: transform .22s var(--spring), background .2s, border-color .2s, color .2s; }
.chip:active { transform: scale(.94); } .chip.on { background: var(--wine); border-color: var(--wine); color: var(--wine-ink); } .chip .x { opacity: .7; }
.chip .ava { width: 28px; height: 28px; font-size: .85rem; margin-left: -8px; }
.sw { width: 22px; height: 22px; border-radius: 50% 50% 50% 50% / 60% 60% 42% 42%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(31,29,27,.14); flex: none; } .chip.on .sw { box-shadow: 0 0 0 2px var(--wine-ink); }
.sticky-save { position: sticky; bottom: calc(16px + env(safe-area-inset-bottom)); margin-top: 30px; z-index: 5; } .sticky-save .btn { box-shadow: 0 10px 24px -10px rgba(114,47,55,.6); }

/* Barre basse */
#nav { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); width: min(420px, calc(100% - 28px)); display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-radius: 30px; padding: 6px; box-shadow: 0 0 0 1px var(--line), 0 16px 34px -14px rgba(31,29,27,.35); }
#nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; border-radius: 24px; color: var(--muted); text-decoration: none; font-size: .76rem; font-weight: 500; transition: background .22s, color .22s, transform .22s var(--spring); }
#nav a.on { background: var(--wine-soft); color: var(--wine); font-weight: 600; } #nav a:active { transform: scale(.93); }

/* Accueil */
.hero { position: relative; overflow: hidden; background: #722F37; color: #FDF8F3; border-radius: 28px 28px 28px 8px; padding: 24px 22px 22px; min-height: 250px; box-shadow: 0 18px 36px -18px rgba(114,47,55,.7); }
.hero .over { color: #EBD9B0 !important; } .hero h2 { margin: 8px 0 8px; font-size: 1.95rem; max-width: 68%; color: inherit; } .hero p { max-width: 66%; margin: 0; }
.hero .pic { position: absolute; right: -16px; bottom: -34px; width: 148px; transform: rotate(9deg); } .hero .pic .sockart { width: 100%; }
.hero .pic .knit { fill: #FAF8F5; stroke: none; } .hero .pic .rib { stroke: #E3D3C4; } .hero .pic text { fill: #722F37; } .hero .pic .ribbon { fill: #C79B4B; }
.hero .todo { display: inline-block; margin-top: 22px; max-width: 64%; font-weight: 600; border-top: 1px solid rgba(253,248,243,.35); padding-top: 12px; }
.shelf { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 6px 18px 4px; scrollbar-width: none; align-items: flex-start; }
.shelf a { flex: none; width: 92px; text-align: center; color: inherit; text-decoration: none; font-size: .84rem; line-height: 1.25; transition: transform .22s var(--spring); } .shelf a:active { transform: scale(.95); }
.shelf .bottleart { height: 150px; margin: 0 auto 8px; display: block; }

/* Étapes de la soirée */
.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 18px 0 6px; }
.stages div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .84rem; color: var(--muted); position: relative; padding-top: 2px; }
.stages span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); z-index: 1; }
.stages div + div::before { content: ""; position: absolute; top: 23px; right: 50%; width: 100%; height: 2px; background: var(--line); }
.stages .on { color: var(--ink); font-weight: 600; } .stages .on span { background: var(--wine); color: var(--wine-ink); } .stages .on + .on::before { background: var(--wine); }
.secretcard { display: flex; align-items: center; gap: 18px; } .secretcard svg:first-child { width: 78px; flex: none; } .secretcard .sockart { width: 56px !important; } .secretcard b { display: block; font-family: var(--title); font-weight: 400; font-size: 1.25rem; }

.shelf .cap2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.secretcard .bottleart { width: 56px !important; height: 92px; flex: none; }
.option { border: 1.5px solid transparent; cursor: pointer; } .option b { display: block; font-family: var(--title); font-weight: 400; font-size: 1.2rem; margin-bottom: 2px; } .option.on { border-color: var(--wine); background: var(--wine-soft); }

/* Chaussettes */
.socks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sock { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 4px 10px; background: var(--surface); border: 0; border-radius: var(--r); box-shadow: var(--shadow); color: var(--muted); font: 500 .88rem var(--text); text-decoration: none; transition: transform .22s var(--spring); }
a.sock, button.sock { cursor: pointer; } a.sock:active, button.sock:active { transform: scale(.94); }
.sockart { width: 72px; display: block; }
.knit { fill: var(--wine-soft); stroke: var(--wine); stroke-width: 2; transition: fill .3s; } .rib { fill: none; stroke: var(--wine); stroke-width: 1.5; opacity: .3; stroke-linecap: round; stroke-linejoin: round; } .ribbon { fill: var(--i-gold); }
.sock.done { color: var(--wine); font-weight: 600; }
.sock.taken { opacity: .4; cursor: not-allowed; }

/* Fiche de dégustation */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: var(--sunk); border-radius: 26px; padding: 5px; position: sticky; top: calc(8px + env(safe-area-inset-top)); z-index: 6; }
.steps button { border: 0; background: none; border-radius: 22px; min-height: 60px; padding: 5px 0; cursor: pointer; font: 500 .78rem var(--text); color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; transition: background .22s, transform .22s var(--spring); }
.steps svg { width: 30px; height: 30px; opacity: .55; transition: opacity .2s; } .steps button:active { transform: scale(.93); }
.steps .on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); } .steps .on svg, .steps .seen svg { opacity: 1; }
.step-head { display: flex; align-items: center; gap: 18px; margin: 20px 0 16px; } .step-head svg { width: 92px; height: 92px; flex: none; margin-left: -6px; } .step-head h2 { margin: 0 0 4px; font-size: 2rem; } .step-head p { margin: 0; color: var(--muted); }
.pane.fwd { animation: fwd .28s var(--out); } .pane.bwd { animation: bwd .28s var(--out); }
@keyframes fwd { from { opacity: 0; transform: translateX(28px); } } @keyframes bwd { from { opacity: 0; transform: translateX(-28px); } }
.fichebar { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); width: min(520px, calc(100% - 28px)); display: flex; gap: 10px; } .fichebar .btn { flex: 1; box-shadow: 0 12px 26px -12px rgba(31,29,27,.5); } .fichebar .btn.round { flex: none; background: var(--surface); border-color: var(--line); color: var(--ink); }
.eye-stage { display: flex; align-items: center; justify-content: center; background: var(--sunk); border-radius: 28px 28px 8px 28px; padding: 12px 0 4px; margin-bottom: 16px; }
.liveglass { width: 118px; overflow: visible; --robe: transparent; --deep: .8; } .liquid { fill: var(--robe); opacity: var(--deep); transition: fill .3s, opacity .3s; }
.wineg { transform: translateY(var(--rise, 70px)); transition: transform .35s var(--out); } .liveglass.filled .wineg { --rise: 0px; } .bub circle { fill: #fff; opacity: 0; } .liveglass.fizz .bub circle { opacity: .85; }
.gleam { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; opacity: .6; } .liveglass.swirl { animation: swirl .35s ease-out; transform-origin: 50% 90%; }
@keyframes swirl { 30% { transform: rotate(-5deg); } 65% { transform: rotate(4deg); } }
.aromas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.aroma { position: relative; border: 0; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); padding: 14px 6px 12px; min-height: 112px; font: 500 .86rem/1.2 var(--text); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: transform .22s var(--spring), box-shadow .2s; hyphens: auto; }
.aroma svg { width: 46px; height: 46px; } .aroma:active { transform: scale(.94); } .aroma.has { box-shadow: inset 0 0 0 2px var(--wine); }
.aroma:last-child:nth-child(3n+1) { grid-column: 1 / -1; flex-direction: row; justify-content: center; min-height: 76px; gap: 14px; font-size: .95rem; }
.aroma .count { position: absolute; top: 8px; right: 8px; min-width: 24px; height: 24px; border-radius: 12px; background: var(--wine); color: var(--wine-ink); font-size: .82rem; font-weight: 600; display: grid; place-items: center; } .aroma .count:empty { display: none; }
.sheet-aroma { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; } .sheet-aroma svg { width: 60px; height: 60px; }

.saveerr { position: fixed; z-index: 21; left: 50%; transform: translateX(-50%); bottom: calc(80px + env(safe-area-inset-bottom)); width: min(520px, calc(100% - 28px)); display: flex; align-items: center; justify-content: space-between; background: var(--ink); color: var(--bg); border-radius: 20px; padding: 2px 20px; } .saveerr .linkbtn { color: inherit; min-height: 48px; font-weight: 600; }

/* Curseurs */
.scale { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px 14px; margin: 0 0 12px; }
.scale-head { display: flex; align-items: center; gap: 10px; } .scale-art svg { width: 34px; height: 34px; display: block; } .scale .lab { font-weight: 600; flex: 1; }
.scale .word { font-family: var(--title); font-size: 1.3rem; color: var(--muted); display: inline-block; } .scale.set .word { color: var(--wine); }
.track { position: relative; height: 48px; margin: 4px 14px 0; } .track::before, .track .fill { content: ""; position: absolute; left: -14px; right: -14px; top: 17px; height: 14px; border-radius: 7px; background: var(--sunk); }
.track .fill { right: auto; width: calc(28px + (100%) * var(--p)); background: linear-gradient(90deg, #A8656B, #722F37); transition: width .28s var(--out), opacity .2s; opacity: 0; } .scale.set .fill { opacity: 1; }
.ticks { position: absolute; inset: 22px 0 auto; display: flex; justify-content: space-between; } .ticks i { width: 4px; height: 4px; margin: 0 -2px; border-radius: 50%; background: var(--muted); opacity: .45; }
.drop { position: absolute; top: 8px; left: calc(100% * var(--p)); width: 32px; height: 32px; margin-left: -16px; background: var(--surface); border: 2.5px solid var(--line); border-radius: 50% 50% 50% 50% / 62% 62% 40% 40%; transition: left .28s var(--spring), transform .2s var(--spring), background .2s, border-color .2s; } .scale.set .drop { background: var(--wine); border-color: var(--surface); box-shadow: 0 3px 10px -2px rgba(114,47,55,.6); }
.track input { position: absolute; inset: 0 -16px; width: calc(100% + 32px); height: 48px; margin: 0; opacity: 0; cursor: grab; touch-action: pan-y; } .track:active .drop { transform: scale(1.18); } .track:focus-within:has(:focus-visible) .drop { outline: 2.5px solid var(--gold); outline-offset: 2px; }
.ends { display: flex; justify-content: space-between; font-size: .86rem; color: var(--muted); } .scale .help { font-size: .88rem; color: var(--muted); margin-top: 6px; }

/* Profil, plaisir */
.profile { width: 100%; display: block; overflow: visible; } .profile text { font: 500 12px var(--text); fill: var(--muted); } .pring { fill: none; stroke: var(--line); stroke-width: 1; }
.pgroup { fill: var(--i-wine); fill-opacity: .82; } .pmine { fill: none; stroke: var(--i-golds); stroke-width: 3; stroke-linejoin: round; } .legend { display: flex; gap: 18px; justify-content: center; font-size: .9rem; color: var(--muted); } .legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 7px; background: var(--i-wine); } .legend i.gold { background: none; border: 3px solid var(--i-gold); }
.phrase { font-family: var(--title); font-size: 1.3rem; line-height: 1.4; margin: 0; }
.pleasure { display: flex; justify-content: space-between; } .pleasure button { border: 0; background: none; padding: 6px 4px; min-width: 52px; cursor: pointer; transition: transform .22s var(--spring); } .pleasure button:active { transform: scale(.9); } .pleasure .meter { width: 42px; }
.meter { width: 34px; display: block; } .mbg { fill: var(--sunk); } .mfill { fill: var(--i-wine); clip-path: inset(calc(59% - 51% * var(--lvl)) 0 0 0); transition: clip-path .32s var(--out); } .mline { fill: none; stroke: var(--i-line); stroke-width: 1.8; stroke-linecap: round; } .mfill { clip-path: polygon(0 calc(100% - 100% * var(--lvl)), 100% calc(100% - 100% * var(--lvl)), 100% 100%, 0 100%); clip-path: inset(calc(100% - 100% * var(--lvl)) 0 0 0); }
.pword { text-align: center; font-family: var(--title); font-size: 1.35rem; min-height: 2rem; margin: 6px 0 0; }

/* Bouteilles */
.bottleart { display: block; } .glass { fill: #2F3B30; } .t-blanc .glass { fill: #D4B666; } .t-rose .glass { fill: #E2A79D; } .t-bulles .glass { fill: #3D4B3A; } .cap { fill: #722F37; } .t-blanc .cap { fill: #93A283; } .t-rose .cap { fill: #C77F7B; } .t-bulles .cap { fill: #C79B4B; }
.shine { stroke: #fff; stroke-width: 3; stroke-linecap: round; opacity: .28; } .label { fill: #FBF5E9; } .lrule { stroke: #C79B4B; stroke-width: 1; } .lmono { font: 400 21px var(--title); fill: #722F37; } .lyear { font: 600 8px var(--text); fill: #1F1D1B; }
.winecard { display: flex; gap: 18px; align-items: center; margin-bottom: 12px; } .winecard .bottleart { height: 124px; flex: none; } .winecard .t { flex: 1; min-width: 0; } .winecard .pts { font-family: var(--title); font-size: 1.6rem; text-align: center; line-height: 1; } .winecard .pts small { display: block; font: 500 .78rem var(--text); color: var(--muted); margin-top: 4px; }
.cellar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .cell { position: relative; } .cell .card { height: 100%; padding: 18px 14px 16px; } .cell .bottleart { height: 138px; margin: 0 auto 12px; } .cell h3 { font-size: 1.08rem; margin-right: 0; }
.fav { width: 48px; height: 48px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; transition: transform .22s var(--spring); } .fav:active { transform: scale(.82); } .cell .fav { position: absolute; top: 4px; right: 4px; } .heart { width: 26px; height: 26px; } .h0 { fill: none; stroke: var(--wine); stroke-width: 1.7; } .h1 { fill: var(--wine); clip-path: inset(100% 0 0 0); transition: clip-path .32s var(--out); } .fav.on .h1 { clip-path: inset(0); }
.winehero { display: flex; justify-content: center; align-items: flex-end; background: var(--sunk); border-radius: 28px 28px 28px 8px; padding: 26px 0 0; margin-bottom: 22px; overflow: hidden; height: 300px; } .winehero .bottleart { height: 330px; margin-bottom: -56px; }
.pair { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); } .pair:last-child { border: 0; } .pair .ic { color: var(--gold); }
.wine-photo { width: 100%; max-height: 280px; object-fit: cover; border-radius: 16px; margin-bottom: 12px; }

/* Classement et listes */
.rank { list-style: none; padding: 4px 20px; margin: 0; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); } .rank li { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); } .rank li:last-child { border-bottom: 0; } .rank .pos { font-family: var(--title); font-size: 1.4rem; width: 22px; color: var(--muted); } .rank li.first .pos { color: var(--gold); } .rank .name { flex: 1; line-height: 1.3; } .rank .pts { font-family: var(--title); font-size: 1.35rem; text-align: right; }
table.guesses { width: 100%; border-collapse: collapse; font-size: .92rem; } table.guesses th, table.guesses td { text-align: left; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; } table.guesses th { font-weight: 500; color: var(--muted); } table.guesses td.ok { color: var(--wine); font-weight: 600; } table.guesses td.pts { text-align: right; font-family: var(--title); font-size: 1.1rem; } .scroll-x { overflow-x: auto; }
.badge { font-size: .8rem; padding: 2px 10px; border-radius: 12px; background: var(--sunk); color: var(--muted); white-space: nowrap; display: inline-block; } .badge.wine { background: var(--wine-soft); color: var(--wine); }
.member-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); } .member-row:last-child { border: 0; } .member-row .name { flex: 1; line-height: 1.4; } .iconbtn { width: 48px; height: 48px; border: 0; background: none; border-radius: 50%; color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: background .2s; } .iconbtn:hover { background: var(--sunk); }
.menu button { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 56px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: 500 1rem var(--text); text-align: left; cursor: pointer; } .menu button:last-child { border: 0; } .menu button[disabled] { opacity: .35; }
.empty:not(.sock) { text-align: left; padding: 8px 0 20px; } .empty:not(.sock) .sockart { width: 110px; margin-bottom: 12px; }
.foot { margin-top: 48px; font-size: .82rem; color: var(--muted); }

/* Tiroir */
dialog.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 88dvh; background: var(--surface); color: var(--ink); border-radius: 30px 30px 0 0; animation: up .3s var(--out); transition: transform .25s var(--out); overflow: auto; } dialog.sheet::backdrop { background: rgba(31,29,27,.5); animation: fade .25s; } dialog.sheet.closing { animation: down .2s ease-in forwards; } dialog.sheet.closing::backdrop { opacity: 0; transition: opacity .2s; }
@keyframes up { from { transform: translateY(100%); } } @keyframes down { to { transform: translateY(100%); } } @keyframes fade { from { opacity: 0; } }
.grab { padding: 12px 0 8px; display: grid; place-items: center; touch-action: none; cursor: grab; } .grab i { width: 44px; height: 5px; border-radius: 3px; background: var(--line); } .sheet-body { padding: 8px 22px calc(28px + env(safe-area-inset-bottom)); } .ask { font-family: var(--title); font-size: 1.35rem; line-height: 1.3; margin-bottom: 22px; } .sheet .envelope-art svg { width: 112px; margin-bottom: 14px; }
#toast { position: fixed; z-index: 30; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translate(-50%, -20px); opacity: 0; background: var(--ink); color: var(--bg); padding: 13px 20px; border-radius: 24px; font-size: .95rem; transition: opacity .25s, transform .3s var(--spring); pointer-events: none; max-width: calc(100% - 32px); text-align: center; width: max-content; } #toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after, ::backdrop { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; } }

/* Dessin commun : le logo, les chaussettes, les bouteilles */
.sockart text { font: 400 27px var(--title); fill: var(--wine); }
.sock.empty .knit { fill: none; stroke-dasharray: 4 5; opacity: .55; } .sock.empty .rib, .sock.empty .ribbon { opacity: .12; }
.sock.done .knit { fill: #722F37; stroke: #722F37; } .sock.done .rib { stroke: #FDF8F3; } .sock.done text { fill: #FDF8F3; } .sock.done { color: var(--wine); font-weight: 600; }
.strings { fill: none; stroke: #C79B4B; stroke-width: 3; stroke-linecap: round; } .sock.empty .strings { opacity: .12; }
.hero .sockart .knit { fill: #F6EAE8; stroke: #722F37; } .hero .sockart .rib { stroke: #722F37; } .hero .sockart text { fill: #722F37; }
.top { position: relative; } .toplogo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 48px; height: 48px; display: grid; place-items: center; } .toplogo .logo { width: 36px; height: 36px; }

/* Curseurs : plus on monte, plus c'est marqué */
.track .fill { background: var(--wine); height: calc(8px + 14px * var(--p)); top: calc(20px - 7px * var(--p)); border-radius: 11px; transition: width .28s var(--out), height .28s var(--out), top .28s var(--out), opacity .2s; }
.scale.set .fill { opacity: calc(.28 + .72 * var(--p)); }
.scale.set .drop { scale: calc(.82 + .36 * var(--p)); }
.scale.set .word { font-size: calc(1.12rem + .36rem * var(--p)); opacity: calc(.62 + .38 * var(--p)); }
.scale .word { transition: font-size .22s var(--out), opacity .22s; line-height: 1.2; }
.scale-head { min-height: 44px; } .scale .lab { min-width: 0; line-height: 1.25; } .scale .word { flex: none; }
.scale.set .scale-art svg { transform: scale(calc(.8 + .4 * var(--p))); opacity: calc(.5 + .5 * var(--p)); transition: transform .25s var(--spring), opacity .2s; }
.scale.set[data-scale="noseIntensity"] .scale-art svg { transform: none; opacity: 1; }
.scale.set .wisp { opacity: clamp(.1, calc(var(--p) * 4 - var(--i) + 1), 1); stroke-width: calc(2px + 1.6px * var(--p)); transition: opacity .25s; }
[data-scale="colorIntensity"] .fill, [data-scale="colorIntensity"].set .drop { background: var(--robe, var(--wine)); } [data-scale="colorIntensity"].set .scale-art .w { fill: var(--robe, var(--wine)); }

/* Page d'un vin : la bouteille se pose */
.winehero { height: auto; padding: 24px 0; } .winehero .bottleart { height: 270px; margin: 0; }
.enter .winehero .bottleart { animation: settle .35s var(--out); transform-origin: 50% 100%; }
@keyframes settle { from { opacity: 0; transform: translateY(26px) rotate(-3deg); } }
.view.enter:has(.winehero) { animation-name: fade; }
@media (prefers-reduced-motion: reduce) { .enter .winehero .bottleart { animation: none; } .track .fill, .scale .word, .scale.set .scale-art svg, .scale.set .wisp { transition: none; } }

/* Images de profil */
.ava.pic { overflow: hidden; background: none; } .ava.pic svg { width: 100%; height: 100%; display: block; }
.avagrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 12px; }
.avapick { border: 0; background: none; padding: 4px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; aspect-ratio: 1; transition: transform .22s var(--spring); } .avapick:active { transform: scale(.92); }
.avapick .ava { width: 100%; height: 100%; font-size: 1.6rem; } .avapick.on { box-shadow: 0 0 0 3px var(--wine); }

/* Chaussettes : lin tant qu'elles ne sont pas choisies, lie-de-vin ensuite */
:root { --linen: #F1E7D4; --linen-line: #8C7040; --linen-ink: #5C4724; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --linen: #3A3122; --linen-line: #CDB27A; --linen-ink: #EBD9B0; } }
.sock:not(.done) .knit { fill: var(--linen); stroke: var(--linen-line); } .sock:not(.done) .rib { stroke: var(--linen-line); } .sock:not(.done) text { fill: var(--linen-ink); }
.sock.empty .knit { fill: none; }
.secretcard .sockart .knit { fill: #722F37; stroke: #722F37; } .secretcard .sockart .rib { stroke: #FDF8F3; } .secretcard .sockart text { fill: #FDF8F3; }

/* Photo de l'étiquette */
.flabel { font-weight: 600; margin: 22px 0 8px; } .flabel .muted { font-weight: 400; }
input.vh[type=file] { position: absolute; left: 0; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; overflow: hidden; pointer-events: none; }
.photobtn { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 92px; padding: 16px 18px; background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--r); color: var(--ink); font: 400 1rem var(--text); text-align: left; cursor: pointer; transition: transform .22s var(--spring); }
button.photobtn:active { transform: scale(.98); } .photobtn b { display: block; font-family: var(--title); font-weight: 400; font-size: 1.15rem; }
.photobtn .round { width: 56px; height: 56px; border-radius: 50%; background: var(--wine); color: var(--wine-ink); display: grid; place-items: center; flex: none; } .photobtn .ic { width: 28px; height: 28px; }
#photoBox .linkbtn { min-height: 48px; }
.photoview { position: relative; } .photoview img { display: block; width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--r); }
.photoacts { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 8px; } .photoacts .iconbtn { width: 48px; height: 48px; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); display: grid; place-items: center; }

/* Tiroir de choix */
dialog.pick[open] { display: flex; flex-direction: column; height: 88dvh; overflow: hidden; }
dialog.pick .sheet-body { display: flex; flex-direction: column; flex: 1; min-height: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.picktitle { font-size: 1.5rem; margin-bottom: 14px; outline: none; }
.picksearch { position: relative; flex: none; } .picksearch .ic { position: absolute; left: 16px; top: 15px; color: var(--muted); pointer-events: none; } .picksearch input[type=text] { padding-left: 48px; background: var(--sunk); border-color: transparent; border-radius: 26px; } .picksearch input:focus { border-color: var(--wine); }
.picklist { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 12px -22px 0; padding: 0 22px 12px; } .picklist .over { margin: 12px 0 8px; }
.pickrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 10px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: 400 1.05rem var(--text); text-align: left; cursor: pointer; touch-action: manipulation; }
.pickrow > span { min-width: 0; overflow-wrap: anywhere; } .pickrow .ic { color: var(--wine); opacity: 0; transform: scale(.6); transition: opacity .18s, transform .22s var(--spring); } .pickrow.on { color: var(--wine); font-weight: 600; } .pickrow.on .ic, .pickrow.free .ic { opacity: 1; transform: none; }
.pickrow:active { background: var(--sunk); }
.pickfoot { flex: none; padding-top: 12px; }
input.opens { cursor: pointer; padding-right: 46px; text-overflow: ellipsis; touch-action: manipulation; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%); background-size: 7px 7px; background-position: right 25px center, right 18px center; background-repeat: no-repeat; }
.addrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; margin-top: 10px; padding: 10px 18px; background: var(--surface); border: 1.5px dashed var(--line); border-radius: 18px; color: var(--wine); font: 500 1rem var(--text); text-align: left; cursor: pointer; touch-action: manipulation; transition: transform .22s var(--spring); } .addrow:active { transform: scale(.98); } .chips:empty + .addrow { margin-top: 0; }

/* Pastille discrète : le rappel des points */
.infobtn { position: relative; width: 24px; height: 24px; margin-left: 10px; padding: 0; vertical-align: middle; border: 1.5px solid var(--line); border-radius: 50%; background: none; color: var(--muted); font: 600 .85rem/1 var(--text); cursor: pointer; } .infobtn::after { content: ""; position: absolute; inset: -13px; } .infobtn:active { color: var(--wine); border-color: var(--wine); }

/* v22 : chaque curseur montre ce qu'il mesure */
.scale.set[data-scale="acidity"] .fill, .scale.set[data-scale="acidity"] .drop { background: color-mix(in srgb, #E9D84A calc(var(--p) * 100%), #B8A98A); }
.scale.set[data-scale="alcohol"] .fill, .scale.set[data-scale="alcohol"] .drop { background: color-mix(in srgb, #C8361E calc(var(--p) * 100%), #E8B04A); }
.scale.set[data-scale="sugar"] .fill, .scale.set[data-scale="sugar"] .drop { background: color-mix(in srgb, #C7862A calc(var(--p) * 100%), #E9DDB8); }
.scale.set[data-scale="noseIntensity"] .fill, .scale.set[data-scale="noseIntensity"] .drop { background: color-mix(in srgb, #722F37 calc(var(--p) * 100%), #C9A6A0); }
[data-scale="colorIntensity"].set .fill, [data-scale="colorIntensity"].set .drop { background: color-mix(in srgb, var(--robe, var(--wine)) calc(35% + var(--p) * 65%), #1F1D1B calc(var(--p) * 22%)); }
.scale.set[data-scale="acidity"] .word { transform: skewX(calc(var(--p) * -8deg)); }
.themeline { margin: 0 0 14px; line-height: 1.4; } .themeline .over { margin-right: 6px; }
.looklinks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 14px 0 0; } .looklinks a.small { color: var(--muted); }
/* v22 : le vin reste opaque, l'intensité éclaircit vers un verre clair. Sur fond sombre, la transparence verdissait les jaunes. */
.liveglass.filled .liquid { opacity: 1; fill: color-mix(in srgb, var(--robe) calc(var(--deep) * 100%), #FFF9EC); }

/* v23 : l'explication des points */
.ptiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin-top: 12px; }
.ptile { background: var(--wine-soft); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ptile b { font-family: var(--title); font-weight: 400; font-size: 2rem; line-height: 1; color: var(--wine); }
.ptile span { font-weight: 600; } .ptile small { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.ptiles.gold .ptile { background: color-mix(in srgb, var(--gold) 16%, transparent); } .ptiles.gold .ptile b { color: #8A6A2C; }
.ex { margin: 10px 0 0; padding: 10px 12px; border-left: 3px solid var(--gold); background: color-mix(in srgb, var(--gold) 9%, transparent); border-radius: 0 12px 12px 0; font-style: italic; font-size: .92rem; }
.ex span { display: block; font-style: normal; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #8A6A2C; }
ul.rules { margin: 8px 0 0; padding-left: 20px; } ul.rules li { margin: 0 0 10px; }
@media (prefers-color-scheme: dark) { .ptiles.gold .ptile b, .ex span { color: var(--gold); } }

/* v24 : questions fréquentes, rappel à l'hôte */
.faq details { border-bottom: 1px solid var(--line); } .faq summary { padding: 14px 0; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; } .faq summary::after { content: "+"; color: var(--wine); font-size: 1.2rem; line-height: 1; transition: transform .2s; } .faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 14px; color: var(--muted); }
.faqpoints { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 6px; border: 0; border-radius: 14px; background: var(--wine-soft); color: inherit; font: inherit; text-align: left; cursor: pointer; } .faqpoints span { color: var(--wine); font-weight: 600; }
.hostnote { display: inline-block; font-weight: 600; color: var(--wine); }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }
.hero .hostnote { color: #1F1D1B; background: #E7C98A; border-radius: 999px; padding: 4px 12px; margin: 10px 0 0; font-size: .92rem; position: relative; z-index: 1; }

/* v25 : quatre étapes, la carte du prochain hôte */
.stages.four { grid-template-columns: repeat(4, 1fr); gap: 2px; } .stages.four div { font-size: .76rem; text-align: center; } .stages.four span { width: 40px; height: 40px; }
.stages.four div + div::before { top: 21px; } .stages .now span { box-shadow: 0 0 0 3px var(--wine-soft); }
.card.nexthost { margin-top: 18px; } .nexthost h3 { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; font-size: 1.5rem; }
.secretcard.now { box-shadow: inset 0 0 0 2px var(--wine), var(--shadow); }
@media (max-width: 360px) { .stages.four div { font-size: .68rem; letter-spacing: -.01em; } .stages.four span { width: 36px; height: 36px; } .stages.four div + div::before { top: 19px; } }

/* v26 : le thème a changé */
.card.banner { margin-top: 16px; box-shadow: inset 0 0 0 2px var(--gold), var(--shadow); }

/* v33 : le nom du groupe en haut, coupé proprement s'il est long */
.brand { min-width: 0; } .brandname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
