/* Polymaintech — thème sombre (prototype)
   Le thème clair validé dans Figma n'est pas modifié : tout ici ne s'applique qu'avec html[data-theme=sombre].
   Principe : --marine sert surtout de couleur de texte, il devient clair ; les blocs qui avaient
   un fond marine gardent un fond sombre (--fond-marine) et leur texte blanc.
   Texte sur orange : toujours en marine foncé (#001631), jamais en blanc. */

html[data-theme=sombre]{
  color-scheme:dark;
  --marine:#E6EDF7;--marine-700:#1F4378;
  --orange-texte:#FFA25C;--orange-doux:#3A2614;
  --creme:#0B1626;--blanc:#102038;--encre:#F1F5FB;--texte:#C3CDDB;--texte-doux:#9CA9BC;
  --ligne:#263A57;--ciel:#1C3354;--sur-sombre:#B9C6DA;--vert:#6AD39E;--vert-doux:#123424;
  --surface:#172A46;--fond-marine:#16386A;--fond-marine-fonce:#060E1A;
}
html[data-theme=sombre] body{background:var(--creme)}

/* Logo : version blanche */
html[data-theme=sombre] .entete .logo img{content:url(/assets/img/logo-blanc.svg)}

/* Cartes et blocs qui étaient blancs */
html[data-theme=sombre] :is(.puce,.creme .carte,.formule,.villes,.tableau,.creme .faq details,.form,.filtres button,.tel,.boutique,.tuile,.suivi,.boutique .services,.blanc .choix label,.espace-nav a,.liste,.vide,.msg,.caracs div,.dispo li,.barre-action,.filtres a){background:var(--surface)}
html[data-theme=sombre] :is(.blanc .champ input,.blanc .champ select,.blanc .champ textarea){background:var(--creme)}
html[data-theme=sombre] .barre-action{box-shadow:0 -6px 18px #0008}

/* Blocs qui avaient un fond marine : on garde un fond sombre et un texte blanc */
html[data-theme=sombre] :is(.demo,.cible.sombre,.formule.vedette,.bascule button[aria-pressed=true],.etape .num,.appel .bloc,.faq details[open] summary i,.filtres button[aria-pressed=true],.grade,.tuile.sombre,.aller-contenu,.recap,.espace-nav a[aria-current=page],.filtres a[aria-current=page]){background:var(--fond-marine);color:#fff}
html[data-theme=sombre] .demo{background:var(--fond-marine-fonce)}
html[data-theme=sombre] .cible.sombre .pastille{background:#24508E}
html[data-theme=sombre] .tel .visuel i{background:#00224F;box-shadow:inset 0 0 0 5px #00224F,inset 0 0 0 6px #ffffff22}
html[data-theme=sombre] .pied{background:var(--fond-marine-fonce)}

/* Boutons et pastilles orange : texte marine foncé */
html[data-theme=sombre] :is(.btn-principal,.badge){color:#001631}

/* Champs, cases, erreurs */
html[data-theme=sombre] .case input{accent-color:#FE7403}
html[data-theme=sombre] .msg-erreur{color:#FF8A80}
html[data-theme=sombre] :is(.champ.erreur input,.champ.erreur select,.champ.erreur textarea){border-color:#FF8A80}
html[data-theme=sombre] ::placeholder{color:#7F8CA0}

/* Illustrations : un peu moins lumineuses la nuit */
html[data-theme=sombre] main img[src*="/illu-"]{filter:brightness(.88)}

/* Bouton clair / sombre (les deux thèmes) */
.theme-bascule{width:44px;height:44px;flex:none;border:0;border-radius:12px;background:var(--ciel);color:var(--marine);display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.theme-bascule svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.theme-bascule .soleil{display:none}
html[data-theme=sombre] .theme-bascule .lune{display:none}
html[data-theme=sombre] .theme-bascule .soleil{display:block}
@media (max-width:1279px){.theme-bascule{margin-left:auto}.theme-bascule + .burger{margin-left:8px}}

/* Mon compte en sombre */
html[data-theme=sombre] .reglages-nav a{background:var(--surface)}
html[data-theme=sombre] .notifs input{accent-color:#FE7403}
html[data-theme=sombre] .zone-danger{border-color:#5A2A27}
html[data-theme=sombre] .zone-danger summary{color:#FF8A80}
html[data-theme=sombre] .champ select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24'%3E%3Cpath d='M7.4 9.3 12 13.9l4.6-4.6L18 10.7l-6 6-6-6z' fill='%23E6EDF7'/%3E%3C/svg%3E")}
html[data-theme=sombre] .compte-menu{background:var(--surface);border-color:var(--ligne);box-shadow:0 12px 32px rgba(0,0,0,.45)}
html[data-theme=sombre] .compte-pastille{background:#FE7403;color:#001631}
html[data-theme=sombre] .compte-sortir{color:#FF8A80}
html[data-theme=sombre] .compte-sortir-btn{background:#3A1A1A;color:#FFB4AB}

html[data-theme=sombre] .grade-info .bulle{background:#1c2e4d;box-shadow:0 10px 30px #0008}html[data-theme=sombre] .grade-info .bulle::after{border-top-color:#1c2e4d}html[data-theme=sombre] .grade-aide{color:#a9b6c8}


html[data-theme=sombre] .mdp-oeil{color:#e9eef6}html[data-theme=sombre] .mdp-oeil:hover{background:#ffffff1a}
