/* ═══════════════════════════════════════════════════════════════════════════
   L'ORACLE D'HAROUN

   Principe de mise en page : TOUT vit dans une scène de 1920 × 1080 unités de
   dessin, mise à l'échelle d'un seul bloc pour tenir dans la fenêtre. Les tailles
   sont donc écrites en pixels de dessin, jamais en vw/vh, et la grille de la scène
   réserve une place à chaque panneau. Réduire la fenêtre rétrécit le jeu entier
   à l'identique — c'est la seule façon de garantir que rien ne se chevauche.

   Couleurs reprises du thème de kalexex.com.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Playfair Display, auto-hébergée (OFL — cf. /fonts/OFL-playfair.txt).
   Le site n'appelle JAMAIS Google Fonts : le <link> vers fonts.googleapis.com du
   projet d'origine est supprimé. Inter, la police du site, est déjà chargée par
   style.css — on ne la redéclare pas ici. */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url('/fonts/playfair-latin-700-900.woff2') format('woff2');
}

:root {
  --bg-dark: #0a0a1a;
  --bg-card: #12122a;
  --bg-card-hover: #1a1a3a;
  --gold: #d4a843;
  --gold-light: #f0d080;
  --purple: #6b2fa0;
  --purple-light: #9b5fd0;
  --bordeaux: #8b1a4a;
  --text: #e8e0d0;
  --text-muted: #9a90a8;
  --text-dim: #6a6078;
  --danger: #e74c3c;
  --success: #2ecc71;
  --turquoise: #47c7c7;
  --border: rgba(212, 168, 67, 0.18);

  --font-title: 'Playfair Display', Georgia, serif;
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #05050c;
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

button { font-family: inherit; color: inherit; cursor: pointer; border: none; background: none; }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ═══════════════════════════════════════════════════════════ la scène */

.viewport {
  position: fixed;
  inset: 0;
  /* Sur mobile, `inset: 0` cale la boîte sur le viewport de MISE EN PAGE, qui inclut
     la bande occupée par la barre d'adresse — alors que le script met la scène à
     l'échelle de la hauteur VISIBLE. La scène se retrouvait centrée dans une boîte
     plus haute qu'elle, donc décalée hors de l'écran. `dvh` suit la hauteur
     réellement visible et fait coïncider les deux. */
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.stage {
  /* ⚠ Le centrage ne passe PAS par l'alignement du conteneur.
     `place-items: center` ne centre pas un enfant PLUS GRAND que son conteneur : les
     navigateurs rabattent alors l'alignement sur `start` pour ne pas pousser du
     contenu hors écran par le haut ou par la gauche. Sur un écran de bureau la scène
     de 1920×1080 tient, donc ça se voyait pas ; sur un téléphone elle déborde,
     l'alignement bascule, et la réduction autour du centre projetait tout le jeu dans
     le coin bas-droite. Mesuré à 844×390 : la scène atterrissait à (613, 345) au lieu
     de (75, 0).
     On ancre donc en haut à gauche et c'est le SCRIPT qui pose la translation — il
     connaît la fenêtre, et une translation explicite ne dépend d'aucun alignement. */
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  flex: none;
  transform-origin: 0 0;
  /* L'échelle ET la translation sont posées par le script. */

  display: grid;
  grid-template-columns: 380px 1fr 380px;
  grid-template-rows: 62px 1fr 148px;
  grid-template-areas:
    'brand  brand  brand'
    'gauche board  droite'
    'hud    hud    hud';
}
.stage[hidden] { display: none; }

/* ═══════════════════════════════════════════════════════════════ chargement */

.boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 40%, rgba(107, 47, 160, 0.28), transparent 65%), var(--bg-dark);
  transition: opacity 0.6s ease, visibility 0.6s;
}
.boot--gone { opacity: 0; visibility: hidden; pointer-events: none; }

.boot__inner { text-align: center; padding: 2rem; max-width: 460px; }
.boot__glyph {
  font-size: 3.6rem; color: var(--gold); line-height: 1; margin-bottom: 1rem;
  animation: pulse 2.6s ease-in-out infinite;
  text-shadow: 0 0 30px rgba(212, 168, 67, 0.5);
}
.boot__title {
  font-family: var(--font-title); font-weight: 900;
  font-size: clamp(2rem, 6vw, 3.1rem); margin: 0 0 0.4rem;
  background: linear-gradient(160deg, var(--gold-light), var(--gold) 55%, #a87c28);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.boot__sub { color: var(--text-muted); margin: 0 0 2rem; font-size: 0.95rem; }
.boot__bar { height: 3px; background: rgba(212, 168, 67, 0.12); border-radius: 999px; overflow: hidden; }
.boot__bar i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--purple-light), var(--gold));
  transition: width 0.35s ease;
}
.boot__status {
  margin: 0.9rem 0 0; font-size: 0.78rem; color: var(--text-dim);
  letter-spacing: 0.06em; text-transform: uppercase; min-height: 1.2em;
}

@keyframes pulse {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.07); }
}

/* ═══════════════════════════════════════════════ demande de rotation */

.rotate {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--bg-dark);
  text-align: center;
  padding: 2rem;
}
.rotate[hidden] { display: none; }
.rotate__icone {
  font-size: 4.5rem; color: var(--gold); line-height: 1;
  animation: tourne 2.4s ease-in-out infinite;
}
@keyframes tourne {
  0%, 100% { transform: rotate(0); }
  40%      { transform: rotate(90deg); }
  60%      { transform: rotate(90deg); }
}
.rotate__titre {
  font-family: var(--font-title); font-weight: 700; font-size: 1.4rem;
  color: var(--gold-light); margin: 1.2rem 0 0.4rem;
}
.rotate__texte { color: var(--text-muted); font-size: 0.9rem; margin: 0; max-width: 30ch; }

/* ═══════════════════════════════════════════════════════════════════ décor */

.scenery {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Une couche par ambiance, créée par le script. Seule leur opacité change, sur un
   fondu de trois secondes : personne ne doit pouvoir dire quand ça a basculé. */
.scenery__land {
  position: absolute;
  inset: -8%;
  background-size: cover;
  background-position: center 56%;
  animation: landDrift 46s ease-in-out infinite alternate;
}

@keyframes landDrift {
  0%   { transform: scale(1.05) translate3d(-1.6%, 0.8%, 0); }
  100% { transform: scale(1.12) translate3d(1.6%, -1.1%, 0); }
}

/* ── le soleil ────────────────────────────────────────────────────────────── */

.scenery__sun {
  position: absolute;
  left: 50%; top: 44%;
  width: 1200px; height: 1200px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 214, 130, 0.40) 0%, rgba(212, 168, 67, 0.16) 30%, transparent 60%);
  animation: sunBreathe 6s ease-in-out infinite;
}
@keyframes sunBreathe {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.09); }
}

/* Rayons crépusculaires qui balaient lentement l'horizon. */
.scenery__rayons {
  position: absolute;
  left: 50%; top: 12%;
  width: 2400px; height: 1400px;
  transform-origin: 50% 30%;
  margin-left: -1200px;
  background: repeating-conic-gradient(
    from 200deg at 50% 30%,
    transparent 0deg 5deg,
    rgba(255, 220, 150, 0.055) 5deg 8deg,
    transparent 8deg 15deg
  );
  animation: rayonsTournent 70s linear infinite;
  mix-blend-mode: screen;
}
@keyframes rayonsTournent {
  0%   { transform: rotate(-7deg); opacity: 0.55; }
  50%  { transform: rotate(7deg);  opacity: 1; }
  100% { transform: rotate(-7deg); opacity: 0.55; }
}

/* ── nuages ───────────────────────────────────────────────────────────────── */

.scenery__nuages {
  position: absolute;
  left: -60%; right: -60%; top: 0;
  height: 55%;
  background:
    radial-gradient(ellipse 340px 60px at 12% 30%, rgba(255, 190, 170, 0.14), transparent 70%),
    radial-gradient(ellipse 480px 74px at 38% 52%, rgba(200, 160, 220, 0.13), transparent 72%),
    radial-gradient(ellipse 300px 52px at 62% 24%, rgba(255, 205, 160, 0.12), transparent 70%),
    radial-gradient(ellipse 420px 66px at 84% 44%, rgba(180, 150, 220, 0.12), transparent 72%);
  animation: nuagesGlissent 120s linear infinite;
}
@keyframes nuagesGlissent {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(38%, 0, 0); }
}

/* ── oiseaux ──────────────────────────────────────────────────────────────── */

/* Trois silhouettes qui traversent le cadre de temps en temps. Rien de plus
   vivant qu'un mouvement qu'on n'attendait pas. */
.scenery__oiseaux {
  position: absolute;
  left: -8%; top: 22%;
  width: 90px; height: 26px;
  opacity: 0;
  background:
    radial-gradient(ellipse 11px 2.5px at 10px 6px, rgba(20, 12, 30, 0.55), transparent 70%),
    radial-gradient(ellipse 9px 2px at 44px 14px, rgba(20, 12, 30, 0.5), transparent 70%),
    radial-gradient(ellipse 8px 2px at 74px 4px, rgba(20, 12, 30, 0.45), transparent 70%);
  animation: oiseauxTraversent 34s ease-in-out infinite;
}
@keyframes oiseauxTraversent {
  0%, 72%  { transform: translate3d(0, 0, 0); opacity: 0; }
  76%      { opacity: 0.9; }
  96%      { opacity: 0.9; }
  100%     { transform: translate3d(2100px, -110px, 0); opacity: 0; }
}

/* ── étoiles (nuit) ───────────────────────────────────────────────────────── */

.scenery__etoiles {
  position: absolute;
  inset: 0 0 45% 0;
  opacity: 0;
  transition: opacity 1.8s ease;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 18%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 27% 9%, #cfe0ff, transparent),
    radial-gradient(1.8px 1.8px at 41% 26%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 58% 13%, #e8d0ff, transparent),
    radial-gradient(1.7px 1.7px at 71% 31%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 84% 16%, #cfe0ff, transparent),
    radial-gradient(1.5px 1.5px at 93% 28%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 19% 34%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 49% 38%, #e8d0ff, transparent),
    radial-gradient(1.4px 1.4px at 65% 6%, #fff, transparent);
  animation: etoilesScintillent 5.5s ease-in-out infinite;
}
@keyframes etoilesScintillent {
  0%, 100% { filter: brightness(0.65); }
  50%      { filter: brightness(1.4); }
}

/* ── sable et poussière ───────────────────────────────────────────────────── */

.scenery__sable {
  position: absolute;
  left: -60%; right: -60%; bottom: 0;
  height: 44%;
  background: repeating-linear-gradient(
    100deg,
    transparent 0 130px,
    rgba(240, 208, 128, 0.06) 130px 176px,
    transparent 176px 320px
  );
  animation: sableCourt 16s linear infinite;
}
@keyframes sableCourt {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(320px, 0, 0); }
}

/* Voiles de poussière qui montent en biais, plus lents et plus larges. */
.scenery__poussiere {
  position: absolute;
  left: -30%; right: -30%; bottom: -6%;
  height: 52%;
  background:
    radial-gradient(ellipse 620px 90px at 20% 82%, rgba(240, 208, 128, 0.10), transparent 72%),
    radial-gradient(ellipse 520px 74px at 68% 90%, rgba(212, 168, 67, 0.09), transparent 72%);
  animation: poussiereMonte 27s ease-in-out infinite alternate;
}
@keyframes poussiereMonte {
  0%   { transform: translate3d(-4%, 2%, 0); opacity: 0.55; }
  100% { transform: translate3d(4%, -3%, 0); opacity: 1; }
}

/* ── assombrissement ──────────────────────────────────────────────────────── */

.scenery__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 42% 56% at 50% 46%, rgba(10, 10, 26, 0.74) 0%, rgba(10, 10, 26, 0.3) 58%, transparent 84%),
    linear-gradient(180deg, rgba(10, 10, 26, 0.72) 0%, transparent 14%, transparent 76%, rgba(10, 10, 26, 0.9) 100%);
}

/* ═══════════════════════════════════════════════════════════ bandeau du haut */

.brand {
  grid-area: brand;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 30px;
}
.brand__ankh { color: var(--gold); font-size: 30px; line-height: 1; }
.brand__nom {
  font-family: var(--font-title); font-weight: 700; font-size: 25px;
  color: var(--gold-light); white-space: nowrap;
}
.brand__sep { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }
.brand__rtp { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim); }

/* ═══════════════════════════════════════════════════════════════ colonnes */

.colonne {
  z-index: 4;
  position: relative;
  display: flex;
  flex-direction: column;
  align-content: start;
  gap: 14px;
  padding: 6px 18px 10px;
  min-height: 0;
}
.colonne--gauche { grid-area: gauche; }
.colonne--droite { grid-area: droite; }

.totem {
  padding: 0;
  border: none;
  background: none;
  backdrop-filter: none;
  box-shadow: none;
}

.panneau,
.feed {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(155deg, rgba(18, 18, 42, 0.9), rgba(10, 10, 26, 0.72));
  backdrop-filter: blur(6px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  min-height: 0;
}

.panneau__titre {
  margin: 0 0 9px;
  font-family: var(--font-title); font-weight: 700; font-size: 15px;
  letter-spacing: 0.04em; color: var(--gold-light);
}
.panneau__titre small {
  display: block; margin-top: 2px;
  font-family: var(--font-ui); font-weight: 400; font-size: 10.5px;
  letter-spacing: 0.02em; text-transform: none; color: var(--text-dim);
}
.panneau__vide { margin: 0; font-size: 13px; color: var(--text-dim); font-style: italic; }

/* ── bouton FONCTION ACHETER ──────────────────────────────────────────────── */

/* Le bouton le plus voyant de l'écran après celui du spin : c'est la porte
   d'entrée vers les cinq bonus achetables. */
.acheter {
  position: relative;
  align-self: center;
  width: 236px;
  padding: 14px 10px 11px;
  border-radius: 16px;
  background: linear-gradient(178deg, #3fa03f 0%, #24761f 48%, #14520f 100%);
  box-shadow:
    0 0 0 3px #c9942e,
    0 0 0 5px #6a4a12,
    0 12px 30px rgba(0, 0, 0, 0.6),
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    inset 0 -6px 14px rgba(0, 0, 0, 0.35);
  text-align: center;
  transition: transform 0.14s, filter 0.2s;
}
.acheter::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 13px;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.22) 50%, transparent 62%);
  transform: translateX(-110%);
  animation: acheterBrille 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes acheterBrille {
  0%, 70% { transform: translateX(-110%); }
  100%    { transform: translateX(110%); }
}
.acheter:hover:not(:disabled) { transform: scale(1.035); }
.acheter:active:not(:disabled) { transform: scale(0.985); }
.acheter:disabled { filter: grayscale(0.7) brightness(0.6); cursor: not-allowed; }

.acheter__titre {
  display: block;
  font-family: var(--font-title); font-weight: 900; font-size: 25px; line-height: 1.04;
  color: #ffe9a8;
  text-shadow: 0 2px 0 #4a2d06, 0 0 18px rgba(255, 200, 100, 0.55);
}
.acheter__sous {
  display: block; margin-top: 5px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em;
  color: #ffd98a;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

/* ── fil des derniers gains ───────────────────────────────────────────────── */

.feed { display: flex; flex-direction: column; }
.feed__liste { display: flex; flex-direction: column; gap: 5px; overflow: hidden; }

.gain {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 8px;
  border-left: 3px solid var(--gold);
  background: rgba(10, 10, 26, 0.55);
  font-size: 13px;
  animation: gainEntre 0.45s cubic-bezier(0.2, 1.1, 0.3, 1.1);
}
.gain__glyphe { font-size: 15px; line-height: 1; }
.gain__quoi { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gain__montant { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--gold-light); }
.gain--gros { border-left-color: var(--gold-light); background: rgba(212, 168, 67, 0.12); }
.gain--enorme {
  border-left-color: var(--bordeaux);
  background: linear-gradient(100deg, rgba(139, 26, 74, 0.4), rgba(10, 10, 26, 0.55));
}
.gain--enorme .gain__montant { color: #ffd98a; text-shadow: 0 0 12px rgba(255, 200, 100, 0.6); }

/* ── le dernier gain ──────────────────────────────────────────────────────── */

/* Il est encadré d'or et respire doucement : c'est la ligne qu'on cherche du regard
   en sortant d'un tour, elle ne doit pas se confondre avec les précédentes. */
.gain--dernier {
  position: relative;
  border-left-width: 4px;
  border-left-color: var(--gold-light);
  box-shadow: 0 0 0 1px rgba(240, 208, 128, 0.55), 0 0 20px rgba(212, 168, 67, 0.35);
  background: linear-gradient(100deg, rgba(212, 168, 67, 0.2), rgba(10, 10, 26, 0.6));
  animation: gainEntre 0.45s cubic-bezier(0.2, 1.1, 0.3, 1.1), dernierRespire 2.6s ease-in-out 0.45s infinite;
}
.gain--dernier .gain__quoi { color: var(--text); }
.gain--dernier .gain__montant {
  color: #fff6dc;
  text-shadow: 0 0 14px rgba(255, 214, 130, 0.8), 0 1px 0 rgba(0, 0, 0, 0.6);
}

/* Petit chevron d'or à gauche, qui pointe la ligne active. */
.gain--dernier::before {
  content: '▸';
  position: absolute;
  left: -13px;
  color: var(--gold-light);
  font-size: 13px;
  text-shadow: 0 0 8px rgba(212, 168, 67, 0.9);
}

@keyframes dernierRespire {
  0%, 100% { box-shadow: 0 0 0 1px rgba(240, 208, 128, 0.45), 0 0 16px rgba(212, 168, 67, 0.25); }
  50%      { box-shadow: 0 0 0 1px rgba(240, 208, 128, 0.75), 0 0 26px rgba(212, 168, 67, 0.5); }
}

@keyframes gainEntre {
  0%   { opacity: 0; transform: translateX(-16px); }
  100% { opacity: 1; transform: none; }
}

/* ── Haroun ───────────────────────────────────────────────────────────────── */

.haroun {
  position: absolute;
  left: -26px;
  bottom: -14px;
  width: 356px;
  pointer-events: none;
  z-index: 5;
  opacity: 0.62;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2), filter 0.5s ease;
  filter: drop-shadow(0 12px 34px rgba(0, 0, 0, 0.7)) saturate(0.8);
}
.haroun img, .haroun__canvas { width: 100%; height: auto; display: block; }
.haroun--anime img { display: none; }

.haroun--in { opacity: 1; transform: translateY(-4px) scale(1.02); }
.haroun--in.haroun--calme      { filter: drop-shadow(0 12px 40px rgba(107, 47, 160, 0.5)) saturate(1.05); }
.haroun--in.haroun--chaud      { filter: drop-shadow(0 12px 46px rgba(212, 168, 67, 0.65)) saturate(1.25) brightness(1.08); }
.haroun--in.haroun--exalte     { filter: drop-shadow(0 14px 56px rgba(240, 208, 128, 0.9)) saturate(1.45) brightness(1.16); }
.haroun--in.haroun--froid      { filter: drop-shadow(0 10px 34px rgba(40, 60, 120, 0.6)) saturate(0.5) brightness(0.85); }
.haroun--in.haroun--electrique { filter: drop-shadow(0 12px 48px rgba(155, 95, 208, 0.85)) saturate(1.3) contrast(1.1); }

.haroun__bubble {
  position: absolute;
  left: 76%;
  bottom: 62%;
  width: max-content;
  max-width: 420px;
  padding: 13px 16px;
  border-radius: 16px 16px 16px 4px;
  border: 1px solid rgba(212, 168, 67, 0.4);
  background: linear-gradient(150deg, rgba(28, 28, 62, 0.97), rgba(16, 16, 38, 0.97));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.7);
  font-size: 16px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(10px) scale(0.94);
  transform-origin: 0 100%;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.haroun__bubble--in { opacity: 1; transform: none; }

/* ═══════════════════════════════════════════════════════ totem des cagnottes */

.totem__liste { display: grid; gap: 4px; }

/* Chaque palier est un CARTOUCHE ÉGYPTIEN gravé : cadre d'or repoussé, hiéroglyphes,
   disque solaire ailé à gauche, ankh à droite, et un champ de pierre polie au centre —
   malachite, lapis, améthyste, cornaline. Ce sont les pierres qu'on incrustait
   vraiment, et elles donnent au passage le code couleur des paliers. */
.tier {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px;
  /* Le cadre d'or de l'image mange les bords : le contenu se pose dans le champ. */
  padding: 15px 44px 15px 52px;
  aspect-ratio: 900 / 310;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  filter: drop-shadow(0 5px 14px rgba(0, 0, 0, 0.65));
}

.tier--MINI  { --vitesse: 8s;   background-image: url('/assets/fortune/ui/plaque-MINI.webp?v=2'); }
.tier--MINOR { --vitesse: 6.5s; background-image: url('/assets/fortune/ui/plaque-MINOR.webp?v=2'); }
.tier--MAJOR { --vitesse: 5.2s; background-image: url('/assets/fortune/ui/plaque-MAJOR.webp?v=2'); }
.tier--GRAND { --vitesse: 3.8s; background-image: url('/assets/fortune/ui/plaque-GRAND.webp?v=2'); }

/* Reflet qui balaie la pierre, d'autant plus vite que la cagnotte est haute. Il est
   masqué à la forme du champ pour ne pas déborder sur le cadre d'or. */
.tier::after {
  content: '';
  position: absolute;
  left: 13%; right: 9%; top: 22%; bottom: 22%;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.26) 50%, transparent 62%);
  animation: tierShine var(--vitesse, 7s) ease-in-out infinite;
  pointer-events: none;
}
@keyframes tierShine {
  0%, 62% { opacity: 0; transform: translateX(-40%); }
  75%     { opacity: 1; }
  100%    { opacity: 0; transform: translateX(40%); }
}

/* Le texte est gravé dans la pierre : liseré sombre net dessous, halo doré autour.
   Sans ces deux ombres, l'or clair sur la malachite serait illisible. */
.tier__nom {
  display: block;
  font-family: var(--font-title); font-weight: 900; font-size: 19px;
  letter-spacing: 0.05em;
  color: #fff4d2;
  text-shadow:
    0 1px 0 rgba(20, 40, 20, 0.9),
    0 2px 4px rgba(0, 0, 0, 0.95),
    0 0 14px rgba(255, 220, 150, 0.5);
}
.tier__req {
  display: block; font-size: 10px; letter-spacing: 0.08em;
  color: rgba(255, 245, 220, 0.82);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}
.tier__montant {
  font-variant-numeric: tabular-nums; font-weight: 800; font-size: 23px;
  color: #fff8e2;
  text-shadow:
    0 1px 0 rgba(20, 20, 10, 0.9),
    0 2px 5px rgba(0, 0, 0, 0.95),
    0 0 18px rgba(255, 220, 150, 0.7);
}
.tier--bump { animation: tierBump 0.5s ease; }
@keyframes tierBump {
  0%   { transform: none; }
  35%  { transform: translateY(-3px) scale(1.035); }
  100% { transform: none; }
}

/* ── séance et classement ─────────────────────────────────────────────────── */

.perso__grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }
.perso__label { display: block; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.perso__grille b { font-size: 17px; font-variant-numeric: tabular-nums; color: var(--gold-light); }

/* Les panneaux se dimensionnent sur leur contenu et s'empilent en haut de la
   colonne : les étirer laissait de grandes zones vides sous le classement. */
.classement { display: flex; flex-direction: column; min-height: 0; }
.classement__liste { display: grid; gap: 5px; overflow: hidden; align-content: start; }
.rang {
  display: grid; grid-template-columns: 20px 1fr auto; gap: 7px; align-items: baseline;
  font-size: 13px; color: var(--text-muted);
}
.rang i { font-style: normal; color: var(--text-dim); font-size: 11px; }
.rang b { color: var(--gold-light); font-variant-numeric: tabular-nums; font-weight: 600; }
.rang span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rang--moi { color: var(--text); }
.rang--moi i { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════════ le plateau */

.board {
  grid-area: board;
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  min-height: 0;
}

.board__canvas { display: grid; place-items: center; }
.board__canvas canvas {
  display: block;
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.8));
}

/* ── compteur de tours gratuits ───────────────────────────────────────────── */

.freebar {
  position: absolute;
  top: 4px; left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex; gap: 22px; align-items: center;
  padding: 7px 20px;
  border-radius: 999px;
  border: 1px solid rgba(212, 168, 67, 0.45);
  background: linear-gradient(120deg, rgba(139, 26, 74, 0.94), rgba(107, 47, 160, 0.94));
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.6);
  font-size: 15px; white-space: nowrap;
}
.freebar[hidden] { display: none; }
.freebar b { color: var(--gold-light); font-variant-numeric: tabular-nums; }

.renversement {
  position: absolute;
  top: 4px; left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  padding: 5px 18px;
  border-radius: 999px;
  border: 1px solid rgba(212, 168, 67, 0.5);
  background: linear-gradient(120deg, #8b1a4a, #6b2fa0);
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-light); white-space: nowrap;
}
.renversement[hidden] { display: none; }

.multiplicateur {
  position: absolute;
  top: 46px; left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  font-family: var(--font-title); font-weight: 900; font-size: 52px;
  color: var(--gold-light);
  text-shadow: 0 0 34px rgba(212, 168, 67, 0.75);
  pointer-events: none;
}
.multiplicateur[hidden] { display: none; }

/* ── présentation des gros gains ──────────────────────────────────────────── */

/* Le montant défile pendant que le titre s'élève de palier en palier. Plus le gain
   est haut, plus la séquence dure et plus l'écran s'emballe : la classe `grosgain--N`
   monte de 1 à 4 et intensifie tout, du halo au tremblement. */
.grosgain {
  position: absolute;
  inset: -20px;
  z-index: 10;
  display: grid;
  place-items: center;
  border-radius: 20px;
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(10, 10, 26, 0.82), rgba(4, 4, 12, 0.96));
  backdrop-filter: blur(5px);
  animation: fadeIn 0.35s ease;
}
.grosgain[hidden] { display: none; }

.grosgain__halo {
  position: absolute;
  inset: -30%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg 8deg,
    rgba(240, 208, 128, 0.16) 8deg 12deg,
    transparent 12deg 24deg
  );
  animation: haloTourne 9s linear infinite;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.grosgain--2 .grosgain__halo { opacity: 0.6; animation-duration: 7s; }
.grosgain--3 .grosgain__halo { opacity: 0.85; animation-duration: 5s; }
.grosgain--4 .grosgain__halo { opacity: 1; animation-duration: 3.2s; }

@keyframes haloTourne { to { transform: rotate(360deg); } }

.grosgain__boite { position: relative; text-align: center; }

.grosgain__titre {
  margin: 0;
  font-family: var(--font-title); font-weight: 900;
  font-size: 44px; line-height: 1.05;
  letter-spacing: 0.04em;
  background: linear-gradient(170deg, #fff6dc, var(--gold) 48%, #b8862c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: font-size 0.5s cubic-bezier(0.2, 1.3, 0.3, 1), filter 0.5s ease;
  filter: drop-shadow(0 0 22px rgba(212, 168, 67, 0.45));
}
.grosgain--2 .grosgain__titre { font-size: 58px; filter: drop-shadow(0 0 34px rgba(212, 168, 67, 0.65)); }
.grosgain--3 .grosgain__titre {
  font-size: 72px;
  filter: drop-shadow(0 0 48px rgba(255, 200, 100, 0.85));
  background: linear-gradient(170deg, #fffaf0, #ffd070 46%, #c9862c);
  -webkit-background-clip: text; background-clip: text;
}
.grosgain--4 .grosgain__titre {
  font-size: 86px;
  filter: drop-shadow(0 0 64px rgba(255, 210, 120, 1));
  background: linear-gradient(170deg, #fff, #ffdd88 40%, #e8564a);
  -webkit-background-clip: text; background-clip: text;
  animation: titrePalpite 0.9s ease-in-out infinite;
}

@keyframes titrePalpite {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.045); }
}

.grosgain__montant {
  margin: 14px 0 0;
  font-size: 92px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff6dc;
  text-shadow: 0 0 40px rgba(255, 214, 130, 0.8), 0 6px 0 rgba(90, 50, 6, 0.5);
  transition: font-size 0.5s cubic-bezier(0.2, 1.3, 0.3, 1);
}
.grosgain--3 .grosgain__montant { font-size: 112px; }
.grosgain--4 .grosgain__montant { font-size: 130px; }

.grosgain__mult {
  margin: 6px 0 0;
  font-size: 22px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--purple-light);
}

/* Le plateau tremble, d'autant plus que le palier est haut. */
.board--secoue-1 { animation: secoue 0.5s ease-in-out infinite; --amp: 2px; }
.board--secoue-2 { animation: secoue 0.4s ease-in-out infinite; --amp: 4px; }
.board--secoue-3 { animation: secoue 0.3s ease-in-out infinite; --amp: 7px; }
.board--secoue-4 { animation: secoue 0.22s ease-in-out infinite; --amp: 11px; }

@keyframes secoue {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(calc(var(--amp) * -1), calc(var(--amp) * 0.4)); }
  50%      { transform: translate(var(--amp), calc(var(--amp) * -0.5)); }
  75%      { transform: translate(calc(var(--amp) * 0.5), var(--amp)); }
}

/* ── annonce plein cadre ──────────────────────────────────────────────────── */

.announce {
  position: absolute;
  inset: -20px;
  z-index: 8;
  display: grid; place-items: center;
  background: radial-gradient(ellipse at center, rgba(10, 10, 26, 0.76), rgba(6, 6, 16, 0.95));
  backdrop-filter: blur(4px);
  border-radius: 20px;
  animation: fadeIn 0.3s ease;
}
.announce[hidden] { display: none; }
.announce__panel { text-align: center; padding: 30px; animation: popIn 0.55s cubic-bezier(0.2, 1.1, 0.3, 1.2); }
.announce__kicker {
  margin: 0 0 6px; font-size: 15px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--purple-light);
}
.announce__title {
  margin: 0; font-family: var(--font-title); font-weight: 900; font-size: 76px; line-height: 1.03;
  background: linear-gradient(170deg, #fff6dc, var(--gold) 45%, #b8862c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 60px rgba(212, 168, 67, 0.35);
}
.announce__amount {
  margin: 10px 0 0; font-size: 48px; font-weight: 800;
  font-variant-numeric: tabular-nums; color: var(--gold-light);
}
.announce__sub { margin: 12px auto 0; max-width: 44ch; color: var(--text-muted); font-size: 17px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.7); }
  60%  { opacity: 1; transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════════════════ HUD */

.hud {
  grid-area: hud;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 34px;
  border-top: 1px solid var(--border);
  background: linear-gradient(0deg, rgba(12, 12, 28, 0.96), rgba(10, 10, 26, 0.5));
}

.hud__cote { display: flex; align-items: center; gap: 34px; }
.hud__cote--droite { justify-content: flex-end; }

.hud__stat { display: flex; flex-direction: column; gap: 1px; }
.hud__stat--win { align-items: flex-end; text-align: right; }
.hud__label { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); }
.hud__value {
  font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--gold-light); line-height: 1.05;
}
.hud__value--petit { font-size: 26px; }
.hud__stat--win .hud__value { color: var(--text); }
.hud__stat--win.is-winning .hud__value { color: var(--success); }

.hud__centre { display: flex; align-items: center; gap: 20px; }
.hud__boutons { display: flex; gap: 8px; }

.rond {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 27px; font-weight: 600;
  color: var(--gold-light);
  background: radial-gradient(circle at 34% 28%, #2a2a52, #14142e);
  box-shadow: 0 0 0 2px rgba(212, 168, 67, 0.4), 0 6px 16px rgba(0, 0, 0, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.14s, box-shadow 0.2s, color 0.2s;
}
.rond:hover:not(:disabled) { color: #fff; box-shadow: 0 0 0 2px var(--gold), 0 8px 22px rgba(212, 168, 67, 0.35); transform: scale(1.06); }
.rond:active:not(:disabled) { transform: scale(0.95); }
.rond:disabled { opacity: 0.35; cursor: not-allowed; }

.pastille {
  min-width: 46px; height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(18, 18, 42, 0.85);
  color: var(--text-muted);
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  transition: all 0.18s;
}
.pastille:hover:not(:disabled) { color: var(--text); border-color: rgba(212, 168, 67, 0.45); background: var(--bg-card-hover); }
.pastille.is-on { color: var(--gold-light); border-color: rgba(212, 168, 67, 0.6); background: rgba(212, 168, 67, 0.14); }
.pastille:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── bouton de spin ───────────────────────────────────────────────────────── */

.spin {
  position: relative;
  width: 104px; height: 104px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 34% 26%, var(--gold-light), var(--gold) 46%, #8f6b1e);
  color: #2a1f06;
  font-weight: 800; font-size: 16px; letter-spacing: 0.1em;
  box-shadow: 0 0 0 3px #6a4a12, 0 8px 30px rgba(212, 168, 67, 0.4), inset 0 -4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.14s, box-shadow 0.2s, filter 0.2s;
}
.spin:hover:not(:disabled) { transform: scale(1.045); box-shadow: 0 0 0 3px #8a6218, 0 10px 38px rgba(212, 168, 67, 0.55), inset 0 -4px 12px rgba(0, 0, 0, 0.3); }
.spin:active:not(:disabled) { transform: scale(0.97); }
.spin:disabled { filter: grayscale(0.5) brightness(0.78); cursor: not-allowed; }

.spin__label { position: relative; z-index: 2; }
.spin__auto {
  position: absolute; bottom: 13px; left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 700; color: #4a3608; letter-spacing: 0.06em;
}
.spin__auto[hidden] { display: none; }

.spin__ring {
  position: absolute; inset: -7px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--purple-light);
  border-right-color: var(--turquoise);
  opacity: 0;
  transition: opacity 0.2s;
}
.spin--busy .spin__ring { opacity: 1; animation: spinRing 0.85s linear infinite; }
@keyframes spinRing { to { transform: rotate(360deg); } }

.spin--free {
  background: radial-gradient(circle at 34% 26%, #f0a0d0, var(--bordeaux) 50%, #5a1030);
  color: #fff0f6;
  animation: freePulse 1.5s ease-in-out infinite;
}
@keyframes freePulse {
  0%, 100% { box-shadow: 0 0 0 3px #6a4a12, 0 8px 26px rgba(139, 26, 74, 0.5), inset 0 -4px 12px rgba(0, 0, 0, 0.3); }
  50%      { box-shadow: 0 0 0 3px #d4a843, 0 8px 44px rgba(212, 168, 67, 0.7), inset 0 -4px 12px rgba(0, 0, 0, 0.3); }
}

/* ═══════════════════════════════════════════════════════════════════ modales */

.modale {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at center, rgba(10, 10, 26, 0.86), rgba(4, 4, 12, 0.97));
  backdrop-filter: blur(7px);
  animation: fadeIn 0.24s ease;
}
.modale[hidden] { display: none; }

.mcadre {
  position: relative;
  padding: 26px 30px 22px;
  border-radius: 20px;
  border: 2px solid var(--gold);
  background: linear-gradient(165deg, #201040, #12122a 60%, #0d0d20);
  box-shadow: 0 0 0 4px #4a3308, 0 30px 90px rgba(0, 0, 0, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.08);
  animation: popIn 0.4s cubic-bezier(0.2, 1.1, 0.3, 1.15);
  max-width: 1560px;
  /* Débordement visible : le bouton de fermeture dépasse du cadre, et le rogner
     ferait aussi apparaître une barre de défilement parasite. Le défilement, quand
     il est nécessaire, est confié à `.mcadre__scroll`. */
  overflow: visible;
}

.mcadre__scroll {
  max-height: 720px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
}
.mcadre__scroll::-webkit-scrollbar { width: 9px; }
.mcadre__scroll::-webkit-scrollbar-thumb { background: rgba(212, 168, 67, 0.4); border-radius: 999px; }
.mcadre__scroll::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.3); border-radius: 999px; }

.mfermer {
  position: absolute;
  top: -18px; right: -18px;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 24px; font-weight: 700;
  color: #fff;
  background: radial-gradient(circle at 36% 30%, #e8564a, #9a1c14);
  box-shadow: 0 0 0 3px #fff, 0 6px 18px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s;
}
.mfermer:hover { transform: scale(1.1) rotate(90deg); }

.mtitre {
  margin: 0 0 4px;
  font-family: var(--font-title); font-weight: 900; font-size: 32px;
  text-align: center;
  background: linear-gradient(170deg, #fff6dc, var(--gold) 50%, #a87c28);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.msous { margin: 0 0 20px; text-align: center; color: var(--text-muted); font-size: 15px; }

/* ── modale FONCTION ACHETER ──────────────────────────────────────────────── */

.options { display: flex; gap: 16px; justify-content: center; }

/* Chaque option est une PLAQUE ILLUSTRÉE entière — cadre d'or sculpté, hiéroglyphes,
   champ de pierre polie — et le texte se pose dessus. Aucun dégradé CSS ne rendra
   l'or repoussé d'un cartouche égyptien.
   L'illustration occupe le haut de la plaque, le texte le bas : c'est pour ça que le
   contenu est poussé vers le bas et que le nom démarre à mi-hauteur. */
.option {
  position: relative;
  width: 234px;
  aspect-ratio: 3 / 4;
  /* Le cadre d'or gravé occupe près d'un cinquième de la largeur de chaque côté :
     le texte doit rester dans le champ de pierre, sinon il chevauche la gravure. */
  padding: 0 42px 30px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  text-align: center;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  filter: drop-shadow(0 14px 34px rgba(0, 0, 0, 0.7));
  transition: transform 0.16s, filter 0.2s;
}
.option:hover:not(:disabled) {
  transform: translateY(-8px) scale(1.02);
  filter: drop-shadow(0 22px 46px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 22px rgba(212, 168, 67, 0.55));
}
.option:active:not(:disabled) { transform: translateY(-2px) scale(1); }
.option:disabled { filter: grayscale(0.8) brightness(0.5); cursor: not-allowed; }

/* Voile sombre sous le texte : la pierre gravée est belle mais chargée, et sans ce
   fondu les petites lignes deviendraient illisibles. */
.option::after {
  content: '';
  position: absolute;
  left: 16%; right: 16%; bottom: 8%;
  height: 46%;
  border-radius: 12px;
  background: linear-gradient(180deg, transparent, rgba(4, 4, 12, 0.72) 30%, rgba(4, 4, 12, 0.9) 70%);
  pointer-events: none;
}
.option > * { position: relative; z-index: 2; }

/* Les ombres de texte font tout le travail de lisibilité : un liseré sombre net,
   puis un halo diffus. On est en Égypte, l'or doit sembler gravé. */
.option__nom {
  margin-top: 50%;
  font-family: var(--font-title); font-weight: 900; font-size: 20px; line-height: 1.12;
  color: #fff4d2;
  text-shadow:
    0 1px 0 rgba(60, 30, 0, 0.95),
    0 2px 3px rgba(0, 0, 0, 0.9),
    0 0 18px rgba(255, 200, 100, 0.55);
}
.option__desc {
  font-size: 12px; line-height: 1.4;
  color: rgba(255, 244, 220, 0.94);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 1), 0 0 10px rgba(0, 0, 0, 0.9);
}
.option__prix {
  margin-top: 3px;
  font-size: 25px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: #ffe9a8;
  text-shadow:
    0 1px 0 rgba(60, 30, 0, 0.95),
    0 3px 5px rgba(0, 0, 0, 0.95),
    0 0 22px rgba(255, 200, 100, 0.8);
}
.option__prix i { font-style: normal; font-size: 17px; }

.mmise {
  margin-top: 22px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.mmise__label {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
.mmise__valeur {
  min-width: 190px;
  padding: 9px 20px;
  border-radius: 999px;
  background: linear-gradient(178deg, #b8285c, #7a1038);
  box-shadow: 0 0 0 2px #6a4a12, inset 0 2px 0 rgba(255, 255, 255, 0.2);
  text-align: center;
  font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: #fff6dc;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

/* ── modale de mise ───────────────────────────────────────────────────────── */

.grosse-mise {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  min-width: 460px;
}
.grosse-mise__valeur {
  padding: 16px 20px;
  border-radius: 14px;
  background: linear-gradient(178deg, #b8285c, #7a1038);
  box-shadow: 0 0 0 2px #6a4a12, inset 0 2px 0 rgba(255, 255, 255, 0.2);
  text-align: center;
  font-size: 46px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: #fff6dc;
  line-height: 1.05;
}
.grosse-mise__valeur i { font-style: normal; font-size: 28px; }

.rond--grand { width: 66px; height: 66px; font-size: 34px; }

/* Réglette des paliers : on voit d'un coup où l'on se situe dans le barème, et on
   peut sauter directement au cran voulu. */
.jauge { display: flex; gap: 5px; margin-top: 16px; }
.jauge__cran {
  flex: 1;
  height: 12px;
  border-radius: 3px;
  background: rgba(212, 168, 67, 0.2);
  box-shadow: inset 0 0 0 1px rgba(212, 168, 67, 0.25);
  transition: background 0.18s, transform 0.18s;
}
.jauge__cran:hover { background: rgba(212, 168, 67, 0.5); transform: scaleY(1.35); }
.jauge__cran--actif {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  box-shadow: 0 0 12px rgba(212, 168, 67, 0.7);
  transform: scaleY(1.5);
}

/* ── tours automatiques ───────────────────────────────────────────────────── */

.autos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; min-width: 460px; }
.auto-choix {
  padding: 16px 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(178deg, rgba(107, 47, 160, 0.35), rgba(10, 10, 26, 0.7));
  transition: all 0.16s;
}
.auto-choix:hover {
  border-color: var(--gold);
  background: linear-gradient(178deg, rgba(212, 168, 67, 0.3), rgba(10, 10, 26, 0.7));
  transform: translateY(-4px);
}
.auto-choix b { display: block; font-size: 30px; font-weight: 800; color: var(--gold-light); font-variant-numeric: tabular-nums; }
.auto-choix span { display: block; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }

.mmax--stop { background: linear-gradient(178deg, #d8484f, #7a1420); }

/* ── réglages du son ──────────────────────────────────────────────────────── */

.sons { display: grid; gap: 11px; min-width: 480px; }
.son {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(8, 8, 20, 0.55);
  text-align: left;
  transition: all 0.18s;
}
.son:hover { border-color: rgba(212, 168, 67, 0.45); background: rgba(26, 26, 58, 0.7); }
.son__texte b { display: block; font-size: 17px; color: var(--text); }
.son__texte span { display: block; font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.son__bascule {
  position: relative;
  width: 56px; height: 30px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 0 0 2px rgba(212, 168, 67, 0.25);
  transition: background 0.24s, box-shadow 0.24s;
}
.son__bascule i {
  position: absolute;
  top: 4px; left: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: transform 0.24s cubic-bezier(0.3, 1.4, 0.4, 1), background 0.24s;
}
.son--on .son__bascule {
  background: linear-gradient(178deg, #3fa03f, #1e7a1a);
  box-shadow: inset 0 0 0 2px rgba(212, 168, 67, 0.6);
}
.son--on .son__bascule i { transform: translateX(26px); background: #fff6dc; }

/* ── réglette de volume de la musique ─────────────────────────────────────── */

.son--volume { align-items: start; padding-top: 15px; }
.son--volume .son__bascule { margin-top: 3px; }
.son__texte em { font-style: normal; color: var(--gold-light); font-variant-numeric: tabular-nums; }

/* Des crans plutôt qu'un curseur glissant : c'est plus sûr au doigt, et six niveaux
   suffisent largement pour placer une musique de fond. */
.volume { display: flex; gap: 5px; margin-top: 9px; }
.volume__cran {
  width: 34px; height: 22px;
  border-radius: 4px;
  background: rgba(212, 168, 67, 0.16);
  box-shadow: inset 0 0 0 1px rgba(212, 168, 67, 0.28);
  transition: background 0.16s, transform 0.16s, box-shadow 0.16s;
}
.volume__cran:hover { background: rgba(212, 168, 67, 0.45); transform: translateY(-2px); }
.volume__cran--actif {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  box-shadow: 0 0 10px rgba(212, 168, 67, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
/* Le cran zéro est la coupure : on le marque en rouge, pas en or. */
.volume__cran--zero { width: 24px; background: rgba(231, 76, 60, 0.2); box-shadow: inset 0 0 0 1px rgba(231, 76, 60, 0.45); }
.volume__cran--zero:hover { background: rgba(231, 76, 60, 0.55); }
.volume__cran--zero::after { content: '✕'; font-size: 11px; color: rgba(255, 200, 200, 0.85); line-height: 20px; }

/* ── annonce de déclenchement d'un bonus ──────────────────────────────────── */

/* Les cartes qui ont déclenché la fonction restent en pleine lumière pendant que
   l'annonce s'affiche : le joueur doit voir CE QUI a déclenché, pas seulement QUE
   ça s'est déclenché. Le fond s'assombrit sans masquer le plateau. */
.declencheur {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse 62% 74% at 50% 50%, transparent 22%, rgba(6, 6, 16, 0.86) 68%);
  animation: fadeIn 0.4s ease;
  pointer-events: none;
}
.declencheur[hidden] { display: none; }

.declencheur__boite {
  margin-top: 62%;
  text-align: center;
  animation: monteEnScene 0.7s cubic-bezier(0.2, 1.1, 0.3, 1.15);
}
.declencheur__raison {
  margin: 0 0 4px;
  font-size: 16px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--turquoise);
  text-shadow: 0 0 18px rgba(71, 199, 199, 0.7);
}
.declencheur__nom {
  margin: 0;
  font-family: var(--font-title); font-weight: 900; font-size: 62px; line-height: 1.05;
  background: linear-gradient(170deg, #fff6dc, var(--gold) 48%, #b8862c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 40px rgba(212, 168, 67, 0.5));
}

@keyframes monteEnScene {
  0%   { opacity: 0; transform: translateY(40px) scale(0.85); }
  60%  { opacity: 1; transform: translateY(0) scale(1.04); }
  100% { transform: scale(1); }
}

.mmax {
  margin-top: 18px;
  width: 100%;
  padding: 13px;
  border-radius: 11px;
  background: linear-gradient(178deg, #3fa03f, #1e7a1a);
  box-shadow: 0 0 0 2px #6a4a12, inset 0 2px 0 rgba(255, 255, 255, 0.25);
  font-size: 18px; font-weight: 800; letter-spacing: 0.1em;
  color: #fff6dc;
  transition: transform 0.14s;
}
.mmax:hover { transform: scale(1.02); }

/* ── table des gains ──────────────────────────────────────────────────────── */

.modale--large .mcadre { width: 1440px; }

.paytable { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 11px; }
.pt {
  display: flex; gap: 11px; align-items: center;
  padding: 9px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(8, 8, 20, 0.5);
}
.pt img { width: 62px; height: 83px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.pt__body { min-width: 0; }
.pt__name { display: block; font-size: 14px; font-weight: 600; color: var(--gold-light); }
.pt__pays { display: block; font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; line-height: 1.5; }
.pt__role {
  display: inline-block; margin-top: 3px; padding: 1px 7px;
  border-radius: 4px; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(107, 47, 160, 0.45); color: var(--purple-light);
}

.paytable__rules { margin-top: 22px; display: grid; gap: 13px; }
.rule { padding: 13px 16px; border-radius: 10px; border-left: 3px solid var(--gold); background: rgba(8, 8, 20, 0.5); }
.rule h3 { margin: 0 0 4px; font-size: 16px; color: var(--gold-light); font-weight: 600; }
.rule p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════ mini-jeux */

.minigame {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: grid; place-items: center;
  animation: fadeIn 0.45s ease;
  overflow: hidden;
}
.minigame[hidden] { display: none; }

/* Le décor du lieu, derrière un voile sombre : l'illustration doit se sentir sans
   jamais concurrencer les éléments avec lesquels on interagit. */
.minigame::before {
  content: '';
  position: absolute;
  inset: -4%;
  background-image: var(--jeu-decor);
  background-size: cover;
  background-position: center;
  animation: decorRespire 24s ease-in-out infinite alternate;
}
.minigame::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 54% 62% at 50% 50%, rgba(6, 6, 16, 0.9) 0%, rgba(6, 6, 16, 0.62) 55%, rgba(6, 6, 16, 0.82) 100%),
    linear-gradient(180deg, rgba(6, 6, 16, 0.75), transparent 26%, transparent 74%, rgba(6, 6, 16, 0.85));
}
.minigame > * { position: relative; z-index: 2; }

@keyframes decorRespire {
  0%   { transform: scale(1.02) translate3d(-0.8%, 0.5%, 0); }
  100% { transform: scale(1.08) translate3d(0.8%, -0.6%, 0); }
}

.mj { width: 1180px; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }

.mj__intro { animation: popIn 0.6s cubic-bezier(0.2, 1.1, 0.3, 1.2); }
.mj__glyphe {
  font-size: 92px; line-height: 1;
  color: var(--jeu-couleur, var(--gold));
  filter: drop-shadow(0 0 40px var(--jeu-couleur, var(--gold)));
  animation: pulse 2.4s ease-in-out infinite;
}
.mj__glyphe--petit { font-size: 34px; animation: none; }

.mj__titre {
  margin: 10px 0 0;
  font-family: var(--font-title); font-weight: 900; font-size: 56px;
  background: linear-gradient(170deg, #fff6dc, var(--jeu-couleur, var(--gold)) 55%, #8f6b1e);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mj__titre--petit { font-size: 26px; margin: 0; }

.mj__baseline { margin: 14px auto 0; max-width: 52ch; color: var(--text-muted); font-size: 19px; line-height: 1.55; }

.mj__continuer {
  margin-top: 26px;
  font-size: 15px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-light);
  animation: clignote 1.7s ease-in-out infinite;
}
@keyframes clignote { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.mj__entete { display: grid; gap: 3px; place-items: center; }
.mj__aide { margin: 0; font-size: 17px; color: var(--text); min-height: 1.4em; }
.mj__scene { display: grid; place-items: center; gap: 18px; }
.mj__pied { font-size: 17px; color: var(--text-muted); }
.mj__gain b { color: var(--gold-light); font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }

.mj__bouton {
  margin-top: 12px;
  padding: 13px 42px;
  border-radius: 999px;
  background: radial-gradient(circle at 34% 28%, var(--gold-light), var(--gold) 50%, #8f6b1e);
  color: #2a1f06;
  font-weight: 800; letter-spacing: 0.12em; font-size: 17px;
  box-shadow: 0 0 0 3px #6a4a12, 0 8px 28px rgba(212, 168, 67, 0.4);
  transition: transform 0.14s;
}
.mj__bouton:hover:not(:disabled) { transform: scale(1.04); }
.mj__bouton:disabled { filter: grayscale(0.6); cursor: not-allowed; }
.mj__bouton--secondaire {
  background: linear-gradient(120deg, var(--bordeaux), var(--purple));
  color: var(--text);
  box-shadow: 0 0 0 3px #6a4a12, 0 8px 26px rgba(139, 26, 74, 0.5);
}
.mj__bouton[hidden] { display: none; }

/* ── la roue ──────────────────────────────────────────────────────────────── */

.roue { position: relative; display: grid; place-items: center; }
.roue__aiguille {
  position: absolute; top: -14px; z-index: 3;
  font-size: 40px; color: var(--gold-light);
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.85));
}
.roue__disque {
  position: relative;
  width: 470px; height: 470px;
  border-radius: 50%;
  border: 6px solid var(--gold);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: 0 0 70px rgba(212, 168, 67, 0.3), inset 0 0 50px rgba(0, 0, 0, 0.75);
}
.roue__quartier {
  position: absolute; inset: 0;
  display: grid; justify-items: center; align-content: start;
  padding-top: 5%;
  transform: rotate(calc(var(--i) * 360deg / var(--n)));
  clip-path: polygon(50% 50%, 36% 0%, 64% 0%);
  background: linear-gradient(180deg, rgba(107, 47, 160, 0.68), rgba(107, 47, 160, 0.12) 72%);
}
.roue__quartier:nth-child(even) { background: linear-gradient(180deg, rgba(139, 26, 74, 0.68), rgba(139, 26, 74, 0.12) 72%); }
.roue__quartier b {
  display: block;
  font-size: 17px; font-weight: 800; letter-spacing: 0.02em;
  color: var(--gold-light);
  white-space: nowrap;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.95);
  writing-mode: vertical-rl; text-orientation: mixed;
}

/* ── le tirage ────────────────────────────────────────────────────────────── */

.tirage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; width: 640px; }
.tcarte { position: relative; aspect-ratio: 2 / 3; padding: 0; perspective: 1000px; }
.tcarte__dos, .tcarte__face {
  position: absolute; inset: 0;
  border-radius: 10px;
  backface-visibility: hidden;
  transition: transform 0.55s cubic-bezier(0.35, 0, 0.2, 1);
  overflow: hidden;
}
.tcarte__dos {
  background: radial-gradient(circle at 50% 42%, rgba(212, 168, 67, 0.3), transparent 62%), linear-gradient(150deg, #281448, #12122a);
  border: 1px solid rgba(212, 168, 67, 0.5);
  display: grid; place-items: center;
}
.tcarte__dos::after { content: '☥'; font-size: 44px; color: var(--gold); opacity: 0.8; }
.tcarte__face { transform: rotateY(180deg); border: 1px solid rgba(212, 168, 67, 0.55); }
.tcarte__face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tcarte--ouverte .tcarte__dos { transform: rotateY(-180deg); }
.tcarte--ouverte .tcarte__face { transform: rotateY(0); }
.tcarte--envers .tcarte__face img { transform: rotate(180deg); }
.tcarte--envers .tcarte__face { border-color: rgba(139, 26, 74, 0.85); box-shadow: 0 0 26px rgba(139, 26, 74, 0.55); }
.tcarte:not(:disabled):hover { transform: translateY(-7px); transition: transform 0.18s; }

/* ── les sarcophages ──────────────────────────────────────────────────────── */

.sarco { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; width: 600px; }
.scase {
  aspect-ratio: 3 / 4;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(212, 168, 67, 0.4);
  background: linear-gradient(165deg, #2e1c44, #14102a);
  font-size: 34px; color: var(--gold);
  transition: transform 0.16s, background 0.3s, border-color 0.3s;
}
.scase:hover:not(:disabled) { transform: translateY(-5px) scale(1.03); border-color: var(--gold); }
.scase--ouverte {
  background: linear-gradient(165deg, rgba(212, 168, 67, 0.26), rgba(10, 10, 26, 0.85));
  animation: popIn 0.4s cubic-bezier(0.2, 1.2, 0.3, 1.1);
}
.scase--ouverte span { font-size: 26px; font-weight: 800; color: var(--gold-light); }
.scase--maudit { background: linear-gradient(165deg, rgba(139, 26, 74, 0.8), rgba(20, 4, 12, 0.92)); border-color: var(--danger); }
.scase--maudit span { color: var(--danger); font-size: 36px; }

.sarco__vies { display: flex; gap: 11px; justify-content: center; }
.vie {
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(212, 168, 67, 0.75);
  transition: all 0.35s;
}
.vie--perdue { background: var(--text-dim); box-shadow: none; transform: scale(0.6); }

/* ── la pyramide ──────────────────────────────────────────────────────────── */

.pyr { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 700px; }
.pyr__palier {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 11px;
  width: var(--w, 60%);
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid rgba(212, 168, 67, 0.18);
  background: rgba(8, 8, 20, 0.6);
  opacity: 0.42;
  transition: all 0.3s;
}
.pyr__palier--actif { opacity: 1; border-color: var(--gold); box-shadow: 0 0 26px rgba(212, 168, 67, 0.35); }
.pyr__palier--franchi { opacity: 1; background: linear-gradient(100deg, rgba(71, 199, 199, 0.24), rgba(8, 8, 20, 0.65)); border-color: var(--turquoise); }
.pyr__palier--chute {
  opacity: 1;
  background: linear-gradient(100deg, rgba(139, 26, 74, 0.65), rgba(20, 4, 12, 0.85));
  border-color: var(--danger);
  animation: chute 0.6s ease-in;
}
@keyframes chute {
  0%   { transform: none; }
  30%  { transform: translateX(-11px) rotate(-1.5deg); }
  60%  { transform: translateX(11px) rotate(1.5deg); }
  100% { transform: translateY(13px); opacity: 0.5; }
}
.pyr__mult { font-size: 17px; font-weight: 800; color: var(--gold-light); font-variant-numeric: tabular-nums; min-width: 62px; }
.pyr__porte {
  border: 1px solid rgba(212, 168, 67, 0.22);
  border-radius: 7px;
  background: rgba(26, 26, 58, 0.55);
  color: var(--text-dim);
  font-size: 22px;
  padding: 3px 0;
  transition: all 0.18s;
}
.pyr__porte--active { color: var(--gold-light); border-color: var(--gold); background: rgba(107, 47, 160, 0.4); }
.pyr__porte--active:hover { background: var(--gold); color: #2a1f06; transform: scale(1.06); }

/* ═══════════════════════════════════════════════════════ accessibilité */

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


/* ── Ce qu'il y a à prendre ────────────────────────────────────────────────────
   Le don du jour, ou le filet quand on est à sec. Le panneau n'apparaît que
   lorsqu'il y a réellement quelque chose : ailleurs, il n'occupe aucune place. */
.reclame {
  border-color: rgba(212, 168, 67, .48);
  background: linear-gradient(150deg, rgba(58, 30, 14, .92), rgba(24, 14, 30, .82));
}
.reclame__dire {
  margin: 0 0 10px; font-size: 12.5px; line-height: 1.45;
  color: var(--text-dim);
}
.reclame__bouton {
  width: 100%; padding: 11px 14px; border: none; border-radius: 12px;
  font: 800 14px/1 var(--font-ui); letter-spacing: .01em;
  color: #2a1206; cursor: pointer;
  background: linear-gradient(180deg, #f7dfae, #d9a545);
  box-shadow: 0 6px 18px rgba(217, 165, 69, .34);
  transition: transform .16s, box-shadow .16s, filter .16s;
}
.reclame__bouton:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(217, 165, 69, .46); }
.reclame__bouton:active { transform: translateY(0); }
.reclame__bouton:disabled { filter: grayscale(.5) brightness(.75); cursor: default; transform: none; }
/* Un halo lent : l'oeil doit l'attraper sans que ça clignote. */
@media (prefers-reduced-motion: no-preference) {
  .reclame { animation: reclame-souffle 3.2s ease-in-out infinite; }
  @keyframes reclame-souffle {
    0%, 100% { box-shadow: 0 12px 34px rgba(0, 0, 0, .5); }
    50%      { box-shadow: 0 12px 34px rgba(0, 0, 0, .5), 0 0 22px rgba(217, 165, 69, .3); }
  }
}
