/* 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 {
  width: 58px; height: 84px; border-radius: 7px; 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.82rem; line-height: 1; }
.card .c-mid { text-align: center; font-size: 1.5rem; line-height: 1; }
.card .c-bot { font-size: 0.82rem; 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 {
  width: 148px; min-height: 168px; 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.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: 42px; height: 60px; padding: 3px; }
.bj-seat .card .c-mid { font-size: 1rem; }
.bj-seat .card .c-top, .bj-seat .card .c-bot { font-size: 0.62rem; }
.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;
}
