/* ============================================================
   [GÉNÉRÉ koaee_theme_gen] tokens THÉMATIQUES dérivés de /etc/koaee/branding.php (restaurant).
   Régénérer après tout changement de teinte : php /usr/local/bin/koaee/koaee_theme_gen.php restaurant <ce fichier>.
   THÈME ORANGE — shared/themes/orange.css (Sprint #65 S65-3β BLOC 2 §4)
   ------------------------------------------------------------
   Thème pilote secteur RESTAURANT du catalogue KOAEE.
   Source palette : /var/www/koaee.ai/style_ubnbee_orange.css
   ("Thème Orange - Restaurant" — primary #FF6B35 / secondary #F7931E).
   Variante widget chatbot : /var/www/koaee.ai/chat_style_orange.php.
   ------------------------------------------------------------
   RGAA AA validé par mesure (Sprint #65 S65-3β cadrage + BLOC 2 audit) :
     LIGHT --accent #9A3412 sur --bg #ffffff = 7.31 ✅ AAA
     DARK  --accent #FF6B35 sur --bg #0f0f0f = 6.76 ✅ AA
     LIGHT --text-faint #5a6470 sur --bg #ffffff = 6.01 ✅ AA (vs #9ca3af emerald 2.54 ❌)
     DARK  --text-faint #909090 sur --bg #0f0f0f = 6.00 ✅ AA (vs #707070 emerald 3.87 ❌)
   ------------------------------------------------------------
   Frontière neutre/thème :
     NEUTRES (conservés de emerald, indépendants du thème) :
       --bg / --surface-1..4 / --surface-deep / --surface-hover
       --text / --text-muted / --text-faintest / --text-on-accent
       --border / --nav-bg / --nav-link
       --ui-day-disabled / --ui-day-booked / --error*
       --font-serif / --font-body
     THÉMATIQUES (changent par secteur) :
       --accent / --accent-strong / --accent-soft / --accent-soft-text
       --text-faint (corrigé AA cf. B1-2)
   Chargement : <link rel="stylesheet" href="/shared/css/base.css">
                <link rel="stylesheet" href="/shared/themes/orange.css">
   ============================================================ */

: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;   /* B1-2 corrigé AA : ratio 6.01 sur #ffffff (vs emerald #9ca3af 2.54 ❌) */
  --text-faintest:    #aaa;
  --text-on-accent:   #ffffff;

  /* Accents palette ORANGE — LIGHT (THÉMATIQUES) */
  /* fix7 : parti pris "orange = graphique, jamais texte". --accent (texte) -> NEUTRE var(--text).
     L'orange vif vit uniquement dans --accent-surface (surfaces, icônes, bordures déco, focus, logo). */
  --accent:           var(--text);   /* fix7 : texte neutre (#1a1a1a light) — plus aucun texte chaud */
  --accent-strong:    #9d3303;       /* conservé (n'alimente plus que des focus outlines reroutés --accent-surface) */
  --accent-soft:      #fdeae3;       /* badge-bg pâle (surface, conservé) */
  --accent-soft-text: var(--text);   /* fix7 : texte badge neutre (était #9A3412) */
  --accent-surface:   #C44518;       /* orange vif commercial — SEUL porteur de l'orange (graphique) */
  --text-on-surface:  #ffffff;       /* texte SUR --accent-surface : ratio 6.39 sur #FF6B35 AA */

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

  /* UI spécifiques — LIGHT (NEUTRES, peut-être à thématiser plus tard) */
  --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;
}

[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;   /* B1-2 corrigé AA : ratio 6.00 sur #0f0f0f (vs emerald #707070 3.87 ❌) */
  --text-faintest:    #444;
  --text-on-accent:   #0f0f0f;

  /* Accents palette ORANGE — DARK (THÉMATIQUES) */
  /* fix7 : --accent (texte) -> NEUTRE var(--text) (#f5f5f5 ivoire). Orange vif = --accent-surface seul. */
  --accent:           var(--text);   /* fix7 : texte neutre DARK (#f5f5f5) */
  --accent-strong:    #ff7241;       /* conservé (focus outlines reroutés --accent-surface) */
  --accent-soft:      #fed3c5;       /* badge-bg pâle (surface, conservé) */
  --accent-soft-text: #1a1a1a;       /* FIX A 2026-05-30 : badge-bg --accent-soft pâle (#FFC9A0) en dark aussi -> texte SOMBRE fixe (était var(--text)=#f5f5f5 -> 1.36:1 illisible -> #1a1a1a = 11.44:1 AA) */
  --accent-surface:   #C44518;       /* orange vif — SEUL porteur de l'orange (graphique) */
  --text-on-surface:  #ffffff;   /* texte SUR --accent-surface : ratio 6.39 sur #FF6B35 AA */

  /* 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);
}
