/*
 * Mode sombre.
 *
 * Activé par l'attribut data-theme="dark" sur <html>, posé avant l'affichage par
 * km_head_assets.php (choix enregistré par le bouton de la barre de navigation,
 * sinon réglage du système). Le site en mode clair n'est pas modifié.
 *
 * - Partie écrite à la main (ci-dessous) : les variables --km-* et les retouches.
 * - Partie générée (après le marqueur) : les couleurs encore écrites en dur dans
 *   kartmadaire.css. À régénérer après modification de kartmadaire.css :
 *       python3 outils/theme_sombre.py
 */

html[data-theme="dark"] {
    color-scheme: dark;
    --km-beton: #0E1620;
    --km-craie: #17212D;
    --km-menu: #0C3A70;
    --km-menu-hover: #092C55;
    --km-asphalte: #3D8FE0;
    --km-asphalte-hover: #5BA4EC;
    --km-encre: #DCE7F3;
    --km-brume: #94A8BD;
    --km-joint: #2B3A4C;
    --km-citron: #E8C547;
    --km-citron-profond: #D9B53A;
    --km-citron-wash: #1D3957;
    --km-citron-pale: #1A2838;
    --km-dromadaire: #5AA8EC;
    --km-feu: #E5584D;
    --km-herbe: #3D8FE0;
    --km-herbe-hover: #5BA4EC;
    --km-herbe-wash: #1A2838;
    --km-sur-couleur: #FFFFFF;
    --km-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

/* Pages React (front/src/strategie) : leurs propres variables */
html[data-theme="dark"] .km-ed {
    --ed-surface: #17212D;
    --ed-surface-2: #1C2938;
    --ed-texte: #DCE7F3;
    --ed-accent: #3D8FE0;
    --ed-accent-fonce: #2F7BC8;
    --ed-accent-pale: #1D3957;
    --ed-ok: #4CC38A;
    --ed-ok-pale: #133326;
    --ed-attention: #F0A43A;
    --ed-attention-pale: #3A2A12;
    --ed-erreur-pale: #3A1A1A;
    --ed-arret: #4A5D72;
}

html[data-theme="dark"] .km-relais-board {
    --km-pw-muted: #94A8BD;
    --km-pw-line: #2B3A4C;
    --km-pw-soft: #1A2838;
    --km-pw-ok: #4CC38A;
    --km-pw-alerte: #F0675B;
    --km-pw-alerte-wash: #3A1A1A;
}

html[data-theme="dark"] body::before {
    opacity: 0.6;
}

/* Logos et pictos sur fond clair : un léger halo pour qu'ils restent lisibles. */
html[data-theme="dark"] img[src*="google_maps"],
html[data-theme="dark"] img[src*="apple_plan"] {
    background: #FFFFFF;
    border-radius: 4px;
}

/* Logo Live Timing (pictogramme noir sur fond transparent) : passé en blanc. */
html[data-theme="dark"] img[src*="KartingLogo"] {
    filter: brightness(0) invert(1);
}

/* Bouton de la barre de navigation : clair / sombre / automatique */
.navbar-theme-toggle {
    background: none;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.navbar-theme-toggle .fa-solid {
    display: none;
}

html[data-theme-choice="auto"] .navbar-theme-toggle .km-theme-icon-auto,
html[data-theme-choice="dark"] .navbar-theme-toggle .km-theme-icon-dark,
html[data-theme-choice="light"] .navbar-theme-toggle .km-theme-icon-light {
    display: inline-block;
}

/* Administration : la pastille jaune des inscriptions garde un texte foncé */
html[data-theme="dark"] .adm-onglet .adm-onglet-compte--alerte {
    color: #3A2E00;
}

/* === Généré par outils/theme_sombre.py : ne pas modifier à la main en dessous === */

/* --- css/kartmadaire.css --- */

:where(html[data-theme="dark"]) body::before {
    background: radial-gradient(circle at 20% 50%, rgba(44, 133, 236, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(44, 133, 236, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(44, 133, 236, 0.048) 0%, transparent 50%);
}

:where(html[data-theme="dark"]) .navbar-links-a {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .navbar-links-a.active {
    color: #FFFFFF !important;
}

:where(html[data-theme="dark"]) .navbar-user-section {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

:where(html[data-theme="dark"]) .navbar-logout:hover {
    background-color: rgba(255, 255, 255, 0.075);
    border-bottom: 2px solid rgba(255, 255, 255, 0.25);
}

:where(html[data-theme="dark"]) .navbar-toggle span {
    background-color: #151E28;
}

:where(html[data-theme="dark"]) table {
    background-color: #151E28;
}

:where(html[data-theme="dark"]) td {
    border-bottom: 1px solid #303F50;
    color: #BBC6D2;
}

:where(html[data-theme="dark"]) .btn-add,
:where(html[data-theme="dark"]) .btn-submit {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .btn-supprimer {
    background: #151E28 !important;
}

@media (max-width: 768px) {
    :where(html[data-theme="dark"]) .navbar-links {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.375);
    }
}

@media (max-width: 768px) {
    :where(html[data-theme="dark"]) .navbar-links-a:hover {
        background-color: rgba(255, 255, 255, 0.075);
    }
}

:where(html[data-theme="dark"]) .welcome-section {
    background-color: #151E28;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

:where(html[data-theme="dark"]) h1 {
    color: #F7EEA0;
}

:where(html[data-theme="dark"]) .container h1 {
    color: #C5CED8;
}

:where(html[data-theme="dark"]) .subtitle {
    color: #A3B2C2;
}

:where(html[data-theme="dark"]) .description {
    background-color: #1F2224;
}

:where(html[data-theme="dark"]) .quick-links h2 {
    color: #C5CED8;
}

:where(html[data-theme="dark"]) .quick-link {
    background-color: #1F2224;
    color: #C5CED8;
}

:where(html[data-theme="dark"]) .quick-link:hover {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .btn-add {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) #add-form-container {
    background: #151E28;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

:where(html[data-theme="dark"]) .form-group select {
    border: 1px solid #37485B;
    background-color: #151E28;
}

:where(html[data-theme="dark"]) .error {
    color: #F66156;
    background-color: #32151A;
}

:where(html[data-theme="dark"]) .error-message {
    border: 1px solid #60292F;
}

:where(html[data-theme="dark"]) .btn-modifier {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) td a.btn-primary,
:where(html[data-theme="dark"]) td a.btn-primary:hover,
:where(html[data-theme="dark"]) td a.btn-primary:focus {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .form-group input:focus {
    box-shadow: 0 0 3px rgba(44, 133, 236, 0.48);
}

:where(html[data-theme="dark"]) .btn-icon:hover {
    background-color: rgba(44, 133, 236, 0.16);
}

:where(html[data-theme="dark"]) .btn-action {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .btn-action.disabled {
    background-color: #273849;
    color: #A3B2C2;
}

:where(html[data-theme="dark"]) .btn-action.disabled:hover {
    background-color: #273849;
}

:where(html[data-theme="dark"]) .course-info {
    color: #A3B2C2;
}

:where(html[data-theme="dark"]) .no-results {
    color: #A3B2C2;
}

:where(html[data-theme="dark"]) .meilleur-temps h3 {
    color: #F3DC96;
}

:where(html[data-theme="dark"]) .meilleur-temps-ligne {
    color: #E7EAEF;
}

:where(html[data-theme="dark"]) .meilleur-temps-ligne-pilote {
    background-color: #524123;
    color: #E7EAEF;
}

:where(html[data-theme="dark"]) .carte-pilote {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

:where(html[data-theme="dark"]) .lp-pilotes-page .res-hero h1 {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .res-hero h1 a {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .res-hero h1 a:hover {
    text-decoration-color: rgba(255, 255, 255, 0.2);
}

:where(html[data-theme="dark"]) .res-hero-place--or {
    background: rgba(232, 197, 71, 0.352);
}

:where(html[data-theme="dark"]) .db-page .db-btn.res-btn-supprimer:hover {
    background: #E44134;
    border-color: #E44134;
}

:where(html[data-theme="dark"]) .res-ruban__seg {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .res-ruban__seg--pluie::after {
    background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0 3px, transparent 3px 7px);
}

:where(html[data-theme="dark"]) .res-ruban__seg--mouille {
    box-shadow: inset 0 4px 0 #000000;
}

:where(html[data-theme="dark"]) .res-relais:hover {
    box-shadow: 0 4px 14px rgba(44, 133, 236, 0.16);
}

:where(html[data-theme="dark"]) .res-relais[open] {
    box-shadow: 0 6px 20px rgba(44, 133, 236, 0.192);
}

:where(html[data-theme="dark"]) .res-relais__num {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .resultats-trophee {
    color: #E4C55E;
}

:where(html[data-theme="dark"]) .graphique-legende__stand {
    background: #7C8D9E;
}

:where(html[data-theme="dark"]) .resultats-badge-stand {
    background: #7C8D9E;
}

:where(html[data-theme="dark"]) .graphique-legende__bande {
    border: 1px solid rgba(44, 133, 236, 0.72);
}

:where(html[data-theme="dark"]) .graphique-legende__bande--pluie {
    background: repeating-linear-gradient(135deg, rgba(44, 133, 236, 0.48) 0 1px, rgba(44, 133, 236, 0.208) 1px 4px);
}

:where(html[data-theme="dark"]) .graphique-legende__bande--mouille {
    background: rgba(44, 133, 236, 0.096);
}

:where(html[data-theme="dark"]) .input-wrapper input {
    border: 2px solid #3D4246;
}

:where(html[data-theme="dark"]) .input-wrapper input:focus {
    box-shadow: 0 0 0 4px rgba(44, 133, 236, 0.16);
}

:where(html[data-theme="dark"]) .input-wrapper input::placeholder {
    color: #ADB5BD;
}

:where(html[data-theme="dark"]) .login-form .btn-submit,
:where(html[data-theme="dark"]) .form-group-connexion-button .btn-submit {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .back-link {
    color: #9AAABB;
}

:where(html[data-theme="dark"]) .ps-avatar {
    color: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.5), 0 0 0 6px var(--km-citron);
}

:where(html[data-theme="dark"]) .ps-kpi {
    background: #151E28;
    box-shadow: 0 1px 3px rgba(44, 133, 236, 0.128);
}

:where(html[data-theme="dark"]) .ps-card {
    background: #151E28;
    box-shadow: 0 1px 3px rgba(44, 133, 236, 0.128);
}

:where(html[data-theme="dark"]) .ps-meta .fa-sun {
    color: #F3D067;
}

:where(html[data-theme="dark"]) .ps-rang--or {
    background: #3A331D;
    color: #F6DB93;
}

:where(html[data-theme="dark"]) .ps-rang--argent {
    background: #23262A;
    color: #B8BABE;
}

:where(html[data-theme="dark"]) .ps-rang--bronze {
    background: #352A20;
    color: #E2B898;
}

:where(html[data-theme="dark"]) .ps-best {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .ps-best-detail a {
    color: #FFFFFF;
    text-decoration-color: rgba(255, 255, 255, 0.2);
}

:where(html[data-theme="dark"]) .ps-best-detail {
    color: rgba(255, 255, 255, 0.41);
}

:where(html[data-theme="dark"]) .ps-best-equipe-titre {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.3);
}

:where(html[data-theme="dark"]) .ps-best-equipe li span {
    background: rgba(255, 255, 255, 0.07);
}

:where(html[data-theme="dark"]) .cd-contact {
    background: #151E28;
}

:where(html[data-theme="dark"]) .cd-live-dot {
    background: #1FB556;
    box-shadow: 0 0 0 3px rgba(59, 221, 119, 0.32);
}

:where(html[data-theme="dark"]) .circuit-detail-page .cd-tabs button[aria-selected="true"] {
    background: #151E28;
    box-shadow: 0 1px 2px rgba(44, 133, 236, 0.24);
}

:where(html[data-theme="dark"]) .cd-pos--1 {
    background: #3A331D;
    color: #F6DB93;
}

:where(html[data-theme="dark"]) .cd-pos--2 {
    background: #23262A;
    color: #B8BABE;
}

:where(html[data-theme="dark"]) .cd-pos--3 {
    background: #352A20;
    color: #E2B898;
}

:where(html[data-theme="dark"]) .cd-detail .fa-sun {
    color: #F3D067;
}

:where(html[data-theme="dark"]) .circuit-detail-page .cd-lien-action--danger:hover {
    background: #301B18;
}

:where(html[data-theme="dark"]) .circuit-detail-page .cd-add-piste-champs input {
    background: #151E28;
}

:where(html[data-theme="dark"]) .lp-pilotes-page #add-form-container.lpi-ajout {
    box-shadow: 0 1px 3px rgba(44, 133, 236, 0.128);
}

:where(html[data-theme="dark"]) .lp-pilotes-page .lpi-ajout-champs input {
    background: #151E28;
}

:where(html[data-theme="dark"]) .lp-pilotes-page .lpi-ajout-champs input:focus {
    box-shadow: 0 0 0 3px rgba(50, 143, 230, 0.24);
}

:where(html[data-theme="dark"]) .lp-pilotes-page .lpi-recherche input[type="search"] {
    background: #151E28;
}

:where(html[data-theme="dark"]) .lp-pilotes-page .lpi-recherche input[type="search"]:focus {
    box-shadow: 0 0 0 3px rgba(50, 143, 230, 0.24);
}

:where(html[data-theme="dark"]) .lp-pilotes-page .lpi-tri select {
    background-color: #151E28;
}

:where(html[data-theme="dark"]) .lpi-carte {
    background: #151E28;
    box-shadow: 0 1px 3px rgba(44, 133, 236, 0.128);
}

:where(html[data-theme="dark"]) .lpi-carte:hover {
    box-shadow: 0 6px 18px rgba(44, 133, 236, 0.16);
}

:where(html[data-theme="dark"]) .lpi-avatar {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .lci-visuel-vide {
    color: rgba(255, 255, 255, 0.175);
}

:where(html[data-theme="dark"]) .lci-badge-live {
    background: rgba(255, 255, 255, 0.46);
}

:where(html[data-theme="dark"]) .lp-pilotes-page .kt-ajout-champs select {
    background-color: #151E28;
}

:where(html[data-theme="dark"]) .kt-moteur {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .kt-carte--2t .kt-moteur {
    background: linear-gradient(135deg, #B99927 0%, var(--km-citron) 100%);
}

:where(html[data-theme="dark"]) .ed-config-titre .fa-sun {
    color: #F3D067;
}

:where(html[data-theme="dark"]) .ed-seance-titre .fa-sun {
    color: #F3D067;
}

:where(html[data-theme="dark"]) .ed-config-court .fa-sun {
    color: #F3D067;
}

:where(html[data-theme="dark"]) .ed-badge {
    background: #3A331D;
    color: #F6DB93;
}

:where(html[data-theme="dark"]) .ed-record {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .ed-record span {
    color: rgba(255, 255, 255, 0.35);
}

:where(html[data-theme="dark"]) a.db-kpi:hover {
    box-shadow: 0 6px 18px rgba(44, 133, 236, 0.192);
}

:where(html[data-theme="dark"]) .db-kpi--alerte {
    background: #301B18;
}

:where(html[data-theme="dark"]) .db-hero {
    background: radial-gradient(600px 220px at 90% 0%, rgba(57, 148, 224, 0.72), transparent 60%),
        linear-gradient(150deg, var(--km-menu) 0%, var(--km-menu-hover) 100%);
    color: #FFFFFF;
    box-shadow: 0 10px 30px rgba(42, 119, 238, 0.288);
}

:where(html[data-theme="dark"]) .db-hero-compte {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

:where(html[data-theme="dark"]) .db-hero-compte span {
    color: rgba(255, 255, 255, 0.375);
}

:where(html[data-theme="dark"]) .db-hero h2 a {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .db-hero h2 a:hover {
    text-decoration-color: rgba(255, 255, 255, 0.2);
}

:where(html[data-theme="dark"]) .db-hero-meta {
    color: rgba(255, 255, 255, 0.425);
}

:where(html[data-theme="dark"]) .db-hero-meta i {
    color: rgba(255, 255, 255, 0.3);
}

:where(html[data-theme="dark"]) .db-hero-meta .db-ok i {
    color: #70D5B0;
}

:where(html[data-theme="dark"]) .db-hero-pilotes span {
    background: rgba(255, 255, 255, 0.08);
}

:where(html[data-theme="dark"]) .db-hero-pilotes em {
    color: rgba(255, 255, 255, 0.375);
}

:where(html[data-theme="dark"]) .db-page .db-btn {
    border: 1px solid rgba(255, 255, 255, 0.175);
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .db-page .db-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #2A3846;
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .db-statut--ok {
    background: #203027;
    color: #A3EACD;
}

:where(html[data-theme="dark"]) .db-statut--todo {
    background: #3A331D;
    color: #F6DB93;
}

:where(html[data-theme="dark"]) .db-ent-texte .fa-sun {
    color: #F3D067;
}

:where(html[data-theme="dark"]) .course-details {
    background: #151E28;
}

:where(html[data-theme="dark"]) .pilote-select {
    border: 1px solid #37485B;
}

:where(html[data-theme="dark"]) .strategie-summary {
    background-color: #1F2224;
}

:where(html[data-theme="dark"]) .strategie-summary h4 {
    color: #C5CED8;
}

:where(html[data-theme="dark"]) .btn-submit:hover {
    box-shadow: 0 4px 8px rgba(44, 133, 236, 0.32);
}

:where(html[data-theme="dark"]) .btn-cancel {
    background: #636B73;
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .btn-cancel:hover {
    background: #535960;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.375);
}

:where(html[data-theme="dark"]) .alert-error {
    background: #361E21;
    border: 1px solid #5D3439;
    color: #E2A5AB;
}

:where(html[data-theme="dark"]) .btn-icon {
    background: #151E28 !important;
}

:where(html[data-theme="dark"]) .btn-icon i[class*="fa-"] {
    color: #A6B5C4;
}

:where(html[data-theme="dark"]) .btn-strategie {
    color: #FFFFFF !important;
}

:where(html[data-theme="dark"]) .btn-strategie:hover {
    color: #FFFFFF !important;
}

:where(html[data-theme="dark"]) .btn-resultats {
    background-color: #636B73;
    color: #FFFFFF !important;
}

:where(html[data-theme="dark"]) .btn-resultats:hover {
    background-color: #535960;
    color: #FFFFFF !important;
}

:where(html[data-theme="dark"]) .btn-google-calendar {
    background: #151E28;
    color: #FFFFFF !important;
    border: 1px solid #37485B;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

:where(html[data-theme="dark"]) .btn-google-calendar::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

:where(html[data-theme="dark"]) .btn-google-calendar:hover {
    background: #1F2224;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.375);
    border-color: #37485B;
}

:where(html[data-theme="dark"]) .btn-google-calendar:active {
    box-shadow: 0 2px 6px rgba(66, 133, 244, 0.48);
}

:where(html[data-theme="dark"]) .btn-apple-calendar {
    background: #151E28;
    color: #E7EAEF !important;
    border: 1px solid #37485B;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

:where(html[data-theme="dark"]) .btn-apple-calendar::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
}

:where(html[data-theme="dark"]) .btn-apple-calendar:hover {
    background: #1F2224;
    color: #E7EAEF !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.375);
    border-color: #37485B;
}

:where(html[data-theme="dark"]) .btn-apple-calendar:active {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}

:where(html[data-theme="dark"]) .calendar-event-menu a:hover {
    background-color: #222326;
}

:where(html[data-theme="dark"]) .btn-map {
    background: #151E28;
    color: #FFFFFF !important;
    border: 1px solid #37485B;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

:where(html[data-theme="dark"]) .btn-map:hover {
    background: #1F2224;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.375);
    border-color: #37485B;
}

:where(html[data-theme="dark"]) .btn-map:active {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

:where(html[data-theme="dark"]) .btn[disabled] {
    background-color: #273849;
}

:where(html[data-theme="dark"]) .strategie-form {
    background: #151E28;
}

:where(html[data-theme="dark"]) .resultats-file-btn {
    color: #FFFFFF;
    box-shadow: 0 2px 10px rgba(44, 133, 236, 0.448);
}

:where(html[data-theme="dark"]) .resultats-file-btn:hover {
    box-shadow: 0 4px 16px rgba(44, 133, 236, 0.608);
}

:where(html[data-theme="dark"]) .resultats-file-btn:active {
    box-shadow: 0 2px 8px rgba(44, 133, 236, 0.4);
}

:where(html[data-theme="dark"]) .resultats-file-upload:focus-within .resultats-file-btn {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5), 0 0 0 4px var(--km-asphalte-hover), 0 2px 10px rgba(44, 133, 236, 0.448);
}

:where(html[data-theme="dark"]) .resultats-file-clear {
    border: 1px solid #484F52;
    background: #151E28;
    color: #AEB4B6;
}

:where(html[data-theme="dark"]) .resultats-file-clear:hover {
    background: #242729;
    border-color: #B0BEC5;
    color: #C3C7C9;
}

:where(html[data-theme="dark"]) .resultats-file-name {
    color: #C3C7C9;
}

:where(html[data-theme="dark"]) .resultats-file-name.is-empty {
    color: #98AAB4;
}

:where(html[data-theme="dark"]) .strategie-summary.resultats-aide-bloc .resultats-aide-intro {
    color: #C5CED8;
}

:where(html[data-theme="dark"]) .strategie-summary.resultats-aide-bloc .resultats-aide-sub {
    color: #AEBBC9;
}

:where(html[data-theme="dark"]) .strategie-summary.resultats-aide-bloc .resultats-format-row {
    background: #151E28;
    border: 1px solid #404448;
}

:where(html[data-theme="dark"]) .strategie-summary.resultats-aide-bloc .resultats-format-label {
    color: #A5ACAF;
}

:where(html[data-theme="dark"]) .strategie-summary.resultats-aide-bloc .resultats-format-code {
    background: #222326;
    border: 1px solid #3D454D;
}

:where(html[data-theme="dark"]) .strategie-summary.resultats-aide-bloc span.resultats-format-hint {
    color: #9AA0A3;
}

:where(html[data-theme="dark"]) .strategie-summary.resultats-aide-bloc .resultats-aide-foot {
    border-top: 1px solid #43474A;
    color: #AEBBC9;
}

:where(html[data-theme="dark"]) .strategie-summary.resultats-aide-bloc .resultats-aide-foot--compact {
    color: #A3B2C2;
}

:where(html[data-theme="dark"]) .form-group input {
    border: 1px solid #37485B;
}

:where(html[data-theme="dark"]) .alert {
    background-color: #361E21;
    border: 1px solid #5D3439;
    color: #E2A5AB;
}

:where(html[data-theme="dark"]) .btn-submit:disabled {
    background-color: #273849;
}

:where(html[data-theme="dark"]) .btn-primary {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .btn-primary:hover {
    box-shadow: 0 4px 8px rgba(44, 133, 236, 0.32);
}

:where(html[data-theme="dark"]) .btn-primary-delete {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .btn-primary-delete:hover {
    box-shadow: 0 4px 8px rgba(221, 59, 75, 0.32);
}

:where(html[data-theme="dark"]) .recap-table {
    background-color: #151E28;
}

:where(html[data-theme="dark"]) .recap-table td {
    border-bottom: 1px solid #303F50;
    color: #BBC6D2;
}

:where(html[data-theme="dark"]) .recap-table tr:nth-child(even) {
    background-color: #1D2124;
}

:where(html[data-theme="dark"]) header {
    background-color: #151E28;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

:where(html[data-theme="dark"]) .nav-container {
    background-color: #151E28;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

:where(html[data-theme="dark"]) .nav-links a {
    color: #C5CED8;
}

:where(html[data-theme="dark"]) .nav-links a:hover {
    background-color: #1B2632;
}

:where(html[data-theme="dark"]) .nav-links a.active {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .btn-login {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .btn-logout {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) main {
    background-color: #1F2224;
}

:where(html[data-theme="dark"]) .hero-section {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .feature-card {
    background: #151E28;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
}

:where(html[data-theme="dark"]) .step-card {
    background: #151E28;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
}

:where(html[data-theme="dark"]) .step-number {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .benefit-card {
    background: #151E28;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
}

:where(html[data-theme="dark"]) .cta-section {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .btn-cta {
    background-color: #151E28;
}

:where(html[data-theme="dark"]) .btn-cta:hover {
    background-color: #1F2224;
}

:where(html[data-theme="dark"]) .form-group-connexion label {
    color: #C5CED8;
}

:where(html[data-theme="dark"]) .separator {
    background-color: #212F3E;
}

:where(html[data-theme="dark"]) .input-icon-modern {
    color: #9AAABB;
}

:where(html[data-theme="dark"]) .input-connexion-modern {
    border: 2px solid #36475A;
    background-color: #17212B;
    color: #C5CED8;
}

:where(html[data-theme="dark"]) .input-connexion-modern:focus {
    background-color: #151E28;
    box-shadow: 0 0 0 4px rgba(44, 133, 236, 0.16), 0 4px 12px rgba(44, 133, 236, 0.24);
}

:where(html[data-theme="dark"]) .input-connexion-modern::placeholder {
    color: #ADB5BD;
}

:where(html[data-theme="dark"]) .password-toggle {
    color: #9AAABB;
}

:where(html[data-theme="dark"]) .password-toggle:hover {
    background-color: rgba(44, 133, 236, 0.08);
}

:where(html[data-theme="dark"]) .btn-submit-modern {
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(44, 133, 236, 0.48);
}

:where(html[data-theme="dark"]) .btn-submit-modern:hover {
    box-shadow: 0 6px 20px rgba(44, 133, 236, 0.64);
}

:where(html[data-theme="dark"]) .btn-submit-modern:active {
    box-shadow: 0 2px 10px rgba(44, 133, 236, 0.48);
}

:where(html[data-theme="dark"]) .btn-secondary-modern {
    background: #151E28 !important;
    box-shadow: 0 2px 8px rgba(44, 133, 236, 0.24) !important;
}

:where(html[data-theme="dark"]) .btn-secondary-modern:hover {
    box-shadow: 0 4px 12px rgba(44, 133, 236, 0.4) !important;
}

:where(html[data-theme="dark"]) .separator-modern {
    color: #9AAABB;
}

:where(html[data-theme="dark"]) .separator-modern::before,
:where(html[data-theme="dark"]) .separator-modern::after {
    border-bottom: 1px solid #36475A;
}

:where(html[data-theme="dark"]) .separator-modern span {
    background: #151E28;
}

:where(html[data-theme="dark"]) .login-subtitle {
    color: #9AAABB;
}

:where(html[data-theme="dark"]) .error-message {
    background: linear-gradient(135deg, #2E1414 0%, #331616 100%);
}

:where(html[data-theme="dark"]) .btn-submit {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .input-icon {
    color: #9AAABB;
}

:where(html[data-theme="dark"]) .input-connexion {
    border: 2px solid #3D4246;
}

:where(html[data-theme="dark"]) .input-connexion:focus {
    box-shadow: 0 0 0 4px rgba(44, 133, 236, 0.16);
}

:where(html[data-theme="dark"]) .input-connexion::placeholder {
    color: #ADB5BD;
}

:where(html[data-theme="dark"]) .calendar-toggle-past {
    color: #B8BDC0;
}

:where(html[data-theme="dark"]) .calendar-legend {
    color: #AEB4B6;
}

:where(html[data-theme="dark"]) #calendar {
    background: linear-gradient(135deg, #151E28 0%, #1F2224 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.125);
}

:where(html[data-theme="dark"]) #calendar.calendar-v2 {
    background: #151E28;
    border: 1px solid #314051;
    box-shadow: 0 8px 24px rgba(44, 133, 236, 0.128);
}

:where(html[data-theme="dark"]) .fc-button {
    color: #FFFFFF !important;
    box-shadow: 0 2px 4px rgba(44, 133, 236, 0.32) !important;
}

:where(html[data-theme="dark"]) .fc-button:hover {
    box-shadow: 0 4px 8px rgba(44, 133, 236, 0.48) !important;
}

:where(html[data-theme="dark"]) .fc-button-primary:not(:disabled):active,
:where(html[data-theme="dark"]) .fc-button-primary:not(:disabled).fc-button-active {
    box-shadow: 0 2px 4px rgba(44, 133, 236, 0.48) !important;
}

:where(html[data-theme="dark"]) .fc-daygrid-day {
    border: 1px solid #36475A !important;
    background: #151E28 !important;
}

:where(html[data-theme="dark"]) .calendar-v2 .fc-daygrid-day:hover {
    background: #14212E !important;
}

:where(html[data-theme="dark"]) .calendar-v2 .fc-day-today {
    background: linear-gradient(180deg, #162433 0%, #222326 100%) !important;
    box-shadow: inset 0 0 0 2px rgba(44, 133, 236, 0.4);
}

:where(html[data-theme="dark"]) .calendar-v2 .fc-day-today .fc-daygrid-day-number {
    color: #FFFFFF !important;
}

:where(html[data-theme="dark"]) .fc-daygrid-day-number {
    color: #BBC6D2 !important;
}

:where(html[data-theme="dark"]) .fc-event {
    box-shadow: 0 2px 4px rgba(44, 133, 236, 0.32) !important;
}

:where(html[data-theme="dark"]) .fc-event:hover {
    box-shadow: 0 4px 8px rgba(44, 133, 236, 0.48) !important;
}

:where(html[data-theme="dark"]) .calendar-detail-panel {
    background: #151E28;
    border: 1px solid #38414D;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

:where(html[data-theme="dark"]) .calendar-detail-close {
    color: #9AA0A3;
}

:where(html[data-theme="dark"]) .calendar-detail-date {
    color: #A5ACAF;
}

:where(html[data-theme="dark"]) .calendar-detail-adresse {
    color: #AEB4B6;
}

:where(html[data-theme="dark"]) .calendar-detail-meta > div {
    background: #222326;
}

:where(html[data-theme="dark"]) .calendar-detail-meta dt {
    color: #9AA0A3;
}

:where(html[data-theme="dark"]) .fc-day-other {
    background: #17212B !important;
}

:where(html[data-theme="dark"]) .fc-day-other .fc-daygrid-day-number {
    color: #BDBDBD !important;
}

:where(html[data-theme="dark"]) .tabs-header {
    border-bottom: 2px solid #43474A;
}

:where(html[data-theme="dark"]) .tab-button {
    color: #9AAABB;
}

:where(html[data-theme="dark"]) .tab-button:hover {
    background-color: #1F2224;
}

:where(html[data-theme="dark"]) .graphique-filtres-panel {
    background: linear-gradient(145deg, var(--km-craie) 0%, #222326 100%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
}

:where(html[data-theme="dark"]) .graphique-filtres-panel__head {
    background: rgba(44, 133, 236, 0.096);
}

:where(html[data-theme="dark"]) .graphique-filtre-toggle__input:focus-visible + .graphique-filtre-toggle__track {
    box-shadow: 0 0 0 3px rgba(44, 133, 236, 0.56);
}

:where(html[data-theme="dark"]) .graphique-filtre-toggle__thumb {
    background: #151E28;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

:where(html[data-theme="dark"]) .graphique-mmss {
    background: #151E28;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

:where(html[data-theme="dark"]) .graphique-mmss:focus-within {
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(44, 133, 236, 0.288);
}

:where(html[data-theme="dark"]) .graphique-mmss__clear:hover {
    background: #222326;
}

:where(html[data-theme="dark"]) .circuit-detail-page .circuit-detail-subtitle {
    color: #AEBBC9;
}

:where(html[data-theme="dark"]) .circuit-stats-summary-toggle:hover {
    background: #222326;
}

:where(html[data-theme="dark"]) .circuit-stats-record-card {
    background: #151E28;
}

:where(html[data-theme="dark"]) .circuit-meta-item {
    background: #151E28;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

:where(html[data-theme="dark"]) .site-footer {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .footer-tagline {
    color: rgba(255, 255, 255, 0.45);
}

:where(html[data-theme="dark"]) .footer-title {
    color: #FFFFFF;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

:where(html[data-theme="dark"]) .footer-menu a {
    color: rgba(255, 255, 255, 0.425);
}

:where(html[data-theme="dark"]) .footer-menu a:hover {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .footer-text {
    color: rgba(255, 255, 255, 0.425);
}

:where(html[data-theme="dark"]) .social-link {
    background-color: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .social-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

:where(html[data-theme="dark"]) .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

:where(html[data-theme="dark"]) .footer-copyright p {
    color: rgba(255, 255, 255, 0.45);
}

:where(html[data-theme="dark"]) .footer-version {
    color: rgba(255, 255, 255, 0.275);
}

:where(html[data-theme="dark"]) .liste-courses-nom-equipe--empty {
    color: #8D9FB3;
}

:where(html[data-theme="dark"]) .liste-courses-equipe-input {
    border: 1px solid #37485B;
    background: #151E28;
}

:where(html[data-theme="dark"]) .liste-courses-equipe-input:focus {
    box-shadow: 0 0 3px rgba(44, 133, 236, 0.48);
}

:where(html[data-theme="dark"]) .liste-courses-equipe-edit {
    color: #8D9FB3;
}

:where(html[data-theme="dark"]) .course-card {
    box-shadow: 0 1px 2px rgba(68, 148, 213, 0.08);
}

:where(html[data-theme="dark"]) .course-groupe-equipe--winner {
    background: rgba(232, 197, 71, 0.128);
}

:where(html[data-theme="dark"]) .course-card-classement {
    background: rgba(232, 197, 71, 0.256);
}

:where(html[data-theme="dark"]) .course-card-btn--primary {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .course-card-btn--primary:hover {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .course-card-icon-btn--delete:hover {
    background-color: #32151A;
}

:where(html[data-theme="dark"]) .km-confirm-overlay {
    background: rgba(78, 131, 202, 0.88);
}

:where(html[data-theme="dark"]) .km-confirm-box {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.625);
}

:where(html[data-theme="dark"]) .km-confirm-icon {
    background: #32151A;
}

:where(html[data-theme="dark"]) .km-confirm-btn-danger {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .km-confirm-btn-danger:hover {
    background-color: #801812;
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .btn-relai-rentree {
    border: 1px solid #484E56;
    color: #A7ACB1;
}

:where(html[data-theme="dark"]) .btn-relai-rentree:hover {
    border-color: #136CD3;
    color: #86B5EB;
}

:where(html[data-theme="dark"]) .btn-relai-rentree--set {
    border-color: #136CD3;
    background: #192833;
    color: #86B5EB;
}

:where(html[data-theme="dark"]) .btn-relai-rentree-clear {
    border: 1px solid #484E56;
    color: #A7ACB1;
}

:where(html[data-theme="dark"]) .btn-relai-rentree-clear:hover {
    background: #32151A;
}

:where(html[data-theme="dark"]) .strategie-duree-relai-inline--reelle {
    color: #86B5EB;
}

:where(html[data-theme="dark"]) .km-rentree-input {
    border: 1px solid #484E56;
}

:where(html[data-theme="dark"]) .km-rentree-modes legend {
    color: #A7ACB1;
}

:where(html[data-theme="dark"]) .km-rentree-error {
    background: #32151A;
    border: 1px solid #60292F;
}

:where(html[data-theme="dark"]) .km-list-card {
    box-shadow: 0 1px 2px rgba(68, 148, 213, 0.08);
}

:where(html[data-theme="dark"]) .btn-icon.btn-icon-delete.is-disabled,
:where(html[data-theme="dark"]) span.btn-icon.btn-icon-delete.is-disabled {
    color: #A6A6A6 !important;
}

:where(html[data-theme="dark"]) .btn-icon.btn-icon-delete.is-disabled i {
    color: #A6A6A6 !important;
}

:where(html[data-theme="dark"]) .km-bulk-actions .btn-primary-delete:disabled {
    color: #A6A6A6 !important;
}

@media (max-width: 768px) {
    :where(html[data-theme="dark"]) table.km-cards tr:not(:has(th)) {
        background-color: #151E28;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
    }
}

@media (max-width: 768px) {
    :where(html[data-theme="dark"]) table.km-cards tr:hover {
        background-color: #151E28;
    }
}

@media (max-width: 768px) {
    :where(html[data-theme="dark"]) table.km-cards td {
        border-bottom: 1px solid #303F50;
    }
}

:where(html[data-theme="dark"]) .strategie-relais-page .strategie-course-meteo {
    color: #B0C6E3;
}

:where(html[data-theme="dark"]) .dashboard-badge--today {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .dashboard-today-actions .btn-strategie {
    box-shadow: 0 2px 8px rgba(44, 133, 236, 0.56);
}

:where(html[data-theme="dark"]) .dashboard-section > h2,
:where(html[data-theme="dark"]) .dashboard-section-head h2 {
    color: #D1D8E0;
}

:where(html[data-theme="dark"]) .dashboard-badge--countdown {
    background: #242729;
    color: #B8BDC0;
}

:where(html[data-theme="dark"]) .dashboard-next-date {
    color: #AEB4B6;
}

:where(html[data-theme="dark"]) .dashboard-next-ville {
    color: #9AA0A3;
}

:where(html[data-theme="dark"]) .dashboard-next-meta dt {
    color: #9AA0A3;
}

:where(html[data-theme="dark"]) .dashboard-next-pilotes {
    color: #B8BDC0;
}

:where(html[data-theme="dark"]) .dashboard-panel-empty {
    color: #9AA0A3;
}

:where(html[data-theme="dark"]) .dashboard-list-item {
    border-bottom: 1px solid #314051;
}

:where(html[data-theme="dark"]) .dashboard-list-date {
    color: #9AA0A3;
}

:where(html[data-theme="dark"]) .dashboard-list-meteo {
    color: #A5ACAF;
}

:where(html[data-theme="dark"]) .dashboard-list-meta {
    color: #A5ACAF;
}

:where(html[data-theme="dark"]) .dashboard-histo-track {
    background: #1C2733;
}

:where(html[data-theme="dark"]) .analyse-sidebar {
    background: #151E28;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

:where(html[data-theme="dark"]) .analyse-filters-bar {
    background: #151E28;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

:where(html[data-theme="dark"]) .analyse-page .an-select select {
    background-color: #151E28;
}

:where(html[data-theme="dark"]) .analyse-page .an-select select:focus,
:where(html[data-theme="dark"]) .analyse-page .an-select select:focus-visible {
    box-shadow: 0 0 0 3px rgba(50, 143, 230, 0.24);
}

:where(html[data-theme="dark"]) .analyse-pilotes-compteur.is-vide {
    background: #301B18;
}

:where(html[data-theme="dark"]) .analyse-page .analyse-pilotes-recherche input[type="search"]:focus {
    background: #151E28;
    box-shadow: 0 0 0 3px rgba(50, 143, 230, 0.24);
}

:where(html[data-theme="dark"]) .analyse-page .form-group .analyse-chip {
    background: #151E28;
}

:where(html[data-theme="dark"]) .analyse-page .form-group .analyse-chip:has(input:checked) {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .analyse-tip-bubble {
    color: #FFFFFF;
    box-shadow: 0 6px 16px rgba(44, 133, 236, 0.448);
}

:where(html[data-theme="dark"]) .analyse-empty {
    background: #151E28;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

:where(html[data-theme="dark"]) .analyse-section.strategie-summary {
    background: #151E28;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

:where(html[data-theme="dark"]) .analyse-regularite--moyen {
    background: #352E17;
    border-color: #F9A825;
    color: #EA9C58;
}

:where(html[data-theme="dark"]) .analyse-regularite--faible {
    background: #32151A;
    color: #E28080;
}

:where(html[data-theme="dark"]) .analyse-regularite--insuffisant {
    background: #222326;
}

:where(html[data-theme="dark"]) .analyse-page .analyse-table thead .analyse-th-id {
    border-bottom: 1px solid #39485C;
}

:where(html[data-theme="dark"]) .analyse-page .analyse-table thead .analyse-th-sub {
    border-bottom: 1px solid #39485C;
}

:where(html[data-theme="dark"]) .analyse-page .analyse-table thead .analyse-th-group.analyse-th-group-start,
:where(html[data-theme="dark"]) .analyse-page .analyse-table thead .analyse-th-id + .analyse-th-group,
:where(html[data-theme="dark"]) .analyse-page .analyse-table thead .analyse-th-sub.analyse-th-group-start,
:where(html[data-theme="dark"]) .analyse-page .analyse-table tbody .analyse-td-group-start {
    border-left: 1px solid #354255;
}

:where(html[data-theme="dark"]) .analyse-charts-swatch--ent {
    background: #E8C547;
}

:where(html[data-theme="dark"]) .analyse-charts-swatch--course {
    background: #2B77EE;
    border: 1px solid #115ED5;
}

:where(html[data-theme="dark"]) .db-hero .db-hero-main h1 a:hover:not([class*="btn"]),
:where(html[data-theme="dark"]) .db-hero .db-hero-main h2 a:hover:not([class*="btn"]) {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .navbar-links-a:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) th {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .btn-add:hover,
:where(html[data-theme="dark"]) .btn-submit:hover,
:where(html[data-theme="dark"]) .btn-action:hover,
:where(html[data-theme="dark"]) .btn-modifier:hover,
:where(html[data-theme="dark"]) .btn-primary:hover,
:where(html[data-theme="dark"]) .btn-submit-modern:hover,
:where(html[data-theme="dark"]) a.btn-add:hover,
:where(html[data-theme="dark"]) a.btn-submit:hover,
:where(html[data-theme="dark"]) a.btn-action:hover,
:where(html[data-theme="dark"]) a.btn-modifier:hover,
:where(html[data-theme="dark"]) a.btn-primary:hover,
:where(html[data-theme="dark"]) td a.btn-add:hover,
:where(html[data-theme="dark"]) td a.btn-submit:hover,
:where(html[data-theme="dark"]) td a.btn-action:hover,
:where(html[data-theme="dark"]) td a.btn-primary:hover {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .btn-strategie:hover,
:where(html[data-theme="dark"]) .btn-resultats:hover,
:where(html[data-theme="dark"]) a.btn-strategie:hover,
:where(html[data-theme="dark"]) a.btn-resultats:hover,
:where(html[data-theme="dark"]) td a.btn-strategie:hover,
:where(html[data-theme="dark"]) td a.btn-resultats:hover {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .input-connexion-modern:focus,
:where(html[data-theme="dark"]) .input-connexion:focus {
    box-shadow: 0 0 0 3px rgba(232, 197, 71, 0.72);
}

:where(html[data-theme="dark"]) .btn-icon.btn-icon-edit,
:where(html[data-theme="dark"]) .btn-icon.btn-icon-delete,
:where(html[data-theme="dark"]) a.btn-icon.btn-icon-edit,
:where(html[data-theme="dark"]) a.btn-icon.btn-icon-delete,
:where(html[data-theme="dark"]) button.btn-icon.btn-icon-edit,
:where(html[data-theme="dark"]) button.btn-icon.btn-icon-delete {
    color: #FFFFFF !important;
}

:where(html[data-theme="dark"]) .btn-icon.btn-icon-edit i,
:where(html[data-theme="dark"]) .btn-icon.btn-icon-delete i,
:where(html[data-theme="dark"]) a.btn-icon.btn-icon-edit i,
:where(html[data-theme="dark"]) a.btn-icon.btn-icon-delete i {
    color: #FFFFFF !important;
}

:where(html[data-theme="dark"]) .btn-icon.btn-icon-edit:hover,
:where(html[data-theme="dark"]) .btn-icon.btn-icon-edit:focus,
:where(html[data-theme="dark"]) a.btn-icon.btn-icon-edit:hover,
:where(html[data-theme="dark"]) a.btn-icon.btn-icon-edit:focus,
:where(html[data-theme="dark"]) td a.btn-icon.btn-icon-edit:hover,
:where(html[data-theme="dark"]) td a.btn-icon.btn-icon-edit:focus,
:where(html[data-theme="dark"]) button.btn-icon.btn-icon-edit:hover {
    color: #FFFFFF !important;
}

:where(html[data-theme="dark"]) .btn-icon.btn-icon-delete:hover,
:where(html[data-theme="dark"]) .btn-icon.btn-icon-delete:focus,
:where(html[data-theme="dark"]) a.btn-icon.btn-icon-delete:hover,
:where(html[data-theme="dark"]) a.btn-icon.btn-icon-delete:focus,
:where(html[data-theme="dark"]) td a.btn-icon.btn-icon-delete:hover,
:where(html[data-theme="dark"]) td a.btn-icon.btn-icon-delete:focus,
:where(html[data-theme="dark"]) button.btn-icon.btn-icon-delete:hover {
    background: #801812 !important;
    background-color: #801812 !important;
    color: #FFFFFF !important;
}

:where(html[data-theme="dark"]) .btn-icon.btn-icon-edit:hover i,
:where(html[data-theme="dark"]) .btn-icon.btn-icon-delete:hover i,
:where(html[data-theme="dark"]) a.btn-icon.btn-icon-edit:hover i,
:where(html[data-theme="dark"]) a.btn-icon.btn-icon-delete:hover i {
    color: #FFFFFF !important;
}

:where(html[data-theme="dark"]) tr:hover .btn-icon.btn-icon-delete:hover,
:where(html[data-theme="dark"]) tr:hover a.btn-icon.btn-icon-delete:hover {
    background: #801812 !important;
}

:where(html[data-theme="dark"]) .recap-table th {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .strategie-relais-page .course-details {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

:where(html[data-theme="dark"]) .resultats-course-page .course-details {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

:where(html[data-theme="dark"]) .resultats-course-page .strategie-summary {
    background: #151E28;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

:where(html[data-theme="dark"]) .strategie-relais-page .strategie-summary {
    background: #151E28;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

:where(html[data-theme="dark"]) .strategie-relais-page .strategie-summary.strategy-summary-noborder {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

:where(html[data-theme="dark"]) .strategie-relais-page table.recap-table th {
    border-bottom: 1px solid #39485C;
}

:where(html[data-theme="dark"]) .strategie-relais-page table.recap-table td {
    border-bottom: 1px solid #333D49;
}

:where(html[data-theme="dark"]) .strategie-relais-page table.recap-table tbody tr:nth-child(even) {
    background-color: #1B2327;
}

:where(html[data-theme="dark"]) .strategie-relais-page .strategie-temps-ligne__ecoule-label,
:where(html[data-theme="dark"]) .strategie-relais-page .strategie-temps-ligne__sep {
    color: #B0C6E3;
}

:where(html[data-theme="dark"]) .login-form .btn-submit-modern {
    color: #FFFFFF;
}

:where(html[data-theme="dark"]) .btn-primary-delete:hover {
    background: #801812;
    background-color: #801812;
}

:where(html[data-theme="dark"]) .btn-icon.btn-icon-delete:hover,
:where(html[data-theme="dark"]) .btn-icon.btn-icon-delete:focus,
:where(html[data-theme="dark"]) a.btn-icon.btn-icon-delete:hover,
:where(html[data-theme="dark"]) a.btn-icon.btn-icon-delete:focus,
:where(html[data-theme="dark"]) td a.btn-icon.btn-icon-delete:hover,
:where(html[data-theme="dark"]) td a.btn-icon.btn-icon-delete:focus,
:where(html[data-theme="dark"]) button.btn-icon.btn-icon-delete:hover,
:where(html[data-theme="dark"]) tr:hover .btn-icon.btn-icon-delete:hover,
:where(html[data-theme="dark"]) tr:hover a.btn-icon.btn-icon-delete:hover {
    background: #32151A !important;
}

:where(html[data-theme="dark"]) .km-auth-brand::after {
    background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.25) 0 26px, transparent 26px 54px);
}

:where(html[data-theme="dark"]) .km-auth-brand__badge {
    border: 2px solid rgba(255, 255, 255, 0.175);
}

:where(html[data-theme="dark"]) .km-auth-lights i {
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.125);
}

:where(html[data-theme="dark"]) .km-auth-lights i.is-lit {
    box-shadow: 0 0 0 5px rgba(232, 197, 71, 0.352), 0 0 14px #E8C547;
}

:where(html[data-theme="dark"]) .km-auth-brand__pitch p {
    color: rgba(255, 255, 255, 0.4);
}

:where(html[data-theme="dark"]) .km-auth-stats {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

:where(html[data-theme="dark"]) .km-auth-stats div span {
    color: rgba(255, 255, 255, 0.31);
}

:where(html[data-theme="dark"]) .km-field-control:focus-within {
    box-shadow: 0 0 0 3px rgba(50, 143, 230, 0.24);
}

:where(html[data-theme="dark"]) .km-toast {
    color: #FFFFFF;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}

:where(html[data-theme="dark"]) .km-toast--success {
    background-color: #2A732E;
}

:where(html[data-theme="dark"]) .km-toast--error {
    background-color: #B62525;
}

:where(html[data-theme="dark"]) .km-avatar--nav {
    border: 2px solid rgba(255, 255, 255, 0.35);
}

:where(html[data-theme="dark"]) .km-avatar--xl {
    border: 3px solid rgba(255, 255, 255, 0.425);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

:where(html[data-theme="dark"]) .km-profil-hero::after {
    background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.25) 0 14px, transparent 14px 28px);
}

:where(html[data-theme="dark"]) .adm-page .adm-kpi:hover {
    box-shadow: 0 6px 16px rgba(44, 133, 236, 0.16);
}

:where(html[data-theme="dark"]) .adm-kpi--alerte {
    box-shadow: inset 4px 0 0 var(--km-citron), 0 1px 3px rgba(44, 133, 236, 0.128);
}

:where(html[data-theme="dark"]) .adm-point-vert {
    background: #1D975B;
    box-shadow: 0 0 0 3px rgba(62, 219, 142, 0.32);
}

:where(html[data-theme="dark"]) .adm-onglets {
    box-shadow: 0 1px 3px rgba(44, 133, 236, 0.128);
}

:where(html[data-theme="dark"]) .adm-onglet.is-active .adm-onglet-compte {
    background: rgba(255, 255, 255, 0.11);
}

:where(html[data-theme="dark"]) .adm-onglet .adm-onglet-compte--alerte,
:where(html[data-theme="dark"]) .adm-onglet.is-active .adm-onglet-compte--alerte {
    color: #FAEDBC;
}

:where(html[data-theme="dark"]) .adm-page .adm-btn--secondaire:hover {
    background: rgba(228, 65, 52, 0.096);
}

:where(html[data-theme="dark"]) .adm-journal-entree--connexion .adm-journal-icone {
    background: rgba(62, 219, 142, 0.192);
    color: #9CE7C3;
}

:where(html[data-theme="dark"]) .adm-journal-entree--securite .adm-journal-icone {
    background: rgba(232, 197, 71, 0.352);
    color: #F6DB93;
}

:where(html[data-theme="dark"]) .adm-journal-entree--suppression .adm-journal-icone {
    background: rgba(228, 65, 52, 0.16);
}

/* --- front/src/strategie/editeur.css --- */

html[data-theme="dark"] .km-ed-btn--principal {
    color: #FFFFFF;
}

html[data-theme="dark"] .km-ed-interrupteur input::after {
    background: #151E28;
}

html[data-theme="dark"] .km-ed-duree .km-ed-icone[aria-pressed='true'] {
    color: #F9EDBA;
}

html[data-theme="dark"] .km-ed-bascule[aria-pressed='true'] {
    color: #FFFFFF;
}

@media (max-width: 960px) {
    html[data-theme="dark"] .km-ed-resume {
        box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.3);
    }
}

/* --- front/src/strategie/frise.css --- */

html[data-theme="dark"] .prevenir-attention-blink {
    color: #DA7979;
}

html[data-theme="dark"] .km-relai__tag--ravito {
    border-color: #613B37;
}

html[data-theme="dark"] .km-relai.relai-row-current {
    background: rgba(232, 197, 71, 0.48);
}

html[data-theme="dark"] .km-pit {
    color: #FFFFFF;
}

/* --- front/src/strategie/layout.css --- */

html[data-theme="dark"] .btn-livetiming-toggle:hover {
    color: #FFFFFF;
}

html[data-theme="dark"] .livetiming-iframe {
    background: #151E28;
}

html[data-theme="dark"] .livetiming-empty {
    color: #A3B2C2;
}

/* --- front/src/strategie/live.css --- */

html[data-theme="dark"] .km-lk__flag--vert {
    background: #1C9144;
}

html[data-theme="dark"] .km-lk__flag--jaune {
    background: #DFB200;
}

html[data-theme="dark"] .km-lk__flag--rouge {
    background: #C42929;
}

html[data-theme="dark"] .km-lk__flag--damier {
    background: repeating-conic-gradient(#DEDEDE 0 25%, #151E28 0 50%) 0 0 / 5px 5px;
    border: 1px solid #B2B2B2;
}

html[data-theme="dark"] .km-lk--best {
    color: #CB87DD;
}

html[data-theme="dark"] .km-lk--perso {
    color: #9EE1C0;
}

html[data-theme="dark"] .km-lk__choix select {
    background: #151E28 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235A7188' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 10px center;
}

html[data-theme="dark"] .km-lk__choix.is-attention select {
    box-shadow: 0 0 0 3px rgba(255, 186, 26, 0.4);
}

html[data-theme="dark"] .km-rt__direct {
    color: #FFFFFF;
}

html[data-theme="dark"] .km-mode button[aria-pressed="true"] {
    color: #FFFFFF;
}

/* --- front/src/strategie/pitwall.css --- */

html[data-theme="dark"] .km-pw-card.is-alerte {
    border-color: #613B37;
}

html[data-theme="dark"] .km-pw-card.is-alerte .km-pw-prevenir {
    border-color: #613B37;
}

html[data-theme="dark"] .km-pw-box {
    color: #FFFFFF;
}

html[data-theme="dark"] .km-pw-meteo--pluie {
    background: #192833;
    border-color: #375974;
}

html[data-theme="dark"] .km-pw-meteo.is-alerte {
    border-color: #613B37;
}

html[data-theme="dark"] .km-pitwall .btn-relai-rentree {
    color: #FFFFFF;
}

html[data-theme="dark"] .km-pitwall .btn-relai-rentree:hover {
    color: #FFFFFF;
}

html[data-theme="dark"] .km-pitwall .btn-relai-rentree--set {
    background: #192833;
}

/* --- front/src/strategie/strategie.css --- */

html[data-theme="dark"] .km-v2-etat--erreur {
    color: #DA7979;
}

html[data-theme="dark"] .km-v2-compteur--insuffisant {
    color: #D96671;
}

html[data-theme="dark"] .km-v2-compteur--excedent {
    color: #F1BB58;
}

html[data-theme="dark"] .km-v2-compteur--conforme {
    color: #86B5EB;
}

html[data-theme="dark"] .km-v2-temps {
    background: #151E28;
    border: 1px solid #3D4752;
}

html[data-theme="dark"] .km-v2-course__item::before {
    color: #B6C6D6;
}

html[data-theme="dark"] .km-v2-chip {
    border: 1px solid #3D4752;
    background: #151E28;
}

html[data-theme="dark"] .km-top {
    background: #197545;
    color: #FFFFFF;
    box-shadow: 0 4px 0 #99CCB2;
}

html[data-theme="dark"] .km-top:hover:not(:disabled) {
    background: #15673A;
}

html[data-theme="dark"] .km-top:active:not(:disabled) {
    box-shadow: 0 1px 0 #99CCB2;
}

html[data-theme="dark"] .km-top-donne {
    color: #9EE3BF;
}

html[data-theme="dark"] .km-top-donne__drapeau {
    background: #197545;
}

html[data-theme="dark"] .km-qualif-en-cours td {
    background: #212F27;
}

html[data-theme="dark"] .km-v2-sans-heure {
    background: #372B18;
    color: #F7D39B;
}
