/* Impré'son — Mode sombre de assets/css/site.css. FICHIER FABRIQUÉ, NE PAS MODIFIER À LA MAIN :
   python3 outils/generer-theme-sombre.py (après chaque modification d'un CSS du site).
   Actif quand <html data-theme="sombre"> (assets/js/commun/theme.js) ; jamais à l'impression. */
@media screen {
    /* Champs, listes déroulantes et barres de défilement du navigateur en version sombre */
    html[data-theme="sombre"] { color-scheme: dark; }
    /* Champs sans fond défini par le site : même ardoise que les cartes (priorité nulle, ne passe jamais devant le site) */
    :where(html[data-theme="sombre"]) :where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea):not([data-theme-fixe] *) { background-color: #1f2633; }
    /* Zones gardées en clair (feuille du bon de commande à l'écran) : cases et champs du navigateur en clair */
    html[data-theme="sombre"] [data-theme-fixe] { color-scheme: light; }
    /* Logos foncés posés sur la barre du haut devenue sombre : petit fond clair arrondi */
    html[data-theme="sombre"] .logo-image { background: #f8fafc; border-radius: 8px; padding: 2px 6px; }
    html[data-theme="sombre"] body {
        background-color: #171d29;
        color: #a7bcd1;
    }
    html[data-theme="sombre"] .lien-evitement {
        background: #294462;
    }
    html[data-theme="sombre"] .lien-evitement:focus {
        outline: 3px solid #fd6a29;
    }
    html[data-theme="sombre"] .navbar {
        background-color: #232a37;
    }
    html[data-theme="sombre"] .lien-nav-direct {
        color: #b3c4dc;
    }
    html[data-theme="sombre"] .lien-nav-direct:hover,
    html[data-theme="sombre"] .lien-nav-direct.actif {
        color: #fb835c;
    }
    html[data-theme="sombre"] .menu-bouton {
        border: 1px solid #536172;
        color: #b3c4dc;
    }
    html[data-theme="sombre"] .menu-bouton:hover {
        background: #181e2a;
        color: #fb835c;
        border-color: #fd6a29;
    }
    html[data-theme="sombre"] .dropdown-menu {
        background: #232a37;
        border: 1px solid #22272c;
    }
    html[data-theme="sombre"] .dropdown-item {
        color: #a7bcd1;
        border-bottom: 1px solid #181e2a;
    }
    html[data-theme="sombre"] .dropdown-item:hover {
        background: #181e2a;
        color: #fb835c;
    }
    html[data-theme="sombre"] .dropdown-item:focus-visible {
        outline: 2px solid #fb835c;
        background: #181e2a;
        color: #fb835c;
    }
    html[data-theme="sombre"] .btn-nav-login {
        color: #80aafb;
        border: 1.5px solid #80aafb;
    }
    html[data-theme="sombre"] .lien-nav-logout {
        color: #9aabc4;
    }
    html[data-theme="sombre"] .lien-nav-logout:hover {
        color: #fa7b6f;
    }
    html[data-theme="sombre"] .modal-auth-boite {
        background: #232a37;
    }
    html[data-theme="sombre"] .btn-voir-code {
        color: #aabad1;
    }
    html[data-theme="sombre"] .btn-voir-code:hover {
        color: #b5d5f8;
    }
    html[data-theme="sombre"] .btn-voir-code:focus-visible {
        outline: 2px solid #fb835c;
    }
    html[data-theme="sombre"] .hero {
        background: linear-gradient(135deg, #232a37 0%, #1c252e 100%);
    }
    html[data-theme="sombre"] .hero-texte h1 {
        color: #b5d5f8;
    }
    html[data-theme="sombre"] .gradient-texte {
        color: #b5d5f8;
    }
    html[data-theme="sombre"] .hero-texte p {
        color: #a7bcd1;
    }
    html[data-theme="sombre"] .bouton-primaire {
        background: linear-gradient(90deg, #294462, #115da6);
    }
    html[data-theme="sombre"] .titre-section h2 {
        color: #b5d5f8;
    }
    html[data-theme="sombre"] .ligne-deco {
        background: linear-gradient(90deg, #294462, #ea580c);
    }
    html[data-theme="sombre"] .configurateur-section {
        background-color: #232a37;
    }
    html[data-theme="sombre"] .option-bloc {
        background: #171d29;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
    html[data-theme="sombre"] .option-bloc h4 {
        color: #b5d5f8;
        border-bottom: 2px solid #b5d5f8;
    }
    html[data-theme="sombre"] .checkbox-group label,
    html[data-theme="sombre"] .radio-group label {
        color: #a7bcd1;
    }
    html[data-theme="sombre"] .etape-carte {
        background: #232a37;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
    html[data-theme="sombre"] .etape-carte h4 {
        color: #b5d5f8;
    }
    html[data-theme="sombre"] .contact-conteneur {
        background: #232a37;
    }
    html[data-theme="sombre"] .contact-info h2 {
        color: #b5d5f8;
    }
    html[data-theme="sombre"] .form-groupe label {
        color: #b5d5f8;
    }
    html[data-theme="sombre"] .form-groupe input,
    html[data-theme="sombre"] .form-groupe textarea {
        border: 2px solid #353d47;
    }
    html[data-theme="sombre"] .form-groupe input:focus,
    html[data-theme="sombre"] .form-groupe textarea:focus {
        border-color: #b5d5f8;
    }
    html[data-theme="sombre"] .bouton-envoi {
        background-color: #294462;
    }
    html[data-theme="sombre"] .commande-container {
        background: #232a37;
    }
    html[data-theme="sombre"] .commande-header {
        border-bottom: 2px solid #353d47;
    }
    html[data-theme="sombre"] .commande-header h2 {
        color: #b5d5f8;
    }
    html[data-theme="sombre"] .section-form {
        background: #171d29;
        border: 1px solid #353d47;
    }
    html[data-theme="sombre"] .section-form h3 {
        color: #b5d5f8;
    }
    html[data-theme="sombre"] .choix-label {
        background: #232a37;
        border: 2px solid #353d47;
        color: #a7bcd1;
    }
    html[data-theme="sombre"] .choix-label:has(input:focus-visible) {
        outline: 3px solid #fb835c;
    }
    html[data-theme="sombre"] .choix-label:has(input:checked) {
        border-color: #fd6a29;
        background: #281f13;
        color: #fb835c;
    }
    html[data-theme="sombre"] .input-groupe label {
        color: #b5d5f8;
    }
    html[data-theme="sombre"] .input-texte {
        border: 2px solid #353d47;
    }
    html[data-theme="sombre"] .input-texte:focus {
        border-color: #b5d5f8;
    }
    html[data-theme="sombre"] #input-message-tchat:focus-visible {
        outline: 2px solid #fb835c;
    }
    html[data-theme="sombre"] .option-visible {
        border-top: 1px dashed #536172;
    }
    html[data-theme="sombre"] .bouton-validation {
        background: linear-gradient(90deg, #294462, #294462);
    }
    html[data-theme="sombre"] .zone-telechargement {
        border: 2px dashed #b5d5f8;
        background-color: #181e2a;
    }
    html[data-theme="sombre"] .zone-telechargement:hover {
        background-color: #1e2630;
        border-color: #b5d5f8;
    }
    html[data-theme="sombre"] .zone-telechargement p {
        color: #b5d5f8;
    }
    html[data-theme="sombre"] .fichiers-valides {
        color: #fb835c;
    }
    html[data-theme="sombre"] select.input-texte {
        background-color: #232a37 !important;
        color: #a7bcd1 !important;
    }
    html[data-theme="sombre"] select.input-texte option {
        background-color: #232a37 !important;
        color: #f5f5f5 !important;
    }
    html[data-theme="sombre"] .timeline::before {
        background: #353d47;
    }
    html[data-theme="sombre"] .etape-cercle {
        background: #232a37;
        border: 3px solid #353d47;
    }
    html[data-theme="sombre"] .etape-texte {
        color: #a7bcd1;
    }
    html[data-theme="sombre"] .etape-suivi.actif .etape-texte {
        color: #b5d5f8;
    }
    html[data-theme="sombre"] .etape-suivi.attente .etape-cercle {
        border-color: #fd6a29;
        background: #281f13;
        color: #fb835c;
    }
    html[data-theme="sombre"] .etape-suivi.attente .etape-texte {
        color: #fb835c;
    }
    html[data-theme="sombre"] .carte-prix {
        background: #232a37;
        border: 1px solid #353d47;
    }
    html[data-theme="sombre"] .carte-prix:hover {
        border-color: #fd6a29;
    }
    html[data-theme="sombre"] .carte-prix h2 {
        color: #b5d5f8;
        border-bottom: 2px solid #181e2a;
    }
    html[data-theme="sombre"] .ligne-prix {
        color: #a7bcd1;
    }
    html[data-theme="sombre"] .prix-valeur {
        color: #fd6a29;
    }
    html[data-theme="sombre"] footer {
        color: #9aabc4;
        border-top: 1px solid #353d47;
    }
    @media (max-width: 1180px) {
        html[data-theme="sombre"] .nav-burger {
            background: #22272c;
            color: #b5d5f8;
        }
        html[data-theme="sombre"] .nav-burger:hover {
            background: #353d47;
        }
        html[data-theme="sombre"] .mm-voile {
            background: rgba(255, 255, 255, 0.45);
        }
        html[data-theme="sombre"] .mm-tiroir {
            background: #232a37;
        }
        html[data-theme="sombre"] .mm-entete {
            border-bottom: 1px solid #272c31;
        }
        html[data-theme="sombre"] .mm-fermer {
            color: #aabad1;
        }
        html[data-theme="sombre"] .mm-fermer:hover {
            background: #22272c;
            color: #b5d5f8;
        }
        html[data-theme="sombre"] .mm-initiales {
            background: #294462;
        }
        html[data-theme="sombre"] .mm-cabinet-texte strong {
            color: #b5d5f8;
        }
        html[data-theme="sombre"] .mm-cabinet-texte span {
            color: #9aabc4;
        }
        html[data-theme="sombre"] .mm-cta {
            background: #294462;
        }
        html[data-theme="sombre"] .mm-cta-secondaire {
            border: 1.5px solid #fd6a29;
            color: #fb835c;
        }
        html[data-theme="sombre"] .mm-groupe-titre {
            color: #9aabc4;
        }
        html[data-theme="sombre"] .mm-ligne,
        html[data-theme="sombre"] .mm-deconnexion {
            color: #c1d0e7;
        }
        html[data-theme="sombre"] .mm-ligne .mm-ico,
        html[data-theme="sombre"] .mm-deconnexion .mm-ico {
            color: #aabad1;
        }
        html[data-theme="sombre"] .mm-ligne:hover {
            background: #181e2a;
        }
        html[data-theme="sombre"] .mm-ligne.mm-actif {
            background: #2d2018;
            color: #fb835c;
        }
        html[data-theme="sombre"] .mm-ligne.mm-actif .mm-ico {
            color: #fb835c;
        }
        html[data-theme="sombre"] .mm-ligne-atelier .mm-ico:first-child {
            color: #fd6a29;
        }
        html[data-theme="sombre"] .mm-deconnexion {
            border-top: 1px solid #272c31;
            color: #fc8b7f;
        }
        html[data-theme="sombre"] .mm-deconnexion .mm-ico {
            color: #fc8b7f;
        }
        html[data-theme="sombre"] .nav-burger:focus-visible,
        html[data-theme="sombre"] .mm-tiroir a:focus-visible,
        html[data-theme="sombre"] .mm-tiroir button:focus-visible,
        html[data-theme="sombre"] .mm-onglets a:focus-visible,
        html[data-theme="sombre"] .mm-onglets button:focus-visible {
            outline: 2px solid #fd6a29;
        }
    }
    @media (max-width: 768px) {
        html[data-theme="sombre"].mm-connecte .mm-onglets {
            border-top: 1px solid #353d47;
            background: rgba(35, 42, 55, 0.97);
        }
        html[data-theme="sombre"] .mm-onglet {
            color: #aabad1;
        }
        html[data-theme="sombre"] .mm-onglet.mm-actif {
            color: #fb835c;
        }
        html[data-theme="sombre"] .mm-onglet-commander {
            color: #fc8965;
        }
    }
    html[data-theme="sombre"] .modal-cta-compte {
        background: #294462;
    }
    html[data-theme="sombre"] .modal-cta-compte:hover {
        background: #20446d;
    }
    html[data-theme="sombre"] footer.footer-technique {
        background: #294462;
    }
    html[data-theme="sombre"] .footer-grille a {
        color: #8897ac;
    }
    html[data-theme="sombre"] .footer-grille a:hover {
        color: #d67102;
    }
    html[data-theme="sombre"] .footer-conformite span {
        color: #8897ac;
    }
    html[data-theme="sombre"] .footer-bas {
        color: #8897ac;
    }
    html[data-theme="sombre"] .facon-carte {
        border: 1.5px solid #353d47;
        background: #232a37;
        color: #a7bcd1;
    }
    html[data-theme="sombre"] label.facon-carte:hover,
    html[data-theme="sombre"] button.facon-carte:hover {
        border-color: #fd6a29;
    }
    html[data-theme="sombre"] button.facon-carte:focus-visible,
    html[data-theme="sombre"] label.facon-carte:focus-within {
        outline: 2px solid #fb835c;
    }
    html[data-theme="sombre"] label.facon-carte:has(input:checked) {
        border-color: #fd6a29;
        background: #211b16;
    }
    html[data-theme="sombre"] .facon-carte.papier {
        background: #181e2a;
    }
    html[data-theme="sombre"] .facon-tag {
        color: #fb9679;
        background: #281f13;
    }
    html[data-theme="sombre"] .facon-tag.gris {
        color: #aabad1;
        background: #353d47;
    }
    html[data-theme="sombre"] .facon-ico {
        background: #252938;
        color: #b5d5f8;
    }
    html[data-theme="sombre"] .facon-carte strong {
        color: #b5d5f8;
    }
    html[data-theme="sombre"] .facon-sous {
        color: #9aabc4;
    }
    html[data-theme="sombre"] .facon-texte b {
        color: #b5d5f8;
    }
    html[data-theme="sombre"] .facon-action {
        color: #fb835c;
    }
}
