/* web/public/casino.css — 🎰 Casino Stellaire (V3.14.0)
   Fenêtre de jeu du POI Casino : tapis vert (images/fondbj.png), sabot en
   bois, cartes et jetons. Style volontairement « table réelle » plutôt que
   science-fiction : c'est une salle de jeux, pas une passerelle de vaisseau. */

.casino-overlay {
  position: fixed; inset: 0; z-index: 4000;
  background: rgba(3, 8, 6, 0.88);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
  padding: 16px;
}
.casino-overlay.open { display: flex; }

.casino-window {
  position: relative;
  width: min(1180px, 100%);
  height: min(800px, 100%);
  display: flex; flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #b98b3a;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(255, 220, 150, 0.18);
  background: #0b2b1c;
}

.casino-topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px;
  background: linear-gradient(180deg, #17352a, #0d241b);
  border-bottom: 1px solid rgba(255, 215, 130, 0.28);
  flex-shrink: 0;
}
.casino-title { font-weight: 700; letter-spacing: 0.06em; color: #ffd98a; font-size: 1.05rem; }
.casino-sub { color: #9fc3b0; font-size: 0.8rem; }
.casino-spacer { flex: 1; }
.casino-balance {
  font-family: 'IBM Plex Mono', monospace; font-weight: 600;
  color: #ffe9a8; background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 215, 130, 0.35); border-radius: 999px;
  padding: 5px 14px; font-size: 0.9rem;
}
.casino-close {
  background: rgba(180, 40, 40, 0.85); border: 1px solid #ff8f8f; color: #fff;
  border-radius: 8px; padding: 6px 12px; cursor: pointer; font-weight: 600;
}
.casino-close:hover { background: #d33; }

.casino-body { flex: 1; overflow: auto; position: relative; }

/* ── Hall d'entrée ─────────────────────────────────────────────────────── */
.casino-hall { padding: 26px; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.casino-game-card {
  border: 1px solid rgba(255, 215, 130, 0.3); border-radius: 14px; padding: 20px;
  background: linear-gradient(160deg, rgba(20, 70, 48, 0.9), rgba(8, 32, 22, 0.95));
  color: #dff0e6;
}
.casino-game-card h3 { margin: 0 0 8px; color: #ffd98a; font-size: 1.2rem; }
.casino-game-card p { margin: 0 0 14px; font-size: 0.88rem; line-height: 1.5; opacity: 0.9; }
.casino-game-card.soon { opacity: 0.72; }
.casino-hall-note { grid-column: 1 / -1; font-size: 0.8rem; color: #9fc3b0; text-align: center; }

.casino-btn {
  border: 1px solid rgba(255, 215, 130, 0.5); border-radius: 10px;
  background: linear-gradient(180deg, #1f7a4d, #145c3a);
  color: #fff; font-weight: 600; padding: 9px 16px; cursor: pointer; font-size: 0.9rem;
}
.casino-btn:hover:not(:disabled) { filter: brightness(1.15); }
.casino-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.casino-btn.ghost { background: rgba(255, 255, 255, 0.08); }
.casino-btn.gold { background: linear-gradient(180deg, #e0b055, #a8781f); color: #2a1c00; }

.casino-tables-list { display: grid; gap: 8px; margin: 10px 0 14px; }
.casino-table-row {
  display: flex; align-items: center; gap: 10px; font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 215, 130, 0.2);
  border-radius: 8px; padding: 8px 12px; color: #dff0e6;
}
.casino-table-row .grow { flex: 1; }

/* ── Table de Blackjack ────────────────────────────────────────────────── */
.casino-felt {
  position: relative; min-height: 100%;
  background: url('images/fondbj.png') center/cover no-repeat, #0d5c37;
  padding: 14px 18px 18px;
  display: flex; flex-direction: column;
}
.casino-felt::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 160px rgba(0, 0, 0, 0.55);
}

.bj-marks { text-align: center; color: #f5d76e; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.bj-marks .bj-title { font-weight: 700; letter-spacing: 0.22em; font-size: 1rem; }
.bj-marks .bj-pays { font-size: 0.7rem; letter-spacing: 0.18em; opacity: 0.9; }
.bj-arc-wrap { position: relative; z-index: 2; margin: 2px auto 0; max-width: 720px; width: 100%; }
.bj-arc-svg { display: block; width: 100%; height: auto; overflow: visible; }
.bj-arc-line { fill: none; stroke: #f5d76e; stroke-width: 4; opacity: 0.95; }
.bj-arc-line.thin { stroke-width: 1.5; opacity: 0.6; }
.bj-arc-text {
  fill: #f5d76e; font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 21px; letter-spacing: 3.5px;
  paint-order: stroke; stroke: rgba(0, 0, 0, 0.45); stroke-width: 2px;
}
.bj-arc-sub {
  fill: #101c14; font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 13px; letter-spacing: 2px;
}

.bj-dealer { position: relative; z-index: 2; text-align: center; margin: 6px 0 4px; }
.bj-dealer-label { color: #eafff2; font-size: 0.75rem; letter-spacing: 0.14em; opacity: 0.85; }

.bj-hand { display: flex; gap: 6px; justify-content: center; min-height: 92px; align-items: flex-start; }
.bj-total {
  display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 0.78rem;
  font-family: 'IBM Plex Mono', monospace; border: 1px solid rgba(255, 255, 255, 0.25);
}
.bj-total.bust { background: rgba(160, 20, 20, 0.85); }
.bj-total.bj { background: linear-gradient(180deg, #e6c14f, #a8781f); color: #241a00; font-weight: 700; }

/* Cartes */
.card {
  /* V3.61.1 — cartes agrandies de 20% (58x84 -> 70x101) : elles étaient
     trop petites, surtout avec les nouvelles faces dessinées. */
  width: 70px; height: 101px; border-radius: 8px; background: #fdfdf6;
  border: 1px solid #d8d3bd; box-shadow: 0 6px 12px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 4px 5px; font-family: 'IBM Plex Mono', monospace; font-weight: 700;
  color: #16181c;
}
.card.red { color: #c1121f; }
.card .c-top { font-size: 0.98rem; line-height: 1; }
.card .c-mid { text-align: center; font-size: 1.8rem; line-height: 1; }
.card .c-bot { font-size: 0.98rem; line-height: 1; text-align: right; transform: rotate(180deg); }
.card.back {
  background: repeating-linear-gradient(45deg, #7a1020, #7a1020 5px, #5d0b18 5px, #5d0b18 10px);
  border-color: #ffd98a;
}

/* Sièges */
.bj-seats { position: relative; z-index: 2; display: flex; justify-content: center; gap: 10px; margin-top: auto; flex-wrap: nowrap; }
.bj-seat {
  /* V3.61.1 — siège élargi pour accompagner les cartes agrandies. */
  width: 168px; min-height: 186px; border-radius: 12px;
  border: 2px solid rgba(245, 215, 110, 0.75);
  background: rgba(0, 0, 0, 0.22);
  padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.bj-seat { position: relative; }   /* ancre des bulles d'emote (V3.64.0) */
.bj-seat.empty { border-style: dashed; opacity: 0.45; }
.bj-seat.you { border-color: #7be2a8; box-shadow: 0 0 0 2px rgba(123, 226, 168, 0.25); }
.bj-seat.active { box-shadow: 0 0 22px rgba(245, 215, 110, 0.75); border-color: #fff0b8; }
.bj-seat-name { font-size: 0.76rem; color: #fff; font-weight: 600; text-align: center; }
.bj-seat-bet { font-size: 0.7rem; color: #ffe9a8; font-family: 'IBM Plex Mono', monospace; }
.bj-seat .bj-hand { min-height: 60px; gap: 4px; flex-wrap: wrap; }
.bj-seat .card { width: 50px; height: 72px; padding: 3px; }
.bj-seat .card .c-mid { font-size: 1.2rem; }
.bj-seat .card .c-top, .bj-seat .card .c-bot { font-size: 0.74rem; }
.bj-subhand { border-top: 1px dashed rgba(255, 255, 255, 0.2); padding-top: 2px; width: 100%; }
.bj-subhand.active-hand { background: rgba(245, 215, 110, 0.14); border-radius: 6px; }
.bj-res { font-size: 0.68rem; padding: 1px 7px; border-radius: 999px; background: rgba(0,0,0,0.55); color: #fff; }
.bj-res.win { background: rgba(30, 140, 70, 0.9); }
.bj-res.lose { background: rgba(150, 30, 30, 0.9); }
.bj-res.push { background: rgba(90, 90, 100, 0.9); }
.bj-res.bj { background: linear-gradient(180deg, #e6c14f, #a8781f); color: #241a00; font-weight: 700; }

/* Sabot */
.bj-shoe {
  position: absolute; top: 14px; right: 18px; z-index: 3; width: 145px; /* +10% (V3.16.0) */
  background: linear-gradient(160deg, #6b4423, #422a14);
  border: 1px solid #2a1a0c; border-radius: 8px; padding: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); color: #f0e0c0;
}
.bj-shoe-label { font-size: 0.68rem; letter-spacing: 0.1em; text-align: center; opacity: 0.85; }
.bj-shoe-bar { position: relative; height: 13px; margin: 6px 0 4px; background: #f4efe2; border-radius: 3px; overflow: hidden; }
.bj-shoe-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #b9a37a, #8b7550); }
.bj-shoe-cut { position: absolute; top: -2px; bottom: -2px; width: 4px; background: #d81e2c; box-shadow: 0 0 6px rgba(216, 30, 44, 0.9); }
.bj-shoe-meta { font-size: 0.66rem; text-align: center; opacity: 0.8; font-family: 'IBM Plex Mono', monospace; }

/* Barre d'actions */
.bj-actionbar {
  position: relative; z-index: 3; margin-top: 10px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.42); border: 1px solid rgba(255, 215, 130, 0.25);
  border-radius: 12px; padding: 10px;
}
.bj-phase { color: #ffe9a8; font-size: 0.82rem; font-weight: 600; margin-right: 6px; }
.bj-timer { width: 120px; height: 6px; background: rgba(255, 255, 255, 0.18); border-radius: 999px; overflow: hidden; }
.bj-timer i { display: block; height: 100%; background: linear-gradient(90deg, #7be2a8, #f5d76e); }

.chip {
  width: 62px; height: 62px; border-radius: 50%; cursor: pointer;
  border: 3px dashed rgba(255, 255, 255, 0.85);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.74rem; color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s ease;
}
.chip:hover:not(.disabled) { transform: translateY(-4px) scale(1.05); }
.chip.disabled { opacity: 0.35; cursor: not-allowed; }
.chip.chip-1 { background: radial-gradient(circle at 30% 25%, #4a90d9, #1c4f86); }
.chip.chip-2 { background: radial-gradient(circle at 30% 25%, #4fbf72, #16713b); }
.chip.chip-3 { background: radial-gradient(circle at 30% 25%, #d96a4a, #8a2f18); }
.chip.chip-4 { background: radial-gradient(circle at 30% 25%, #2b2b33, #101015); border-color: #f5d76e; color: #f5d76e; }

.bj-log {
  position: relative; z-index: 3; margin-top: 8px; max-height: 96px; overflow: auto;
  background: rgba(0, 0, 0, 0.4); border-radius: 10px; padding: 8px 12px;
  font-size: 0.76rem; color: #d9ecdf; line-height: 1.5;
}
.bj-error { color: #ffb3b3; font-size: 0.82rem; text-align: center; margin-top: 6px; min-height: 18px; }

@media (max-width: 900px) {
  .bj-seats { flex-wrap: wrap; }
  .bj-seat { width: 118px; min-height: 140px; }
  .bj-shoe { position: static; width: auto; margin-bottom: 8px; }
}

/* ── Règlement de la maison & garde-fous (V3.15.0) ───────────────────────── */
.casino-rules {
  grid-column: 1 / -1;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 215, 130, 0.28);
  border-radius: 12px; padding: 12px 16px;
  color: #dff0e6; font-size: 0.82rem; line-height: 1.7;
}
.casino-rules b { color: #ffe9a8; }
.casino-daily-bar {
  margin-top: 6px; height: 7px; border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
}
.casino-daily-bar i { display: block; height: 100%; background: linear-gradient(90deg, #7be2a8, #f5d76e, #d94a4a); }
.bj-limits {
  position: relative; z-index: 3; margin-top: 6px; text-align: center;
  font-size: 0.7rem; color: #cfe6d8; opacity: 0.85;
  font-family: 'IBM Plex Mono', monospace;
}

/* ══════════════════════════════════════════════════════════════════════════
   🃏 POKER TEXAS HOLD'EM (V3.18.0)
   Réutilise le tapis, les cartes et les sièges du blackjack (même fond réglé
   dans la console admin) — seuls les éléments propres au poker sont ajoutés.
   ══════════════════════════════════════════════════════════════════════════ */

.pk-board {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin: 10px auto 4px; padding: 10px 16px;
  background: rgba(0, 0, 0, 0.28); border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.35);
}
.pk-pot {
  font-family: var(--font-mono, monospace); font-size: 13px; letter-spacing: 0.6px;
  color: #f4e2a8; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}
.pk-pot b { color: #ffd76a; }

.pk-seat { position: relative; }
.pk-seat.folded { opacity: 0.45; }
.pk-state {
  text-align: center; font-size: 10px; letter-spacing: 0.4px; margin-top: 3px;
  color: rgba(255, 255, 255, 0.78); text-transform: uppercase;
}
.pk-state .win { color: #8ee6a1; }
.pk-button {
  display: inline-block; width: 15px; height: 15px; line-height: 15px;
  border-radius: 50%; background: #f2f2f2; color: #12160f;
  font-size: 9px; font-weight: 700; text-align: center; vertical-align: middle;
}

.poker-buyin, .pk-raise { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.poker-buyin input[type="range"], .pk-raise input[type="range"] { flex: 1; min-width: 140px; accent-color: #d4af37; }
.poker-buyin-val, .pk-raise-val {
  font-family: var(--font-mono, monospace); font-size: 12px; color: #ffd76a; min-width: 92px; text-align: right;
}

/* ══ 🃏 Cartes « premium » CSS 3D (V3.61.0) ═══════════════════════════════
   Le rendu classique reste intact : ces règles ne s'appliquent qu'aux cartes
   portant la classe .premium, produites uniquement quand le mode 3D est actif
   (bouton « Cartes 3D » dans la barre du casino). Poker ET blackjack. */
.casino-cards-toggle {
  background: rgba(0, 0, 0, 0.35); color: #e8dfc0;
  border: 1px solid rgba(245, 215, 110, 0.5); border-radius: 8px;
  padding: 7px 12px; margin-right: 8px; cursor: pointer;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem; letter-spacing: 0.04em;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.casino-cards-toggle:hover { color: #fff; border-color: #f5d76e; }
.casino-cards-toggle.is-on { background: rgba(245, 215, 110, 0.16); color: #ffe9a8; }

.card.premium {
  position: relative; display: block; padding: 0; background: none;
  border: none; box-shadow: none; overflow: visible;
  perspective: 700px;
}
.card.premium .card-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; transition: transform 0.45s ease;
}
.card.premium .card-face {
  position: absolute; inset: 0; border-radius: 7px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  /* Épaisseur : un liseré clair sur la tranche + une ombre portée douce. */
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 7px 14px rgba(0, 0, 0, 0.5),
    0 2px 3px rgba(0, 0, 0, 0.4);
}
.card.premium .card-front {
  background: linear-gradient(160deg, #fffdf4 0%, #f4f0e2 100%);
  border: 1px solid #cfc9b2;
}
.card.premium .card-back {
  transform: rotateY(180deg);
  border: 1px solid #ffd98a;
  background:
    repeating-linear-gradient(45deg, rgba(255, 217, 138, 0.16) 0 4px, transparent 4px 8px),
    repeating-linear-gradient(-45deg, rgba(255, 217, 138, 0.16) 0 4px, transparent 4px 8px),
    linear-gradient(160deg, #8b1526 0%, #5d0b18 100%);
}
/* Dos affiché : on retourne le volume pour présenter la face arrière. */
.card.premium.back .card-inner { transform: rotateY(180deg); }

.card.premium .card-front svg { width: 100%; height: 100%; display: block; }
.card.premium .card-front text {
  font-family: 'IBM Plex Mono', monospace; font-weight: 700;
  fill: #16181c; text-anchor: middle; dominant-baseline: middle;
}
.card.premium.red .card-front text { fill: #c1121f; }
.card.premium .idx { font-size: 20px; text-anchor: start; }
.card.premium .idx-suit { font-size: 16px; text-anchor: start; }
.card.premium .pip { font-size: 24px; }
.card.premium .figure-letter { font-size: 34px; }
.card.premium .figure-suit { font-size: 26px; }
.card.premium .figure-frame {
  fill: rgba(193, 18, 31, 0.05); stroke: #c9c2a8; stroke-width: 1.2;
}
.card.premium:not(.red) .figure-frame { fill: rgba(22, 24, 28, 0.05); }

/* Distribution : la carte arrive en glissant, puis se retourne. L'animation
   ne se joue QUE lorsqu'une carte apparaît ou change réellement de valeur
   (voir cardMemo dans casino.js) — jamais à chaque sondage. */
@keyframes casino-deal {
  0%   { opacity: 0; transform: translate(28px, -34px) rotate(9deg) scale(0.9); }
  70%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
.card.premium.is-dealt { animation: casino-deal 0.34s ease-out both; }
.card.premium.is-dealt:not(.back) .card-inner {
  animation: casino-flip 0.5s 0.18s ease-out both;
}
@keyframes casino-flip {
  0%   { transform: rotateY(180deg); }
  100% { transform: rotateY(0deg); }
}

/* Cartes plus petites dans les sièges : on réduit la typographie SVG en
   conséquence (le viewBox se met à l'échelle tout seul). */
.bj-seat .card.premium .card-face { border-radius: 5px; }

@media (prefers-reduced-motion: reduce) {
  .card.premium.is-dealt,
  .card.premium.is-dealt .card-inner { animation: none; }
}


/* ══════════════════════════════════════════════════════════════════════════
   😀 EMOTES DE TABLE (V3.64.0)
   Bulle flottante affichée au-dessus du siège de son auteur, visible par tous
   les joueurs de la table. L'animation couvre toute la durée de vie de
   l'emote (6 s) en un seul cycle : apparition en rebond, montée lente, puis
   effacement. Le JS applique un `animation-delay` négatif égal à l'âge réel
   de la bulle, ce qui la fait reprendre à son avancement exact si le sondage
   reconstruit le DOM au milieu de l'animation.
   ══════════════════════════════════════════════════════════════════════════ */
.bj-emote {
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  z-index: 20; pointer-events: none; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(24, 26, 32, 0.96), rgba(12, 14, 18, 0.96));
  border: 1px solid rgba(245, 215, 110, 0.7);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55), 0 0 18px rgba(245, 215, 110, 0.18);
  animation-name: bjEmoteLife;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  animation-fill-mode: both;
}
/* Petite pointe qui rattache la bulle au siège. */
.bj-emote::after {
  content: ''; position: absolute; top: 100%; left: 50%; margin-left: -6px;
  border: 6px solid transparent; border-top-color: rgba(245, 215, 110, 0.7);
}
.bj-emote-emoji { font-size: 1.25rem; line-height: 1; }
.bj-emote-text { font-size: 0.76rem; color: #ffe9a8; font-weight: 600; }

@keyframes bjEmoteLife {
  0%   { opacity: 0; transform: translate(-50%, 14px) scale(0.6); }
  8%   { opacity: 1; transform: translate(-50%, -4px) scale(1.08); }
  14%  { transform: translate(-50%, 0) scale(1); }
  80%  { opacity: 1; transform: translate(-50%, -8px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -22px) scale(0.94); }
}
/* Respect des préférences système : pas de mouvement, juste un fondu. */
@media (prefers-reduced-motion: reduce) {
  .bj-emote { animation-name: bjEmoteFade; }
  @keyframes bjEmoteFade {
    0% { opacity: 0; transform: translate(-50%, 0); }
    8%, 85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 0); }
  }
}

/* Sélecteur d'emotes dans la barre d'action. */
.bj-emote-bar { position: relative; display: inline-flex; align-items: center; }
.bj-emote-list {
  position: absolute; bottom: calc(100% + 10px); right: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 6px;
  padding: 10px; border-radius: 12px;
  background: rgba(10, 12, 16, 0.97);
  border: 1px solid rgba(245, 215, 110, 0.55);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
  animation: bjEmotePop 0.16s ease-out;
}
@keyframes bjEmotePop {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bj-emote-choice {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 7px 10px; border-radius: 8px; text-align: left;
  background: rgba(255, 255, 255, 0.05); color: #e8dfc0;
  border: 1px solid rgba(245, 215, 110, 0.28);
  transition: background 0.14s, border-color 0.14s, transform 0.14s;
}
.bj-emote-choice:hover {
  background: rgba(245, 215, 110, 0.16); border-color: #f5d76e;
  color: #fff; transform: translateY(-1px);
}
.bj-emote-choice span { font-size: 1.15rem; line-height: 1; }
.bj-emote-choice small { font-size: 0.72rem; font-weight: 600; }

/* ══════════════════════════════════════════════════════════════════════════
   📖 PAGE DES RÈGLES (V3.64.0)
   Mêmes textes que les embeds Discord (src/casinoRules.js).
   ══════════════════════════════════════════════════════════════════════════ */
.casino-rules-page {
  padding: 16px 20px 26px; overflow-y: auto; max-height: 100%;
  color: #e8dfc0; line-height: 1.55;
}
.casino-rules-tabs {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 5; padding: 10px 0 12px;
  background: linear-gradient(180deg, rgba(10, 12, 16, 0.98) 70%, rgba(10, 12, 16, 0));
}
.casino-rules-block {
  margin: 0 0 18px; padding: 14px 16px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(245, 215, 110, 0.24);
  border-left: 3px solid rgba(245, 215, 110, 0.7);
}
.casino-rules-block h4 {
  margin: 0 0 10px; font-size: 0.95rem; color: #ffe9a8; letter-spacing: 0.02em;
}
.casino-rules-block p { margin: 0 0 7px; font-size: 0.84rem; }
.casino-rules-block p:last-child { margin-bottom: 0; }
.casino-rules-block b { color: #fff; }
.casino-rules-block i { color: #bfc7d4; }

@media (max-width: 760px) {
  .bj-emote-list { grid-template-columns: 1fr; right: auto; left: 0; }
  .bj-emote-text { font-size: 0.7rem; }
  .casino-rules-page { padding: 12px 14px 22px; }
}

/* ── 🎡 Roue de la Fortune (V3.66.0) ─────────────────────────────────────────
   La roue est un SVG dont seul le groupe #wheel-rotor tourne. L'angle d'arrêt
   est décidé par le serveur (case tirée) : la transition CSS ne fait que le
   rendre spectaculaire. */
.wheel-page {
  display: grid; gap: 22px; padding: 22px;
  grid-template-columns: minmax(320px, 1fr) minmax(260px, 340px);
  align-items: start;
  color: #dff0e6;
}
@media (max-width: 900px) { .wheel-page { grid-template-columns: 1fr; } }

.wheel-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }

.wheel-pointer {
  font-size: 2rem; line-height: 1; color: #ffd98a;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
  margin-bottom: -14px; z-index: 2;
}

.wheel-svg { width: min(420px, 100%); height: auto; display: block; }
.wheel-rotor { transform-origin: 210px 210px; }
.wheel-emoji { font-size: 20px; }
.wheel-label { font-size: 10px; fill: #f6ecd2; font-weight: 600; letter-spacing: 0.03em; }
.wheel-hub { font-size: 26px; fill: #ffd98a; }
.wheel-slice.is-won path { stroke: #fff3c4; stroke-width: 3.5; filter: drop-shadow(0 0 8px rgba(255, 226, 150, 0.85)); }

.wheel-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.wheel-counters {
  font-size: 0.86rem; color: #cfe6d8;
  background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 215, 130, 0.25);
  border-radius: 999px; padding: 6px 16px;
}

.wheel-result { min-height: 34px; width: 100%; }
.wheel-prize {
  border-radius: 12px; padding: 14px 18px; text-align: center;
  border: 1px solid rgba(255, 215, 130, 0.4);
  background: linear-gradient(160deg, rgba(30, 90, 60, 0.92), rgba(8, 32, 22, 0.95));
  animation: wheel-prize-pop 420ms ease-out;
}
.wheel-prize.is-void { border-color: rgba(160, 180, 170, 0.3); background: rgba(20, 32, 28, 0.9); }
.wheel-prize-title { color: #ffd98a; font-weight: 700; font-size: 1.1rem; margin-bottom: 6px; }
.wheel-prize div { font-size: 0.9rem; line-height: 1.5; }
@keyframes wheel-prize-pop {
  from { opacity: 0; transform: scale(0.9) translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.wheel-side {
  border: 1px solid rgba(255, 215, 130, 0.3); border-radius: 14px; padding: 18px;
  background: linear-gradient(160deg, rgba(20, 70, 48, 0.9), rgba(8, 32, 22, 0.95));
}
.wheel-side h4 { margin: 0 0 10px; color: #ffd98a; font-size: 1rem; }
.wheel-side h4 + h4, .wheel-side p + h4 { margin-top: 16px; }
.wheel-side p { margin: 4px 0; font-size: 0.84rem; opacity: 0.9; line-height: 1.45; }
.wheel-prizes { list-style: none; margin: 0 0 4px; padding: 0; }
.wheel-prizes li {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; padding: 4px 0;
  border-bottom: 1px dashed rgba(255, 215, 130, 0.12);
}
.wheel-prizes li small { margin-left: auto; opacity: 0.7; font-family: 'IBM Plex Mono', monospace; }
.wheel-chip { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(255, 235, 190, 0.5); flex-shrink: 0; }
.wheel-stats { margin-top: 14px; border-top: 1px solid rgba(255, 215, 130, 0.2); padding-top: 10px; }
