/* Roue You Sushi — mobile-first */
:root {
  --ink: #0B1D32;          /* Bleu japonais */
  --ocean: #1D3566;        /* Bleu océan */
  --salmon: #E85D75;       /* Chair de poisson */
  --salmon-dark: #B8445A;
  --rice: #F7F5EF;         /* Beige riz */
  --shiso: #689561;        /* Vert shizo */
  --error: #B3263F;
  --line: rgba(29, 53, 102, 0.16);
  --font-title: 'Poppins', 'Questrial', 'Avenir Next', system-ui, sans-serif;
  --font-body: 'Satoshi', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(11, 29, 50, 0.1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font: 500 1rem/1.5 var(--font-body);
  color: var(--ink);
  background: var(--rice);
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('../assets/topo.svg') center / 900px auto repeat;
  pointer-events: none;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ocean); text-underline-offset: 2px; }
a:hover { color: var(--salmon-dark); }
h1, h2, h3 { font-family: var(--font-title); font-weight: 800; line-height: 1.12; margin: 0; color: var(--ocean); }
h1:focus { outline: none; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 10; background: var(--ink); color: var(--rice); padding: .6rem 1rem; }
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--salmon); outline-offset: 3px; border-radius: 6px; }

.demo-banner {
  margin: 0;
  padding: .55rem 1rem;
  background: var(--ink);
  color: var(--rice);
  font-size: .82rem;
  text-align: center;
}

/* ---------- Bandeau ---------- */
.hero {
  background: var(--ocean) url('../assets/seigaiha.svg') center / 56px 28px repeat;
  padding: calc(1.25rem + env(safe-area-inset-top)) 1rem 1.5rem;
  display: flex;
  justify-content: center;
  border-radius: 0 0 28px 28px;
  box-shadow: inset 0 -6px 0 rgba(11, 29, 50, 0.18);
}
.hero-logo { width: min(30vw, 130px); height: auto; transition: width .3s ease; }
body:not([data-screen="form"]) .hero-logo { width: min(22vw, 96px); }

main { flex: 1; width: 100%; }
.screen { width: 100%; max-width: 1120px; margin: 0 auto; padding: 1.5rem 1.1rem 2rem; }

/* ---------- Écran 1 ---------- */
.intro { text-align: center; }
.kicker {
  display: inline-block;
  margin: 0 0 .6rem;
  padding: .25rem .8rem;
  border-radius: 999px;
  background: var(--salmon);
  color: #fff;
  font: 700 .78rem/1.4 var(--font-title);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.screen h1 { font-size: clamp(1.85rem, 7.6vw, 3rem); }
.accent { color: var(--salmon); }
.lead { margin: .7rem auto 1.2rem; max-width: 34ch; font-size: 1.05rem; }

.lot-chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; padding: 0; margin: 1.1rem 0 1.4rem; }
.chip {
  padding: .3rem .75rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: .85rem;
  font-weight: 700;
  color: var(--ocean);
}
.chip-rare { background: var(--salmon); border-color: var(--salmon); color: #fff; }

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.form { padding: 1.4rem 1.15rem 1.2rem; text-align: left; }
.form-title { font-size: 1.3rem; margin-bottom: 1rem; }
.form-alert {
  margin: 0 0 1rem;
  padding: .8rem 1rem;
  border-radius: 12px;
  background: #FCE8EC;
  border: 1px solid #F3B5C1;
  color: var(--error);
  font-weight: 700;
}

.field { margin-bottom: .55rem; }
.field label { display: block; font-weight: 700; margin-bottom: .3rem; color: var(--ink); }
.field input {
  width: 100%;
  min-height: 52px;
  padding: .7rem .95rem;
  font: 500 16px/1.3 var(--font-body);
  color: var(--ink);
  background: var(--rice);
  border: 2px solid transparent;
  border-radius: 12px;
  transition: border-color .15s, background .15s;
}
.field input::placeholder { color: rgba(11, 29, 50, 0.45); }
.field input:focus { outline: none; border-color: var(--ocean); background: #fff; box-shadow: 0 0 0 4px rgba(29, 53, 102, 0.12); }
.field input[aria-invalid="true"] { border-color: var(--error); background: #fff; }
.field-error { min-height: 1.2em; margin: .25rem 0 0; font-size: .85rem; font-weight: 700; color: var(--error); }
.field-error:empty { min-height: 0; }

.check { display: flex; gap: .7rem; align-items: flex-start; margin: .9rem 0 .3rem; font-size: .9rem; line-height: 1.4; }
.check input { flex: none; width: 22px; height: 22px; margin: .05rem 0 0; accent-color: var(--ocean); }
.check input[aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 2px; }
.req { color: var(--error); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile { margin: 1rem 0 0; }
.legal-note { margin: .9rem 0 0; font-size: .78rem; color: rgba(11, 29, 50, 0.75); text-align: center; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin-top: 1.1rem;
  padding: .8rem 1.4rem;
  border: 0;
  border-radius: 999px;
  font: 800 1.2rem/1.2 var(--font-title);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:disabled { cursor: default; opacity: .75; }
.btn-cta { background: var(--salmon); color: #fff; box-shadow: 0 6px 0 var(--salmon-dark); }
.btn-cta:not(:disabled):active { transform: translateY(4px); box-shadow: 0 2px 0 var(--salmon-dark); }
.btn-primary { background: var(--ocean); color: #fff; box-shadow: 0 6px 0 var(--ink); font-size: 1.05rem; }
.btn-primary:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.btn-ghost { background: transparent; color: var(--ocean); border: 2px solid var(--ocean); font-size: 1rem; min-height: 52px; }
.link-btn {
  display: block;
  margin: 1.8rem auto 0;
  background: none;
  border: 0;
  color: rgba(11, 29, 50, 0.7);
  font: 500 .85rem var(--font-body);
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Roue ---------- */
.wheel-wrap { position: relative; margin: 0 auto; aspect-ratio: 1; }
.wheel-preview { width: min(60vw, 250px); margin-top: .4rem; }
.wheel-main { width: min(88vw, 440px); margin-top: 1.2rem; }
.wheel-rim, .wheel-rotor { position: absolute; inset: 0; width: 100%; height: 100%; }
.wheel-rim { filter: drop-shadow(0 12px 22px rgba(11, 29, 50, 0.25)); }
.wheel-rotor { will-change: transform; }
.wheel-rotor.is-idle { animation: idle-spin 40s linear infinite; }
@keyframes idle-spin { to { transform: rotate(360deg); } }
.wheel-segment { stroke: rgba(11, 29, 50, 0.35); stroke-width: 1.5; }
.wheel-segment.is-winner { animation: winner 0.6s ease-in-out 3 alternate; }
@keyframes winner { to { filter: brightness(1.25) saturate(1.2); } }
.wheel-label { font: 800 21px var(--font-title); letter-spacing: .02em; }
.wheel-light.a { fill: #F7F5EF; }
.wheel-light.b { fill: #E85D75; }
.wheel.is-spinning .wheel-light { animation: blink .32s steps(1) infinite; }
.wheel.is-spinning .wheel-light.b { animation-delay: .16s; }
@keyframes blink { 50% { fill: #F2B8C3; } }
.wheel-hub {
  position: absolute;
  left: 50%; top: 50%;
  width: 27%; height: 27%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 4px solid var(--rice);
  box-shadow: 0 4px 12px rgba(11, 29, 50, 0.35);
  z-index: 2;
}
.wheel-pointer {
  position: absolute;
  left: 50%; top: -5%;
  width: 12%;
  margin-left: -6%;
  z-index: 3;
  transform-origin: 50% 30%;
  filter: drop-shadow(0 3px 4px rgba(11, 29, 50, 0.4));
}
.wheel-pointer svg { width: 100%; height: auto; }

/* ---------- Écran 2 ---------- */
.screen-wheel { text-align: center; }
.btn-spin { max-width: 420px; margin-top: 1.8rem; font-size: 1.35rem; min-height: 64px; }
.btn-spin:not(:disabled) { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.04); } }

/* ---------- Écran 3 ---------- */
.screen-gain { max-width: 520px; }
.ticket { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; text-align: center; }
.ticket-head {
  background: var(--ocean) url('../assets/seigaiha.svg') center / 56px 28px repeat;
  padding: 1.4rem 1rem 1.3rem;
}
.ticket-head h1 { color: var(--rice); font-size: clamp(1.7rem, 7vw, 2.3rem); }
.ticket-kicker { margin: 0 0 .3rem; color: #F2B8C3; font: 700 .8rem var(--font-title); letter-spacing: .14em; text-transform: uppercase; }
.ticket-body { padding: 1.4rem 1.2rem 1.5rem; position: relative; }
.ticket-label { margin: 0; font-size: .95rem; color: rgba(11, 29, 50, 0.75); }
.ticket-lot { margin: .2rem 0 0; font: 800 clamp(1.6rem, 7.5vw, 2.2rem)/1.15 var(--font-title); color: var(--ocean); }
.ticket-lot.is-rare { color: var(--salmon); }
.ticket-sep { margin: 1.3rem -1.2rem; border-top: 3px dashed var(--line); position: relative; }
.ticket-sep::before, .ticket-sep::after {
  content: ''; position: absolute; top: -14px; width: 24px; height: 24px; border-radius: 50%; background: var(--rice);
}
.ticket-sep::before { left: -12px; }
.ticket-sep::after { right: -12px; }
.code-box {
  display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap;
  margin: .5rem auto 1rem;
  padding: .7rem 1rem;
  border: 3px dashed var(--salmon);
  border-radius: 16px;
  max-width: 360px;
}
.code { font: 800 clamp(1.8rem, 9vw, 2.4rem)/1 var(--font-title); letter-spacing: .06em; color: var(--ocean); user-select: all; }
.btn-copy {
  border: 0; border-radius: 999px; padding: .45rem .9rem;
  background: var(--rice); color: var(--ocean);
  font: 700 .85rem var(--font-body); cursor: pointer;
}
.ticket-expiry { margin: 0; font-weight: 700; font-size: 1.05rem; }
.ticket-expiry::first-letter { text-transform: uppercase; }
.ticket-expiry.is-expired { color: var(--error); }
.ticket-rule {
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  margin: .9rem 0 0; padding: .65rem .8rem;
  border-radius: 12px; background: #EEF4EC; color: #33522F;
}
.ticket-rule svg { flex: none; color: var(--shiso); }
.ticket-small { margin: .8rem 0 0; font-size: .8rem; color: rgba(11, 29, 50, 0.7); }
.gain-actions { margin-top: .6rem; }
.gain-actions .btn { margin-top: 1rem; }
.hint { margin: .9rem 0 0; text-align: center; font-size: .85rem; color: rgba(11, 29, 50, 0.75); }
.review {
  margin-top: 2rem; padding: 1.1rem; text-align: center;
  border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.7);
}
.review p { margin: 0; }
.review-link { display: inline-block; margin-top: .6rem; font-weight: 700; }
.review-note { margin-top: .4rem !important; font-size: .75rem; color: rgba(11, 29, 50, 0.6); }

/* ---------- Pied de page ---------- */
.site-footer { padding: 1.2rem 1rem calc(1.4rem + env(safe-area-inset-bottom)); text-align: center; font-size: .8rem; color: rgba(11, 29, 50, 0.7); }
.site-footer nav { display: flex; justify-content: center; gap: 1.2rem; margin-bottom: .4rem; }
.site-footer p { margin: 0; }

.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 50; }

/* ---------- Pages légales ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 1.5rem 1.1rem 3rem; }
.legal h1 { font-size: clamp(1.7rem, 6vw, 2.4rem); margin-bottom: 1rem; }
.legal h2 { font-size: 1.15rem; margin: 1.8rem 0 .5rem; }
.legal mark { background: #FCE8EC; color: var(--error); padding: 0 .2em; border-radius: 4px; }
.legal table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
.legal th, .legal td { padding: .55rem .8rem; border-bottom: 1px solid var(--line); text-align: left; }
.legal th { background: var(--ocean); color: var(--rice); font-family: var(--font-title); }
.back-link { display: inline-block; margin-bottom: 1rem; font-weight: 700; }

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  .hero { padding-bottom: 1.8rem; }
  .hero-logo { width: 150px; }
  .screen { padding-top: 2.6rem; }
  .screen-form { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3.5rem; align-items: center; }
  .wheel-preview { width: 340px; }
  .form { padding: 2rem 2rem 1.6rem; }
  .wheel-main { width: 460px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
