/* FinanceEBC v2 — Design tokens (namespace --fin-*). Aucune couleur en dur dans les vues. */
:root {
  /* Palette FINANCIA : marine + or */
  --fin-primary: #0f2f4f;
  --fin-primary-600: #143b63;
  --fin-primary-700: #0b2540;
  --fin-accent: #c8a24a;
  --fin-accent-600: #b28f3c;

  --fin-bg: #f4f6f9;
  --fin-surface: #ffffff;
  --fin-surface-2: #f8fafc;
  --fin-border: #e2e8f0;
  --fin-border-strong: #cbd5e1;

  --fin-text: #1a2433;
  --fin-text-muted: #5b6675;
  --fin-text-invert: #ffffff;
  --fin-link: #0f2f4f;              /* liens et marque : doit contraster avec --fin-bg */
  --fin-on-primary: #dfe7f0;        /* texte principal sur fond marine (sidebar, hero) */
  --fin-on-primary-muted: #cdd8e6;  /* texte secondaire sur fond marine */

  --fin-success: #1a7f52;
  --fin-success-bg: #e6f4ec;
  --fin-warning: #b7791f;
  --fin-warning-bg: #fdf3e2;
  --fin-danger: #c0392b;
  --fin-danger-bg: #fbeae8;
  --fin-info: #1f6f8b;
  --fin-info-bg: #e6f1f5;

  --fin-radius-sm: 6px;
  --fin-radius: 10px;
  --fin-radius-lg: 16px;

  --fin-shadow-sm: 0 1px 2px rgba(15, 47, 79, 0.06);
  --fin-shadow: 0 4px 16px rgba(15, 47, 79, 0.08);
  --fin-shadow-lg: 0 12px 40px rgba(15, 47, 79, 0.12);

  --fin-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fin-font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --fin-space-1: 4px;
  --fin-space-2: 8px;
  --fin-space-3: 12px;
  --fin-space-4: 16px;
  --fin-space-5: 24px;
  --fin-space-6: 32px;

  --fin-sidebar-w: 256px;
  --fin-topbar-h: 60px;

  /* Ajouts UI V1 (§3.1) */
  --fin-accent-bg: #faf3e3;        /* fond doux or (chips, survols) */
  --fin-primary-bg: #e8eef5;       /* fond doux marine (nav active claire, aides) */
  --fin-space-7: 48px;
  --fin-space-8: 64px;
  --fin-radius-xl: 24px;
  --fin-shadow-pop: 0 20px 60px rgba(15, 47, 79, 0.18);
  --fin-topbar-h-mobile: 56px;
  --fin-transition: 150ms ease;
}

html[data-theme="sombre"] {
  --fin-bg: #0c1622;
  --fin-surface: #131f2e;
  --fin-surface-2: #0f1a27;
  --fin-border: #223447;
  --fin-border-strong: #2f455c;
  --fin-text: #e6ecf3;
  --fin-text-muted: #9aa8ba;
  --fin-primary: #1c4a76;
  --fin-success-bg: #10281f;
  --fin-warning-bg: #2a2211;
  --fin-danger-bg: #2a1512;
  --fin-info-bg: #10222a;

  /* Ajouts UI V1 (§3.1 + §7.4 : couleurs manquantes au thème sombre) */
  --fin-accent-bg: #2a2416;
  --fin-primary-bg: #14283c;
  --fin-primary-600: #24578a;
  --fin-primary-700: #0a1725;
  /* Le marine des liens est illisible sur fond sombre : éclairci (AA vérifié). */
  --fin-link: #8ec5f0;
  /* Couleurs d'état éclaircies : les valeurs claires ne passent pas AA sur fond sombre. */
  --fin-success: #57c98d;
  --fin-warning: #e0b357;
  --fin-danger: #f08074;
  --fin-info: #64b6cf;
}

@media (prefers-reduced-motion: reduce) {
  :root { --fin-transition: 0ms; }
}
