/* Équinoxe — thème jour/nuit. Nuit par défaut.
   Nuit : texte #F5F7FA, fond #0F2340.
   Jour : texte, titres, liens et boutons en bleu nuit #0F2340 (13,97:1 sur le crème #F7F1E3, WCAG AAA),
          texte secondaire #3D4A63 (7,91:1), survol des liens #7A5C1E (5,52:1) ; l'or n'est qu'un filet décoratif.
   Les couleurs de nuit hors fond et texte courant restent celles du site. */
html,
html[data-theme="nuit"]{
  --ink:#F5F7FA;
  --paper:#0F2340;
  --bg:#0F2340;
  --accent:#d4af37;
  --gold:#d4af37;
  --mute:#C5CAD3;
  color-scheme:dark;
  background:#0F2340 !important;
}
html[data-theme="jour"]{
  --ink:#0F2340;
  --paper:#F7F1E3;
  --bg:#F7F1E3;
  --accent:#0F2340;
  --gold:#0F2340;
  --mute:#3D4A63;
  color-scheme:light;
  background:#F7F1E3 !important;
}

html[data-theme="nuit"] body,
html:not([data-theme="jour"]) body{
  background:#0F2340 !important;
  background-image:none !important;
  color:#F5F7FA !important;
}
html[data-theme="jour"] body{
  background:#F7F1E3 !important;
  background-image:none !important;
  color:#0F2340 !important;
}

/* Jour : titres, devise, liens, navigation, boutons (l'or #d4af37 échoue à 1,87:1 sur crème) */
html[data-theme="jour"] h1,
html[data-theme="jour"] h2,
html[data-theme="jour"] h3,
html[data-theme="jour"] .motto,
html[data-theme="jour"] .star,
html[data-theme="jour"] .cta,
html[data-theme="jour"] .open,
html[data-theme="jour"] a,
html[data-theme="jour"] nav.eqnav .sitelinks a,
html[data-theme="jour"] nav.eqnav .disclink,
html[data-theme="jour"] nav.eqnav .homecard span,
html[data-theme="jour"] .sitelinks a,
html[data-theme="jour"] .lang a[aria-current]{
  color:#0F2340;
}
html[data-theme="jour"] a:hover,
html[data-theme="jour"] a:focus{
  color:#7A5C1E;
}
html[data-theme="jour"] nav.eqnav .sitelinks a[aria-current],
html[data-theme="jour"] nav.eqnav .disclink[aria-current],
html[data-theme="jour"] nav.eqnav .sitelinks a:hover{
  color:#0F2340;
}
html[data-theme="jour"] .cta{
  border-color:#0F2340;
  color:#0F2340;
}
html[data-theme="jour"] .cta:hover,
html[data-theme="jour"] .cta:focus{
  background:#0F2340;
  color:#F7F1E3;
}
html[data-theme="jour"] .eq-avis a{
  background:#0F2340 !important;
  border-color:#0F2340 !important;
  color:#F7F1E3 !important;
}
html[data-theme="jour"] .eq-avis a:hover,
html[data-theme="jour"] .eq-avis a:focus{
  background:transparent !important;
  color:#0F2340 !important;
}

/* Textes secondaires trop clairs sur crème */
html[data-theme="jour"] .note,
html[data-theme="jour"] .kicker,
html[data-theme="jour"] .sub,
html[data-theme="jour"] footer,
html[data-theme="jour"] .lang{
  color:#3D4A63;
}

html[data-theme="jour"] nav.eqnav select,
html[data-theme="jour"] select,
html[data-theme="jour"] #lang,
html[data-theme="jour"] #q{
  background:#F7F1E3;
  color:#0F2340;
  border-color:#0F2340;
}

html[data-theme="jour"] .banner{
  background:#EFE6D2 !important;
  color:#0F2340 !important;
  border-bottom-color:#DDD0B0 !important;
}

/* Formulaires et pieds déjà en !important sur les pages intérieures */
html[data-theme="jour"] .f input,
html[data-theme="jour"] .f textarea,
html[data-theme="jour"] .f select{
  background:#FFFBF3;
  color:#0F2340;
  border-color:#0F2340;
}
html[data-theme="jour"] .f button{
  background:#0F2340;
  border-color:#0F2340;
  color:#F7F1E3;
}

html[data-theme="jour"] #bdom-foot{
  color:#3D4A63 !important;
  border-top-color:#0F234066 !important;
}
html[data-theme="jour"] #bdom-foot .bd{
  color:#0F2340 !important;
}
html[data-theme="jour"] #bdom-foot .sh a,
html[data-theme="jour"] #bdom-foot .sh button{
  color:#0F2340 !important;
}
html[data-theme="jour"] #bdom-foot .sh a:hover,
html[data-theme="jour"] #bdom-foot .sh button:hover{
  color:#7A5C1E !important;
}

/* Cartes et fiches restent sombres (composants autonomes) : garder un texte lisible */
html[data-theme="jour"] .card{
  color:#F5F7FA;
}
html[data-theme="jour"] .card h3,
html[data-theme="jour"] .card .num,
html[data-theme="jour"] .card .open{
  color:#d4af37;
}

/* equinoxpedia : panneau principal et survol des liens */
html[data-theme="jour"] main{
  background:#EFE8D8;
  color:#0F2340;
}
html[data-theme="jour"] .toc li{
  background:#EFE8D8;
}
html[data-theme="jour"] #res{
  background:#F7F1E3;
}

/* Cartes et fiches : composants sombres en Jour aussi, l'or y reste #d4af37 (le bleu nuit y serait invisible) */
html[data-theme="jour"] .card,
html[data-theme="jour"] .fiche-wrap{ --gold:#d4af37; }
html[data-theme="jour"] a.card{ color:#F5F7FA; }
html[data-theme="jour"] .fiche-x{ color:#d4af37; }
html[data-theme="jour"] .fiche h3{ color:#efe6cf; }
html[data-theme="jour"] .fiche footer{ color:#c9b27a !important; }
html[data-theme="jour"] .fiche{ color:#efe6cf; }

/* Cartouche : il annonce le mode VERS lequel on bascule (page d'accueil seulement) */
/* Page Nuit : cartouche « Jour » (style jour : crème + bleu nuit) */
.eq-theme-btn{
  position:absolute; top:1rem; left:1.5rem; z-index:41;
  font:600 1rem/1.2 var(--f-ui, Georgia,"Times New Roman",serif);
  letter-spacing:.04em; padding:.45rem .9rem; border-radius:6px; cursor:pointer;
  background:#F7F1E3; color:#0F2340; border:1px solid #F7F1E3;
}
/* Page Jour : cartouche « Nuit » (style nuit : bleu nuit + filet or) */
html[data-theme="jour"] .eq-theme-btn{
  background:#0F2340; color:#F5F7FA; border:1px solid #d4af37;
}
.eq-theme-btn:focus-visible{ outline:2px solid #d4af37; outline-offset:3px; }
html[data-theme="jour"] .eq-theme-btn:focus-visible{ outline-color:#0F2340; }
.eq-theme-btn:hover,.eq-theme-btn:focus-visible{ box-shadow:0 0 0 1px currentColor; }
@media (max-width:600px){ .eq-theme-btn{ position:static; margin:.6rem .8rem; display:inline-block; } }
