/* ============================================================
   WAR — habillage borne de casino v2 (cabinet plein écran)
   La borne EST l'image : elle remplit tout l'écran du téléphone,
   bord à bord, sans défilement — enseigne ovale à ampoules,
   écran supérieur (roue + progressifs), LCD, écran principal,
   panneau de boutons physique, vitre du bas.
   — Taktak, 2026-12-06
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --gold: #f7d774; --gold-deep: #b8860b; --gold-dark: #7a5b00;
  --navy: #060b26; --panel: #0d1440; --red: #c21807;
  --led-green: #59ffa0; --led-amber: #ffc44d;
  --wheel: clamp(118px, 19.5dvh, 292px);
}
html, body { height: 100%; overflow: hidden; }
body {
  font-family: "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
  background: #02040f;
  color: #eef1ff;
  overflow: hidden;
  padding: 0;
}
.ambient {
  position: fixed; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
  filter: brightness(0.5) saturate(1.15);
}
.ambient::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 30%, transparent 30%, rgba(2,4,15,.88) 78%);
}

/* ===== le meuble : toute la hauteur de l'écran, flex vertical ===== */
.cabinet {
  position: relative;
  height: 100vh; height: 100dvh; width: 100%; max-width: 1060px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 5px;
  background: linear-gradient(180deg, #1a1f3a 0%, #0a0e2a 55%, #131736 100%);
  border: 3px solid #2c3260;
  padding: 8px 10px 6px;
  box-shadow: 0 30px 80px rgba(0,0,0,.85), inset 0 2px 0 rgba(255,255,255,.14), inset 0 -14px 34px rgba(0,0,0,.6);
}
.cabinet::before, .cabinet::after {
  content: ""; position: absolute; top: 70px; bottom: 70px; width: 7px; border-radius: 6px; z-index: 3;
  background: linear-gradient(180deg, #37c8ff, #7a3cff, #ff3ca8, #ffd94d, #37c8ff);
  background-size: 100% 300%;
  animation: ledflow 6s linear infinite;
  box-shadow: 0 0 16px rgba(110,140,255,.85);
}
.cabinet::before { left: 5px; } .cabinet::after { right: 5px; }
@keyframes ledflow { from { background-position: 0 0; } to { background-position: 0 300%; } }
/* célébrations : la borne flashe, les bandes LED accélèrent */
body.party-big .cabinet::before, body.party-big .cabinet::after,
body.cine-mode .cabinet::before, body.cine-mode .cabinet::after { animation-duration: 1.1s; }
body.party-mega .cabinet::before, body.party-mega .cabinet::after { animation-duration: .45s; filter: brightness(1.5); }
body.party-big .cabinet { animation: cabFlash .5s ease-in-out infinite alternate; }
body.party-mega .cabinet { animation: cabFlash .26s ease-in-out infinite alternate; }
@keyframes cabFlash {
  from { box-shadow: 0 30px 80px rgba(0,0,0,.85), inset 0 2px 0 rgba(255,255,255,.14), 0 0 12px rgba(255,200,60,.25); }
  to   { box-shadow: 0 30px 80px rgba(0,0,0,.85), inset 0 2px 0 rgba(255,255,255,.2), 0 0 55px rgba(255,200,60,.8); }
}
body.fs-mode .cabinet { border-color: #7b2ff7; box-shadow: 0 30px 80px rgba(0,0,0,.85), inset 0 2px 0 rgba(255,255,255,.14), 0 0 34px rgba(140,80,255,.4); }

/* ===== enseigne ovale + ampoules en poursuite ===== */
.topper {
  position: relative; text-align: center; overflow: hidden; border-radius: 46% / 30px;
  flex: 0 0 auto; padding: 11px 0 9px;
  background: radial-gradient(ellipse at 50% 42%, rgba(70,40,0,.55), rgba(4,6,20,.0) 72%);
}
.topper::before, .topper::after {
  content: ""; position: absolute; left: 14px; right: 14px; height: 10px; z-index: 2;
  background-image: radial-gradient(circle, #fff6c0 0 2.6px, #ffb52e 3.6px, rgba(255,160,30,0) 5.4px);
  background-size: 22px 10px; background-repeat: repeat-x;
  animation: bulbChase .72s steps(1, end) infinite;
  filter: drop-shadow(0 0 5px rgba(255,180,50,.8));
}
.topper::before { top: 1px; } .topper::after { bottom: 1px; }
@keyframes bulbChase {
  0% { background-position-x: 0; opacity: 1; }
  50% { background-position-x: 11px; opacity: .55; }
  100% { background-position-x: 0; opacity: 1; }
}
body.party-big .topper::before, body.party-big .topper::after,
body.cine-mode .topper::before, body.cine-mode .topper::after { animation-duration: .3s; }
body.party-mega .topper::before, body.party-mega .topper::after { animation-duration: .14s; filter: drop-shadow(0 0 9px rgba(255,200,60,1)) brightness(1.5); }
.topper img {
  height: clamp(54px, 11dvh, 148px); width: auto; max-width: 92%; display: block; margin: 0 auto;
  filter: drop-shadow(0 0 22px rgba(255,190,40,.45));
  animation: topperGlow 2.6s ease-in-out infinite;
}
@keyframes topperGlow {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(255,190,40,.35)); }
  50% { filter: drop-shadow(0 0 30px rgba(255,200,60,.7)); }
}
.topper-shine {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.14) 48%, transparent 62%);
  background-size: 260% 100%;
  animation: shine 5.5s ease-in-out infinite;
}
@keyframes shine { 0%, 55% { background-position: 130% 0; } 90%, 100% { background-position: -130% 0; } }

/* ===== écran supérieur : roue + progressifs ===== */
.upper-screen {
  flex: 0 0 auto;
  display: flex; gap: 12px; align-items: stretch;
  background: linear-gradient(180deg, #05071a, #0a1030);
  border: 3px solid #000; border-radius: 16px;
  box-shadow: inset 0 0 0 2px #2c3260, inset 0 0 44px rgba(30,60,180,.35);
  padding: 9px 12px; position: relative; z-index: 5; overflow: hidden;
  transition: box-shadow .4s;
}
#planes { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.plane {
  position: absolute; width: 48px; height: 24px; left: -18%; opacity: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 20'%3E%3Cpath d='M1 13 C10 11 20 10 30 10 L38 10 L46 13 L38 15 L12 16 C6 16 2 15 1 13 Z M20 11 L26 4 L29 4 L26 11 Z M6 12 L10 6 L13 6 L12 12 Z' fill='%230b1233' stroke='%23f7d774' stroke-width='0.8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.plane.p1 { top: 4%; } .plane.p2 { top: 38%; transform: scale(.72); } .plane.p3 { top: 66%; transform: scale(.55); }
body.cine-mode .plane.p1 { animation: flyX 1.5s linear .1s forwards; }
body.cine-mode .plane.p2 { animation: flyX 1.3s linear .42s forwards; }
body.cine-mode .plane.p3 { animation: flyX 1.15s linear .68s forwards; }
@keyframes flyX {
  0% { left: -18%; opacity: 0; } 8% { opacity: 1; } 90% { opacity: 1; } 100% { left: 103%; opacity: 0; }
}
.wheel-block { flex: 0 0 auto; width: var(--wheel); text-align: center; }
.wheel-title {
  font-weight: 900; letter-spacing: 4px; font-size: 13.5px; color: var(--gold);
  text-shadow: 0 0 12px rgba(255,200,60,.6); margin-bottom: 5px;
}
.wheel-frame {
  position: relative; width: var(--wheel); height: var(--wheel); margin: 0 auto;
  border-radius: 50%;
  border: 6px solid var(--gold-deep);
  box-shadow: 0 0 0 3px #3a2c00, 0 0 26px rgba(255,190,40,.4), inset 0 0 24px rgba(0,0,0,.7);
  animation: framePulse 3s ease-in-out infinite;
}
@keyframes framePulse { 0%,100% { box-shadow: 0 0 0 3px #3a2c00, 0 0 16px rgba(255,190,40,.3), inset 0 0 24px rgba(0,0,0,.7);} 50% { box-shadow: 0 0 0 3px #3a2c00, 0 0 34px rgba(255,190,40,.65), inset 0 0 24px rgba(0,0,0,.7);} }
#wheel-rotor { width: 100%; height: 100%; border-radius: 50%; will-change: transform; }
#wheel-svg { width: 100%; height: 100%; display: block; border-radius: 50%; }
.wheel-label { font: 900 17px "Trebuchet MS", sans-serif; fill: #fff; text-anchor: middle; dominant-baseline: middle; text-shadow: 0 1px 2px #000; }
.wheel-seg { transition: filter .15s; }
.wheel-seg.seg-lit { filter: brightness(1.7) saturate(1.25); }
.wheel-seg.seg-win { animation: segFlash .26s ease-in-out 10 alternate; }
@keyframes segFlash { from { filter: brightness(1); } to { filter: brightness(2.2) saturate(1.35); } }
.wheel-pointer {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%); z-index: 6;
  width: 0; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent;
  border-top: 20px solid #ff3b30; filter: drop-shadow(0 2px 3px rgba(0,0,0,.7));
  transform-origin: 50% 0;
}
.wheel-frame.spinning .wheel-pointer { animation: rattle .09s linear infinite; }
@keyframes rattle {
  0% { transform: translateX(-50%) rotate(-6deg); } 50% { transform: translateX(-50%) rotate(5deg); } 100% { transform: translateX(-50%) rotate(-6deg); }
}
.wheel-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 26%; height: 26%; border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #fff2b0, #d4af37 58%, #7a5b00);
  border: 3px solid #5e4600; color: #3a2400;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: clamp(12px, 2.2dvh, 19px); letter-spacing: 1px;
  box-shadow: 0 3px 10px rgba(0,0,0,.65);
}
.wheel-note { margin-top: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: 1.6px; color: #9db8e8; }
body.wheel-mode #spotlight { opacity: 1; pointer-events: auto; }
body.wheel-mode .upper-screen { z-index: 80; box-shadow: inset 0 0 0 2px #2c3260, 0 0 85px rgba(255,210,80,.5); }
body.wheel-mode .main-screen, body.wheel-mode .meters, body.wheel-mode .deck, body.wheel-mode .lcd, body.wheel-mode .msg-display { filter: brightness(.55) saturate(.85); }
.main-screen, .meters, .deck, .lcd, .msg-display { transition: filter .4s; }
#spotlight {
  position: fixed; inset: 0; background: rgba(1,2,10,.78); z-index: 70;
  opacity: 0; pointer-events: none; transition: opacity .4s;
}

.jackpots { flex: 1; display: flex; flex-direction: column; gap: 6px; justify-content: center; min-width: 0; }
.jp {
  display: flex; justify-content: space-between; align-items: center; min-width: 0;
  border-radius: 11px; padding: 5px 13px; border: 2px solid;
  box-shadow: inset 0 0 18px rgba(0,0,0,.6);
}
.jp-name { font-weight: 900; letter-spacing: 3px; font-size: clamp(13px, 2dvh, 19px); }
.jp-amount { font-family: "Courier New", monospace; font-weight: 900; font-size: clamp(17px, 3.1dvh, 27px); color: #fff; letter-spacing: 1px; white-space: nowrap; }
.jp-grand { background: linear-gradient(180deg, #6d0f00, #2c0500); border-color: #ff6a3c; color: #ffb199; }
.jp-grand .jp-amount { text-shadow: 0 0 12px rgba(255,110,60,.9); animation: jpPulse 1.8s ease-in-out infinite; }
.jp-major { background: linear-gradient(180deg, #42096e, #1e0433); border-color: #b45cff; color: #e2b8ff; }
.jp-major .jp-amount { text-shadow: 0 0 12px rgba(180,92,255,.9); }
.jp-minor { background: linear-gradient(180deg, #0d3070, #061a3d); border-color: #3f8cff; color: #a9ccff; }
.jp-minor .jp-amount { text-shadow: 0 0 12px rgba(63,140,255,.9); }
.jp-mini { background: linear-gradient(180deg, #0d5429, #052b13); border-color: #2ee06f; color: #a4ffc4; }
.jp-mini .jp-amount { text-shadow: 0 0 12px rgba(46,224,111,.9); }
@keyframes jpPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.045); } }
.jp-note { text-align: center; font-size: 10px; letter-spacing: 2.2px; color: #8fa3cc; font-weight: 800; }

/* ===== LCD suivi joueur ===== */
.lcd {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, #0c2214, #06150b);
  border: 2px solid #000; border-radius: 8px;
  box-shadow: inset 0 0 0 1px #1e4d2e, inset 0 0 16px #000;
  padding: 4px 12px; overflow: hidden;
}
.lcd-card { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; color: #59ffa0; font: 700 11.5px "Courier New", monospace; letter-spacing: 1px; }
.lcd-chip { width: 17px; height: 13px; border: 1.5px solid #59ffa0; border-radius: 2.5px; display: inline-block; box-shadow: inset 0 0 4px rgba(89,255,160,.6); }
.lcd-ticker { flex: 1; overflow: hidden; white-space: nowrap; }
.lcd-ticker-inner { display: inline-flex; animation: ticker 30s linear infinite; }
.lcd-ticker span { color: #59ffa0; font: 700 12.5px "Courier New", monospace; letter-spacing: 1px; text-shadow: 0 0 7px rgba(89,255,160,.55); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== bandeau message mince (au-dessus des rouleaux) ===== */
.msg-display {
  flex: 0 0 auto;
  background: #000; border: 2px solid #2c3260; border-radius: 10px;
  box-shadow: inset 0 0 18px rgba(0,0,0,.9);
  text-align: center; padding: 4px 10px 3px;
  display: flex; flex-direction: column; justify-content: center;
}
#msg-main { font-size: clamp(14px, 2.3dvh, 21px); font-weight: 900; letter-spacing: 1.5px; color: var(--led-amber); text-shadow: 0 0 11px rgba(255,196,77,.55); text-transform: uppercase; line-height: 1.15; }
#msg-sub { font-size: clamp(10.5px, 1.6dvh, 13px); color: #b9cdf5; font-weight: 700; min-height: 13px; line-height: 1.2; }

/* ===== écran principal ===== */
.main-screen {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  border: 3px solid #000; border-radius: 16px; overflow: hidden;
  box-shadow: inset 0 0 0 2px #2c3260, inset 0 0 50px rgba(0,0,0,.55);
  background: #05081c;
}
.frame-top {
  flex: 0 0 auto; text-align: center; padding: 4px 6px 3px;
  font-weight: 900; letter-spacing: 3px; font-size: clamp(12px, 2dvh, 16px); color: var(--gold);
  background: linear-gradient(180deg, #2a1400, #120a02);
  border-bottom: 2px solid var(--gold-deep);
  text-shadow: 0 0 10px rgba(255,200,60,.55);
}
.frame-top .ft-sub { color: #c8a24a; letter-spacing: 2px; }
.frame-top .ft-star { color: #ffe9a8; }
body.fs-mode .frame-top { background: linear-gradient(180deg, #3a0a6e, #1c0440); border-bottom-color: #b45cff; color: #e2b8ff; text-shadow: 0 0 10px rgba(180,92,255,.6); }
.reel-row {
  position: relative; flex: 1 1 auto; min-height: 0;
  display: flex; gap: 5px; align-items: stretch;
  padding: 8px 7px;
}
.reel-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: 132% 132%; background-position: 50% 42%;
  filter: brightness(.42) saturate(1.1);
  animation: bgPan 26s ease-in-out infinite alternate;
}
@keyframes bgPan { from { background-position: 42% 38%; } to { background-position: 58% 58%; } }
.reel-row::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.06) 48%, transparent 60%);
  background-size: 280% 100%;
  animation: shine 9s ease-in-out infinite;
}
.rail { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; gap: 2px; padding: 2px 0; }
.rail-num {
  width: 20px; min-height: 15px; flex: 1 1 auto; border-radius: 4px;
  background: #10122b; color: #7e90bd; border: 1px solid #2c3260;
  font-size: 9.5px; font-weight: 900; display: flex; align-items: center; justify-content: center;
}
.rail-num.lit { background: var(--c, #ffd94d); color: #141414; border-color: #fff; box-shadow: 0 0 11px var(--c, #ffd94d); animation: railFlash .35s infinite alternate; }
@keyframes railFlash { from { transform: scale(1); } to { transform: scale(1.22); } }
.reels-wrap { position: relative; z-index: 2; flex: 1; min-width: 0; }
#reels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; height: 100%; }
.reel {
  position: relative; overflow: hidden; height: 100%;
  background: linear-gradient(180deg, rgba(10,14,44,.94), rgba(4,6,22,.96));
  border: 2px solid #9a7f2e; border-radius: 10px;
  box-shadow: inset 0 0 22px rgba(0,0,0,.8), inset 0 12px 18px rgba(0,0,0,.55), inset 0 -12px 18px rgba(0,0,0,.55);
}
.strip { will-change: transform; }
.strip.blur .cell { filter: blur(1.6px) brightness(1.15); }
.cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-bottom: 1px solid rgba(140,150,200,.16); padding: 3px; position: relative; overflow: hidden;
}
.cell.sym-flag {
  background: linear-gradient(180deg, #ffffff, #e9edf8 55%, #ccd4ea);
  margin: 4px; border-radius: 8px; border: 2px solid #c9a227;
  box-shadow: inset 0 1px 0 #fff, inset 0 -7px 11px rgba(20,30,80,.16), 0 2px 6px rgba(0,0,0,.5);
}
.cell.sym-flag img { width: 86%; height: 57%; object-fit: cover; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.45); filter: saturate(1.15); }
.sym-name { width: 100%; max-width: 100%; font-size: clamp(6.5px, 1.3vw, 10px); font-weight: 900; letter-spacing: 0; color: #16264d; text-transform: uppercase; margin-top: 3px; text-align: center; line-height: 1.05; overflow-wrap: anywhere; }
.cell.sym-art { margin: 4px; border-radius: 8px; overflow: hidden; border: 2px solid #d4af37; box-shadow: inset 0 0 14px rgba(255,200,60,.25), 0 2px 7px rgba(0,0,0,.55); }
.cell.sym-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sym-tag {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  font-size: clamp(7px, 1.3vw, 10px); font-weight: 900; letter-spacing: 1.5px;
  padding: 1.5px 8px; border-radius: 8px; color: #fff; white-space: nowrap;
}
.tag-bonus { background: linear-gradient(180deg, #ff7043, #c21807); box-shadow: 0 0 9px rgba(255,80,40,.8); }
.tag-wild { background: linear-gradient(180deg, #b45cff, #6d28a8); box-shadow: 0 0 9px rgba(180,92,255,.8); }
.cell.win { animation: cellWin .45s infinite alternate; z-index: 3; }
.cell.sym-flag.win { box-shadow: 0 0 0 2.5px #ffd94d, 0 0 20px #ffd94d; }
.cell.sym-art.win { box-shadow: 0 0 0 2.5px #ffd94d, 0 0 22px #ffd94d; }
@keyframes cellWin { from { transform: scale(1); } to { transform: scale(1.055); } }
.cell.ally { animation: allyPulse .5s ease-in-out infinite alternate; z-index: 3; }
.cell.sym-flag.ally { box-shadow: 0 0 0 2.5px #4dc3ff, 0 0 22px #4dc3ff; }
.cell.sym-art.ally { box-shadow: 0 0 0 2.5px #4dc3ff, 0 0 22px #4dc3ff; }
@keyframes allyPulse { from { transform: scale(1); } to { transform: scale(1.07); } }
.cell.fs-glow { animation: fsGlow .55s ease-in-out infinite alternate; z-index: 3; }
.cell.sym-art.fs-glow { box-shadow: 0 0 0 3px #c99aff, 0 0 30px #a55cff; }
@keyframes fsGlow { from { transform: translateY(0) scale(1); } to { transform: translateY(-4px) scale(1.06); } }
#line-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }
.win-line { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; opacity: .92; filter: drop-shadow(0 0 5px rgba(0,0,0,.65)); }
#fs-badge {
  display: none; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); z-index: 6;
  background: linear-gradient(180deg, #7b2ff7, #4a148c); border: 2px solid #e2b8ff; color: #fff;
  font-weight: 900; letter-spacing: 1px; font-size: clamp(9.5px, 2.4vw, 13px); padding: 5px 13px; border-radius: 20px;
  box-shadow: 0 0 18px rgba(150,80,255,.75); text-align: center; white-space: nowrap; max-width: 94%;
}

/* géométrie des rouleaux — v2.1 : plus AUCUNE unité conteneur (cqh) —
   dans le WebView du téléphone, container-type: size s'effondrait et la
   fenêtre des rouleaux tombait à une bande de quelques pixels. La fenêtre
   hérite maintenant sa hauteur de la colonne flex (pourcentages, voie
   robuste partout), et la hauteur exacte d'une case est mesurée au DOM
   par war.js puis publiée dans la variable --cellh : hauteur de case +
   marges verticales = exactement --cellh, donc le calcul de défilement
   du moteur reste exact au pixel à toute taille d'écran. */
.reel-row { align-items: stretch; }
.rail { align-self: stretch; height: auto; max-height: none; }
#reels { grid-template-rows: 1fr; }
.cell { height: var(--cellh, 90px); }
.cell.sym-flag, .cell.sym-art { height: calc(var(--cellh, 90px) - 8px); }

/* ===== cinématique bonus (arrivée des tanks) ===== */
#cine {
  position: absolute; inset: 0; z-index: 7; overflow: hidden; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
#cine.show { opacity: 1; }
.cine-scene { position: absolute; inset: 0; background-size: 135% 135%; filter: brightness(.75) saturate(1.15); animation: cinePan 3s linear forwards; }
@keyframes cinePan { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
.cine-bar { position: absolute; left: 0; right: 0; height: 13%; background: #000; z-index: 3; transform: scaleY(0); transition: transform .3s ease; }
.cine-bar-top { top: 0; transform-origin: top; }
.cine-bar-bottom { bottom: 0; transform-origin: bottom; }
#cine.show .cine-bar { transform: scaleY(1); }
.cine-dust {
  position: absolute; z-index: 1; bottom: 11%; left: -45%; width: 46%; height: 24%;
  background: radial-gradient(ellipse at center, rgba(255,190,80,.4), transparent 70%);
  filter: blur(7px);
}
#cine.show .cine-dust { animation: tankRoll 2.3s cubic-bezier(.3,.6,.4,1) .24s forwards; }
#cine-tank {
  position: absolute; z-index: 2; bottom: 15%; left: -42%; width: 37%;
  border-radius: 10px; box-shadow: 0 12px 22px rgba(0,0,0,.65);
}
#cine.show #cine-tank { animation: tankRoll 2.3s cubic-bezier(.3,.6,.4,1) .15s forwards; }
@keyframes tankRoll {
  0% { left: -42%; transform: translateY(0); }
  45% { transform: translateY(-4px); }
  100% { left: 105%; transform: translateY(0); }
}
.cine-title {
  position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center;
  font-size: clamp(34px, 9vw, 56px); font-weight: 900; letter-spacing: 5px; opacity: 0;
  background: linear-gradient(180deg, #fff6b0 15%, #ffd94d 45%, #ff9d00 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #6e4700) drop-shadow(0 8px 22px rgba(0,0,0,.75));
}
#cine.show .cine-title { animation: cineTitle 2.5s ease forwards; }
@keyframes cineTitle {
  0% { opacity: 0; transform: scale(.6); } 22% { opacity: 1; transform: scale(1.06); }
  42% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1.02); }
}

/* ===== affichages (compteurs) ===== */
.meters { flex: 0 0 auto; display: flex; gap: 8px; }
.meter { flex: 1; background: #000; border: 2px solid #2c3260; border-radius: 10px; text-align: center; padding: 4px 4px 5px; box-shadow: inset 0 0 14px rgba(0,0,0,.9); }
.meter label { font-size: 10px; letter-spacing: 3px; color: #8fa3cc; font-weight: 900; }
.meter-val { font-family: "Courier New", monospace; font-size: clamp(18px, 3.2dvh, 27px); font-weight: 900; color: #dfe7ff; }
.meter-val.gold { color: var(--gold); text-shadow: 0 0 9px rgba(255,210,80,.6); }
.meter-val.green { color: var(--led-green); text-shadow: 0 0 9px rgba(80,255,160,.55); }

/* ===== panneau de boutons physique ===== */
.deck {
  flex: 0 0 auto;
  display: flex; gap: 12px; align-items: center;
  background: linear-gradient(180deg, #333a55, #171b31 60%, #232842);
  border: 2px solid #000; border-radius: 15px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.22), inset 0 -10px 20px rgba(0,0,0,.55);
  padding: 9px 13px;
}
.deck-group { text-align: center; }
.ctl-label { font-size: 10px; font-weight: 900; letter-spacing: 2.2px; color: #c8d4f5; margin-bottom: 4px; }
.ctl-row { display: flex; align-items: center; gap: 5px; }
.ctl-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid #000;
  background: radial-gradient(circle at 38% 30%, #7a86ad, #2b3153 72%); color: #fff;
  font-size: 20px; font-weight: 900; cursor: pointer;
  box-shadow: 0 3px 0 #000, inset 0 1px 0 rgba(255,255,255,.35);
}
.ctl-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }
.ctl-btn:disabled { opacity: .4; cursor: default; }
.ctl-val {
  min-width: 48px; background: #000; border: 2px solid #454e7d; border-radius: 7px;
  font-family: "Courier New", monospace; font-weight: 900; font-size: 19px; color: var(--led-green);
  padding: 4px 4px; text-shadow: 0 0 7px rgba(80,255,160,.5);
}
.deck-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.deck-btn {
  border: 2px solid #000; border-radius: 20px; padding: 9px 12px; cursor: pointer;
  background: linear-gradient(180deg, #4a5a94, #232c52); color: #eef1ff;
  font: 900 12px "Trebuchet MS", sans-serif; letter-spacing: 1px;
  box-shadow: 0 3px 0 #000, inset 0 1px 0 rgba(255,255,255,.28);
}
.deck-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }
.deck-btn:disabled { opacity: .4; cursor: default; }
.deck-btn.on { background: linear-gradient(180deg, #ffe066, #e0a800); color: #241a00; }
.acceptor { margin-left: auto; text-align: center; }
.acceptor-slot {
  width: 62px; height: 44px; background: #0a0a12; border: 2px solid #000; border-radius: 6px;
  box-shadow: inset 0 0 12px #000; position: relative;
}
.acceptor-slot::before { content: ""; position: absolute; left: 9px; right: 9px; top: 8px; height: 5px; border-radius: 3px; background: #2ee06f; box-shadow: 0 0 10px #2ee06f; animation: accBlink 2.4s infinite; }
.acceptor-slot::after { content: ""; position: absolute; left: 15px; right: 15px; bottom: 8px; height: 13px; border: 1.5px dashed #3c5a46; border-radius: 3px; }
@keyframes accBlink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.acceptor-label { font-size: 8.5px; letter-spacing: 2px; color: #8fa3cc; font-weight: 800; margin-top: 4px; }
.acceptor-light { display: none; }
#btn-spin {
  margin-left: auto;
  width: clamp(84px, 12.5dvh, 118px); height: clamp(84px, 12.5dvh, 118px); border-radius: 50%; cursor: pointer;
  border: 4px solid #ffe9a8; flex: 0 0 auto;
  background: radial-gradient(circle at 50% 30%, #ffb199, #e0331c 55%, #8f1306);
  color: #fff; font: 900 clamp(19px, 2.8dvh, 23px) "Trebuchet MS", sans-serif; letter-spacing: 1px;
  text-shadow: 0 2px 3px rgba(0,0,0,.5);
  box-shadow: 0 6px 0 #5e0a02, 0 0 32px rgba(255,90,50,.55);
  animation: spinPulse 1.7s ease-in-out infinite;
}
.acceptor + #btn-spin { margin-left: 0; }
@keyframes spinPulse { 0%,100% { box-shadow: 0 6px 0 #5e0a02, 0 0 18px rgba(255,90,50,.4);} 50% { box-shadow: 0 6px 0 #5e0a02, 0 0 40px rgba(255,90,50,.8);} }
#btn-spin:active { transform: translateY(4px); box-shadow: 0 2px 0 #5e0a02; }
#btn-spin:disabled { opacity: .5; animation: none; cursor: default; }
.reload-row { flex: 0 0 auto; text-align: center; }
.reload-row:empty { display: none; }
#btn-reload {
  border: 2px solid var(--gold-deep); border-radius: 10px; padding: 8px 20px; cursor: pointer;
  background: linear-gradient(180deg, #ffe066, #e0a800); color: #241a00;
  font: 900 13.5px "Trebuchet MS", sans-serif; letter-spacing: 1px;
  box-shadow: 0 3px 0 #7a5b00, 0 0 18px rgba(255,200,60,.5);
}

/* ===== belly glass ===== */
.belly {
  flex: 0 1 auto; min-height: 0;
  border: 3px solid var(--gold-deep); border-radius: 13px; overflow: hidden;
  box-shadow: 0 0 22px rgba(255,190,40,.25), inset 0 0 30px rgba(0,0,0,.4);
}
.belly img { width: 100%; height: clamp(38px, 8.5dvh, 118px); object-fit: cover; object-position: center 38%; display: block; }
.cab-footer { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; font-size: 10px; letter-spacing: 2px; color: #8fa3cc; font-weight: 800; }
.cab-footer a { color: var(--gold); text-decoration: none; }
.cab-footer .sep { color: #4a5588; }

/* ===== célébrations : bannière, flash de bordure, pièces, confettis ===== */
#edge-flash {
  position: fixed; inset: 0; z-index: 65; pointer-events: none; opacity: 0;
  box-shadow: inset 0 0 90px rgba(255,200,60,.85), inset 0 0 0 5px rgba(255,220,120,.9);
}
body.party-big #edge-flash { opacity: 1; animation: edgeFlash .45s ease-in-out infinite alternate; }
body.party-mega #edge-flash { opacity: 1; animation: edgeFlash .22s ease-in-out infinite alternate; }
@keyframes edgeFlash { from { filter: brightness(.75); } to { filter: brightness(1.45); } }
#win-banner {
  position: fixed; top: 34%; left: 50%; transform: translate(-50%, -50%) scale(.6);
  z-index: 125; text-align: center; pointer-events: none; opacity: 0;
  transition: opacity .25s, transform .25s;
}
#win-banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#win-banner::after {
  content: ""; position: absolute; inset: -12px -30px; z-index: -1; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%);
  background-size: 280% 100%; opacity: 0;
}
#win-banner.show::after { opacity: 1; animation: shine 1.1s ease-in-out infinite; }
#win-banner-title {
  font-size: clamp(38px, 8.5vw, 74px); font-weight: 900; letter-spacing: 3px;
  background: linear-gradient(180deg, #fff6b0 15%, #ffd94d 45%, #ff9d00 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #6e4700) drop-shadow(0 8px 22px rgba(0,0,0,.75));
}
#win-banner-sub { font-size: clamp(17px, 3.6vw, 27px); font-weight: 900; color: #fff; text-shadow: 0 2px 9px rgba(0,0,0,.85); letter-spacing: 1px; }
#win-banner.banner-big #win-banner-title { font-size: clamp(44px, 10vw, 84px); }
#win-banner.banner-mega #win-banner-title {
  font-size: clamp(52px, 12.5vw, 104px);
  animation: jackpotBlink .3s steps(2, end) infinite;
}
@keyframes jackpotBlink {
  0% { filter: drop-shadow(0 3px 0 #6e4700) drop-shadow(0 0 26px rgba(255,190,40,.95)) brightness(1.25); }
  100% { filter: drop-shadow(0 3px 0 #6e4700) drop-shadow(0 8px 22px rgba(0,0,0,.75)) brightness(.92); }
}
#coin-layer { position: fixed; inset: 0; pointer-events: none; z-index: 130; overflow: hidden; }
.coin {
  position: absolute; top: 36%; width: 21px; height: 21px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff2b0, #f7d774 45%, #b8860b);
  border: 1.5px solid #7a5b00; box-shadow: 0 0 8px rgba(255,200,60,.7);
}
#confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 131; overflow: hidden; }
.confetti { position: absolute; top: -4vh; width: 9px; height: 14px; border-radius: 2px; box-shadow: 0 0 6px rgba(0,0,0,.3); }

/* ===== modales ===== */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(1,2,10,.82); padding: 12px 8px; overflow-y: auto;
}
.modal.open { display: block; }
.modal-box {
  position: relative; width: 100%; max-width: 860px; margin: 4px auto;
  background: linear-gradient(180deg, #131a45, #080d2c);
  border: 3px solid var(--gold-deep); border-radius: 16px;
  padding: 18px 20px; box-shadow: 0 24px 60px rgba(0,0,0,.8);
  max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); display: flex; flex-direction: column;
}
.modal-box h2 { text-align: center; color: var(--gold); letter-spacing: 3px; font-size: clamp(19px, 3dvh, 25px); margin-bottom: 6px; text-shadow: 0 0 14px rgba(255,200,60,.4); }
.modal-box h3 { color: var(--gold); letter-spacing: 2px; margin: 17px 0 6px; font-size: 16px; }
.modal-box p { color: #c9d6fa; font-size: 14px; line-height: 1.5; }
.modal-sub { text-align: center; }
.modal-fine { font-size: 11.5px !important; color: #8fa3cc !important; margin-top: 14px; }
.modal-close {
  position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid #000; background: linear-gradient(180deg, #ff7043, #c21807); color: #fff;
  font-size: 16px; font-weight: 900; cursor: pointer; box-shadow: 0 2px 0 #000; z-index: 5;
}
.pt-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 4px; }
.pt-table { width: 100%; border-collapse: collapse; font-size: 13.5px; table-layout: fixed; }
.pt-table th:first-child { width: 46%; }
.pt-table td { overflow-wrap: anywhere; }
.pt-table th { text-align: left; color: var(--gold); letter-spacing: 1px; padding: 5px 7px; border-bottom: 2px solid #2c3260; }
.pt-table td { padding: 4.5px 7px; border-bottom: 1px solid #1d2450; color: #dbe5ff; font-weight: 700; }
.pt-table td:not(:first-child) { font-family: "Courier New", monospace; font-weight: 900; }
.pt-flag { width: 30px; height: auto; border-radius: 3px; vertical-align: middle; margin-right: 6px; }
.pt-art { width: 30px; height: 30px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: 6px; }
.pt-chip { display: inline-block; color: #fff; font-weight: 900; font-size: 12px; padding: 4px 10px; border-radius: 12px; margin: 2.5px; border: 1.5px solid rgba(255,255,255,.5); text-shadow: 0 1px 2px rgba(0,0,0,.6); }

/* ===== conquête : la scène de la carte ===== */
.cq-box { overflow: hidden; }
.cq-box.grand { animation: cabFlash .3s ease-in-out infinite alternate; border-color: #ffe9a8; }
.cq-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(.3); }
.cq-box > *:not(.cq-bg) { position: relative; z-index: 2; }
.cq-stats { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 8px 0 2px; }
.cq-stats div { background: #000; border: 2px solid #2c3260; border-radius: 9px; padding: 7px 16px; font-weight: 900; letter-spacing: 1.5px; font-size: 14px; color: #b9cdf5; }
.cq-stats b { color: var(--gold); font-family: "Courier New", monospace; }
#cq-msg { text-align: center; min-height: 38px; font-weight: 700; }
#cq-map {
  position: relative; height: 64px; margin: 8px 0 4px;
  border: 2px solid #8a7433; border-radius: 10px; overflow: hidden;
  background: linear-gradient(180deg, rgba(12,18,48,.88), rgba(6,8,26,.92));
  box-shadow: inset 0 0 18px rgba(0,0,0,.6);
}
.cq-track {
  position: absolute; left: 5%; right: 5%; top: 50%; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, #7a5b00, #f7d774, #7a5b00);
  box-shadow: 0 0 9px rgba(255,200,60,.55);
}
.cq-node {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 29px; height: 29px; border-radius: 50%; overflow: hidden;
  border: 2px solid #8a7433; background: #101736; z-index: 2;
}
.cq-node img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cq-node.taken { border-color: #ffe9a8; box-shadow: 0 0 13px #ffd94d; }
.cq-node.taken::after { content: ""; position: absolute; inset: 0; background: rgba(255,200,60,.38); }
#cq-tank {
  position: absolute; z-index: 3; top: 1px; width: 38px; height: 38px; object-fit: cover;
  border-radius: 8px; border: 1.5px solid #d4af37;
  transform: translateX(-50%); transition: left .8s cubic-bezier(.3,.7,.3,1);
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.6));
}
#cq-plane { top: 26%; }
#cq-plane.fly { animation: flyX 1.1s linear forwards; }
#cq-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 10px 0; }
.cq-card {
  position: relative; border: 2.5px solid #8a7433; border-radius: 11px; cursor: pointer;
  background: linear-gradient(180deg, #fdfdf4, #d5daea); color: #16264d;
  padding: 8px 5px 7px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-family: inherit; transition: transform .12s;
}
.cq-card:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 8px 18px rgba(0,0,0,.5); }
.cq-card img { width: 72%; height: 40px; object-fit: cover; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.cq-name { font-weight: 900; font-size: 12px; text-transform: uppercase; text-align: center; line-height: 1.1; }
.cq-prize { font-weight: 900; color: #a30f00; font-size: 13px; }
.cq-chance { font-size: 10px; color: #4a5a85; font-weight: 700; }
.cq-card.done { background: linear-gradient(180deg, #ffe066, #d9a514); border-color: #fff2b0; }
.cq-card.failed { opacity: .55; filter: grayscale(.5); }
.cq-stamp {
  position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%) rotate(-13deg);
  background: rgba(20,120,40,.92); color: #fff; font-weight: 900; letter-spacing: 1.5px;
  padding: 3px 11px; border-radius: 5px; font-size: 13px; border: 2px solid #fff;
}
.cq-stamp.fail { background: rgba(178,24,7,.92); }
.cq-card.shake { animation: shake .5s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }
.cq-cash { display: block; margin: 4px auto 2px; background: linear-gradient(180deg, #ffe066, #e0a800); color: #241a00; font-size: 14px; padding: 12px 26px; }

/* ===== responsive ===== */
@media (min-width: 900px) {
  body { padding: 12px 10px; }
  .cabinet { height: calc(100dvh - 24px); border-radius: 24px; padding: 12px 20px 10px; }
}
@media (max-width: 760px) {
  /* v2.1 : la borne est épinglée à la fenêtre visible — exactement la
     largeur et la hauteur de l'écran du téléphone, bord à bord, et rien
     ne peut la faire dépasser (aucun défilement horizontal ni vertical). */
  .cabinet { position: fixed; inset: 0; height: auto; max-width: none; border-left: none; border-right: none; border-radius: 0; padding: 6px 7px 5px; gap: 4px; }
  .cabinet::before, .cabinet::after { display: none; }
  :root { --wheel: clamp(100px, 15.5dvh, 170px); }
  .topper { padding: 6px 0 5px; }
  .topper img { height: clamp(40px, 7dvh, 96px); }
  .upper-screen { padding: 7px 9px; gap: 9px; }
  .wheel-title { display: none; }
  .wheel-note, .jp-note { display: none; }
  .jackpots { gap: 4px; }
  .jp { padding: 3px 9px; }
  .jp-name { font-size: 12px; letter-spacing: 1.5px; }
  .jp-amount { font-size: clamp(14px, 2.2dvh, 20px); }
  .cab-footer { font-size: 9px; letter-spacing: 1px; gap: 4px; }
  .cab-footer > span:first-child { display: none; }
  .lcd-card { display: none; }
  .frame-top { font-size: 13px; letter-spacing: 2px; }
  .frame-top .ft-sub { display: none; }
  #msg-main { font-size: clamp(13px, 2dvh, 18px); }
  #msg-sub { font-size: 11px; min-height: 12px; }
  .meter-val { font-size: clamp(16px, 2.6dvh, 24px); }
  .rail-num { width: 15px; font-size: 8px; border-radius: 3px; }
  .reel-row { padding: 6px 4px; gap: 3px; }
  #reels { gap: 4px; }
  .cell.sym-flag, .cell.sym-art { margin: 3px; height: calc(var(--cellh, 90px) - 6px); }
  #fs-badge { white-space: normal; }
  /* panneau de boutons sur deux rangées : contrôles + JOUER, puis les
     4 boutons de fonction — tout tient dans la largeur de l'écran */
  .deck { flex-wrap: wrap; gap: 8px; row-gap: 6px; padding: 8px 9px; }
  .deck-group { min-width: 0; }
  .deck-btns { order: 10; flex: 1 1 100%; grid-template-columns: repeat(4, 1fr); }
  .deck-btn { padding: 8px 4px; font-size: 11px; }
  .acceptor { display: none; }
  #btn-spin { margin-left: auto; width: clamp(76px, 10dvh, 96px); height: clamp(76px, 10dvh, 96px); font-size: 17px; }
  .belly img { height: clamp(30px, 6dvh, 90px); }
  .modal { padding: 10px 6px; }
  .modal-box { padding: 14px 12px; }
  .pt-table { font-size: 12.5px; }
  .pt-table th, .pt-table td { padding: 4px 5px; }
  .pt-flag { width: 24px; }
  .pt-art { width: 24px; height: 24px; }
  #cq-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .ctl-btn { width: 34px; height: 34px; font-size: 18px; }
  .ctl-val { min-width: 42px; font-size: 17px; }
  .deck { gap: 6px; padding: 8px 7px; }
  .deck-btn { padding: 8px 4px; font-size: 11px; }
  #btn-spin { width: 72px; height: 72px; font-size: 15px; }
  .jp { padding: 4px 9px; }
  .frame-top .ft-sub { display: none; }
}
@media (max-height: 820px) {
  /* écrans courts : on rend la hauteur aux rouleaux (dégradation douce) */
  .belly, .cab-footer, .lcd { display: none; }
}
@media (max-height: 640px) {
  :root { --wheel: clamp(96px, 15dvh, 140px); }
  .topper img { height: clamp(38px, 7.5dvh, 64px); }
  .wheel-note, .jp-note { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reel-bg, .lcd-ticker-inner, .topper-shine, .reel-row::after { animation: none; }
}
