/* ═══════════════════════════════════════════════════════════════
   LE FLAMBEUR — design system
   Vieux Vegas × casino de Deauville : feutrine verte, laiton, or,
   enseignes à ampoules. Display: Limelight · Corps: Jost · Chiffres: Oswald
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg0: #07100a;
  --bg1: #0c1b11;
  --felt: #0f2818;
  --felt2: #143421;
  --card: #122519;
  --card2: #16301f;
  --line: rgba(230, 183, 92, 0.22);
  --line-soft: rgba(230, 183, 92, 0.12);
  --gold: #e6b75c;
  --gold2: #ffdd8f;
  --gold-deep: #96762f;
  --cream: #f4ead0;
  --ink: #241505;
  --muted: #8fae97;
  --red: #c8323e;
  --red-deep: #8e2438;
  --blue-chip: #3d6fa8;
  --purple-chip: #6d4494;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --radius: 14px;
  --font-display: 'Limelight', Georgia, serif;
  --font-body: 'Jost', system-ui, sans-serif;
  --font-num: 'Oswald', 'Arial Narrow', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  /* fond du rebond iOS (rubber-band) : sans ça, Safari montre du blanc
     quand on tire la page au-delà du haut ou du bas */
  background: var(--bg0);
  overscroll-behavior-y: none;
  /* défilement uniquement : pas de zoom double-tap ni pincement
     (contraint aussi tous les descendants) */
  touch-action: pan-x pan-y;
}

body {
  font-family: var(--font-body);
  color: var(--cream);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(230, 183, 92, 0.07), transparent 60%),
    radial-gradient(900px 900px at 110% 110%, rgba(142, 36, 56, 0.12), transparent 55%),
    radial-gradient(ellipse at center, var(--bg1) 0%, var(--bg0) 75%);
  min-height: 100dvh;
  overflow-x: hidden;
}

button {
  font-family: inherit; color: inherit; cursor: pointer; background: none; border: none;
  /* évite le zoom double-tap iOS quand on enchaîne les taps (mises, jetons) */
  touch-action: manipulation;
}
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--gold2);
  outline-offset: 2px;
}
input {
  font-family: var(--font-body);
  color: var(--cream);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px;
  width: 100%;
}
input::placeholder { color: rgba(244, 234, 208, 0.35); }
b, strong { color: var(--gold2); }

/* ───────────────────────── Boutons ───────────────────────── */

.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.06em;
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.4); }

.btn-gold {
  color: var(--ink);
  background: linear-gradient(180deg, #ffe3a1 0%, var(--gold) 45%, #c8963c 100%);
  border: 1px solid #ffedbe;
  box-shadow: 0 4px 0 #7a5c22, 0 10px 24px rgba(230, 183, 92, 0.28);
  text-transform: uppercase;
}
.btn-gold:not(:disabled):hover { filter: brightness(1.07); box-shadow: 0 4px 0 #7a5c22, 0 12px 34px rgba(230, 183, 92, 0.45); }
.btn-gold:active { box-shadow: 0 1px 0 #7a5c22; }

.btn-cream {
  color: var(--ink);
  background: linear-gradient(180deg, #fdf6e3, #e4d5ae);
  border: 1px solid #fff;
  box-shadow: 0 3px 0 #9c8a5e;
}
.btn-ghost {
  color: var(--gold);
  border: 1px solid var(--line);
  background: rgba(230, 183, 92, 0.06);
}
.btn-ghost:hover { background: rgba(230, 183, 92, 0.14); }

.btn-big { width: 100%; padding: 16px 24px; font-size: 18px; border-radius: 14px; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-sub { font-size: 11px; font-weight: 500; opacity: 0.75; letter-spacing: 0.04em; text-transform: none; }

.btn-cashout {
  color: #08260f;
  background: linear-gradient(180deg, #b7f3c3, #4fc36e 55%, #2e9b4e);
  border: 1px solid #d9ffe2;
  box-shadow: 0 4px 0 #17612e, 0 0 30px rgba(79, 195, 110, 0.4);
  text-transform: uppercase;
  animation: cashoutPulse 0.9s ease-in-out infinite;
}
@keyframes cashoutPulse {
  50% { box-shadow: 0 4px 0 #17612e, 0 0 52px rgba(79, 195, 110, 0.75); }
}

.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.25);
  font-size: 18px;
  flex: none;
}
.icon-btn.back { font-size: 26px; line-height: 1; padding-bottom: 3px; color: var(--gold); }

/* ───────────────────── Enseigne à ampoules ───────────────────── */

.marquee-frame {
  position: relative;
  text-align: center;
  padding: 18px 16px;
  border: 3px solid var(--gold-deep);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(230, 183, 92, 0.10), rgba(0, 0, 0, 0.25)),
    var(--card);
  box-shadow: var(--shadow), inset 0 0 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.marquee-frame::before {
  content: '';
  position: absolute; inset: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  pointer-events: none;
}

.marquee-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 8vw, 56px);
  letter-spacing: 0.04em;
  color: var(--gold2);
  text-shadow:
    0 0 6px rgba(255, 221, 143, 0.8),
    0 0 26px rgba(230, 183, 92, 0.55),
    0 3px 0 #6b4f1c;
  margin: 6px 0 2px;
}
.marquee-sub {
  font-family: var(--font-num);
  font-size: clamp(10px, 2.6vw, 13px);
  letter-spacing: 0.34em;
  color: var(--muted);
  margin-bottom: 6px;
}

.bulb-row {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 3vw, 22px);
  padding: 4px 0;
}
.bulb {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff7dd, var(--gold) 55%, #7a5c22);
  box-shadow: 0 0 8px 2px rgba(255, 221, 143, 0.65);
  animation: bulbChase 1.05s linear infinite;
  animation-delay: calc(var(--i) * 0.15s);
}
@keyframes bulbChase {
  0%, 100% { opacity: 1; box-shadow: 0 0 9px 3px rgba(255, 221, 143, 0.75); }
  50% { opacity: 0.25; box-shadow: 0 0 2px 0 rgba(255, 221, 143, 0.1); }
}

/* ───────────────────────── Topbar ───────────────────────── */

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
  background: linear-gradient(180deg, rgba(7, 16, 10, 0.96), rgba(7, 16, 10, 0.88));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.logo-mini {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(230, 183, 92, 0.5);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.balance-sign {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px;
  border: 2px solid var(--gold-deep);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(230, 183, 92, 0.14), rgba(0, 0, 0, 0.4)),
    var(--card);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6), 0 0 18px rgba(230, 183, 92, 0.18);
}
.balance-sign.bump { animation: balanceBump 0.5s ease; }
@keyframes balanceBump {
  30% { transform: scale(1.08); box-shadow: inset 0 0 12px rgba(0,0,0,.6), 0 0 34px rgba(255, 221, 143, 0.6); }
}

.coin-ic {
  width: 22px; height: 22px; flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff3cf, var(--gold) 52%, #8a6a28 95%);
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.35), 0 0 8px rgba(255, 221, 143, 0.4);
  position: relative;
}
.coin-ic::after {
  content: 'F';
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 11px;
  color: rgba(90, 62, 10, 0.85);
}

/* Odomètre */
.odometer {
  display: inline-flex;
  font-family: var(--font-num);
  font-weight: 600;
  font-size: 20px;
  color: var(--gold2);
  line-height: 1;
  overflow: hidden;
  height: 1em;
}
.odo-sep { width: 0.28em; }
.odo-digit { height: 1em; overflow: hidden; }
.odo-col {
  display: flex; flex-direction: column;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.odo-col span { height: 1em; line-height: 1; display: block; text-align: center; }

/* ───────────────────────── Structure ───────────────────────── */

#views {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 14px calc(96px + env(safe-area-inset-bottom));
}
.view { animation: viewIn 0.3s ease; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
}

.game-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.game-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  color: var(--gold2);
  text-shadow: 0 0 14px rgba(230, 183, 92, 0.4);
  flex: 1;
}
.rules-hint { font-family: var(--font-num); font-size: 12px; color: var(--muted); letter-spacing: 0.1em; }

.section-title {
  font-family: var(--font-num);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 13px;
  color: var(--muted);
  margin: 26px 4px 12px;
}
.section-title::before { content: '◆ '; color: var(--gold-deep); }

.card-panel {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.disclaimer {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  margin: 26px auto 8px;
  max-width: 480px;
  opacity: 0.8;
}

/* ───────────────────────── Tabbar ───────────────────────── */

.tabbar {
  position: fixed;
  left: 50%; bottom: calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 20, 13, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 86px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.tab-ic { font-size: 17px; }
.tab.active {
  color: var(--ink);
  background: linear-gradient(180deg, #ffe3a1, var(--gold));
  box-shadow: 0 4px 14px rgba(230, 183, 92, 0.35);
}

/* ───────────────────────── Lobby ───────────────────────── */

.hero-marquee { margin: 6px 0 18px; }

.claim-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  background: linear-gradient(120deg, rgba(142, 36, 56, 0.30), rgba(0, 0, 0, 0.2)), var(--card);
  border: 1px solid rgba(200, 50, 62, 0.4);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
}
.claim-txt { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.claim-txt strong { font-size: 16px; }
.claim-timer {
  font-family: var(--font-num);
  font-size: 15px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 12px;
}
.game-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 20px 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: linear-gradient(170deg, var(--card2), var(--card) 70%);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}
.game-card::after { /* reflet balayant */
  content: '';
  position: absolute; inset: -60% auto auto -60%;
  width: 60%; height: 220%;
  background: linear-gradient(100deg, transparent, rgba(255, 235, 190, 0.14), transparent);
  transform: rotate(18deg) translateX(-140%);
  transition: transform 0.7s ease;
  pointer-events: none;
}
.game-card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: 0 18px 40px rgba(0,0,0,.55), 0 0 24px rgba(230,183,92,.12); }
.game-card:hover::after { transform: rotate(18deg) translateX(420%); }
.gc-name { font-family: var(--font-display); font-size: 17px; color: var(--gold2); }
.gc-tag { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.gc-odds {
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 3px 10px;
  margin-top: 4px;
}

/* petites œuvres des cartes de jeu */
.gc-art { height: 58px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.art-slots i {
  font-style: normal;
  display: grid; place-items: center;
  width: 34px; height: 46px;
  background: linear-gradient(180deg, #fdf6e3, #ded0a8);
  border-radius: 6px;
  border: 2px solid var(--gold-deep);
  font-size: 20px;
  font-family: var(--font-num); font-weight: 700; color: var(--red);
  box-shadow: inset 0 -8px 12px rgba(0,0,0,.15);
}
.art-wheel {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 3px solid var(--gold-deep);
  background:
    radial-gradient(circle, var(--card) 26%, transparent 27%),
    conic-gradient(#157145 0 9.7deg,
      #b02735 9.7deg 19.4deg, #17181d 19.4deg 29.1deg, #b02735 29.1deg 38.8deg, #17181d 38.8deg 48.5deg,
      #b02735 48.5deg 58.2deg, #17181d 58.2deg 67.9deg, #b02735 67.9deg 77.6deg, #17181d 77.6deg 87.3deg,
      #b02735 87.3deg 97deg, #17181d 97deg 106.7deg, #b02735 106.7deg 116.4deg, #17181d 116.4deg 126.1deg,
      #b02735 126.1deg 135.8deg, #17181d 135.8deg 145.5deg, #b02735 145.5deg 155.2deg, #17181d 155.2deg 164.9deg,
      #b02735 164.9deg 174.6deg, #17181d 174.6deg 184.3deg, #b02735 184.3deg 194deg, #17181d 194deg 203.7deg,
      #b02735 203.7deg 213.4deg, #17181d 213.4deg 223.1deg, #b02735 223.1deg 232.8deg, #17181d 232.8deg 242.5deg,
      #b02735 242.5deg 252.2deg, #17181d 252.2deg 261.9deg, #b02735 261.9deg 271.6deg, #17181d 271.6deg 281.3deg,
      #b02735 281.3deg 291deg, #17181d 291deg 300.7deg, #b02735 300.7deg 310.4deg, #17181d 310.4deg 320.1deg,
      #b02735 320.1deg 329.8deg, #17181d 329.8deg 339.5deg, #b02735 339.5deg 349.2deg, #17181d 349.2deg 360deg);
  animation: wheelIdle 14s linear infinite;
}
@keyframes wheelIdle { to { transform: rotate(360deg); } }
.mini-card {
  font-style: normal;
  display: grid; place-items: center;
  width: 36px; height: 50px;
  background: #fdf6e3;
  color: #1a1a1a;
  border-radius: 5px;
  font-family: var(--font-num); font-weight: 600; font-size: 14px;
  box-shadow: 0 3px 8px rgba(0,0,0,.4);
}
.mini-card.red { color: var(--red); transform: rotate(12deg) translateX(-6px); }
.art-cards .mini-card:first-child { transform: rotate(-8deg) translateX(6px); }
.art-rocket { font-size: 38px; filter: drop-shadow(0 0 12px rgba(255, 160, 60, 0.6)); }
.art-coin .coin-face-mini {
  display: grid; place-items: center;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff3cf, var(--gold) 55%, #8a6a28);
  color: rgba(90, 62, 10, 0.9);
  font-family: var(--font-display); font-size: 22px;
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.35), 0 0 16px rgba(255, 221, 143, 0.35);
}

/* ───────────────────────── Jetons (mises) ───────────────────────── */

.bet-row, .chip-select {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px;
  margin: 14px 0;
}
.chip {
  --c: var(--blue-chip);
  position: relative;
  width: 56px; height: 56px; flex: none;
  border-radius: 50%;
  font-family: var(--font-num); font-weight: 600; font-size: 15px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 50%, var(--c) 0 44%, transparent 44.5%),
    repeating-conic-gradient(#f6efdd 0 14deg, var(--c) 14deg 45deg),
    var(--c);
  border: 3px dashed rgba(255, 255, 255, 0.0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(255,255,255,.25);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.chip:hover { transform: translateY(-3px); }
.chip.sel {
  transform: translateY(-6px) scale(1.1);
  box-shadow: 0 10px 20px rgba(0,0,0,.55), 0 0 0 3px var(--gold2), 0 0 22px rgba(255,221,143,.5);
}
.chip[data-v='10'] { --c: #3d6fa8; }
.chip[data-v='50'] { --c: #b02735; }
.chip[data-v='100'] { --c: #23272e; }
.chip[data-v='500'] { --c: #6d4494; }
.chip[data-v='1000'] { --c: #9a7a1e; color: #fff8e0; }

/* ───────────────────────── Machine à sous ───────────────────────── */

.slot-cabinet {
  max-width: 440px;
  margin: 0 auto;
  padding: 18px 16px 20px;
  border-radius: 22px;
  border: 3px solid var(--gold-deep);
  background:
    linear-gradient(180deg, rgba(230,183,92,.10), transparent 30%),
    linear-gradient(180deg, #1d1410, #14100c);
  box-shadow: var(--shadow), inset 0 0 60px rgba(0,0,0,.6);
}
.slot-marquee {
  text-align: center;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--gold2);
  text-shadow: 0 0 12px rgba(255, 221, 143, 0.6);
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}
.slot-marquee .bulb-row { margin-bottom: 6px; }

.reels {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, #2a2018, #0d0a07);
  border: 2px solid #3a2d1c;
  box-shadow: inset 0 6px 24px rgba(0,0,0,.8);
}
.reel {
  flex: 1;
  height: 240px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(180deg, #d9cba4, #fdf6e3 30%, #fdf6e3 70%, #d9cba4);
  box-shadow: inset 0 10px 18px rgba(0,0,0,.35), inset 0 -10px 18px rgba(0,0,0,.35);
}
.strip { will-change: transform; }
.strip.spinning { filter: blur(3px); }
.cell {
  height: 80px;
  display: grid; place-items: center;
  font-size: 44px;
  line-height: 1;
}
.cell .bar-sym {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.05em;
  color: #fdf6e3;
  background: linear-gradient(180deg, #2f2f2f, #111);
  border: 2px solid #c8963c;
  border-radius: 6px;
  padding: 4px 12px;
  transform: skewX(-6deg);
}
.cell .seven-sym {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 52px;
  color: var(--red);
  text-shadow: 2px 2px 0 #7c1420;
}
.payline {
  position: absolute; left: 4px; right: 4px; top: 50%;
  height: 3px; margin-top: -1.5px;
  background: linear-gradient(90deg, transparent, rgba(255, 221, 143, 0.85), transparent);
  border-radius: 2px;
  pointer-events: none;
}
.payline.flash { animation: paylineFlash 0.4s ease 4; }
@keyframes paylineFlash {
  50% { box-shadow: 0 0 24px 6px rgba(255, 221, 143, 0.9); background: #fff; }
}

.slot-msg {
  min-height: 26px;
  text-align: center;
  margin-top: 12px;
  font-size: 15px;
  color: var(--muted);
}
.slot-msg.win { color: var(--gold2); font-weight: 600; text-shadow: 0 0 14px rgba(255,221,143,.5); }

.paytable { max-width: 440px; margin: 16px auto 0; }
.paytable h3 { font-family: var(--font-num); letter-spacing: .06em; margin-bottom: 10px; color: var(--gold); }
.paytable small { color: var(--muted); font-weight: 400; }
.paytable table { width: 100%; border-collapse: collapse; font-size: 15px; }
.paytable td { padding: 7px 4px; border-bottom: 1px solid var(--line-soft); }
.paytable td:last-child { text-align: right; font-family: var(--font-num); color: var(--gold2); }

/* ───────────────────────── Roulette ───────────────────────── */

.roulette-layout { display: grid; gap: 20px; }
@media (min-width: 860px) {
  .roulette-layout { grid-template-columns: minmax(300px, 400px) 1fr; align-items: start; }
}

.wheel-wrap {
  max-width: 380px;
  margin: 0 auto;
  width: 100%;
}
.wheel-box { position: relative; width: 100%; }
/* pendant le lancer sur petit écran, la roue passe en plein écran :
   plus besoin de remonter la page pour la voir tourner */
.wheel-wrap.overlay {
  position: fixed; inset: 0; z-index: 60;
  max-width: none; margin: 0;
  display: grid; place-items: center;
  background: rgba(4, 8, 5, 0.85);
  backdrop-filter: blur(3px);
  animation: bannerIn 0.25s ease;
}
.wheel-wrap.overlay .wheel-box { width: min(82vw, 400px); }
#wheelCanvas { width: 100%; height: auto; display: block; filter: drop-shadow(0 14px 30px rgba(0,0,0,.6)); }
.wheel-pointer {
  position: absolute; top: -4px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border: 12px solid transparent;
  border-top: 18px solid var(--gold2);
  filter: drop-shadow(0 2px 6px rgba(255,221,143,.7));
  z-index: 3;
}
.wheel-result {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
  z-index: 2;
}
.wheel-result span {
  font-family: var(--font-num); font-weight: 700;
  font-size: 44px;
  width: 92px; height: 92px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 3px solid var(--gold2);
  color: #fff;
  background: rgba(0,0,0,.75);
  box-shadow: 0 0 40px rgba(255,221,143,.4);
  animation: resultPop 0.45s cubic-bezier(.2, 1.6, .4, 1);
}
.wheel-result span.red { background: radial-gradient(circle, #d63a47, #8e1420); }
.wheel-result span.black { background: radial-gradient(circle, #2e3138, #101216); }
.wheel-result span.green { background: radial-gradient(circle, #1c9459, #0d5c33); }
@keyframes resultPop { from { transform: scale(0.3); opacity: 0; } }

.history { display: flex; gap: 6px; align-items: center; }
.hist-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-num); font-size: 12px; font-weight: 600;
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  animation: resultPop .3s ease;
}
.hist-dot.red { background: #b02735; }
.hist-dot.black { background: #17181d; }
.hist-dot.green { background: #157145; }
.hist-dot.gold { background: linear-gradient(180deg, #ffe3a1, #c8963c); color: var(--ink); }

/* Tapis */
.board {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  padding: 14px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(255,255,255,.05), transparent 50%),
    linear-gradient(180deg, var(--felt2), var(--felt));
  border: 2px solid var(--gold-deep);
  box-shadow: var(--shadow), inset 0 0 50px rgba(0,0,0,.35);
}
.bcell {
  position: relative;
  min-height: 44px;
  border-radius: 7px;
  border: 1px solid rgba(230, 183, 92, 0.35);
  font-family: var(--font-num); font-weight: 600; font-size: 16px;
  color: var(--cream);
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.18);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  /* l'appui long retire la mise : pas de sélection ni de menu contextuel iOS */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.bcell:active { transform: scale(0.94); }
.bcell.num-red { background: linear-gradient(180deg, #c23744, #911b28); }
.bcell.num-black { background: linear-gradient(180deg, #23252b, #0e0f13); }
.bcell.zero { background: linear-gradient(180deg, #1c8f56, #0d5c33); grid-column: span 6; min-height: 40px; }
.bcell.outside { font-size: 12.5px; letter-spacing: 0.04em; grid-column: span 2; }
.bcell.dozen { grid-column: span 2; }
.bcell.colbet { grid-column: span 2; font-size: 13px; }
.bcell.win-flash { animation: cellWin 0.5s ease 3; }
@keyframes cellWin {
  50% { box-shadow: 0 0 0 3px var(--gold2), 0 0 26px rgba(255,221,143,.8); }
}
.bcell .placed {
  position: absolute;
  top: -7px; right: -5px;
  min-width: 26px; height: 26px;
  padding: 0 4px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  color: var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff3cf, var(--gold) 60%, #8a6a28);
  border: 2px solid #fff8e0;
  box-shadow: 0 3px 8px rgba(0,0,0,.55);
  animation: chipDrop 0.25s cubic-bezier(.2, 1.8, .4, 1);
  z-index: 2;
}
@keyframes chipDrop { from { transform: translateY(-14px) scale(1.4); opacity: 0; } }

/* les numéros 1–36 : 6 colonnes de grille = 2 cases par numéro ? non — cellules numériques en span 2 */
.bcell.num { grid-column: span 2; }

.bet-summary {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px;
  margin: 4px 2px 10px;
}
.bet-summary b { font-family: var(--font-num); font-size: 18px; }

.board-hint {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.8;
  margin: 8px 0 2px;
}

/* petit écran : la roue laisse la place au tapis, qui se resserre */
@media (max-width: 859px) {
  .roulette-layout { gap: 14px; }
  .wheel-wrap:not(.overlay) { max-width: min(58vw, 240px); }
  .wheel-wrap:not(.overlay) .wheel-result span { width: 68px; height: 68px; font-size: 32px; }
  .board { padding: 8px; gap: 4px; }
  .bcell { min-height: 40px; font-size: 15px; }
  .bcell.zero { min-height: 38px; }
  .roulette-panel .chip-select { margin-top: 4px; }
}

/* ───────────────────────── Blackjack ───────────────────────── */

.bj-table {
  max-width: 620px;
  margin: 0 auto;
  padding: 22px 18px;
  border-radius: 24px;
  border: 3px solid var(--gold-deep);
  background:
    radial-gradient(130% 90% at 50% -10%, rgba(255,255,255,.06), transparent 55%),
    linear-gradient(180deg, var(--felt2), var(--felt));
  box-shadow: var(--shadow), inset 0 0 60px rgba(0,0,0,.4);
}
.bj-row { min-height: 128px; margin-bottom: 8px; }
.bj-label {
  font-family: var(--font-num);
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.hand-value {
  font-size: 13px;
  min-width: 30px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.4);
  border: 1px solid var(--line-soft);
  color: var(--gold2);
  text-align: center;
}
.hand-value:empty { display: none; }

.hand { display: flex; gap: -30px; min-height: 104px; padding-left: 10px; }
.hand .pcard { margin-left: -34px; }
.hand .pcard:first-child { margin-left: 0; }

.pcard {
  width: 72px; height: 104px; flex: none;
  perspective: 600px;
  animation: cardDeal 0.4s cubic-bezier(.2, 1.2, .4, 1) backwards;
}
@keyframes cardDeal {
  from { transform: translate(60px, -80px) rotate(12deg); opacity: 0; }
}
.pcard-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(.3, 1.4, .5, 1);
}
.pcard.facedown .pcard-inner { transform: rotateY(180deg); }
.pcard-face, .pcard-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: 9px;
  box-shadow: 0 6px 14px rgba(0,0,0,.45);
}
.pcard-face {
  background: linear-gradient(160deg, #fffcf2, #efe3c2);
  color: #14141c;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 6px 7px;
}
.pcard-face.red { color: #b02735; }
.pcard-rank { font-family: var(--font-num); font-weight: 700; font-size: 19px; line-height: 1; }
.pcard-suit-sm { font-size: 13px; line-height: 1.1; }
.pcard-suit { place-self: center; font-size: 34px; }
.pcard-back {
  transform: rotateY(180deg);
  background:
    repeating-linear-gradient(45deg, rgba(230,183,92,.35) 0 3px, transparent 3px 9px),
    repeating-linear-gradient(-45deg, rgba(230,183,92,.35) 0 3px, transparent 3px 9px),
    linear-gradient(160deg, #7e2438, #571423);
  border: 4px solid #fffcf2;
}

.bj-felt-line {
  text-align: center;
  font-family: var(--font-num);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  color: rgba(230, 183, 92, 0.4);
  border-top: 1px solid rgba(230, 183, 92, 0.18);
  border-bottom: 1px solid rgba(230, 183, 92, 0.18);
  padding: 6px 0;
  margin: 10px 0 14px;
}

.bj-msg { text-align: center; min-height: 26px; font-size: 16px; margin: 8px 0 12px; }
.bj-msg.win { color: var(--gold2); font-weight: 600; }
.bj-msg.lose { color: #e88b95; }

.bj-controls { display: flex; gap: 10px; justify-content: center; }
.bj-controls .btn { flex: 1; max-width: 160px; }

/* ───────────────────────── Crash ───────────────────────── */

.crash-stage {
  position: relative;
  border-radius: var(--radius);
  border: 2px solid var(--line-soft);
  background:
    linear-gradient(rgba(230,183,92,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230,183,92,.05) 1px, transparent 1px),
    linear-gradient(180deg, #0a1420, #071009);
  background-size: 36px 36px, 36px 36px, 100% 100%;
  overflow: hidden;
  box-shadow: var(--shadow), inset 0 0 60px rgba(0,0,0,.5);
}
#crashCanvas { width: 100%; height: clamp(220px, 40vw, 340px); display: block; }
.crash-mult {
  position: absolute; top: 14px; left: 0; right: 0;
  text-align: center;
  font-family: var(--font-num); font-weight: 700;
  font-size: clamp(40px, 9vw, 64px);
  color: var(--cream);
  text-shadow: 0 0 24px rgba(230, 183, 92, 0.35);
  pointer-events: none;
  transition: color 0.2s;
}
.crash-mult.flying { color: var(--gold2); }
.crash-mult.crashed { color: #ff5964; text-shadow: 0 0 30px rgba(255, 60, 70, 0.6); animation: crashShake 0.5s ease; }
.crash-mult.cashed { color: #7ee2a0; text-shadow: 0 0 30px rgba(79, 195, 110, 0.6); }
@keyframes crashShake {
  20% { transform: translate(-8px, 3px); }
  40% { transform: translate(7px, -4px); }
  60% { transform: translate(-5px, 2px); }
  80% { transform: translate(4px, -2px); }
}
.crash-stage.boom { animation: crashShake 0.4s ease; }

.crash-controls { max-width: 520px; margin: 16px auto 0; display: grid; gap: 12px; }
.crash-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.crash-inputs label {
  display: grid; gap: 6px;
  font-size: 13px; color: var(--muted);
  letter-spacing: 0.04em;
}
.crash-inputs input { font-family: var(--font-num); font-size: 18px; }

/* ───────────────────────── Pile ou Face ───────────────────────── */

.flip-stage { max-width: 420px; margin: 0 auto; text-align: center; }

.coin3d {
  width: 170px; height: 170px;
  margin: 26px auto 20px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 2.6s cubic-bezier(0.12, 0.86, 0.22, 1);
}
.coin-face {
  position: absolute; inset: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 74px;
  color: rgba(90, 62, 10, 0.9);
  backface-visibility: hidden;
  background:
    radial-gradient(circle at 32% 28%, #fff3cf, var(--gold) 58%, #8a6a28 97%);
  box-shadow:
    inset 0 0 0 8px rgba(138, 106, 40, 0.55),
    inset 0 -6px 12px rgba(0,0,0,.3),
    0 18px 40px rgba(0,0,0,.55),
    0 0 40px rgba(255, 221, 143, 0.25);
}
.coin-back { transform: rotateY(180deg); }

.flip-msg { min-height: 24px; color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.flip-msg.win { color: var(--gold2); font-weight: 600; }
.flip-choice { display: flex; gap: 12px; justify-content: center; margin-bottom: 6px; }
.flip-choice .choice { min-width: 130px; letter-spacing: 0.18em; }
.flip-choice .choice.sel {
  background: linear-gradient(180deg, #ffe3a1, var(--gold));
  box-shadow: 0 0 0 3px var(--gold2), 0 8px 20px rgba(230,183,92,.4);
}

/* ───────────────────────── Classement ───────────────────────── */

.podium {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  align-items: end;
  margin: 10px 0 18px;
}
.pod {
  text-align: center;
  border-radius: var(--radius) var(--radius) 8px 8px;
  padding: 14px 8px 12px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--card2), var(--card));
  box-shadow: var(--shadow);
  animation: podRise 0.5s cubic-bezier(.2, 1.3, .4, 1) backwards;
}
.pod:nth-child(1) { order: 2; padding-top: 22px; border-color: rgba(255, 221, 143, 0.55); animation-delay: 0.2s; }
.pod:nth-child(2) { order: 1; animation-delay: 0.05s; }
.pod:nth-child(3) { order: 3; animation-delay: 0.1s; }
@keyframes podRise { from { transform: translateY(24px); opacity: 0; } }
.pod-medal { font-size: 30px; }
.pod:nth-child(1) .pod-medal { font-size: 40px; filter: drop-shadow(0 0 14px rgba(255,221,143,.7)); }
.pod-name { font-weight: 600; margin: 4px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-bal { font-family: var(--font-num); color: var(--gold2); font-size: 15px; }

.lb-list { list-style: none; display: grid; gap: 6px; }
.lb-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: var(--card);
  animation: viewIn 0.3s ease backwards;
}
.lb-row.me { border-color: var(--gold); background: linear-gradient(90deg, rgba(230,183,92,.12), var(--card)); }
.lb-rank { font-family: var(--font-num); font-weight: 600; color: var(--muted); width: 34px; }
.lb-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-bal { font-family: var(--font-num); color: var(--gold2); }
.lb-me { text-align: center; color: var(--muted); margin-top: 14px; font-size: 14px; }

/* ───────────────────────── Profil ───────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.stat {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: var(--card);
  text-align: center;
}
.stat-label { font-size: 12px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.stat-value { font-family: var(--font-num); font-weight: 600; font-size: 24px; color: var(--gold2); margin-top: 4px; }
.profile-actions { display: grid; gap: 12px; font-size: 14px; color: var(--muted); }

.secret-panel { display: grid; gap: 10px; margin-bottom: 16px; text-align: center; }
.secret-panel h3 { font-family: var(--font-num); letter-spacing: 0.06em; color: var(--gold); }
.secret-panel p { font-size: 13.5px; color: var(--muted); max-width: 380px; margin: 0 auto; }
.secret-code.small { font-size: clamp(17px, 5vw, 22px); padding: 10px 14px; }
.secret-actions { display: flex; gap: 10px; justify-content: center; }

.install-panel { display: grid; gap: 10px; margin-bottom: 16px; text-align: center; }
.install-panel h3 { font-family: var(--font-num); letter-spacing: 0.06em; color: var(--gold); }
.install-panel p { font-size: 13.5px; color: var(--muted); max-width: 380px; margin: 0 auto; }
.install-panel .btn { justify-self: center; }
.ios-steps {
  text-align: left;
  margin: 0 auto;
  max-width: 340px;
  display: grid; gap: 8px;
  font-size: 14px;
  color: var(--cream);
  padding-left: 22px;
}
.ios-steps li::marker { color: var(--gold); font-family: var(--font-num); }
.share-ic {
  width: 17px; height: 17px;
  vertical-align: -3px;
  color: var(--gold);
  display: inline-block;
}

/* ───────────────────────── Auth ───────────────────────── */

.auth-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.auth-inner { width: 100%; max-width: 460px; display: grid; gap: 18px; }
.auth-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.auth-tabs {
  display: flex; gap: 6px;
  margin-bottom: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px;
}
.auth-tab {
  flex: 1;
  padding: 9px;
  border-radius: 999px;
  font-weight: 600; font-size: 14px;
  color: var(--muted);
}
.auth-tab.active { background: linear-gradient(180deg, #ffe3a1, var(--gold)); color: var(--ink); }
.auth-form { display: grid; gap: 10px; }
.auth-form label { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.form-hint { font-size: 12.5px; color: var(--muted); opacity: 0.8; }

.secret-card { text-align: center; display: grid; gap: 12px; }
.secret-title { font-family: var(--font-display); color: var(--gold2); font-size: 22px; }
.secret-card p { font-size: 14.5px; color: var(--muted); }
.secret-code {
  font-family: var(--font-num);
  font-size: clamp(20px, 6vw, 28px);
  letter-spacing: 0.14em;
  padding: 14px;
  border-radius: 10px;
  border: 2px dashed var(--gold-deep);
  background: rgba(0,0,0,.35);
  color: var(--gold2);
  user-select: all;
}

/* ───────────────────────── Toasts & gros gains ───────────────────────── */

#toasts {
  position: fixed;
  left: 50%; bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 90;
  display: grid; gap: 8px;
  width: min(92vw, 400px);
  pointer-events: none;
}
.toast {
  padding: 12px 16px;
  border-radius: 12px;
  text-align: center;
  font-size: 14.5px;
  font-weight: 500;
  background: rgba(14, 26, 17, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: toastIn 0.3s cubic-bezier(.2, 1.4, .4, 1), toastOut 0.3s ease 3.2s forwards;
}
.toast.err { border-color: rgba(200, 50, 62, 0.6); color: #f3b7bd; }
.toast.ok { border-color: var(--gold-deep); color: var(--gold2); }
@keyframes toastIn { from { transform: translateY(16px) scale(.95); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(10px); opacity: 0; } }

.win-banner {
  position: fixed; inset: 0;
  z-index: 80;
  display: grid; place-content: center; place-items: center;
  background: rgba(4, 8, 5, 0.72);
  pointer-events: none;
  animation: bannerIn 0.35s ease;
}
@keyframes bannerIn { from { opacity: 0; } }
.win-rays {
  position: absolute; inset: -50%;
  background: repeating-conic-gradient(rgba(255, 221, 143, 0.12) 0 9deg, transparent 9deg 18deg);
  animation: raysSpin 9s linear infinite;
}
@keyframes raysSpin { to { transform: rotate(360deg); } }
.win-label {
  font-family: var(--font-display);
  font-size: clamp(40px, 12vw, 84px);
  color: var(--gold2);
  text-shadow: 0 0 14px rgba(255, 221, 143, 0.9), 0 0 60px rgba(230, 183, 92, 0.6), 0 4px 0 #6b4f1c;
  animation: winZoom 0.5s cubic-bezier(.2, 1.6, .4, 1);
  position: relative;
}
.win-amount {
  font-family: var(--font-num); font-weight: 700;
  font-size: clamp(26px, 7vw, 44px);
  color: var(--cream);
  position: relative;
  animation: winZoom 0.5s cubic-bezier(.2, 1.6, .4, 1) 0.08s backwards;
}
@keyframes winZoom { from { transform: scale(0.2); opacity: 0; } }

/* pièces qui volent */
.fx-coin {
  position: fixed;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff3cf, var(--gold) 55%, #8a6a28);
  box-shadow: inset 0 -2px 3px rgba(0,0,0,.35), 0 0 10px rgba(255,221,143,.5);
  pointer-events: none;
  z-index: 95;
}

/* ───────────────────────── Divers ───────────────────────── */

.view[hidden], [hidden] { display: none !important; }

@media (max-width: 420px) {
  .hand .pcard { margin-left: -42px; }
  .chip { width: 50px; height: 50px; font-size: 13.5px; }
}

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