:root {
  --nuit: #0d0802;
  --brun: #1c1306;
  --brun-2: #2c1e08;
  --or: #f5b301;
  --or-clair: #ffe27a;
  --or-pale: #fff3c4;
  --or-fonce: #8a5a00;
  --creme: #fff8e6;
  --rouge: #e3261b;
  --titre: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --texte: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --bord-or: linear-gradient(135deg, #fff1a8, #f5b301 28%, #7d4f00 52%, #ffd75e 76%, #a86b00);
  --fond-panneau: linear-gradient(180deg, rgba(48, 32, 8, .94), rgba(16, 10, 2, .96));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: radial-gradient(120% 80% at 50% 0%, #3a2507 0%, var(--nuit) 60%) fixed, var(--nuit);
  color: var(--creme);
  font-family: var(--texte);
  font-size: 19px;
  line-height: 1.3;
  overflow-x: hidden;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Fond animé ---------- */
.fond { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.rayons {
  position: absolute; left: 50%; top: 38%;
  width: 260vmax; height: 260vmax; translate: -50% -50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 196, 60, .14) 0deg 5deg, transparent 5deg 13deg);
  -webkit-mask: radial-gradient(circle, #000 0 8%, transparent 42%);
          mask: radial-gradient(circle, #000 0 8%, transparent 42%);
  animation: tourne 120s linear infinite;
}
.halo {
  position: absolute; inset: 0;
  background:
    radial-gradient(40% 30% at 50% 36%, rgba(255, 190, 50, .32), transparent 70%),
    radial-gradient(60% 40% at 100% 100%, rgba(255, 170, 30, .18), transparent 70%),
    radial-gradient(50% 40% at 0% 70%, rgba(255, 170, 30, .12), transparent 70%);
}
.pieces img {
  position: absolute; opacity: .85;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55));
  animation: flotte var(--d, 7s) ease-in-out var(--delai, 0s) infinite alternate;
}
.pieces img.flou { filter: blur(3px); opacity: .5; }
@keyframes tourne { to { rotate: 360deg; } }
@keyframes flotte {
  from { transform: translateY(0) rotate(var(--r0, -12deg)); }
  to   { transform: translateY(-26px) rotate(var(--r1, 14deg)); }
}

/* ---------- Carte ---------- */
.carte {
  width: min(100%, 580px);
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(40px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 22px;
}

.titre {
  margin: 4px 0 0;
  font-family: var(--titre); font-weight: 400;
  font-size: clamp(22px, 6.5vw, 44px);
  line-height: 1.05; letter-spacing: 0;
  white-space: nowrap;
  text-transform: uppercase; text-align: center;
  background: linear-gradient(180deg, #fffdf2 0%, #ffeaa6 50%, #f7b733 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #3b2300) drop-shadow(0 8px 14px rgba(0, 0, 0, .6));
}

.panneau {
  position: relative;
  border: 3px solid transparent;
  border-radius: 20px;
  background: var(--fond-panneau) padding-box, var(--bord-or) border-box;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 230, 150, .15);
}

/* Prix */
.prix-panneau { padding: 16px 16px 14px 96px; text-align: center; }
.prix-gros {
  margin: 0;
  font-family: var(--titre);
  font-size: clamp(32px, 9.4vw, 58px);
  line-height: 1; text-transform: uppercase;
  background: linear-gradient(180deg, #fffef7 0%, #ffefb8 55%, #f2b43a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #3b2300);
}
.prix-sous { margin: 6px 0 0; font-weight: 700; font-size: clamp(17px, 4.4vw, 24px); }
.badge-etoile {
  position: absolute; left: -14px; top: -22px;
  width: 112px; height: 112px;
  display: grid; place-items: center;
  rotate: -14deg;
  background: radial-gradient(circle, #ff5a2a, var(--rouge) 60%, #a5120a);
  clip-path: polygon(50.0% 0.0%,58.7% 12.0%,71.7% 5.0%,74.3% 19.5%,89.1% 18.8%,85.1% 33.1%,98.7% 38.9%,89.0% 50.0%,98.7% 61.1%,85.1% 66.9%,89.1% 81.2%,74.3% 80.5%,71.7% 95.0%,58.7% 88.0%,50.0% 100.0%,41.3% 88.0%,28.3% 95.0%,25.7% 80.5%,10.9% 81.2%,14.9% 66.9%,1.3% 61.1%,11.0% 50.0%,1.3% 38.9%,14.9% 33.1%,10.9% 18.8%,25.7% 19.5%,28.3% 5.0%,41.3% 12.0%);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5));
  animation: pulse 2.4s ease-in-out infinite;
}
.badge-etoile span {
  font-family: var(--titre); text-transform: uppercase; text-align: center;
  font-size: 17px; line-height: .98; color: #fff;
  text-shadow: 0 2px 0 #6b0b05;
}
@keyframes pulse { 50% { scale: 1.07; } }

/* Stats */
.stats { display: grid; grid-template-columns: 1fr 1fr; padding: 26px 0 18px; margin-top: 8px; }
.stat { padding: 0 18px; text-align: center; }
.stat + .stat { border-left: 2px solid rgba(245, 179, 1, .25); }
.onglet {
  position: absolute; top: -17px; left: 50%; translate: -50% 0;
  padding: 4px 18px 3px;
  font-family: var(--titre); font-size: 17px; letter-spacing: .03em; text-transform: uppercase;
  color: #fff; text-shadow: 0 2px 0 #6a3d00;
  border-radius: 9px; border: 2px solid #fff1a8;
  background: linear-gradient(180deg, #ffd34d, #f09a00);
  white-space: nowrap;
}
.stat-label { margin: 0; font-weight: 800; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; color: var(--or-clair); }
.stat-val {
  margin: 2px 0 10px;
  font-family: var(--titre); font-size: clamp(34px, 9vw, 46px); line-height: 1.05;
  background: linear-gradient(180deg, #fff6c7, #f5b301);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #3b2300);
}
.barre { height: 14px; border-radius: 99px; background: #0b0702; border: 2px solid #5c3d06; overflow: hidden; }
.barre i {
  display: block; height: 100%; width: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, #fff1a0, #f5b301 60%, #c98400);
  transition: width 1.2s cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Fenêtre / formulaire ---------- */
.fenetre {
  position: relative;
  margin: 18px 0 6px;
  padding: 44px 18px 22px;
  border: 6px solid transparent;
  border-radius: 26px;
  background: linear-gradient(180deg, #170f04, #0b0702) padding-box, var(--bord-or) border-box;
  box-shadow: 0 0 0 2px #3a2504, 0 0 40px rgba(255, 190, 40, .28), 0 18px 40px rgba(0, 0, 0, .6);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.fenetre::after {
  content: ""; position: absolute; left: 50%; bottom: -20px; translate: -50% 0;
  width: 58%; height: 14px;
  background: linear-gradient(180deg, #ffe27a, #b67a00);
  clip-path: polygon(0 0, 100% 0, 92% 100%, 8% 100%);
}
.piece-haut {
  position: absolute; top: -38px; left: 50%; translate: -50% 0;
  width: 70px; height: 70px;
  filter: drop-shadow(0 0 14px rgba(255, 200, 60, .8));
  animation: pulse 2.4s ease-in-out infinite;
}

.modes { display: flex; gap: 6px; margin: 0; padding: 5px; border: 0; border-radius: 99px; background: #050301; box-shadow: inset 0 0 0 2px #4a3005; }
.modes label { cursor: pointer; }
.modes input { position: absolute; opacity: 0; pointer-events: none; }
.modes span {
  display: block; padding: 8px 20px;
  border-radius: 99px;
  font-weight: 800; font-size: 18px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--or-clair);
  transition: background .2s, color .2s;
}
.modes input:checked + span { background: linear-gradient(180deg, #ffe27a, #f5a700); color: #2a1700; box-shadow: 0 2px 0 #8a5a00; }
.modes input:focus-visible + span { outline: 3px solid var(--or-pale); outline-offset: 2px; }

.modes label[hidden] { display: none; }
.creneaux { margin: -2px 0 0; font-size: 15px; font-weight: 600; color: #c9a861; text-align: center; line-height: 1.35; }
.creneaux b { color: var(--or-clair); }
.question { margin-top: 6px; font-weight: 800; font-size: 22px; text-align: center; color: var(--creme); }

.stepper { display: flex; align-items: center; gap: 14px; }
.pas {
  width: 56px; height: 56px; flex: none;
  border-radius: 50%; border: 3px solid #fff1a8;
  background: radial-gradient(circle at 35% 30%, #ffe98a, #f5a700 60%, #b36b00);
  color: #2a1700; font: 400 32px/1 var(--titre);
  cursor: pointer;
  box-shadow: 0 4px 0 #6a3d00, 0 8px 14px rgba(0, 0, 0, .45);
  transition: transform .12s, box-shadow .12s;
}
.pas:active { transform: translateY(3px); box-shadow: 0 1px 0 #6a3d00; }
.pas:focus-visible { outline: 3px solid var(--or-pale); outline-offset: 3px; }
#quantite {
  width: 120px; padding: 4px 0;
  border: 0; border-bottom: 3px solid #6b4a10;
  background: transparent; color: var(--or-clair);
  font: 400 54px/1 var(--titre); text-align: center;
  -moz-appearance: textfield; appearance: textfield;
}
#quantite::-webkit-inner-spin-button, #quantite::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
#quantite:focus { outline: none; border-bottom-color: var(--or); }
.aide { margin: -4px 0 0; font-size: 16px; font-weight: 600; color: #c9a861; }

.total {
  width: 100%;
  margin-top: 4px; padding: 12px 10px 14px;
  border-radius: 16px;
  background: radial-gradient(80% 120% at 50% 0%, rgba(255, 200, 60, .2), transparent 70%), rgba(255, 210, 90, .05);
  border: 2px dashed rgba(245, 179, 1, .45);
  display: flex; flex-direction: column; align-items: center;
}
.total-label { font-weight: 800; font-size: 16px; letter-spacing: .18em; text-transform: uppercase; color: var(--or-clair); }
#total {
  font-family: var(--titre); font-size: clamp(52px, 15vw, 72px); line-height: 1.05;
  background: linear-gradient(180deg, #fffdf2, #ffe08a 50%, #f5a700);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 #3b2300) drop-shadow(0 0 18px rgba(255, 190, 40, .35));
}
#total.bump { animation: bump .32s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 40% { scale: 1.14; } }
.total-detail { font-weight: 600; font-size: 17px; color: #e6cf98; }

.champs { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.champ { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.champ-large { grid-column: 1 / -1; }
.champ > span { font-weight: 800; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--or-clair); }
.champ em { font-style: normal; font-weight: 600; color: #b8975a; text-transform: none; letter-spacing: 0; }
.champ input, .champ textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px; border: 2px solid #5c3d06;
  background: #070401; color: var(--creme);
  font: 600 19px/1.2 var(--texte);
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
.champ input::placeholder, .champ textarea::placeholder { color: #75613c; }
.champ input:focus, .champ textarea:focus { outline: none; border-color: var(--or); box-shadow: 0 0 0 4px rgba(245, 179, 1, .2); }
.champ .invalide { border-color: #ff5a3c; box-shadow: 0 0 0 4px rgba(255, 90, 60, .2); }

.erreur { margin: 0; min-height: 0; font-weight: 700; font-size: 18px; color: #ff7b5c; text-align: center; }
.erreur:empty { display: none; }
.erreur a { display: inline-block; margin-top: 6px; color: var(--or-clair); text-decoration: underline; }
.indice { font-size: 14px; font-weight: 600; color: #a98a52; line-height: 1.15; }

/* Étapes */
.etapes { padding: 16px 20px 18px; }
.etapes h2 {
  margin: 0 0 10px; text-align: center;
  font-family: var(--titre); font-weight: 400; font-size: clamp(26px, 7vw, 36px); text-transform: uppercase;
  background: linear-gradient(180deg, #fff6c7, #f5b301);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #3b2300);
}
.etapes ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.etapes li { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 21px; }
.etapes li::before { content: ""; width: 28px; height: 28px; flex: none; background: url(jeton.svg) center / contain no-repeat; }
.etapes b { color: var(--or-clair); }

/* ---------- Bouton principal ---------- */
.cta-zone { position: relative; padding-bottom: 14px; }
.cta {
  position: relative; overflow: hidden;
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 16px 20px 14px;
  border-radius: 99px; border: 3px solid #fff3b0;
  background: linear-gradient(180deg, #ffe98a 0%, #f7b400 48%, #d98a00 52%, #f5a700 100%);
  color: #fff;
  font: 400 clamp(26px, 7.4vw, 38px)/1 var(--titre); text-transform: uppercase; letter-spacing: .01em;
  text-shadow: 0 3px 0 #6a3d00, 0 0 10px rgba(106, 61, 0, .5);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 0 #7a4800, 0 14px 30px rgba(255, 170, 20, .35);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.cta::after {
  content: ""; position: absolute; top: -20%; left: -40%;
  width: 30%; height: 140%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent);
  transform: skewX(-20deg);
  animation: reflet 3.2s ease-in-out infinite;
}
@keyframes reflet { 0%, 55% { left: -40%; } 100% { left: 130%; } }
.cta:hover { transform: translateY(-2px); filter: brightness(1.06); }
.cta:active { transform: translateY(4px); box-shadow: 0 2px 0 #7a4800, 0 8px 18px rgba(255, 170, 20, .3); }
.cta:focus-visible { outline: 4px solid var(--or-pale); outline-offset: 4px; }
.cta[disabled] { cursor: wait; filter: saturate(.6) brightness(.9); }
.cta .fl { font-size: .8em; }
.places {
  position: absolute; right: -6px; bottom: -6px;
  padding: 6px 14px 5px;
  rotate: -7deg;
  border-radius: 8px; border: 2px solid #fff;
  background: linear-gradient(180deg, #ff4a32, #c8150c);
  color: #fff; font: 400 16px/1 var(--titre); text-transform: uppercase; letter-spacing: .03em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .5);
}

/* ---------- Confirmation ---------- */
.confirm {
  width: min(calc(100% - 32px), 470px);
  max-height: calc(100dvh - 48px);
  margin: auto; padding: 22px 20px 20px;
  overflow: auto;
  color: var(--creme);
  border: 5px solid transparent; border-radius: 24px;
  background: linear-gradient(180deg, #23180a, #0b0702) padding-box, var(--bord-or) border-box;
  box-shadow: 0 0 60px rgba(255, 190, 40, .35);
  text-align: center;
}
.confirm::backdrop { background: rgba(5, 3, 0, .78); backdrop-filter: blur(4px); }
.confirm[open] { animation: entree .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes entree { from { opacity: 0; scale: .85; } }
.confirm .piece-haut { position: static; translate: none; display: block; margin: 0 auto 6px; }
.confirm-titre {
  margin: 0; font-family: var(--titre); font-weight: 400; font-size: 40px; text-transform: uppercase;
  background: linear-gradient(180deg, #fffdf2, #f5b301);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #3b2300);
}
.confirm-num { margin: 2px 0 12px; font-weight: 700; font-size: 20px; }
.confirm-num b { color: var(--or-clair); letter-spacing: .06em; }
.recap {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 14px;
  background: rgba(255, 210, 90, .08); border: 2px solid rgba(245, 179, 1, .4);
  font-weight: 700; font-size: 19px;
}
.recap strong { font: 400 30px/1 var(--titre); color: var(--or-clair); }
.confirm h3 { margin: 18px 0 8px; font-family: var(--titre); font-weight: 400; font-size: 22px; text-transform: uppercase; color: var(--or-clair); text-align: left; }
.moyen { text-align: left; padding: 10px 12px; margin-bottom: 8px; border-radius: 14px; background: #070401; border: 2px solid #4a3005; }
.moyen-titre { margin: 0 0 6px; font-weight: 800; font-size: 18px; }
.moyen-detail { margin: 6px 0 0; font-weight: 600; font-size: 16px; color: #d6bf8c; }
.moyen-detail:empty { display: none; }
.copie { display: flex; gap: 8px; align-items: center; }
.copie button { align-self: center; height: 40px; }
.copie code {
  flex: 1; min-width: 0; padding: 8px 10px;
  border-radius: 10px; background: #1a1206; border: 1px solid #5c3d06;
  font: 600 16px/1.3 ui-monospace, Consolas, monospace; color: var(--or-pale);
  overflow-wrap: anywhere;
}
.copie button {
  flex: none; padding: 0 14px;
  border-radius: 10px; border: 2px solid #fff1a8;
  background: linear-gradient(180deg, #ffe27a, #f5a700);
  color: #2a1700; font: 800 16px var(--texte); text-transform: uppercase;
  cursor: pointer;
}
.copie button.ok { background: linear-gradient(180deg, #b6ff9a, #3cc43a); }
.note { margin: 6px 0 0; font-size: 17px; font-weight: 600; color: #e6cf98; text-align: left; }
.note.petite { font-size: 16px; text-align: center; margin-top: 10px; }
.cta-discord { font-size: clamp(19px, 5.4vw, 24px); padding: 14px 16px 12px; background: linear-gradient(180deg, #8f9bff 0%, #5865f2 50%, #4752c4 100%); border-color: #d3d8ff; text-shadow: 0 2px 0 #2b3190; box-shadow: 0 5px 0 #2b3190, 0 12px 24px rgba(88, 101, 242, .35); }
.fermer { margin-top: 14px; padding: 8px 18px; border: 0; background: none; color: #b8975a; font: 700 17px var(--texte); text-decoration: underline; cursor: pointer; }

/* Pluie de jetons à la confirmation */
.pluie { position: fixed; top: -80px; z-index: 50; width: 44px; pointer-events: none; animation: chute var(--d) cubic-bezier(.3, .1, .6, 1) forwards; }
@keyframes chute { to { transform: translateY(calc(100dvh + 160px)) rotate(var(--r)); } }

/* ---------- Petits écrans ---------- */
@media (max-width: 420px) {
  body { font-size: 18px; }
  .prix-panneau { padding-left: 78px; }
  .badge-etoile { width: 96px; height: 96px; left: -10px; }
  .badge-etoile span { font-size: 14px; }
  .champs { grid-template-columns: 1fr; }
  .stat { padding: 0 10px; }
  .places { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
