/* Logestimmo Design Tokens v2 */
:root {
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  /* Light */
  --bg: #FFFFFF;
  --bg-sunken: #F7F8FA;
  --bg-alt: #F2F4F7;
  --ink: #0B1220;
  --ink-2: #2B3344;
  --ink-3: #5B6577;
  --ink-4: #8E97A6;
  --line: #E4E7EC;
  --line-2: #EEF0F3;

  /* Dark product surface */
  --d-bg: #0A0E17;
  --d-panel: #10151F;
  --d-elev: #161C28;
  --d-sunken: #0D1119;
  --d-line: #1E2532;
  --d-line-2: #171D28;
  --d-ink: #ECEEF2;
  --d-ink-2: #B5BAC5;
  --d-ink-3: #7B8494;
  --d-ink-4: #525C6E;

  /* Brand — strictly scoped */
  --blue: #2563EB;
  --blue-2: #1E4FCC;
  --blue-wash: #EEF3FE;
  --blue-d: #6192FF;
  --orange: #F97316;
  --orange-2: #E05F0D;
  --orange-wash: #FFF1E6;

  --pos: #0F7A4C;
  --pos-d: #3FB583;
  --warn: #8A5A10;
  --warn-d: #E0A74A;
  --neg: #9A2A2A;
  --neg-d: #F16A63;

  --r-1: 4px;
  --r-2: 6px;
  --r-3: 10px;

  --row-h: 44px;
  --cell-px: 16px;
}
[data-density="compact"] { --row-h: 34px; --cell-px: 12px; }

/* ─── Mode CLAIR du produit ───────────────────────────────
   L'app utilise les tokens --d-* (surface sombre par défaut).
   Ce bloc les remappe vers une palette claire propre à Logestimmo,
   activée par data-theme="light" sur la racine .app. */
.app[data-theme="light"] {
  --d-bg: #FFFFFF;
  --d-panel: #F7F8FA;
  --d-elev: #EDF0F4;
  --d-sunken: #F4F6F9;
  --d-line: #E4E7EC;
  --d-line-2: #EEF0F3;
  --d-ink: #0B1220;
  --d-ink-2: #2B3344;
  --d-ink-3: #5B6577;
  --d-ink-4: #97A0B0;
  --blue-d: #2563EB;
  --pos-d: #0F9D58;
  --warn-d: #B7791F;
  --neg-d: #D64550;
}
/* L'accent agence (--accent) pilote le bouton primaire + surbrillances.
   Repli sur l'orange Logestimmo si non défini. */
.app { --accent: var(--orange); --accent-2: var(--orange-2); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: var(--font-sans); -webkit-font-smoothing: antialiased; color: var(--ink); background: var(--bg); }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }
input { font-family: inherit; }
a { color: inherit; text-decoration: none; }
.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
