/* Maison Velvet × Pegasus — charte Maison Velvet (prune, crème, or, terracotta · Mulish) */
@font-face {
  font-family: 'Mulish';
  src: url('/fonts/mulish-var.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Mulish';
  src: url('/fonts/mulish-var-ext.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --plum: #463133;
  --plum-2: #5b4143;
  --plum-ink: #2f2122;
  --cream: #f6f2ec;
  --paper: #fffdf9;
  --line: #e4dccf;
  --gold: #b9965a;
  --gold-light: #d8bd8a;
  --terra: #a94f3d;
  --rose: #d49487;
  --night: #081e3e;
  --night-2: #0d2a57;
  --cyan: #06eff6;
  --muted: #7a6a66;
  --radius: 14px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 56px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Mulish', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--plum);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.2; }
p { margin: 0 0 .9em; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }

.eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .6rem;
}
.eyebrow--gold { color: var(--gold-light); }
.eyebrow--cyan { color: #7fd8de; }
.fine { font-size: .78rem; color: var(--muted); margin-top: 1rem; }
.link {
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.4rem;
  border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; text-align: center;
  transition: transform .15s ease, background-color .2s ease, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--block { display: flex; width: 100%; }
.btn--primary { background: var(--plum); color: var(--cream); }
.btn--gold { background: var(--gold); color: var(--plum-ink); }
.btn--terra { background: var(--terra); color: #fff; }
.btn--ghost { background: transparent; border-color: var(--plum); color: var(--plum); }
.btn--ghost-light { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }

/* ---------- Écran d'inscription ---------- */
.gate {
  min-height: 100vh; min-height: 100dvh;
  display: flex; justify-content: center;
  padding: 32px 20px calc(32px + var(--safe-b));
  background: var(--cream);
}
.gate__inner { width: 100%; max-width: 420px; }
.gate__logo { width: 170px; margin: 8px auto 28px; }
.gate .eyebrow { text-align: center; }
.gate__title { font-weight: 300; font-size: 2.2rem; text-align: center; letter-spacing: .04em; margin-bottom: .6rem; }
.gate__lead { text-align: center; color: var(--plum-2); margin-bottom: 1.6rem; }

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-weight: 700; font-size: .85rem; }
.field em { font-weight: 400; font-style: normal; color: var(--muted); }
.field input {
  font: inherit; font-weight: 400; font-size: 1rem; color: var(--plum);
  min-height: 50px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper);
  outline: none; transition: border-color .2s;
}
.field input:focus { border-color: var(--gold); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--plum); flex: none; }
.form__error { color: var(--terra); font-weight: 700; font-size: .9rem; min-height: 1.2em; margin: 0; }

/* ---------- Barre haute ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 12px;
  background: rgba(70,49,51,.94); color: var(--cream);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.topbar__star {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: none; border: 0; color: var(--gold-light); cursor: pointer; padding: 6px;
  -webkit-tap-highlight-color: transparent;
}
.topbar__star svg { width: 26px; height: 26px; transition: transform .25s; }
.topbar__star.is-pulse svg { transform: rotate(45deg) scale(1.15); }
.topbar__title { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__title i { font-style: normal; color: var(--gold-light); }
.topbar__hello { font-size: .8rem; opacity: .85; white-space: nowrap; max-width: 34%; overflow: hidden; text-overflow: ellipsis; }

main { padding-bottom: 0; }

/* ---------- Hero (univers Pegasus) ---------- */
.hero { background: var(--night); color: #fff; position: relative; overflow: hidden; }
.hero__media { position: relative; }
.hero__media img { width: 100%; height: min(118vw, 560px); object-fit: cover; object-position: 50% 0; }
.hero__media::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(to bottom, rgba(8,30,62,0), var(--night));
}
.hero__body { position: relative; padding: 0 22px 36px; margin-top: -72px; }
.hero__title { font-size: 2.05rem; font-weight: 800; letter-spacing: .01em; text-transform: uppercase; line-height: 1.08; }
.hero__script {
  font-size: 1.5rem; font-style: italic; font-weight: 300; color: var(--gold-light);
  margin: .35rem 0 1rem; letter-spacing: .02em;
}
.hero__lead { color: rgba(255,255,255,.85); }
.facts { margin: 1.4rem 0; display: grid; gap: 14px; }
.facts div { border-left: 2px solid var(--gold); padding-left: 14px; }
.facts dt { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-light); font-weight: 700; }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.programme { list-style: none; padding: 0; margin: 0 0 1.4rem; display: flex; flex-wrap: wrap; gap: 8px; }
.programme li {
  border: 1px solid rgba(255,255,255,.3); border-radius: 999px;
  padding: 6px 14px; font-size: .82rem; font-weight: 600;
}
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 1.4rem; }
.countdown__cell { background: rgba(255,255,255,.07); border-radius: 12px; padding: 10px 4px; text-align: center; }
.countdown__n { display: block; font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown__l { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.countdown__live { grid-column: 1 / -1; text-align: center; color: var(--gold-light); font-weight: 700; letter-spacing: .08em; padding: 10px; border: 1px solid var(--gold); border-radius: 12px; }
.hero__actions { display: grid; gap: 10px; }
.hero__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero__row .btn { padding-inline: .6rem; font-size: .72rem; }

/* ---------- Sections ---------- */
.section { padding: 44px 22px 48px; }
.section--cream { background: var(--cream); }
.section--night { background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%); color: #fff; }
.section--plum { background: var(--plum); color: var(--cream); }
.section__title { font-size: 1.6rem; font-weight: 400; margin-bottom: .8rem; }
.section__title--light { color: var(--cream); }
.section__lead { color: rgba(255,255,255,.8); font-size: 1.05rem; }

/* Lot */
.prize {
  display: grid; grid-template-columns: 54px 1fr; gap: 16px; align-items: center;
  background: var(--plum); color: var(--cream);
  border-radius: var(--radius); padding: 16px 18px; margin: 1.2rem 0 1.4rem;
}
.prize__bottle { height: 120px; width: auto; margin: 0 auto; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.prize__kicker { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-light); font-weight: 700; margin: 0; }
.prize__title { font-size: 1.15rem; font-weight: 800; margin: .1rem 0 .3rem; }
.prize__text { font-size: .86rem; margin: 0; color: rgba(246,242,236,.85); }

.vote-status { font-weight: 700; min-height: 1em; }
.vote-status--done { color: var(--plum); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }

/* Cocktails */
.cocktails { display: grid; gap: 14px; }
.cocktail {
  --c: var(--gold); --a: var(--gold);
  position: relative; display: grid; grid-template-columns: 70px 1fr; gap: 14px; align-items: center;
  width: 100%; text-align: left;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px 14px 12px; cursor: pointer; overflow: hidden;
  transition: border-color .2s, transform .15s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.cocktail::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--c); }
.cocktail:active:not(:disabled) { transform: scale(.985); }
.cocktail:disabled { cursor: default; }
.cocktail__img {
  height: 104px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--c) 28%, transparent), transparent 70%);
}
.cocktail__img img { max-height: 100px; width: auto; }
.cocktail__brand { font-size: .66rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--c); filter: brightness(.8); }
.cocktail__name { display: block; font-size: 1.2rem; font-weight: 800; margin: 2px 0 4px; color: var(--plum); }
.cocktail__ing { display: block; font-size: .84rem; color: var(--muted); line-height: 1.4; }
.cocktail__cta {
  display: inline-block; margin-top: 8px; font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--plum); border-bottom: 1.5px solid var(--gold);
}
.cocktail.is-mine { border-color: var(--plum); box-shadow: 0 6px 20px rgba(70,49,51,.15); }
.cocktail.is-mine .cocktail__cta { border: 0; background: var(--plum); color: var(--cream); padding: 4px 10px; border-radius: 999px; }
.cocktail.is-dim { opacity: .55; }
.cocktail.is-winner { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(185,150,90,.25); opacity: 1; }

/* Résultats */
.results {
  text-align: center; border-radius: var(--radius); padding: 22px 18px; margin-bottom: 1.2rem;
  background: var(--night); color: #fff;
}
.results__title { font-size: 1.35rem; font-weight: 800; margin: .3rem 0 .6rem; }
.results--won { background: linear-gradient(135deg, var(--gold), #e2c792); color: var(--plum-ink); }
.results--won .eyebrow { color: var(--plum); }

/* Pegasus */
.pegasus__logo { width: 120px; margin: 0 auto 28px; }
.section--night .eyebrow, .section--night .section__title, .section--night .section__lead { text-align: center; }
.photo { margin: 1.6rem 0 1.2rem; border-radius: var(--radius); overflow: hidden; }
.photo img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: 50% 35%; }
.photo--portrait img { aspect-ratio: 4 / 4.4; object-position: 50% 20%; }
.range {
  display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; margin: 1.6rem -22px 0; padding: 0 22px 8px;
  scrollbar-width: none;
}
.range::-webkit-scrollbar { display: none; }
.bottle {
  --c: #fff;
  scroll-snap-align: center; border-radius: var(--radius); padding: 22px 18px 18px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
}
.bottle[data-c="minty"] { --c: #07f2a1; }
.bottle[data-c="vodka"] { --c: #06eff6; }
.bottle[data-c="eaudor"] { --c: #f1a83b; }
.bottle[data-c="orion"] { --c: #8fb0ff; }
.bottle img { height: 200px; width: auto; margin: 0 auto 16px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); }
.bottle h3 { font-size: 1.2rem; color: var(--c); }
.bottle__meta { font-size: .8rem; color: rgba(255,255,255,.65); margin-bottom: .6rem; }
.bottle p { font-size: .92rem; }
.bottle__serve { font-weight: 800; font-size: .82rem !important; margin: 0; }

/* Maison Velvet */
.mv__logo { width: 190px; margin: 4px auto 14px; }
.mv__baseline { text-align: center; font-size: .9rem; color: rgba(246,242,236,.8); }
.section--plum p { color: rgba(246,242,236,.9); }
.mv__sub { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-light); margin: 2rem 0 .8rem; }
.houses, .steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.houses li, .steps li {
  display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.06);
}
.houses span, .steps span { font-size: .85rem; color: rgba(246,242,236,.7); }
.steps { counter-reset: step; }
.steps li { grid-template-columns: 28px 1fr; column-gap: 10px; }
.steps li::before {
  counter-increment: step; content: counter(step); grid-row: span 2;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--gold); color: var(--gold-light); font-size: .8rem; font-weight: 800;
}
.contact { display: grid; gap: 6px; margin: 2rem 0 1.4rem; padding: 18px; border: 1px solid rgba(185,150,90,.5); border-radius: var(--radius); text-align: center; }
.contact__name { font-weight: 800; font-size: 1.05rem; margin: 0; }
.contact a { color: var(--gold-light); font-weight: 600; text-underline-offset: 3px; }

/* Pied de page */
.footer {
  text-align: center; padding: 28px 22px calc(var(--tabbar-h) + 28px + var(--safe-b));
  background: var(--plum-ink); color: rgba(246,242,236,.7); font-size: .82rem;
}
.footer__secret { color: var(--gold-light); letter-spacing: .1em; font-size: .78rem; }
.footer__health { font-size: .72rem; margin-top: 1rem; }

/* Barre d'onglets */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(246,242,236,.96); border-top: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; font-size: .64rem; font-weight: 700; letter-spacing: .04em; color: var(--muted);
  -webkit-tap-highlight-color: transparent;
}
.tabbar svg { width: 22px; height: 22px; fill: currentColor; }
.tabbar a.is-active { color: var(--plum); }
.tabbar a.is-active svg { color: var(--gold); }

/* Dialogues */
.dialog {
  width: min(92vw, 420px); border: 0; border-radius: 18px; padding: 24px 22px 20px;
  background: var(--paper); color: var(--plum); box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.dialog::backdrop { background: rgba(47,33,34,.6); }
.dialog--tall { max-height: 82vh; }
.dialog__title { font-size: 1.4rem; font-weight: 800; margin-bottom: .4rem; }
.dialog__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 1.2rem; }
.dialog__actions:has(> :only-child) { grid-template-columns: 1fr; }
.rules { font-size: .88rem; }
.rules p { margin-bottom: .8em; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px + var(--safe-b)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px;
  background: var(--plum-ink); color: var(--cream); font-weight: 600; font-size: .9rem;
  transition: opacity .25s, transform .25s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Mini-jeu ---------- */
.game { position: fixed; inset: 0; z-index: 100; background: var(--night); color: #fff; touch-action: none; user-select: none; -webkit-user-select: none; }
.game canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.game__hud {
  position: absolute; top: 0; left: 0; right: 0; padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 0;
  display: grid; grid-template-columns: 44px 1fr auto; align-items: start; pointer-events: none;
}
.game__close {
  pointer-events: auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  background: rgba(8,30,62,.6); color: #fff; font-size: 1rem; cursor: pointer;
}
.game__score { text-align: center; font-size: 2.6rem; font-weight: 900; line-height: 1; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.game__score small { display: block; font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; opacity: .7; margin-top: 4px; }
.game__best { font-size: .78rem; font-weight: 700; color: var(--gold-light); padding-top: 10px; }
.game__panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(88vw, 380px); max-height: 82vh; overflow-y: auto;
  background: rgba(8,30,62,.92); border: 1px solid rgba(185,150,90,.6); border-radius: 18px;
  padding: 24px 20px; text-align: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.game__title { font-size: 1.6rem; font-weight: 300; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .5rem; }
.game__bonus {
  display: inline-block; background: var(--gold); color: var(--plum-ink); font-weight: 800;
  padding: 6px 14px; border-radius: 999px; font-size: .86rem; margin-bottom: 1rem;
}
.game__how { font-size: .88rem; color: rgba(255,255,255,.8); }
.game__result { font-size: 1.1rem; font-weight: 800; color: var(--gold-light); min-height: 0; }
.game__result:empty { display: none; }
.leaderboard { margin-top: 1.2rem; text-align: left; }
.leaderboard__title { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-light); font-weight: 800; text-align: center; }
.leaderboard ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.leaderboard li {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center;
  padding: 7px 10px; border-radius: 8px; background: rgba(255,255,255,.05); font-size: .88rem;
}
.leaderboard li.is-me { background: rgba(185,150,90,.25); }
.leaderboard li span:first-child { font-weight: 800; color: var(--gold-light); }
.leaderboard li span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard li span:last-child { font-weight: 800; font-variant-numeric: tabular-nums; }
.leaderboard__empty { text-align: center; font-size: .85rem; opacity: .7; }

@media (min-width: 640px) {
  main, .footer { max-width: 560px; margin: 0 auto; }
  body { background: var(--plum-ink); }
  .tabbar { max-width: 560px; margin: 0 auto; }
  .range { grid-auto-columns: 46%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
