/* =========================================================
   LordCaisse — base.css
   Variables, reset et styles globaux
   ========================================================= */

:root{
  /* --- Bleu LordCaisse : palette principale --- */
  --navy:#0F4C81; --navy-dark:#0A3860; --navy-mid:#1968BE; --navy-pale:#EAF2FA;
  --navy-text:#0F4C81; /* bleu réservé aux TEXTES (sur fond sombre → bleu clair) */
  --gold:#F5C542; --gold-dark:#B8860B; --gold-pale:#FDF6E3;
  --bg:#F3F6FB; --surface:#FFFFFF; --border:#E1E6EF;
  --text:#101828; --muted:#54627A; --muted-2:#97A2B8;
  --success:#127A56; --success-pale:#E3F5EC;
  --warning:#B4590A; --warning-pale:#FDF0E1;
  --danger:#B3261E; --danger-pale:#FBEAE8;
  --radius:10px; --radius-sm:7px; --radius-lg:14px;
  /* Échelle typographique — tailles cohérentes partagées par les composants */
  --fs-2xs:10.5px; --fs-xs:11px; --fs-sm:12px; --fs-md:13px;
  --fs-base:14px; --fs-lg:16px; --fs-xl:20px; --fs-2xl:27px; --fs-hero:34px;
  --shadow-sm:0 1px 2px rgba(15,38,64,.06), 0 1px 1px rgba(15,38,64,.04);
  --shadow-md:0 6px 16px rgba(15,38,64,.08), 0 2px 4px rgba(15,38,64,.05);
  --shadow-lg:0 20px 48px rgba(10,30,54,.22);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Mode sombre ---- */
html.theme-dark{
  --navy-pale:#152A42; --gold-pale:#2E2717;
  --navy-text:#93C5FD;              /* textes bleus → bleu clair lisible */
  --navy-mid:#3B82D6;               /* accents/icônes légèrement éclaircis */
  --success:#4CC38A; --warning:#F0A64B; --danger:#F87171;  /* tons sémantiques lisibles */
  --bg:#0D1520; --surface:#141E2C; --border:#243347;
  --text:#E7EEF7; --muted:#9AACc4; --muted-2:#64788F;
  --success-pale:#12291F; --warning-pale:#2E2113; --danger-pale:#321714;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow-md:0 6px 16px rgba(0,0,0,.5);
  --shadow-lg:0 20px 48px rgba(0,0,0,.65);
}
html.theme-dark body{background:var(--bg); color:var(--text);}
html.theme-dark ::selection{background:var(--navy-mid); color:#fff;}
html.theme-dark .badge.muted{background:#1D2A3B; color:var(--muted);}
html.theme-dark .badge.gold{color:#F0D08A; border-color:#4A3D1E;}
html.theme-dark .progress-bar{background:#1D2A3B;}
html.theme-dark .search-bar input, html.theme-dark .field input, html.theme-dark .field select, html.theme-dark .field textarea{background:#0F1926; color:var(--text);}
html.theme-dark .stat-card .stat-ico{background:var(--navy-pale);}
html.theme-dark .lp-input-wrap input{background:#0F1926; color:var(--text);}
html.theme-dark .note-box{color:#E9C87E; border-color:#4A3D1E;}
html.theme-dark .note-box.blue{color:#93C5FD; border-color:#2A4A6E;}
html.theme-dark .toast{background:#16233A; border-color:#2A3A55; color:var(--text);}
html.theme-dark .toast-ico{background:#1D2A3B;}
html.theme-dark .toast.danger .toast-ico{background:var(--danger-pale); color:var(--danger);}
html.theme-dark .toast.danger::before, html.theme-dark .toast.danger::after{background:#F87171;}
html.theme-dark .offline-banner{background:#7F1D1D;}
html.theme-dark ::-webkit-scrollbar-thumb{background:#33445C;}
html.theme-dark ::-webkit-scrollbar-thumb:hover{background:#42556F;}
*{box-sizing:border-box;}
html{-webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;}
body{margin:0; font-family:var(--font); background:var(--bg); color:var(--text); font-size:14px; line-height:1.5; -webkit-font-feature-settings:"cv11","ss01"; font-feature-settings:"cv11","ss01"; letter-spacing:-0.01em;}
::-webkit-scrollbar{width:9px; height:9px;}
::-webkit-scrollbar-thumb{background:#C7D0DE; border-radius:5px;}
::-webkit-scrollbar-thumb:hover{background:#AEBACE;}
::selection{background:var(--navy-mid); color:#fff;}