/* ============================================================
   [GÉNÉRÉ koaee_theme_gen] tokens THÉMATIQUES dérivés de /etc/koaee/branding.php (mairie).
   Régénérer après tout changement de teinte : php /usr/local/bin/koaee/koaee_theme_gen.php mairie <ce fichier>.
   THÈME MARIANNE — shared/themes/marianne.css (MÉGA P4 MAIRIE, 2026-06-12 — décliné d'olive.css, palette P0 validée Erwan)
   ------------------------------------------------------------
   Thème secteur MAIRIE du catalogue KOAEE — « Mairie de Koaee-sur-Seine ».
   Palette P0 (STATE-MEGA, GO Erwan) : primaire #000091 (bleu Marianne) ·
   accent clair #8585F6 · surfaces douces #E0E0FF/#C7C7FC.
   AA mesurés (script ratio, 2026-06-12) : #fff/#000091 = 14.91 ·
   #8585F6/#0f0f0f = 6.10 · #1a1a1a/#E0E0FF = 13.49 · #1a1a1a/#C7C7FC = 10.78.
*/

:root {
  /* Backgrounds / surfaces — LIGHT (NEUTRES, identiques emerald) */
  --bg:               #ffffff;
  --surface-1:        #fafafa;
  --surface-2:        #f5f5f5;
  --surface-3:        #e5e7eb;
  --surface-4:        #d1d5db;
  --surface-deep:     #ffffff;
  --surface-hover:    #f5f5f5;

  /* Texts — LIGHT (NEUTRES sauf --text-faint corrigé AA) */
  --text:             #1a1a1a;
  --text-muted:       #6b7280;
  --text-faint:       #5a6470;   /* corrigé AA : 6.01 sur #ffffff (hérité orange B1-2) */
  --text-faintest:    #aaa;
  --text-on-accent:   #ffffff;

  /* Accents palette MARIANNE — LIGHT (THÉMATIQUES) */
  /* fix7 : marianne = graphique. --accent (texte) -> NEUTRE var(--text). */
  --accent:           var(--text);   /* texte neutre — pas de texte courant coloré */
  --accent-strong:    #0055a4;       /* focus outlines / hover profond (14.91 AA) */
  --accent-soft:      #e4f0fe;       /* badge-bg bleu pâle (surface) */
  --accent-soft-text: var(--text);   /* texte badge neutre */
  --accent-surface:   #0055a4;       /* bleu Marianne — SEUL porteur du bleu (graphique) */
  --text-on-surface:  #ffffff;       /* texte SUR --accent-surface : 14.91 AA */

  /* Border + nav — LIGHT (NEUTRES) */
  --border:           #e5e7eb;
  --nav-bg:           #ffffff;
  --nav-link:         #1f2937;

  /* UI spécifiques — LIGHT (NEUTRES) */
  --ui-day-disabled:  #d0d0d0;
  --ui-day-booked:    #9ca3af;

  /* Errors — LIGHT (NEUTRES) */
  --error:            #c0392b;
  --error-bg:         rgba(192,57,43,.08);
  --error-border:     rgba(192,57,43,.18);

  /* Typographie (NEUTRES, héritées light → dark) */
  --font-serif:       'Noto Serif', Georgia, serif;
  --font-body:        'Manrope', sans-serif;

  /* Alias hérités du pilote hôtel (emerald-noir définit --text-primary ; le moteur
     widget cloné l'utilise 15× — LOT 3bis A5 : croix invisible car var absente). */
  --text-primary:     #1a1a1a;
}

[data-theme="dark"] {
  /* Backgrounds / surfaces — DARK (NEUTRES, identiques emerald) */
  --bg:               #0f0f0f;
  --surface-1:        #1a1a1a;
  --surface-2:        #252525;
  --surface-3:        #2a2a2a;
  --surface-4:        #353534;
  --surface-deep:     #0e0e0e;
  --surface-hover:    #3f3f3d;

  /* Texts — DARK (NEUTRES sauf --text-faint corrigé AA) */
  --text:             #f5f5f5;
  --text-muted:       #a0a0a0;
  --text-faint:       #909090;   /* corrigé AA : 6.00 sur #0f0f0f */
  --text-faintest:    #444;
  --text-on-accent:   #0f0f0f;

  /* Accents palette MARIANNE — DARK (THÉMATIQUES) */
  --accent:           var(--text);   /* texte neutre DARK */
  --accent-strong:    #589ff4;       /* focus outlines visibles en dark (6.10 AA) */
  --accent-soft:      #c9e0fe;       /* badge-bg bleu pâle conservé en dark */
  --accent-soft-text: #1a1a1a;       /* texte SOMBRE sur badge pâle (10.78 AA, pattern FIX A orange) */
  --accent-surface:   #0055a4;       /* marque CONSTANTE dans les 2 thèmes (L3, validé LOT 2) */
  --text-on-surface:  #ffffff;       /* 14.91 AA sur #000091 */

  /* Border + nav — DARK (NEUTRES) */
  --border:           #333333;
  --nav-bg:           rgba(15,15,15,0.7);
  --nav-link:         #e5e7eb;

  /* UI spécifiques — DARK (NEUTRES) */
  --ui-day-disabled:  #3a3a3a;
  --ui-day-booked:    #666;

  /* Errors — DARK (NEUTRES) */
  --error:            #ff8080;
  --error-bg:         rgba(255,100,100,.1);
  --error-border:     rgba(255,100,100,.2);

  /* Alias hérités du pilote hôtel (cf. light) */
  --text-primary:     #f5f5f5;
}

/* LOT RECETTE-FIX A (2026-06-13) — accent foreground lisible en dark, cible 7:1 sur #1a1a1a (teinte conservée, validé Erwan) */
[data-theme="dark"]{ --accent-on-dark: #61a8fe; }
