/* ════════════════════════════════════════════════════════════
   MINI JEUX — STYLES SPÉCIFIQUES (21 / Roulette / Slots)
   ════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════
   PANELS COMMUNS (mises / actions / paris)
   ════════════════════════════════════ */
.jeu-bets,
.jeu-actions,
.roulette-bets,
.roulette-bets-douzaines {
    display: grid;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-card) 100%);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

/* ── Mises (5/10/25/50 + reset) ── */
.jeu-bets {
    grid-template-columns: repeat(4, 1fr);
}
.jeu-bets .btn.sm {
    padding: 9px 6px;
    font-size: 0.85rem;
    min-height: 40px;
    font-weight: 800;
    background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg) 100%);
    border: 1px solid var(--border-light);
    color: var(--text);
    border-radius: var(--r);
    cursor: pointer;
    transition: all 0.18s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.jeu-bets .btn.sm:hover:not(:disabled) {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px var(--accent-glow);
}
.jeu-bets .btn.sm:active:not(:disabled)  { transform: translateY(0); }
.jeu-bets .btn.sm:disabled              { opacity: 0.45; cursor: not-allowed; }

.jeu-bets .btn.sm.danger {
    background: linear-gradient(180deg, rgba(239,68,68,0.14), rgba(239,68,68,0.04));
    border-color: rgba(239,68,68,0.4);
    color: #fca5a5;
    box-shadow: none;
}
.jeu-bets .btn.sm.danger:hover:not(:disabled) {
    background: linear-gradient(180deg, var(--red), #b91c1c);
    color: #fff;
    border-color: var(--red);
    box-shadow: 0 6px 14px rgba(239,68,68,0.4);
}

/* ── Actions (Distribuer / Tirer / Rester / Doubler) ── */
.jeu-actions {
    grid-template-columns: repeat(4, 1fr);
}
.jeu-actions .btn {
    padding: 11px 8px;
    font-size: 0.86rem;
    min-height: 44px;
    font-weight: 700;
}
.jeu-actions .btn.primary { font-size: 0.92rem; min-height: 48px; }

/* ── Utilitaires de span (remplacent les inline styles) ── */
.jeu-bets .span-all,
.jeu-actions .span-all { grid-column: 1 / -1; }
.jeu-actions .span-2  { grid-column: span 2; }

/* ════════════════════════════════════
   BOUTON PLEIN LARGEUR (LANCER)
   ════════════════════════════════════ */
.btn.full-width {
    width: 100%;
    padding: 14px 20px;
    min-height: 52px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(180deg, #4a90e8 0%, var(--accent-2) 100%);
    border: 1px solid var(--accent-2);
    color: #fff;
    border-radius: var(--r);
    cursor: pointer;
    transition: all 0.2s var(--ease);
    box-shadow:
        0 6px 18px rgba(31,111,235,0.4),
        inset 0 1px 0 rgba(255,255,255,0.2);
    text-transform: uppercase;
    -webkit-tap-highlight-color: transparent;
}
.btn.full-width:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow:
        0 10px 24px rgba(31,111,235,0.55),
        inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn.full-width:active:not(:disabled) { transform: translateY(0); }
.btn.full-width:disabled              { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ════════════════════════════════════════════════════════════
   ♠️ 21 — TABLE & CARTES
   ════════════════════════════════════════════════════════════ */
.jeu-table {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 12px;
    background:
        radial-gradient(ellipse at center, #0f8a4a 0%, #0a5c36 55%, #074027 100%);
    border: 3px solid var(--gold-deep);
    border-radius: var(--r-xl);
    box-shadow:
        var(--shadow-lg),
        inset 0 1px 0 rgba(255,255,255,0.12),
        inset 0 0 60px rgba(0,0,0,0.35);
    position: relative;
    overflow: hidden;
    margin: 0;
}
.jeu-table::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,0.08), transparent 40%);
    pointer-events: none;
}

.table-21 {
    /* Variante 21 — légèrement plus large */
    padding: 18px 12px;
}

.jeu-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.jeu-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 0.4px;
}

.jeu-score {
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.95rem;
    color: #36d97a;
    font-weight: 800;
    min-width: 38px;
    text-align: center;
    text-shadow: 0 0 10px rgba(54,217,122,0.6);
}

.jeu-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 100px;
    align-items: center;
    justify-content: center;
}

/* ── Cartes blackjack ── */
.bj-card {
    width: 60px;
    height: 88px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 1px solid #888;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 10px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(255,255,255,0.9);
    flex-shrink: 0;
    color: #1a1a1a;
    font-weight: 800;
    position: relative;
    animation: cardDeal 0.4s var(--bounce);
}
@keyframes cardDeal {
    0%   { transform: translateY(-30px) rotate(-12deg) scale(0.7); opacity: 0; }
    100% { transform: translateY(0)      rotate(0deg)   scale(1);   opacity: 1; }
}

.bj-card .bj-rank {
    font-size: 1.3rem;
    font-weight: 900;
    line-height: 1;
}
.bj-card .bj-suit {
    font-size: 1.4rem;
    line-height: 1;
    margin-top: 2px;
}
.bj-card .bj-suit.red { color: #dc2626; }

/* Carte cachée (dos) */
.bj-card.back {
    background:
        repeating-linear-gradient(45deg, #1a4a8a, #1a4a8a 8px, #2a5a9a 8px, #2a5a9a 16px),
        linear-gradient(135deg, #1a4a8a, #2a5a9a);
    color: rgba(255,255,255,0.4);
    border-color: var(--gold-deep);
    font-size: 2rem;
    align-items: center;
    justify-content: center;
}

/* Compat avec la règle ".card" du JS (au cas où) */
.jeu-cards .card {
    width: 60px;
    height: 88px;
    background: linear-gradient(135deg, #fff, #f0f0f0);
    border: 1px solid #888;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    font-weight: 800;
    color: #1a1a1a;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    flex-shrink: 0;
}
.jeu-cards .card.hidden {
    background: repeating-linear-gradient(45deg, #1a4a8a, #1a4a8a 8px, #2a5a9a 8px, #2a5a9a 16px);
    color: rgba(255,255,255,0.4);
    border-color: var(--gold-deep);
}

/* ════════════════════════════════════════════════════════════
   🎡 ROULETTE — ROUE & BILLE
   ════════════════════════════════════════════════════════════ */
.roulette-wheel-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 4px auto;
    position: relative;
    width: 100%;
    max-width: 280px;
}

.wheel-container {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 0 auto;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle, #0a4a26 0%, #074020 70%);
    overflow: hidden;
    box-shadow:
        0 0 0 6px #6b3410,
        0 0 0 8px var(--gold-deep),
        0 0 0 10px #6b3410,
        0 12px 32px rgba(0,0,0,0.65),
        inset 0 0 40px rgba(0,0,0,0.4);
    transition: transform 0.1s linear;
}
.wheel::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 56%; height: 56%;
    background: radial-gradient(circle, #f5d76e 0%, var(--gold-deep) 60%, #a08020 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    box-shadow: 0 0 24px rgba(212,175,55,0.5);
}
.wheel::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-conic-gradient(
            from 0deg at 50% 50%,
            transparent 0deg,
            transparent 9.73deg,
            rgba(107,52,16,0.6) 9.73deg,
            rgba(107,52,16,0.6) 9.85deg
        );
    z-index: 1;
    border-radius: 50%;
}

.wheel-numbers {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.number {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(calc(var(--i) * 9.73deg));
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 14px;
    box-sizing: border-box;
}
.number span {
    width: 24px;
    height: 24px;
    background: #fff;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    transform: rotate(calc(var(--i) * -9.73deg));
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.number:nth-child(1) span { background: #16a34a; color: #fff; }
.number.red span   { background: #dc2626; color: #fff; }
.number.black span { background: #111; color: #fff; }

.wheel-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 50px; height: 50px;
    background: radial-gradient(circle, #f5d76e 0%, var(--gold-deep) 70%);
    border-radius: 50%;
    border: 3px solid #6b3410;
    z-index: 4;
    box-shadow:
        0 4px 8px rgba(0,0,0,0.5),
        inset 0 2px 4px rgba(255,255,255,0.4);
}

.ball {
    position: absolute;
    top: 0; left: 50%;
    width: 12px; height: 12px;
    background: radial-gradient(circle, #fff, #ddd);
    border-radius: 50%;
    transform: translateX(-50%) translateY(-6px);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 800;
    color: #000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
    transition: none;
}

@keyframes wheelSpin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(-1080deg); }
}
@keyframes ballSpin {
    0%   { transform: rotate(0deg) translateX(110px) rotate(0deg); }
    100% { transform: rotate(-2880deg) translateX(110px) rotate(2880deg); }
}

/* Paris roulette */
.roulette-bets {
    grid-template-columns: repeat(2, 1fr);
}
.roulette-bets-douzaines {
    grid-template-columns: repeat(3, 1fr);
}

.roulette-bets .btn,
.roulette-bets-douzaines .btn {
    padding: 11px 10px;
    font-size: 0.85rem;
    min-height: 42px;
    font-weight: 700;
}
.roulette-bets .btn.active,
.roulette-bets-douzaines .btn.active {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 18px var(--accent-glow);
    transform: translateY(-1px);
}

/* Petits accents couleur sur les paris dédiés */
#btnRouge { border-color: rgba(220,38,38,0.4); }
#btnRouge:hover:not(:disabled) {
    background: linear-gradient(180deg, #dc2626, #991b1b);
    border-color: #dc2626;
    color: #fff;
}
#btnNoir { border-color: rgba(0,0,0,0.5); }
#btnNoir:hover:not(:disabled) {
    background: linear-gradient(180deg, #2a2a2a, #0a0a0a);
    border-color: #555;
    color: #fff;
}

/* ════════════════════════════════════════════════════════════
   🎰 SLOTS — MACHINE À SOUS
   ════════════════════════════════════════════════════════════ */
.slots-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 4px solid var(--gold-deep);
    border-radius: var(--r-xl);
    box-shadow:
        var(--shadow-lg),
        inset 0 1px 0 rgba(255,255,255,0.1),
        0 0 28px rgba(212,175,55,0.25);
    position: relative;
    overflow: hidden;
}
.slots-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(212,175,55,0.12), transparent 60%);
    border-radius: var(--r-xl);
    pointer-events: none;
}

.slots-reels {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    background: #000;
    padding: 12px;
    border-radius: var(--r);
    border: 3px solid var(--gold-deep);
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.9);
    position: relative;
    z-index: 1;
}

.slot-reel {
    width: 64px;
    height: 92px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 2px solid var(--gold-deep);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    overflow: hidden;
    position: relative;
    box-shadow:
        inset 0 2px 8px rgba(0,0,0,0.85),
        0 0 12px rgba(212,175,55,0.2);
}

@keyframes reelSpin {
    0%   { transform: translateY(0)    scale(1); }
    50%  { transform: translateY(-6px) scale(0.95); }
    100% { transform: translateY(0)    scale(1); }
}
.slot-reel.spinning {
    animation: reelSpin 0.18s linear infinite;
}

.slots-meta {
    background: rgba(212,175,55,0.08);
    padding: 10px 14px;
    border-radius: var(--r);
    border-left: 3px solid var(--gold-deep);
    font-size: 0.78rem;
    color: #f0f0f0;
    text-align: center;
    line-height: 1.65;
    letter-spacing: 0.2px;
    position: relative;
    z-index: 1;
}

/* ════════════════════════════════════════════════════════════
   STATS — KPI cards (réutilisé dans 2 pages stats)
   ════════════════════════════════════════════════════════════ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.kpi-card {
    background: linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-card) 100%);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 14px 12px;
    text-align: center;
    transition: all 0.25s var(--ease);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 88px;
    justify-content: center;
}
.kpi-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.kpi-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.15;
    word-break: break-word;
}
.kpi-label {
    font-size: 0.65rem;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — PHONE LARGE (>= 480px)
   ════════════════════════════════════════════════════════════ */
@media (min-width: 480px) {
    .bj-card { width: 68px; height: 96px; }
    .bj-card .bj-rank { font-size: 1.5rem; }
    .bj-card .bj-suit { font-size: 1.5rem; }

    .wheel-container { width: 270px; height: 270px; }
    .number span { width: 26px; height: 26px; }

    .slot-reel { width: 78px; height: 108px; font-size: 2.4rem; }

    .kpi-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (>= 768px)
   ════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
    .jeu-bets, .jeu-actions { gap: 10px; padding: 14px; }
    .jeu-bets .btn.sm       { min-height: 46px; font-size: 0.9rem; }
    .jeu-actions .btn       { min-height: 50px; font-size: 0.92rem; }
    .jeu-actions .btn.primary { font-size: 1rem; min-height: 54px; }

    .jeu-table { padding: 22px; gap: 18px; }
    .jeu-cards { min-height: 130px; gap: 10px; }

    .bj-card { width: 78px; height: 112px; }
    .bj-card .bj-rank { font-size: 1.75rem; }
    .bj-card .bj-suit { font-size: 1.75rem; }

    .wheel-container { width: 320px; height: 320px; }
    .number { padding-right: 18px; }
    .number span { width: 28px; height: 28px; font-size: 12px; }
    .wheel-center { width: 56px; height: 56px; }
    .roulette-wheel-wrap { max-width: 360px; }

    .slots-frame { padding: 22px; gap: 16px; }
    .slots-reels { gap: 12px; padding: 16px; }
    .slot-reel { width: 92px; height: 130px; font-size: 2.8rem; }
    .slots-meta { font-size: 0.88rem; padding: 12px 16px; }

    .roulette-bets { grid-template-columns: repeat(3, 1fr); }

    .kpi-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
    .kpi-card { min-height: 110px; padding: 18px 14px; }
    .kpi-value { font-size: 1.7rem; }
    .kpi-label { font-size: 0.72rem; }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — DESKTOP (>= 1024px)
   ════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
    .jeu-bets .btn.sm { min-height: 50px; font-size: 0.95rem; }
    .jeu-actions .btn { min-height: 54px; }

    .jeu-table { padding: 28px 24px; gap: 22px; }
    .bj-card { width: 88px; height: 128px; }
    .bj-card .bj-rank { font-size: 2rem; }
    .bj-card .bj-suit { font-size: 2rem; }

    .wheel-container { width: 360px; height: 360px; }
    .number span { width: 32px; height: 32px; font-size: 13px; }
    .roulette-wheel-wrap { max-width: 420px; }

    .slot-reel { width: 100px; height: 140px; font-size: 3rem; }

    .roulette-bets { grid-template-columns: repeat(6, 1fr); }
    .roulette-bets-douzaines { grid-template-columns: repeat(3, 1fr); }

    .kpi-grid { grid-template-columns: repeat(6, 1fr); }
    .kpi-value { font-size: 1.85rem; }
}

/* ════════════════════════════════════════════════════════════
   GAME PAGE MODE — layouts compacts pour fixed-height
   ════════════════════════════════════════════════════════════ */

/* ── Bets : 4 montants + reset (icône) en single-row ── */
body.game-page .jeu-bets {
    grid-template-columns: repeat(4, 1fr) auto;
    padding: 4px;
    gap: 3px;
}
body.game-page .jeu-bets .btn.sm {
    min-height: 28px;
    padding: 4px 2px;
    font-size: 0.74rem;
}
body.game-page .jeu-bets .btn.sm.danger {
    grid-column: auto;
    padding: 4px 8px;
    font-size: 0.9rem;
    line-height: 1;
    min-width: 30px;
}

/* ── Actions 21 : 2 rangs (Distribuer en haut, 3 actions en bas) ── */
body.game-page .jeu-actions {
    padding: 3px;
    gap: 2px;
}
body.game-page .jeu-actions .btn {
    min-height: 26px;
    padding: 3px 3px;
    font-size: 0.7rem;
}
body.game-page .jeu-actions .btn.primary {
    min-height: 30px;
    font-size: 0.78rem;
}

/* ── 21 : table absorbe l'espace dispo, plafonnée à 42svh ── */
body.game-page .jeu-table {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 42svh;
    margin: 0;
    padding: 8px;
    gap: 6px;
    justify-content: space-around;
    overflow: hidden;
}
body.game-page .jeu-row {
    gap: 4px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
}
body.game-page .jeu-title { font-size: 0.78rem; }
body.game-page .jeu-cards {
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    min-height: 66px;
}
body.game-page .bj-card {
    width: clamp(40px, 11.5vw, 56px);
    height: clamp(58px, 16vw, 78px);
}
body.game-page .bj-card .bj-rank { font-size: clamp(0.85rem, 2.6vw, 1.15rem); }
body.game-page .bj-card .bj-suit { font-size: clamp(0.9rem, 2.7vw, 1.25rem); }

/* ── Roulette : roue + paris compacts ── */
body.game-page .roulette-wheel-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;        /* PAS flex:1 — sinon le gain de place reste dans le wrap */
    gap: 4px;
}
body.game-page .wheel-container {
    margin: 0 auto;
    flex-shrink: 0;
    width: clamp(210px, 59.5vw, 280px);
    height: clamp(210px, 59.5vw, 280px);
}
body.game-page .number { padding-right: 11px; }
body.game-page .number span { width: 28px; height: 28px; font-size: 13px; }
body.game-page .wheel-center { width: 49px; height: 49px; }

body.game-page .roulette-bets,
body.game-page .roulette-bets-douzaines {
    grid-template-columns: repeat(3, 1fr);
    padding: 5px;
    gap: 4px;
}
body.game-page .roulette-bets .btn,
body.game-page .roulette-bets-douzaines .btn {
    min-height: 30px;
    padding: 5px 3px;
    font-size: 0.74rem;
}

body.game-page .btn.full-width {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 0.8rem;
    margin: 0;
}

/* ── Slots : frame absorbe l'espace dispo, plafonnée à 24svh ── */
body.game-page .slots-frame {
    padding: 6px;
    gap: 6px;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 24svh;
    margin: 0;
    justify-content: center;
}
body.game-page .slots-reels { padding: 6px; gap: 5px; }
body.game-page .slot-reel {
    width: clamp(50px, 15vw, 70px);
    height: clamp(70px, 18vw, 96px);
    font-size: clamp(1.4rem, 5vw, 2rem);
}
body.game-page .slots-meta {
    padding: 4px 8px;
    font-size: 0.62rem;
    line-height: 1.3;
}

/* ── Slots reels stop / win highlight ── */
.slot-reel.locked {
    animation: reelLock 0.5s var(--bounce);
}
@keyframes reelLock {
    0%   { transform: scale(1.18); }
    60%  { transform: scale(0.92); }
    100% { transform: scale(1); }
}
.slot-reel.win {
    border-color: var(--gold);
    box-shadow:
        inset 0 2px 8px rgba(0,0,0,0.85),
        0 0 28px var(--gold-glow);
    animation: reelWinPulse 0.9s ease-in-out infinite;
}
@keyframes reelWinPulse {
    0%, 100% {
        box-shadow:
            inset 0 2px 8px rgba(0,0,0,0.85),
            0 0 28px var(--gold-glow);
    }
    50% {
        box-shadow:
            inset 0 2px 8px rgba(0,0,0,0.85),
            0 0 44px var(--gold);
    }
}

/* ── Alerte : EN FLUX DOM (entre le jeu et les contrôles), fond SOLIDE ── */
body.game-page .alert {
    position: relative;
    margin: 0;
    flex-shrink: 0;
    background: var(--bg-mid);
    color: var(--muted);
    border: 0 solid transparent;
    box-shadow: var(--shadow-sm);
}
body.game-page .alert.show {
    max-height: 42px;
    padding: 7px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    border-width: 1px;
    border-style: solid;
    border-color: var(--border-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    animation: alertSlideIn 0.35s var(--bounce);
}
body.game-page .alert.show.ok {
    background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
    border-color: #15803d;
}
body.game-page .alert.show.err {
    background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    border-color: #991b1b;
}
@keyframes alertSlideIn {
    0%   { transform: translateY(-12px) scale(0.96); opacity: 0; }
    60%  { transform: translateY(0)     scale(1.02); }
    100% { transform: translateY(0)     scale(1);    opacity: 1; }
}

/* ── Tablet+ : tailles plus généreuses tout en restant fit ── */
@media (min-width: 600px) {
    body.game-page .bj-card {
        width: clamp(58px, 9vw, 78px);
        height: clamp(82px, 13vw, 112px);
    }
    body.game-page .bj-card .bj-rank,
    body.game-page .bj-card .bj-suit {
        font-size: clamp(1.2rem, 2.2vw, 1.7rem);
    }

    body.game-page .wheel-container {
        width: clamp(200px, min(32vh, 35vw), 290px);
        height: clamp(200px, min(32vh, 35vw), 290px);
    }
    body.game-page .number span { width: 26px; height: 26px; font-size: 11px; }
    body.game-page .wheel-center { width: 46px; height: 46px; }

    body.game-page .slot-reel {
        width: clamp(72px, 12vw, 100px);
        height: clamp(102px, 17vw, 140px);
        font-size: clamp(2rem, 4vw, 3rem);
    }
    body.game-page .slots-meta { font-size: 0.82rem; padding: 8px 14px; }

    body.game-page .jeu-bets .btn.sm,
    body.game-page .jeu-actions .btn,
    body.game-page .roulette-bets .btn,
    body.game-page .roulette-bets-douzaines .btn {
        min-height: 42px;
        font-size: 0.88rem;
    }
    body.game-page .jeu-actions .btn.primary { min-height: 48px; font-size: 0.95rem; }
    body.game-page .btn.full-width { min-height: 50px; font-size: 0.95rem; }
}

@media (min-width: 1024px) {
    body.game-page .bj-card { width: 84px; height: 122px; }
    body.game-page .bj-card .bj-rank,
    body.game-page .bj-card .bj-suit { font-size: 1.95rem; }

    body.game-page .wheel-container {
        width: clamp(220px, min(34vh, 28vw), 320px);
        height: clamp(220px, min(34vh, 28vw), 320px);
    }
    body.game-page .number span { width: 30px; height: 30px; font-size: 13px; }
    body.game-page .wheel-center { width: 56px; height: 56px; }

    body.game-page .roulette-bets { grid-template-columns: repeat(6, 1fr); }
    body.game-page .slot-reel { width: 100px; height: 140px; font-size: 3rem; }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — VERY SMALL (<= 360px)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {
    .jeu-bets, .jeu-actions { gap: 6px; padding: 8px; }
    .jeu-bets .btn.sm { min-height: 36px; font-size: 0.78rem; padding: 7px 4px; }
    .jeu-actions .btn { min-height: 40px; font-size: 0.78rem; padding: 8px 4px; }

    .jeu-table { padding: 12px 8px; gap: 10px; }
    .jeu-cards { min-height: 80px; gap: 4px; }
    .bj-card { width: 50px; height: 72px; }
    .bj-card .bj-rank { font-size: 1.05rem; }
    .bj-card .bj-suit { font-size: 1.15rem; }

    .wheel-container { width: 200px; height: 200px; }
    .number { padding-right: 10px; }
    .number span { width: 20px; height: 20px; font-size: 9px; }
    .wheel-center { width: 38px; height: 38px; }

    .slots-frame { padding: 12px; gap: 10px; }
    .slots-reels { gap: 6px; padding: 10px; }
    .slot-reel { width: 54px; height: 78px; font-size: 1.7rem; }
    .slots-meta { font-size: 0.7rem; padding: 8px 10px; line-height: 1.5; }

    .btn.full-width { padding: 12px 14px; font-size: 0.88rem; min-height: 46px; }

    .kpi-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .kpi-card { padding: 10px 8px; min-height: 72px; }
    .kpi-value { font-size: 1.05rem; }
    .kpi-label { font-size: 0.58rem; }
}
