/* =====================================================
   SCM UX FIX — Sprint 1.19+
   - Fix boutons filtres "is-active" en mode sombre (lime au lieu de blanc)
   - Bouton retour mobile pour PWA
   ===================================================== */

/* =====================================================
   1. FIX BOUTONS FILTRES "is-active" EN MODE SOMBRE
   =====================================================
   Problème : en mode sombre, --text-hi devient clair,
   donc les boutons "is-active" sont blancs avec texte
   blanc → invisibles.

   Solution : couleur lime (#C7FB3A) avec texte noir
   en mode sombre. Le mode clair garde le style noir
   d'origine.
   ===================================================== */

/* DARK MODE par défaut */
.ath-pill.is-active,
.lb-pill.is-active,
.lb-tab.is-active,
.cal-pill.is-active,
.cal-mode-btn.is-active,
.badges-filter.is-active {
    background: var(--lime, #C7FB3A) !important;
    border-color: var(--lime, #C7FB3A) !important;
    color: #06080C !important;          /* noir profond pour contraste max */
    font-weight: 800 !important;
    box-shadow: 0 4px 12px rgba(199, 251, 58, 0.25);
}

.ath-pill.is-active:hover,
.lb-pill.is-active:hover,
.lb-tab.is-active:hover,
.cal-pill.is-active:hover,
.cal-mode-btn.is-active:hover,
.badges-filter.is-active:hover {
    background: var(--lime-deep, #9FCC2E) !important;
    border-color: var(--lime-deep, #9FCC2E) !important;
    color: #06080C !important;
}

/* Le badge de comptage à l'intérieur du bouton actif */
.ath-pill.is-active .ath-pill-count,
.lb-pill.is-active .lb-pill-count,
.cal-pill.is-active .cal-pill-count {
    background: rgba(6, 8, 12, 0.20) !important;
    color: #06080C !important;
}

/* Le select dropdown actif (Sport "Autres sports") */
.ath-sport-select.is-active,
.lb-tab-select.is-active {
    background: var(--lime, #C7FB3A) !important;
    border-color: var(--lime, #C7FB3A) !important;
    color: #06080C !important;
    font-weight: 800 !important;
}

/* LIGHT MODE — restaurer le style noir/blanc d'origine */
@media (prefers-color-scheme: light) {
    .ath-pill.is-active,
    .lb-pill.is-active,
    .lb-tab.is-active,
    .cal-pill.is-active,
    .cal-mode-btn.is-active,
    .badges-filter.is-active {
        background: #020405 !important;
        border-color: #020405 !important;
        color: #FFFFFF !important;
        box-shadow: none;
    }
    .ath-pill.is-active:hover,
    .lb-pill.is-active:hover,
    .lb-tab.is-active:hover,
    .cal-pill.is-active:hover,
    .cal-mode-btn.is-active:hover,
    .badges-filter.is-active:hover {
        background: #1A2026 !important;
        border-color: #1A2026 !important;
        color: #FFFFFF !important;
    }
    .ath-pill.is-active .ath-pill-count,
    .lb-pill.is-active .lb-pill-count,
    .cal-pill.is-active .cal-pill-count {
        background: rgba(255, 255, 255, 0.20) !important;
        color: #FFFFFF !important;
    }
    .ath-sport-select.is-active,
    .lb-tab-select.is-active {
        background: #020405 !important;
        border-color: #020405 !important;
        color: #FFFFFF !important;
    }
}

/* Override manuel data-theme="light" */
html[data-theme="light"] .ath-pill.is-active,
html[data-theme="light"] .lb-pill.is-active,
html[data-theme="light"] .lb-tab.is-active,
html[data-theme="light"] .cal-pill.is-active,
html[data-theme="light"] .cal-mode-btn.is-active,
html[data-theme="light"] .badges-filter.is-active {
    background: #020405 !important;
    border-color: #020405 !important;
    color: #FFFFFF !important;
    box-shadow: none;
}
html[data-theme="light"] .ath-pill.is-active .ath-pill-count,
html[data-theme="light"] .lb-pill.is-active .lb-pill-count,
html[data-theme="light"] .cal-pill.is-active .cal-pill-count {
    background: rgba(255, 255, 255, 0.20) !important;
    color: #FFFFFF !important;
}
html[data-theme="light"] .ath-sport-select.is-active,
html[data-theme="light"] .lb-tab-select.is-active {
    background: #020405 !important;
    border-color: #020405 !important;
    color: #FFFFFF !important;
}

/* Override manuel data-theme="dark" (au cas où prefers-color-scheme: light) */
html[data-theme="dark"] .ath-pill.is-active,
html[data-theme="dark"] .lb-pill.is-active,
html[data-theme="dark"] .lb-tab.is-active,
html[data-theme="dark"] .cal-pill.is-active,
html[data-theme="dark"] .cal-mode-btn.is-active,
html[data-theme="dark"] .badges-filter.is-active {
    background: var(--lime, #C7FB3A) !important;
    border-color: var(--lime, #C7FB3A) !important;
    color: #06080C !important;
    box-shadow: 0 4px 12px rgba(199, 251, 58, 0.25);
}
html[data-theme="dark"] .ath-pill.is-active .ath-pill-count,
html[data-theme="dark"] .lb-pill.is-active .lb-pill-count,
html[data-theme="dark"] .cal-pill.is-active .cal-pill-count {
    background: rgba(6, 8, 12, 0.20) !important;
    color: #06080C !important;
}
html[data-theme="dark"] .ath-sport-select.is-active,
html[data-theme="dark"] .lb-tab-select.is-active {
    background: var(--lime, #C7FB3A) !important;
    border-color: var(--lime, #C7FB3A) !important;
    color: #06080C !important;
}

/* =====================================================
   2. BOUTON RETOUR MOBILE — DÉSACTIVÉ
   =====================================================
   Décision UX (v3) : on supprime la flèche retour pour
   simplifier la navigation. Le menu hamburger ☰ est
   présent sur toutes les pages et donne accès à toute
   la navigation, c'est suffisant.

   On garde le JS qui crée le bouton (pas besoin de
   modifier back-button.js), on cache juste le résultat
   via CSS — c'est sans risque.
   ===================================================== */

.scm-back-btn {
    display: none !important;
}
