/* ============================================================
   THÈME NUIT — page de connexion (alicea-login.html)
   Sans session : le mode vient du dernier choix de l'onglet (sessionStorage
   alicea_theme, posé par l'application ou la bascule ci-dessous), sinon de la
   préférence système (prefers-color-scheme). Après connexion, l'application
   applique le réglage réel (cabinet / utilisateur).
   ============================================================ */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] {
    --creme: #0F1729;
    --text-dark: #F3F0EB;
    --text-gray: #B8BCC8;
    --text-light: #8E97A9;
    --danger: #F87171;
    --success: #6FCB8A;
}
html[data-theme="dark"] body { background: #0F1729; }
html[data-theme="dark"] .form-group input, html[data-theme="dark"] .form-group select, html[data-theme="dark"] textarea {
    background-color: #111A2E !important; color: #F3F0EB !important; border-color: #263450 !important;
}
html[data-theme="dark"] .form-group input:focus { background-color: #111A2E !important; }
html[data-theme="dark"] .form-group input[readonly] { background-color: #16213A !important; }
html[data-theme="dark"] input::placeholder { color: #8E97A9; }

/* Bascule Jour / Nuit (coin du panneau de connexion) */
.login-theme-toggle {
    position: absolute; top: 18px; right: 18px; z-index: 5;
    display: inline-flex; align-items: center; gap: 2px; padding: 3px;
    background: #F0EAE5; border: none; border-radius: 99px; cursor: pointer; font-family: inherit;
}
.login-theme-toggle .ttt-opt {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px;
    font-size: 11px; font-weight: 600; color: #9CA3AF; transition: all 0.15s;
}
.login-theme-toggle .ttt-opt.on { background: #fff; color: #2D3142; box-shadow: 0 1px 2px rgba(15,23,41,0.08); }
html[data-theme="dark"] .login-theme-toggle { background: rgba(255,255,255,0.08); }
html[data-theme="dark"] .login-theme-toggle .ttt-opt { color: rgba(255,255,255,0.5); }
html[data-theme="dark"] .login-theme-toggle .ttt-opt.on { background: #F5A574; color: #0F1729; box-shadow: none; }
.auth-form-panel { position: relative; }

/* ---- Surcharges dérivées des <style> des pages (générées par scripts/gen-theme-nuit.js) ---- */
html[data-theme="dark"] .auth-form-panel:not(.active):not(.is-active):not(.on):not(.selected):not(.current):not(.checked):not(.sorted-asc):not(.sorted-desc) { background-color: #111A2E; }
html[data-theme="dark"] .auth-title { color: #E8E6E1; }
html[data-theme="dark"] .form-group input { background-color: #16213A; }
html[data-theme="dark"] .form-group input:focus { background-color: #16213A; }
html[data-theme="dark"] .form-group input[readonly] { background-color: #111A2E; }
html[data-theme="dark"] .auth-brand-panel { color: #0F1729; }
html[data-theme="dark"] .activation-modal:not(.active):not(.is-active):not(.on):not(.selected):not(.current):not(.checked):not(.sorted-asc):not(.sorted-desc) { background-color: #16213A; }
html[data-theme="dark"] .activation-title { color: #E8E6E1; }
html[data-theme="dark"] .activation-code-input:not(.active):not(.is-active):not(.on):not(.selected):not(.current):not(.checked):not(.sorted-asc):not(.sorted-desc) { background-color: #111A2E; color: #E8E6E1; }
html[data-theme="dark"] .activation-code-input:focus { background-color: #16213A; }
/* Couleurs en ligne codées sur la page (marque « ALI » du sous-titre, etc.) */
html[data-theme="dark"] [style*="color:var(--marine)"], html[data-theme="dark"] [style*="color: var(--marine)"],
html[data-theme="dark"] [style*="color:#0F1729"], html[data-theme="dark"] [style*="color: #0F1729"] { color: #F3F0EB !important; }
html[data-theme="dark"] [style*="color:var(--text-gray)"], html[data-theme="dark"] [style*="color: var(--text-gray)"] { color: #B8BCC8 !important; }
