/* Maya : sombre premium, vert sportsbook, chiffres blancs. Mobile-first. */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* La navigation entière repose sur l'attribut hidden : cette règle doit battre
   les display posés plus bas (une règle auteur l'emporte sur celle du navigateur). */
[hidden] { display: none !important; }

:root {
  --fond: #0a1a12;        /* vert-noir profond */
  --surface: #11271a;     /* cartes */
  --surface-2: #173322;   /* éléments surélevés */
  --ligne: #22452f;       /* bordures discrètes */
  --vert: #3eb14b;        /* accent Unibet : actions */
  --sur-vert: #05130a;    /* texte posé sur le vert */
  --texte: #eaf4ed;
  --texte-2: #8fb39d;
  --or: #f0c33c;          /* réservé au Maya et au trône des stats */
  --rouge: #e5484d;       /* réservé au duel et au perdant */
  --orange: #ff8a4a;      /* relance, bien distinct de l'or du Maya */
}

html { font-size: 17px; }
body {
  background: var(--fond);
  color: var(--texte);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh;
  overscroll-behavior: none;
  user-select: none;
}
body.busy { pointer-events: none; }
body.busy .btn { opacity: .55; }
/* La modale de confirmation doit rester cliquable même sous busy,
   sinon confirmer() ne se résout jamais et l'app gèle. */
body.busy .modale { pointer-events: auto; }
body.busy .modale .btn { opacity: 1; }
/* Les habillages plein écran s'écourtent d'un tap : ils s'affichent toujours
   sous busy, ils doivent donc rester cliquables. */
body.busy #overlay-special, body.busy #overlay-duel-intro { pointer-events: auto; }
/* L'écran duel teinte tout le fond, pas seulement la colonne de 480px. */
body[data-ecran="ecran-duel"] { background: linear-gradient(180deg, #150808, #1d0b0d); }

main > section {
  min-height: 100dvh;
  padding: max(1.4rem, env(safe-area-inset-top)) 1.3rem calc(1.4rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-width: 480px;
  margin: 0 auto;
}
.centre {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.3rem;
  text-align: center;
}

h2 { font-size: 1.35rem; font-weight: 800; text-align: center; letter-spacing: -.01em; }
h3 {
  font-size: .8rem; font-weight: 700; color: var(--texte-2);
  text-transform: uppercase; letter-spacing: .1em; margin-top: .4rem;
}
small { display: block; font-weight: 500; font-size: .78rem; opacity: .8; margin-top: .35rem; }
:focus-visible { outline: 2px solid var(--vert); outline-offset: 2px; }

/* ---------- Boutons ---------- */
.btn {
  border: none;
  border-radius: 12px;
  padding: 1rem 1.3rem;
  font-size: 1.08rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--texte);
  background: var(--surface-2);
  cursor: pointer;
  width: 100%;
  transition: transform .12s, filter .12s;
}
.btn:active { transform: scale(.98); filter: brightness(1.1); }
.btn:disabled { opacity: .35; }
.btn-large { padding: 1.15rem; font-size: 1.18rem; }
.btn-primaire { background: var(--vert); color: var(--sur-vert); box-shadow: 0 8px 28px rgba(62, 177, 75, .22); }
.btn-secondaire { background: transparent; border: 1px solid var(--ligne); }
.btn-discret { background: transparent; color: var(--texte-2); font-weight: 600; }
.btn-valide { background: var(--vert); color: var(--sur-vert); }
.btn-relance { background: var(--fond); border: 1px solid var(--orange); color: var(--orange); }
.btn-duel { background: var(--rouge); color: #fff; font-weight: 800; }
.btn-icone {
  background: none; border: none; color: var(--texte);
  font-size: 1.2rem; padding: .4rem .6rem; cursor: pointer; width: auto;
  transition: transform .12s, color .12s;
}
.btn-icone:active { color: var(--vert); transform: scale(.88); }
#btn-muet {
  font-size: .72rem; font-weight: 700; color: var(--texte-2);
  text-transform: uppercase; letter-spacing: .08em;
}

/* ---------- Accueil ---------- */
.titre-jeu {
  font-size: 4.6rem;
  font-weight: 900;
  letter-spacing: .02em;
  color: #fff;
  line-height: 1;
}
.titre-jeu::after {
  content: '';
  display: block;
  width: 2.2rem; height: .28rem;
  background: var(--vert);
  border-radius: 2px;
  margin: .55rem auto 0;
}
.sous-titre {
  color: var(--texte-2);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
}
.des-deco { display: flex; gap: .9rem; padding: .6rem 0; }
.des-deco .de { width: 58px; height: 58px; border-radius: 12px; padding: 9px; }
.des-deco .de:first-child { transform: rotate(-7deg); }
.des-deco .de:last-child { transform: rotate(6deg); }
.mentions { font-size: .68rem; color: var(--texte-2); text-align: center; opacity: .75; }

/* ---------- Compte ---------- */
#form-compte { display: flex; flex-direction: column; gap: .7rem; width: 100%; max-width: 320px; }
.ligne-compte { text-align: center; font-size: .8rem; color: var(--texte-2); }
.ligne-compte button {
  background: none; border: none; color: var(--texte-2); font: inherit;
  text-decoration: underline; cursor: pointer; padding: .2rem;
}

/* ---------- Création ---------- */
.note-remplacement {
  text-align: center; color: var(--texte-2); font-size: .85rem;
  border: 1px solid var(--ligne); border-radius: 10px; padding: .55rem .8rem;
}
.chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.chip {
  background: transparent; color: var(--texte);
  border: 1px solid var(--ligne); border-radius: 999px;
  padding: .5rem 1rem; font-size: .95rem; font-weight: 600;
  font-family: inherit; cursor: pointer;
}
.chip:active { border-color: var(--vert); color: var(--vert); }
#form-ajout { display: flex; gap: .5rem; }
#form-ajout input, #form-compte input {
  flex: 1; border: 1px solid var(--ligne); border-radius: 12px;
  background: var(--surface); color: var(--texte);
  padding: .85rem 1rem; font-size: 1.05rem; font-family: inherit;
}
#form-ajout input:focus, #form-compte input:focus { outline: none; border-color: var(--vert); }
#form-ajout .btn { width: auto; padding: .85rem 1rem; font-size: .95rem; }
.liste-joueurs { list-style: none; display: flex; flex-direction: column; gap: .45rem; }
.liste-joueurs li {
  display: flex; align-items: center; gap: .7rem;
  background: var(--surface); border: 1px solid var(--ligne);
  border-radius: 12px; padding: .65rem .9rem;
}
.liste-joueurs .nom { flex: 1; font-weight: 700; font-size: 1.08rem; }
.liste-joueurs .btn-icone { color: var(--texte-2); }
.pastille { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.compteur {
  text-align: center; color: var(--texte-2);
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
}
.choix-mode { display: flex; gap: .5rem; }
.btn-mode {
  flex: 1; display: flex; flex-direction: column; gap: .2rem;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: 12px;
  padding: .7rem .6rem; font-family: inherit; cursor: pointer;
}
.btn-mode .mode-nom { font-weight: 800; font-size: 1rem; color: var(--texte); }
.btn-mode .mode-desc { font-size: .74rem; color: var(--texte-2); }
.btn-mode.actif { border-color: var(--vert); background: var(--surface-2); }
.btn-mode.actif .mode-nom { color: var(--vert); }
#btn-mode-hardcore.actif { border-color: var(--rouge); }
#btn-mode-hardcore.actif .mode-nom { color: var(--rouge); }

/* ---------- Passage ---------- */
#ecran-passage .point-joueur {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--joueur, var(--vert));
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--joueur, var(--vert)) 25%, transparent),
              0 0 42px color-mix(in srgb, var(--joueur, var(--vert)) 55%, transparent);
}
.passe-label {
  font-size: .82rem; color: var(--texte-2); font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em;
}
.prenom-geant {
  font-size: 3.4rem; font-weight: 900; color: #fff;
  line-height: 1.05; word-break: break-word; text-wrap: balance;
}
.info-tour { color: var(--texte-2); text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- Lancer ---------- */
.entete-lancer { display: flex; align-items: center; gap: .8rem; }
.badge-joueur {
  color: #05130a; font-weight: 800; font-size: 1.05rem;
  padding: .38rem .95rem; border-radius: 999px; flex: 0 1 auto;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0; max-width: 55%;
}
#lancer-compteur {
  flex: 1; text-align: right; color: var(--texte-2);
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
}
.badge-premier {
  border: 1px solid var(--ligne); color: var(--texte-2);
  border-radius: 10px; padding: .5rem .8rem; text-align: center;
  font-size: .82rem; font-weight: 600;
}

/* Barre d'état du tour : le pot et le jet le plus bas, lisibles d'un coup d'œil. */
.barre-infos { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .6rem; }
.carte-info {
  background: var(--surface); border: 1px solid var(--ligne);
  border-radius: 12px; padding: .6rem .8rem;
  display: flex; flex-direction: column; gap: .1rem;
  text-align: center; min-width: 0;
}
.carte-info-label {
  font-size: .66rem; font-weight: 700; color: var(--texte-2);
  text-transform: uppercase; letter-spacing: .12em;
}
.carte-info-valeur {
  font-size: clamp(.95rem, 5.5vw, 1.2rem); font-weight: 900; color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.carte-info-detail {
  font-size: .74rem; color: var(--texte-2); font-variant-numeric: tabular-nums;
}
.carte-plus-bas { border-color: #5c2226; }
.carte-plus-bas .carte-info-label { color: #e08a8f; }
.carte-plus-bas .carte-info-valeur { color: var(--rouge); }

/* Les dés occupent le cœur de l'écran. Tap sur les dés = lancer. */
.zone-des {
  flex: 1; min-height: 200px;
  display: flex; justify-content: center; align-items: center;
  gap: clamp(1.1rem, 6vw, 1.9rem); padding: 1rem 0;
}
.zone-des.tappable { cursor: pointer; }
.zone-des.tappable:active .de3d { transform: scale(.96); }

/* Dé plat : conservé pour les mini-dés décoratifs de l'accueil. */
.de {
  background: linear-gradient(150deg, #ffffff 0%, #eef4ef 55%, #dbe6de 100%);
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  grid-template-areas: "a . c" "e g f" "d . b";
  padding: 14%;
}

/* Dé 3D : un cube à 6 faces qui roule vraiment. */
.de3d {
  --cote: clamp(112px, 36vw, 164px);
  width: var(--cote); height: var(--cote);
  perspective: calc(var(--cote) * 4.2);
  transition: transform .12s;
}
.de3d.vide {
  border: 1px dashed var(--ligne);
  border-radius: 20px;
  background: var(--surface);
}
.de3d.vide .cube { display: none; }
.cube {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
}
.face {
  position: absolute; inset: 0;
  background: linear-gradient(150deg, #ffffff 0%, #eef4ef 55%, #d5e2d9 100%);
  border-radius: 16%;
  box-shadow: inset 0 0 0 1px rgba(10, 26, 18, .08),
              inset 0 -6% 10% rgba(10, 26, 18, .12);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  grid-template-areas: "a . c" "e g f" "d . b";
  padding: 12%;
}
/* Faces opposées à somme 7, comme un vrai dé. */
.face-avant   { transform: rotateY(0deg)   translateZ(calc(var(--cote) / 2)); }
.face-arriere { transform: rotateY(180deg) translateZ(calc(var(--cote) / 2)); }
.face-droite  { transform: rotateY(90deg)  translateZ(calc(var(--cote) / 2)); }
.face-gauche  { transform: rotateY(-90deg) translateZ(calc(var(--cote) / 2)); }
.face-haut    { transform: rotateX(90deg)  translateZ(calc(var(--cote) / 2)); }
.face-bas     { transform: rotateX(-90deg) translateZ(calc(var(--cote) / 2)); }

/* Roulis libre : rotation continue dès le tap, en attendant la réponse du
   serveur. L'animation bat le transform inline ; la retirer rend la main à la
   transition d'atterrissage, coupure invisible à pleine vitesse. Les variables
   --rx0/--ry0 (posées par le JS) font partir le roulis de la face affichée,
   sans saut vers la face 1. */
.cube.roule-libre { animation: roule-libre .5s linear infinite; }
@keyframes roule-libre {
  from { transform: rotateX(var(--rx0, 0deg)) rotateY(var(--ry0, 0deg)); }
  to { transform: rotateX(calc(var(--rx0, 0deg) - 360deg)) rotateY(calc(var(--ry0, 0deg) - 360deg)); }
}

/* Le saut du dé pendant le roulis. */
.de3d.saute { animation: saute-de 1.15s cubic-bezier(.3, .6, .4, 1); }
.de3d.saute-inverse { animation-delay: .06s; }
@keyframes saute-de {
  0% { transform: translateY(0) scale(1); }
  28% { transform: translateY(calc(var(--cote) / -3)) scale(1.06); }
  55% { transform: translateY(0) scale(1); }
  72% { transform: translateY(calc(var(--cote) / -9)); }
  86% { transform: translateY(0); }
  94% { transform: translateY(calc(var(--cote) / -22)); }
  100% { transform: translateY(0); }
}

/* Points : ~16 % de la face, comme un vrai dé, avec un creux marqué. */
.point {
  width: 74%; aspect-ratio: 1;
  background: radial-gradient(circle at 32% 30%, #3a5f45 8%, #14291b 55%, #081711 100%);
  border-radius: 50%; align-self: center; justify-self: center;
  box-shadow: inset 0 4px 7px rgba(0, 0, 0, .6),
              0 1px 0 rgba(255, 255, 255, .65);
}
.cube-duel .face { background: linear-gradient(150deg, #fff3f3 0%, #f3dede 55%, #e4c8c8 100%); }
.cube-duel .point {
  background: radial-gradient(circle at 32% 30%, #b0484d 8%, #5e181c 55%, #3d0d10 100%);
}

/* Boutons d'action ancrés en bas : Relancer à gauche, Garder à droite.
   Le voile dégradé couvre le contenu qui défile dessous. */
.actions-fixes {
  margin-top: auto;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .7rem;
  position: sticky; bottom: 0;
  margin-inline: -1.3rem;
  padding: .8rem 1.3rem calc(.5rem + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--fond) 35%);
}
.hint-lancer {
  text-align: center; color: var(--texte-2); font-size: .8rem;
  min-height: 1.15rem; font-variant-numeric: tabular-nums;
}

/* rebond reste utilisé par le VS de l'intro de duel. */
@keyframes rebond { 0% { transform: scale(1.18); } 100% { transform: scale(1); } }

.libelle-jet {
  text-align: center; font-size: 1.9rem; font-weight: 900; color: #fff;
  min-height: 2.3rem; letter-spacing: .01em; font-variant-numeric: tabular-nums;
}
.jets-du-tour { color: var(--texte-2); font-size: .92rem; }
.jets-du-tour summary { cursor: pointer; padding: .4rem 0; }
.jets-du-tour li {
  list-style: none; padding: .35rem 0;
  display: flex; justify-content: space-between;
  border-bottom: 1px solid var(--ligne);
  font-variant-numeric: tabular-nums;
}

/* ---------- Habillages plein écran ---------- */
#overlay-special {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1.1rem;
  text-align: center; padding: 2rem;
  overflow: hidden; cursor: pointer;
}
/* Halo coloré posé SUR un fond quasi opaque : sans lui, les gros dés 3D de
   l'écran de jeu restent visibles au centre et brouillent l'annonce. */
#overlay-special.special-maya {
  background: radial-gradient(circle at 50% 42%, rgba(240, 195, 60, .28), transparent 62%),
              rgba(6, 14, 9, .985);
  color: var(--or);
}
#overlay-special.special-double {
  background: radial-gradient(circle at 50% 42%, rgba(62, 177, 75, .24), transparent 62%),
              rgba(6, 14, 9, .985);
  color: #fff;
}
/* Rayons dorés en rotation lente derrière l'annonce du Maya. Carré 120vmax
   centré : assez grand pour la rotation (le masque fond les bords), sans payer
   une couche GPU de 220 % du viewport au moment le plus chargé (confettis). */
#overlay-special.special-maya::before {
  content: ''; position: absolute; left: 50%; top: 50%; pointer-events: none;
  width: 120vmax; height: 120vmax; margin: -60vmax 0 0 -60vmax;
  background: repeating-conic-gradient(from 0deg,
    rgba(240, 195, 60, .13) 0deg 10deg, transparent 10deg 30deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  animation: rayons 16s linear infinite;
}
@keyframes rayons { to { transform: rotate(360deg); } }

/* Onde de choc : deux cercles qui s'étendent depuis le centre de l'annonce. */
#overlay-special .onde {
  position: absolute; top: 45%; left: 50%;
  width: 13rem; height: 13rem; margin: -6.5rem 0 0 -6.5rem;
  border: 2px solid; border-radius: 50%; pointer-events: none;
  opacity: 0; animation: onde .9s ease-out;
}
#overlay-special .onde-2 { animation-delay: .18s; }
#overlay-special.special-maya .onde { border-color: var(--or); }
#overlay-special.special-double .onde { border-color: var(--vert); }
@keyframes onde {
  0% { transform: scale(.2); opacity: .85; }
  100% { transform: scale(2.7); opacity: 0; }
}

/* Le jet affiché en vrais dés, qui tombent l'un après l'autre. */
.overlay-des { display: flex; gap: .85rem; }
.overlay-des .de {
  width: 72px; height: 72px; border-radius: 15px; padding: 11px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
  animation: de-annonce .55s cubic-bezier(.2, 1.5, .4, 1) both;
}
.overlay-des .de:first-child { transform: rotate(-8deg); animation-delay: .05s; }
.overlay-des .de:last-child { transform: rotate(7deg); animation-delay: .14s; }
@keyframes de-annonce {
  from { transform: translateY(-46px) scale(.3); opacity: 0; }
}
/* Dés dorés pour le Maya. */
.special-maya .overlay-des .de {
  background: linear-gradient(150deg, #fff6dc 0%, #f7e2a4 55%, #e9cd79 100%);
}
.special-maya .overlay-des .point {
  background: radial-gradient(circle at 32% 30%, #8a6414 8%, #4c360a 55%, #2e2004 100%);
}

#overlay-texte {
  font-size: clamp(2.6rem, 17vw, 4.4rem); font-weight: 900; letter-spacing: .01em;
  animation: surgit .45s cubic-bezier(.2, 1.6, .4, 1);
}
.special-maya #overlay-texte {
  background: linear-gradient(180deg, #ffeaa6 8%, var(--or) 55%, #c98f1b 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 20px rgba(240, 195, 60, .45));
}
.special-double #overlay-texte { text-shadow: 0 0 30px rgba(62, 177, 75, .6); }
#overlay-sous-texte {
  font-size: .98rem; font-weight: 700; color: var(--texte);
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(0, 0, 0, .35);
  border-radius: 999px; padding: .55rem 1.15rem;
  max-width: 30ch; text-wrap: balance;
  animation: apparait .4s .22s both;
}
.overlay-passer {
  position: absolute; bottom: calc(1.6rem + env(safe-area-inset-bottom));
  color: var(--texte-2); font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em; opacity: .7;
}
@keyframes surgit { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.secousse { animation: secousse .4s; }
@keyframes secousse {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-5px, 2px); }
  40% { transform: translate(5px, -2px); }
  60% { transform: translate(-4px, -2px); }
  80% { transform: translate(4px, 2px); }
}

canvas#confettis { position: fixed; inset: 0; z-index: 60; pointer-events: none; }

/* ---------- Duel ---------- */
#ecran-duel { background: linear-gradient(180deg, #150808, #1d0b0d); }
.titre-duel { color: var(--rouge); letter-spacing: .04em; }
.rappel-duel { text-align: center; color: #c99a9c; font-size: .88rem; max-width: 34ch; margin: 0 auto; text-wrap: balance; }
.duel-tableau { list-style: none; display: flex; flex-direction: column; gap: .45rem; }
.duel-tableau li {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(0, 0, 0, .35); border: 1px solid #4a191c;
  border-radius: 12px; padding: .7rem 1rem;
}
.duel-tableau .nom { font-weight: 800; font-size: 1.1rem; }
.duel-resultat { font-weight: 900; font-size: 1.15rem; color: #fff; font-variant-numeric: tabular-nums; }
#ecran-duel .prenom-geant { font-size: 2.7rem; }
#ecran-duel .passe-label { color: #c99a9c; }

#overlay-duel-intro {
  position: fixed; inset: 0; z-index: 55; background: #0c0405;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1.6rem;
  text-align: center; padding: 1.5rem;
}
#intro-egalite {
  font-size: .95rem; font-weight: 800; color: var(--rouge);
  text-transform: uppercase; letter-spacing: .3em;
  animation: clignote .6s step-end infinite;
}
@keyframes clignote { 50% { opacity: .25; } }
#intro-titre { font-size: 3.1rem; font-weight: 900; color: #fff; letter-spacing: .1em; }
#intro-vs { display: flex; align-items: center; gap: 1.1rem; font-size: 1.3rem; font-weight: 800; flex-wrap: wrap; justify-content: center; }
#intro-gauche { color: #fff; animation: glisse-gauche .6s cubic-bezier(.2, 1.4, .4, 1); }
#intro-droite { color: #fff; animation: glisse-droite .6s cubic-bezier(.2, 1.4, .4, 1); }
.vs { color: var(--rouge); font-size: 2rem; font-weight: 900; animation: rebond 1.1s cubic-bezier(.2, 2.2, .4, 1) infinite; }
@keyframes glisse-gauche { 0% { transform: translateX(-80vw); } }
@keyframes glisse-droite { 0% { transform: translateX(80vw); } }
.intro-passer {
  color: #a18a8c; font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  position: absolute; bottom: 2.2rem;
}

/* ---------- Récap ---------- */
.suspense-texte { font-size: 1.6rem; font-weight: 800; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(1.04); } }
.annonce-perdant {
  text-align: center; font-size: 1.55rem; font-weight: 900; color: #fff;
  animation: surgit .5s cubic-bezier(.2, 1.6, .4, 1);
  word-break: break-word; text-wrap: balance;
}
.classement { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.classement li {
  display: flex; justify-content: space-between; gap: .8rem;
  background: var(--surface); border: 1px solid var(--ligne);
  border-radius: 10px; padding: .65rem .95rem;
  font-variant-numeric: tabular-nums;
}
.classement li.perdant { background: #33151a; border-color: var(--rouge); font-weight: 800; }
.classement li.via-duel { background: transparent; border: none; color: var(--texte-2); justify-content: center; font-size: .88rem; }
.detail-boissons {
  list-style: none; background: var(--surface); border: 1px solid var(--ligne);
  border-radius: 12px; padding: .85rem 1rem;
  font-variant-numeric: tabular-nums;
}
.detail-boissons li { padding: .28rem 0; animation: apparait .4s both; }
.detail-boissons li:nth-child(2) { animation-delay: .15s; }
.detail-boissons li:nth-child(3) { animation-delay: .3s; }
.detail-boissons li:nth-child(4) { animation-delay: .45s; }
.detail-boissons li:nth-child(5) { animation-delay: .6s; }
@keyframes apparait { 0% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; } }
.detail-boissons .barre { text-decoration: line-through; opacity: .55; }
.detail-boissons .fort { font-weight: 900; font-size: 1.12rem; color: #fff; animation: tremble .3s .5s both; }
@keyframes tremble {
  0% { transform: scale(1.3); }
  60% { transform: scale(.96) rotate(-1deg); }
  100% { transform: scale(1); }
}
.pique { text-align: center; color: var(--texte-2); font-style: italic; font-size: .92rem; }
#recap-contenu { display: flex; flex-direction: column; gap: 1.1rem; }

/* ---------- Stats ---------- */
#stats-cartes { display: flex; flex-direction: column; gap: .5rem; }
.carte-stat {
  background: var(--surface); border: 1px solid var(--ligne);
  border-radius: 12px; padding: .85rem 1rem;
}
.carte-stat.eponge { border-color: var(--or); }
.carte-stat.eponge h4 { color: var(--or); }
.carte-stat h4 { font-size: 1.1rem; font-weight: 800; margin-bottom: .25rem; }
.carte-stat p { color: var(--texte-2); font-size: .88rem; font-variant-numeric: tabular-nums; }
.liste-soirees { list-style: none; display: flex; flex-direction: column; gap: .45rem; color: var(--texte-2); font-size: .88rem; }
.liste-soirees li {
  background: var(--surface); border: 1px solid var(--ligne);
  border-radius: 10px; padding: .65rem .9rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- Fin ---------- */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: .5rem; padding: 1rem 0 .4rem; }
.marche {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .3rem;
  background: var(--surface); border: 1px solid var(--ligne); border-top-width: 3px;
  border-radius: 10px 10px 0 0; padding: .8rem .5rem; min-width: 30%; text-align: center;
}
.marche .nom {
  font-weight: 800; font-size: .98rem;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.marche .rang { font-size: .72rem; font-weight: 800; color: var(--texte-2); text-transform: uppercase; letter-spacing: .12em; }
.marche .score { font-size: .85rem; color: var(--texte-2); font-variant-numeric: tabular-nums; }
.marche-1 { border-top-color: var(--or); height: 150px; }
.marche-1 .rang { color: var(--or); }
.marche-2 { border-top-color: #aab7ad; height: 116px; }
.marche-3 { border-top-color: #b08a62; height: 92px; }
#fin-liste li { flex-direction: column; gap: .2rem; }
#fin-liste li span:last-child { color: var(--texte-2); font-size: .84rem; }

/* ---------- Modale + toast ---------- */
.modale {
  position: fixed; inset: 0; z-index: 70; background: rgba(4, 10, 7, .78);
  display: flex; justify-content: center; align-items: center; padding: 1.5rem;
}
.modale-boite {
  background: var(--surface-2); border: 1px solid var(--ligne);
  border-radius: 16px; padding: 1.5rem;
  display: flex; flex-direction: column; gap: .9rem; width: 100%; max-width: 380px; text-align: center;
}
/* Le h3 global est un label d'eyebrow : le titre de modale doit dominer son texte. */
.modale-boite h3 {
  font-size: 1.15rem; font-weight: 800; color: var(--texte);
  text-transform: none; letter-spacing: 0; margin-top: 0;
}
#indicateur-hl {
  position: fixed; top: calc(.5rem + env(safe-area-inset-top)); left: 50%;
  transform: translateX(-50%); z-index: 45;
  background: var(--surface-2); border: 1px solid var(--orange); color: var(--orange);
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  padding: .3rem .8rem; border-radius: 999px; white-space: nowrap;
}
#toast {
  position: fixed; bottom: calc(1.5rem + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--ligne); color: var(--texte);
  font-weight: 600; font-size: .95rem;
  border-radius: 999px; padding: .75rem 1.3rem; z-index: 80;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); max-width: 90vw; text-align: center;
}

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