/* ============================================================
   Jeux Adoptants — MesLapins.fr
   ============================================================ */

:root {
    --ja-primary:   #104b59;
    --ja-accent:    #d4a96a;
    --ja-light:     #f0f7f5;
    --ja-card-bg:   #ffffff;
    --ja-radius:    16px;
    --ja-shadow:    0 4px 20px rgba(16,75,89,0.10);
    --ja-shadow-lg: 0 8px 40px rgba(16,75,89,0.18);
}

/* ── APP WRAPPER ──────────────────────────────────────────── */
.ja-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1a2e35;
    padding-bottom: 80px;
    overflow-x: clip;
}

/* ── GRILLE DES JEUX — pleine largeur, padding côtés ─────── */
.ja-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 0px 0px 0;
}


/* ── Barre de tri ─────────────────────────────────────────── */
.ja-sort-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px 6px;
    flex-wrap: wrap;
}

.ja-sort-label {
    font-size: .78rem;
    font-weight: 600;
    color: rgba(0,0,0,.38);
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}

.ja-sort-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ja-sort-btn {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid rgba(0,0,0,.1);
    background: transparent;
    font-size: .82rem;
    font-weight: 600;
    color: rgba(0,0,0,.5);
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}

.ja-sort-btn:hover {
    border-color: rgba(0,0,0,.25);
    color: rgba(0,0,0,.75);
    background: rgba(0,0,0,.03);
}

.ja-sort-btn.active {
    background: #104b59;
    border-color: #104b59;
    color: white;
    box-shadow: 0 2px 8px rgba(16,75,89,.25);
}

/* Cartes — transition lors du réordonnancement */
.ja-game-card {
    transition: opacity .22s ease, transform .22s ease;
}

.ja-game-card.ja-sorting-out {
    opacity: 0;
    transform: scale(.96) translateY(4px);
}

/* Badge "plays" sur la carte quand tri populaire */
.ja-card-plays {
    display: none;
    font-size: .72rem;
    color: #e85c0d;
    font-weight: 700;
    margin-top: 2px;
}

.ja-sort-popular .ja-card-plays {
    display: inline-block;
}

/* Badge "Nouveau" quand tri récent */
.ja-card-new-badge {
    display: none;
    font-size: .68rem;
    font-weight: 700;
    background: #104b59;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 2px;
}

.ja-sort-recent .ja-card-new-badge {
    display: inline-block;
}

@media (max-width: 600px) {
    .ja-sort-bar { padding: 10px 12px 4px; gap: 6px; }
    .ja-sort-label { display: none; }
    .ja-sort-btns { flex-wrap: nowrap; gap: 5px; }
    .ja-sort-btn { padding: 5px 9px; font-size: .72rem; }
}

@media (max-width: 900px) {
    .ja-game-grid { grid-template-columns: repeat(2, 1fr); padding: 24px 20px 0; }
}
@media (max-width: 580px) {
    .ja-game-grid { grid-template-columns: 1fr; padding: 16px 16px 0; gap: 16px; }
}

/* ── CARTES ───────────────────────────────────────────────── */
.ja-game-card {
    border-radius: var(--ja-radius);
    background: var(--ja-card-bg);
    box-shadow: var(--ja-shadow);
    border: 1px solid rgba(16,75,89,0.08);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.ja-game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ja-shadow-lg);
}

/* Séparateur dégradé entre image et contenu */
.ja-card-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--ja-primary), var(--ja-accent)) 1;
}

.ja-card-inner {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    flex: 1;
}

.ja-card-icon {
    font-size: 2.6rem;
    background: var(--ja-light);
    width: 60px; height: 60px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(16,75,89,0.1);
}

.ja-card-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
    color: var(--ja-primary);
    border: none;
}

.ja-card-desc {
    font-size: .85rem;
    color: #546e7a;
    margin: 0;
    line-height: 1.5;
    flex: 1;
}

.ja-card-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ja-meta-tag {
    background: var(--ja-light);
    color: var(--ja-primary);
    font-size: .74rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    border: 1px solid rgba(16,75,89,0.12);
}

.ja-meta-tag--players {
    background: linear-gradient(135deg, #cfe6df, #bddcd3);
    color: #2a544b;
    border-color: transparent;
}

.ja-card-record {
    font-size: .8rem;
    color: #78909c;
}

.ja-record-val {
    font-weight: 700;
    color: var(--ja-accent);
}

.ja-btn-jouer {
    background: linear-gradient(135deg, var(--ja-primary), #1a6b7c);
    color: white;
    border: none;
    padding: 11px 24px;
    border-radius: 30px;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    width: 100%;
    letter-spacing: .02em;
    margin-top: auto;
}

.ja-btn-jouer:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16,75,89,0.35);
}
.ja-btn-jouer:active { transform: scale(0.97); }

/* ── CLASSEMENTS GLOBAUX ─────────────────────────────────── */
.ja-leaderboards-section {
    padding: 48px 32px 0;
}

@media (max-width: 580px) { .ja-leaderboards-section { padding: 36px 16px 0; } }

/* Header style quiz */
.ja-lb-section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 28px;
}

.ja-lb-section-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--ja-primary), #1a6b7c);
    color: white;
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(16,75,89,0.3);
    flex-shrink: 0;
}

.ja-lb-section-text { text-align: left; }

.ja-lb-section-title {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--ja-primary);
    margin: 0 0 3px;
    border: none;
}

.ja-lb-section-desc {
    font-size: .82rem;
    color: #90a4ae;
    margin: 0;
}

/* Conteneur principal */
.ja-lb-card {
    background: var(--ja-card-bg);
    border-radius: 18px;
    box-shadow: 0 2px 24px rgba(16,75,89,0.10);
    border: 1px solid rgba(16,75,89,0.08);
    overflow: hidden;
}

/* Barre d'onglets */
.ja-lb-tabs {
    display: flex;
    overflow-x: auto;
    padding: 0 8px;
    background: rgba(16,75,89,0.03);
    border-bottom: 1.5px solid rgba(16,75,89,0.08);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 0;
}
.ja-lb-tabs::-webkit-scrollbar { display: none; }

.ja-lb-tab {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 13px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    color: #90a4ae;
    border-bottom: 3px solid transparent;
    margin-bottom: -1.5px;
    transition: all .18s;
    white-space: nowrap;
}

.ja-lb-tab .ja-lb-tab-emoji { font-size: 1rem; }
.ja-lb-tab-label { display: inline; font-size: .78rem; }
@media (max-width: 400px) { .ja-lb-tab-label { font-size: .72rem; } }

.ja-lb-tab:hover { color: var(--ja-primary); background: rgba(16,75,89,0.04); }
.ja-lb-tab.active {
    color: var(--ja-primary);
    border-bottom-color: var(--ja-primary);
    background: white;
    font-weight: 800;
}

/* Zone contenu */
.ja-lb-content { min-height: 80px; }

/* Rows */




















.ja-my-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 20px;
    background: rgba(16,75,89,0.04);
    border-bottom: 1px solid rgba(16,75,89,0.07);
    font-size: .82rem;
    color: #78909c;
    font-weight: 600;
}
.ja-my-score-val { font-weight: 800; color: var(--ja-accent); }


/* ── Barre de période classement ──────────────────────────── */
.ja-lb-period-bar {
    display: flex;
    gap: 6px;
    padding: 10px 16px 0;
    background: rgba(16,75,89,.02);
    flex-wrap: wrap;
}

.ja-lb-period-bar--ingame {
    padding: 10px 20px 0;
}

.ja-lb-period-btn {
    padding: 5px 13px;
    border-radius: 20px;
    border: 1.5px solid rgba(16,75,89,.12);
    background: transparent;
    font-size: .76rem;
    font-weight: 600;
    color: #90a4ae;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
}
.ja-lb-period-btn:hover {
    border-color: var(--ja-primary);
    color: var(--ja-primary);
}
.ja-lb-period-btn.active {
    background: var(--ja-primary);
    border-color: var(--ja-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(16,75,89,.2);
}

/* ── Classement rows — mobile first ───────────────────────── */
.ja-leaderboard-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(16,75,89,.05);
    transition: background .12s;
}
.ja-leaderboard-row:last-child { border-bottom: none; }
.ja-leaderboard-row:hover      { background: var(--ja-light); }
.ja-lb-me { background: rgba(212,169,106,.07) !important; }

/* Rang fixe */
.ja-lb-rank {
    flex-shrink: 0;
    width: 28px;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: #b0bec5;
}
.ja-lb-rank.gold   { color: #f59e0b; filter: drop-shadow(0 1px 3px rgba(245,158,11,.4)); }
.ja-lb-rank.silver { color: #94a3b8; }
.ja-lb-rank.bronze { color: #b87333; }

/* Avatar */
.ja-lb-avatar {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--ja-light);
    object-fit: cover;
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid rgba(16,75,89,.1);
    overflow: hidden;
}

/* Pseudo + parties — colonne flex qui prend la place dispo */
.ja-lb-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ja-lb-pseudo {
    font-weight: 600;
    font-size: .86rem;
    color: #37474f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ja-lb-parties {
    font-size: .7rem;
    color: #b0bec5;
}

/* Score mis en valeur à droite */
.ja-lb-score {
    flex-shrink: 0;
    font-size: .92rem;
    font-weight: 800;
    color: var(--ja-accent);
    text-align: right;
    white-space: nowrap;
}

/* Message vide période */
.ja-lb-empty-period {
    padding: 32px 20px;
    text-align: center;
    color: #b0bec5;
    font-size: .84rem;
    line-height: 1.6;
}

@media (max-width: 400px) {
    .ja-leaderboard-row { padding: 9px 12px; gap: 8px; }
    .ja-lb-avatar       { width: 28px; height: 28px; font-size: .85rem; }
    .ja-lb-pseudo       { font-size: .82rem; }
    .ja-lb-score        { font-size: .85rem; }
}

/* ── ZONE DE JEU ──────────────────────────────────────────── */
.ja-play-zone {
    padding: 24px 32px 0;
}

@media (max-width: 580px) { .ja-play-zone { padding: 16px 16px 0; } }

.ja-play-topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    min-height: 48px;
    background: white;
    border-radius: 16px;
    padding: 6px 10px;
    box-shadow: 0 2px 12px rgba(16,75,89,0.08);
    border: 1px solid rgba(16,75,89,0.08);
}

.ja-topbar-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.ja-topbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}
.ja-topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.ja-btn-back {
    background: rgba(16,75,89,0.06);
    border: 1px solid rgba(16,75,89,0.15);
    color: var(--ja-primary);
    padding: 7px 14px;
    border-radius: 30px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}
.ja-btn-back:hover { background: var(--ja-primary); color: white; }

@media (max-width: 580px) {
    .ja-btn-back { padding: 7px 10px; }
    .ja-btn-back-text { display: none; }
    .ja-play-topbar { padding: 6px 8px; }
}

.ja-play-game-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ja-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 6px;
}
@media (max-width: 580px) {
    .ja-play-game-name { font-size: .88rem; }
}

.ja-game-slot {
    width: 100%;
    margin-bottom: 32px;
}

/* ── Bouton plein écran ─────────────────────────────── */
.ja-btn-fullscreen {
    display: none; /* caché sur desktop */
    background: rgba(16,75,89,0.06);
    border: 1px solid rgba(16,75,89,0.18);
    color: var(--ja-primary);
    width: 34px; height: 34px;
    border-radius: 50%;
    font-size: 1.1rem; cursor: pointer;
    align-items: center; justify-content: center;
    transition: all .2s; flex-shrink: 0;
    line-height: 1; padding: 0;
}
.ja-btn-fullscreen:hover { background: var(--ja-primary); color: white; }

/* Visible uniquement sur mobile */
@media (max-width: 768px) {
    .ja-btn-fullscreen { display: flex; }
}

/* ── Mode plein écran ───────────────────────────────── */
.ja-play-zone.ja-fs-active {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9990 !important;
    background: #f8faf8 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 0 0 env(safe-area-inset-bottom, 0) !important;
    margin: 0 !important;
}
.ja-play-zone.ja-fs-active .ja-play-topbar {
    position: sticky; top: 0; z-index: 2;
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    padding: 10px 14px; margin-bottom: 12px;
}
.ja-play-zone.ja-fs-active .ja-game-slot { padding: 0 8px; }
.ja-play-zone.ja-fs-active .ja-btn-fullscreen {
    background: rgba(220,38,38,0.08);
    border-color: rgba(220,38,38,0.2);
    color: #dc2626;
}
.ja-play-zone.ja-fs-active .ja-btn-fullscreen:hover { background: #dc2626; color: white; }

/* Masquer la scrollbar du body en fullscreen */
body.ja-fs-body-lock { overflow: hidden; }

.ja-leaderboard-wrap {
    background: var(--ja-card-bg);
    border-radius: 18px;
    box-shadow: var(--ja-shadow);
    border: 1px solid rgba(16,75,89,0.08);
    overflow: hidden;
    max-width: 640px;
    margin: 0 auto;
}

.ja-leaderboard-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--ja-primary);
    margin: 0;
    border: none;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(16,75,89,0.07);
    background: var(--ja-light);
}

/* ── SQUELETTE LOADING ────────────────────────────────────── */
.ja-leaderboard-loading {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ja-skel-row {
    height: 44px;
    border-radius: 8px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e9eaec 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: ja-shimmer 1.4s infinite;
}

@keyframes ja-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

/* ── SPINNER ──────────────────────────────────────────────── */
.ja-loading-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
    font-size: .9rem;
    color: #78909c;
}

.ja-spinner {
    width: 36px; height: 36px;
    border: 3px solid rgba(16,75,89,0.12);
    border-top-color: var(--ja-primary);
    border-radius: 50%;
    animation: ja-spin .8s linear infinite;
}

@keyframes ja-spin { to { transform: rotate(360deg); } }



/* ── Mobile : overlays de jeux ─────────────────────────────
   Sur petit écran le contenu d'un overlay peut dépasser
   la hauteur du container (overflow:hidden). Double fix :
   - overflow-y:auto sur l'overlay pour qu'il soit scrollable
   - gap/padding réduits pour que ça tienne sans scroller
──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    /* Tous les overlays de start/end dans les jeux */
    .ja-game-slot [class*="-overlay"] {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 9px !important;
        padding: 14px 16px !important;
    }
    /* Icônes de présentation (canvas 80×80 ou 90×90) */
    .ja-game-slot canvas[width="80"][height="80"],
    .ja-game-slot canvas[width="90"][height="90"] {
        width: 56px !important;
        height: 56px !important;
    }
    /* Scores dans les overlays : plus compacts */
    .ja-game-slot [class*="-ov-score"] {
        font-size: 2.4rem !important;
    }
    /* Forcer le container à ne pas clipper pour que l'overlay puisse scroller */
    .ja-game-slot > div {
        overflow: visible !important;
    }
    /* Mais les canvas-wrap restent propres */
    .ja-game-slot [class*="-canvas-wrap"] {
        overflow: hidden !important;
    }
}
/* Correctifs overlays jeux */
.lg-overlay,.cf-overlay,.cb-overlay,.rc-overlay,.ld-overlay,.bl-overlay,.cb-dead,.rc-end,.ld-end,.bl-end { z-index: 30; }
.lg-field,.cf-canvas-wrap,.cb-canvas-wrap,.rc-board,.ld-scene,.bl-field { position: relative; }

/* ═══════════════════════════════════════════════════════════════
   Fix global : overlays de jeux scrollables sur petits écrans
   Tous les overlays position:absolute inset:0 justify-content:center
   peuvent déborder si le contenu est trop haut.
   On force overflow-y:auto + un centrage CSS safe.
   ═══════════════════════════════════════════════════════════════ */
[id^="ja-game-"] [class*="overlay"],
[id^="ja-game-"] [class*="-overlay"],
[id^="ja-game-"] .ttl-overlay,
[id^="ja-game-"] .ttl-dead {
    overflow: hidden !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Réduire le contenu des overlays si l'écran est petit */
@media (max-height: 750px), (max-width: 420px) {
    [id^="ja-game-"] [class*="overlay"] h2,
    [id^="ja-game-"] [class*="-overlay"] h2,
    [id^="ja-game-"] [class*="overlay"] .ja-nl-ov-title,
    [id^="ja-game-"] [class*="-overlay"] [class*="ov-title"] {
        font-size: 1.2rem !important;
        margin: 0 !important;
    }
    [id^="ja-game-"] [class*="overlay"] canvas,
    [id^="ja-game-"] [class*="-overlay"] canvas {
        width: 56px !important;
        height: 56px !important;
    }
    [id^="ja-game-"] [class*="overlay"],
    [id^="ja-game-"] [class*="-overlay"] {
        gap: 6px !important;
        padding: 12px !important;
        font-size: 0.82em !important;
    }
}

/* ── Bouton favori (coeur) ─────────────────────────────── */
.ja-game-card {
    position: relative;
}
.ja-fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: rgba(0,0,0,.45);
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 1.15rem;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
    color: #fff;
    transition: background .15s, transform .12s;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ja-fav-btn:hover {
    background: rgba(0,0,0,.65);
    transform: scale(1.12);
}
.ja-fav-btn.ja-fav-active {
    color: #f43f5e;
    background: rgba(244,63,94,.18);
}
.ja-fav-btn.ja-fav-loading {
    opacity: .5;
    pointer-events: none;
}

/* Carte masquée en mode favoris */
.ja-game-card.ja-fav-hidden {
    display: none;
}

/* Bouton favoris dans la sort bar */
.ja-sort-btn--fav.active {
    background: linear-gradient(135deg, #f43f5e, #fb7185);
    color: #fff;
    border-color: #f43f5e;
}




.ja-card-meta {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: center;
}

/* ═══════════════════════════════════════════════════
   LIVE FEED
═══════════════════════════════════════════════════ */
.ja-live-feed {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    gap: 10px;
    background: linear-gradient(135deg, rgb(13, 31, 26), rgb(10, 26, 21));
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 0 0 12px 12px;
    padding: 9px 14px;
    overflow: hidden;
}
.ja-live-badge {
    flex-shrink: 0;
    font-size: .72rem;
    font-weight: 700;
    color: #4ade80;
    background: rgba(74,222,128,.15);
    border: 1px solid rgba(74,222,128,.3);
    border-radius: 6px;
    padding: 3px 8px;
    white-space: nowrap;
    letter-spacing: .04em;
}
.ja-live-badge::before {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    background: #4ade80;
    border-radius: 50%;
    margin-right: 5px;
    animation: ja-live-pulse 1.2s ease-in-out infinite;
    vertical-align: middle;
}
@keyframes ja-live-pulse {
    0%,100% { opacity:1; transform:scale(1); }
    50%      { opacity:.4; transform:scale(.7); }
}
.ja-live-track {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.ja-live-inner {
    display: flex;
    gap: 40px;
    white-space: nowrap;
    will-change: transform;
}
.ja-live-item {
    font-size: .8rem;
    color: rgba(255,255,255,.75);
    white-space: nowrap;
    flex-shrink: 0;
}
.ja-live-item--me {
    color: #fbbf24;
    font-weight: 700;
    background: rgba(251,191,36,.1);
    border-radius: 6px;
    padding: 2px 8px;
}
.ja-live-ago {
    font-size: .7rem;
    color: rgba(255,255,255,.4);
    font-style: normal;
    margin-left: 4px;
}
.ja-live-placeholder {
    font-size: .8rem;
    color: rgba(255,255,255,.3);
    font-style: italic;
}

/* Classement général */
.ja-lb-tab--global {
    background: linear-gradient(135deg, rgba(16,75,89,.3), rgba(16,75,89,.1)) !important;
    border-color: rgba(16,75,89,.5) !important;
}
.ja-lb-tab--global.active {
    background: linear-gradient(135deg, #104b59, #0d3d47) !important;
    color: white !important;
}
.ja-lb-global-header {
    font-size: .78rem;
    color: #90a4ae;
    padding: 8px 16px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 4px;
}

@media (max-width: 600px) {
    .ja-live-feed { padding: 7px 10px; gap: 7px; }
    .ja-live-badge { font-size: .68rem; padding: 2px 6px; }
    .ja-live-item { font-size: .75rem; }
}

/* ════════════════════════════════════════════════════════
   BOUTON INFO + MODALE RÈGLES DU JEU
   ════════════════════════════════════════════════════════ */

.ja-btn-info {
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(16,75,89,0.2);
    background: rgba(16,75,89,0.06);
    color: var(--ja-primary);
    font-size: .95rem;
    font-weight: 800;
    cursor: pointer;
    transition: all .18s;
    flex-shrink: 0;
    font-family: Georgia, serif;
    line-height: 1;
}
.ja-btn-info:hover {
    background: var(--ja-primary);
    border-color: var(--ja-primary);
    color: white;
    transform: scale(1.08);
}

/* Modale */
.ja-info-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,25,30,0.72);
    z-index: 99999;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
@media (min-width: 540px) {
    .ja-info-modal { align-items: center; }
}
.ja-info-modal-inner {
    background: #fff;
    width: 100%;
    max-width: 480px;
    max-height: 88vh;
    border-radius: 22px 22px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(40px);
    opacity: 0;
    transition: transform .22s cubic-bezier(0.34,1.2,0.64,1), opacity .2s ease;
    box-shadow: 0 -8px 48px rgba(0,0,0,0.22);
}
@media (min-width: 540px) {
    .ja-info-modal-inner {
        border-radius: 22px;
        transform: scale(0.94) translateY(8px);
        box-shadow: 0 24px 64px rgba(0,0,0,0.28);
    }
}
.ja-info-modal--open .ja-info-modal-inner {
    transform: translateY(0);
    opacity: 1;
}
@media (min-width: 540px) {
    .ja-info-modal--open .ja-info-modal-inner { transform: scale(1) translateY(0); }
}

/* Header modale */
.ja-info-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px 14px;
    background: linear-gradient(135deg, #104b59, #0d3d49);
    flex-shrink: 0;
}
.ja-info-modal-emoji {
    font-size: 2.2rem;
    line-height: 1;
    flex-shrink: 0;
}
.ja-info-modal-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: white;
    flex: 1;
}
.ja-info-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.ja-info-tag {
    font-size: .72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 2px 9px;
}
.ja-info-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: .9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s;
}
.ja-info-modal-close:hover { background: rgba(255,255,255,0.28); }

/* Corps modale */
.ja-info-modal-body {
    overflow-y: auto;
    padding: 16px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ja-info-section {
    background: #f8fafb;
    border-radius: 12px;
    padding: 12px 14px;
    border-left: 3px solid #d4a96a;
}
.ja-info-section-label {
    font-size: .72rem;
    font-weight: 700;
    color: #104b59;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 6px;
}
.ja-info-section-text {
    font-size: .88rem;
    color: #374151;
    line-height: 1.55;
}

/* Badges */
.ja-info-badges-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ja-info-badge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(16,75,89,0.1);
    transition: opacity .2s;
}
.ja-info-badge-item.obtained {
    background: linear-gradient(90deg, #f0fdf4, #fff);
    border-color: rgba(74,222,128,0.35);
}
.ja-info-badge-item.locked {
    opacity: 0.5;
}
.ja-info-badge-check {
    font-size: .9rem;
    font-weight: 900;
    color: #22c55e;
    flex-shrink: 0;
}
.ja-info-badge-lock {
    font-size: .8rem;
    flex-shrink: 0;
    opacity: 0.5;
}
.ja-info-badge-icon { font-size: 1.1rem; }
.ja-info-badge-label {
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
}

/* Bouton ? positionné en fixed via JS (évite overflow) */
.ja-overlay-info-btn {
    position: fixed;
    z-index: 99998;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.45);
    background: rgba(16,75,89,0.75);
    color: white;
    font-size: .95rem;
    font-weight: 800;
    font-family: Georgia, serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all .18s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.ja-overlay-info-btn:hover {
    background: rgba(212,169,106,0.85);
    border-color: #d4a96a;
    transform: scale(1.1);
}

/* Note badges adoptants */
.ja-info-badges-note {
    margin-top: 10px;
    font-size: .75rem;
    color: #6b7280;
    background: rgba(16,75,89,0.06);
    border-radius: 8px;
    padding: 6px 10px;
    text-align: center;
}

.ja-info-badge-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 3px;
}
.ja-info-badge-desc {
    font-size: .75rem;
    color: #6b7280;
    margin-top: 2px;
    font-weight: 400;
}
