/* Palette Duoapp — une seule source pour le clair et le sombre.
   Les alias (--color-*, --status-*, --nav-bg…) gardent les feuilles audits
   et la connexion sur les mêmes valeurs que styles.css. */
:root {
  color-scheme: light;
  --ground: #faf5ec;
  --surface: #ffffff;
  --surface-2: #f7f1e5;
  --surface-3: #efe6d6;
  --ink: #3b2a20;
  --ink-2: #6a574a;
  --ink-3: #8e7b6e;
  --line: #e3d8c6;
  --line-2: #cbbba2;
  --accent: #ce5e12;
  --accent-2: #a94a0b;
  --accent-soft: #fbeadb;
  --nav: #faf5ec;
  --nav-ink: #3b2a20;
  --nav-ink-2: #8e7b6e;
  --nav-line: #e3d8c6;
  --nav-chip: rgba(59, 42, 32, 0.05);
  --nav-chip-hover: rgba(59, 42, 32, 0.1);
  --overlay: #3b2a20;
  --overlay-ink: #faf5ec;
  --st-ok: #12805c;
  --st-late: #a98a00;
  --st-warn: #be3b2a;
  --st-fault: #7e1d18;
  --st-exempt: #3d5ba8;
  --st-draft: #8e7b6e;
  --st-note: #6d28d9;
  --tk-pending: #a16207;
  --tk-pending-bg: #fef3c7;
  --tk-todo: #c2410c;
  --tk-todo-bg: #ffedd5;
  --tk-progress: #1d4ed8;
  --tk-progress-bg: #dbeafe;
  --tk-blocked: #b91c1c;
  --tk-blocked-bg: #fee2e2;
  --tk-done: #15803d;
  --tk-done-bg: #dcfce7;
  --tk-cancel: #7e22ce;
  --tk-cancel-bg: #f3e8ff;
  --tk-late: #dc2626;
  --tk-late-bg: #fde8ea;
  --tk-p1: #db2777;
  --tk-p1-bg: #fce7f1;
  --tk-p2: #0f766e;
  --tk-p2-bg: #d7f3ef;
  --tk-p3: #4d7c0f;
  --tk-p3-bg: #eaf3d4;
  --st-ok-bg: #e3f1ea;
  --st-late-bg: #f7f0da;
  --st-warn-bg: #fae7e2;
  --st-fault-bg: #f3dcd9;
  --st-exempt-bg: #e5e9f6;
  --st-draft-bg: #efe6d6;
  --st-note-bg: #ede9fe;
  --focus: #ce5e12;
  --on-accent: #ffffff;
  --shadow: 0 12px 34px rgba(59, 42, 32, 0.2);
  --shadow-md: 0 18px 45px rgba(59, 42, 32, 0.14);
  --r: 6px;
  --r-lg: 10px;
  --font-d: "Archivo", system-ui, sans-serif;
  --font-b: "IBM Plex Sans", system-ui, sans-serif;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;

  --color-bg: var(--ground);
  --color-surface: var(--surface);
  --color-surface-muted: var(--surface-2);
  --color-surface-strong: var(--surface-3);
  --color-text: var(--ink);
  --color-muted: var(--ink-2);
  --color-muted-strong: var(--ink-3);
  --color-border: var(--line);
  --color-border-strong: var(--line-2);
  --color-primary: var(--accent);
  --color-primary-dark: var(--accent-2);
  --color-primary-soft: var(--accent-soft);
  --nav-bg: var(--nav);
  --nav-ink-muted: var(--nav-ink-2);
  --nav-accent: var(--accent);
  --status-ok: var(--st-ok);
  --status-ok-bg: var(--st-ok-bg);
  --status-late: var(--st-late);
  --status-late-bg: var(--st-late-bg);
  --status-warn: var(--st-warn);
  --status-warn-bg: var(--st-warn-bg);
  --status-fault: var(--st-fault);
  --status-fault-bg: var(--st-fault-bg);
  --status-exempt: var(--st-exempt);
  --status-exempt-bg: var(--st-exempt-bg);
  --status-note: var(--st-note);
  --status-note-bg: var(--st-note-bg);
  --shadow-sm: var(--shadow);
  --radius-md: var(--r);
  --radius-lg: var(--r-lg);
  --font-display: var(--font-d);
  --font-sans: var(--font-b);
  --font-mono: var(--font-m);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #181109;
  --surface: #241a14;
  --surface-2: #2e2118;
  --surface-3: #3a2a20;
  --ink: #f5ede1;
  --ink-2: #cbb9a8;
  --ink-3: #a08f80;
  --line: #3e2d22;
  --line-2: #57402f;
  --accent: #e8823a;
  --accent-2: #f49e5f;
  --accent-soft: #3a2317;
  --nav: #120c08;
  --nav-ink: #f5ede1;
  --nav-ink-2: #a08f80;
  --nav-line: #31241b;
  --nav-chip: rgba(255, 255, 255, 0.06);
  --nav-chip-hover: rgba(255, 255, 255, 0.12);
  --overlay: #120c08;
  --overlay-ink: #f5ede1;
  --st-ok: #2fa87e;
  --st-late: #b98c00;
  --st-warn: #cf4a57;
  --st-fault: #ec8a7c;
  --st-exempt: #7089d6;
  --st-draft: #a08f80;
  --st-note: #b69cff;
  --tk-pending: #f5c542;
  --tk-pending-bg: #3a2e08;
  --tk-todo: #fb923c;
  --tk-todo-bg: #3b2412;
  --tk-progress: #60a5fa;
  --tk-progress-bg: #172554;
  --tk-blocked: #f87171;
  --tk-blocked-bg: #3f1515;
  --tk-done: #4ade80;
  --tk-done-bg: #12301c;
  --tk-cancel: #c084fc;
  --tk-cancel-bg: #2e1065;
  --tk-late: #fb7185;
  --tk-late-bg: #3d1518;
  --tk-p1: #f472b6;
  --tk-p1-bg: #3d1830;
  --tk-p2: #2dd4bf;
  --tk-p2-bg: #0f2e2b;
  --tk-p3: #a3e635;
  --tk-p3-bg: #24300e;
  --st-ok-bg: #102a22;
  --st-late-bg: #2a2208;
  --st-warn-bg: #34161a;
  --st-fault-bg: #3a1f1a;
  --st-exempt-bg: #191f33;
  --st-draft-bg: #2e2118;
  --st-note-bg: #2a2140;
  --focus: #e8823a;
  --on-accent: #2a1408;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 18px 45px rgba(0, 0, 0, 0.4);
}
