/* ==========================================================================
   Helveticard — thème sombre
   Actif quand <html data-theme="dark"> (posé dans html/meta.html, bouton dans html/nav.html).
   html[data-theme="dark"] (0,1,1) l'emporte sur les :root (0,1,0) de index.css et des
   <style> des pages internes, quel que soit l'ordre de chargement.
   Contrastes vérifiés (WCAG AA) : texte #A7B0BE ≥ 7:1, gold #C9A46A ≥ 6.9:1 sur les fonds ci-dessous.
   ========================================================================== */

html[data-theme="dark"] {
  color-scheme: dark;

  /* Jetons de light.css */
  --t-page: #0B1220;
  --t-page-inner: #0B1220;
  --t-surface: #16213A;
  --t-stage-a: #232836;         /* graphite chaud : la carte navy se détache */
  --t-stage-b: #2C303B;
  --t-pill-bg: rgba(255,255,255,.04);
  --t-footer-classic: #0F1828;
  --nav-bg: #0B1220;

  --t-heading: #ECE8E1;
  --t-title: #ECE8E1;
  --t-text: #A7B0BE;
  --t-body: #C3CAD5;
  --t-accent: #C9A46A;
  --t-link: #9DB8E8;
  --t-link-strong: #9DB8E8;
  --t-footer-link: #ECE8E1;
  --t-menu-text: #A7B0BE;

  --t-field-line: #34466A;
  --t-menu-line: #27354F;
  --t-ring: #16213A;

  --t-btn-bg: #B8925A;          /* sur fond sombre, le bouton navy disparaît : gold + texte navy */
  --t-btn-fg: #13213A;
  --t-btn-hover-bg: #C9A46A;

  /* Variables des pages (index.css + <style> des pages internes) qui ne servent
     qu'aux fonds clairs, aux traits et aux textes. --navy, --blue, --blue-m et --gold
     restent inchangées : elles colorent aussi les sections et panneaux toujours sombres. */
  --white: #16213A;     /* cartes (index) */
  --cream: #0F1828;     /* sections beige */
  --grey-0: #121C30;    /* sections secondaires, champs, encadrés */
  --grey-1: #27354F;    /* traits */
  --grey-2: #8892A3;    /* texte discret, placeholders */
  --grey-3: #A7B0BE;    /* texte secondaire */
  --grey-4: #ECE8E1;    /* texte principal */
  --grey-text: #A7B0BE;
  --blue-l: #1C2A45;    /* fonds teintés (survol, pastilles) */
  --gold-ink: #C9A46A;  /* gold pour texte : version claire sur fond sombre */
  --text: #A7B0BE;      /* app.html */
  --line: #27354F;      /* app.html */
}

html[data-theme="dark"] body { background-color: var(--t-page); }

/* Logos : version claire */
html[data-theme="dark"] .main-nav-logo,
html[data-theme="dark"] .footer-logo-img { content: url("../img/logo-light.svg"); }

/* Menu fixe : ombre plus marquée sur fond sombre */
html[data-theme="dark"] .main-nav.is-scrolled { box-shadow: 0 6px 18px -10px rgba(0,0,0,.8); }

/* Accueil — section #cards : variables locales (définies sur #cards) */
html[data-theme="dark"] #cards { --cr-bg: #0F1828; --cr-line: #27354F; --cr-text: #A7B0BE; }

/* Blocs navy (badge du hero, carte Credit) : liseré gold pour se détacher du fond sombre */
html[data-theme="dark"] .p3-badge,
html[data-theme="dark"] .cr-credit { box-shadow: 0 0 0 1px rgba(201,164,106,.35), 0 20px 40px rgba(0,0,0,.45); }

/* Ombres des encadrés : plus profondes pour se détacher du fond */
html[data-theme="dark"] .p3-box,
html[data-theme="dark"] .ct-card { box-shadow: 0 18px 40px rgba(0,0,0,.45); }

/* Pages internes : bouton d'envoi (contact) sur fond sombre */
html[data-theme="dark"] .ct-submit { color: var(--t-btn-fg); background: var(--t-btn-bg); }
html[data-theme="dark"] .ct-submit:hover { background: var(--t-btn-hover-bg); }
html[data-theme="dark"] .ct-card .form-control.main:focus { box-shadow: 0 0 0 3px rgba(157,184,232,.25); }

/* Images de stores noires (app) : liseré pour les détacher du fond */
html[data-theme="dark"] .store-row img { box-shadow: 0 0 0 1px rgba(255,255,255,.25); border-radius: 8px; }

/* Les captures et images restent claires : on adoucit l'éclat */
html[data-theme="dark"] .ap-visual img { filter: brightness(.92); }
