/* ═══════════════════════════════════════════════════════
   ERM Design Tokens — « Le Registre »
   Paper, ink, serif. One palette for every surface.

   Legacy names (--primary, --verified, --compromised, --surface…) are kept on
   purpose: ~30 templates still style inline with them. Their *values* now
   resolve to the Registre palette, so a page that has not been re-laid-out
   yet already wears the new skin.
   ═══════════════════════════════════════════════════════ */
:root {
  /* Paper & ink */
  --paper: #f4efe6;
  --paper-deep: #ece5d8;
  --white: #ffffff;
  --bg: var(--paper);
  --surface: #fbf9f4;
  --surface-hover: #ffffff;
  --ink: #1c1b18;
  --ink-secondary: rgba(28, 27, 24, 0.8);
  --ink-muted: rgba(28, 27, 24, 0.6);
  --ink-faint: rgba(28, 27, 24, 0.45);
  --off: #d9d2c3;

  /* Ink as the action colour (legacy "primary") */
  --primary: #1c1b18;
  --primary-mid: #33312c;
  --primary-light: #59564f;
  --primary-dim: rgba(28, 27, 24, 0.06);
  --primary-ring: rgba(28, 27, 24, 0.14);
  --accent: #b8352b;
  --accent-dim: rgba(184, 53, 43, 0.08);

  /* Outcomes: remis / notifié / non réclamé-refusé-échec */
  --ok: #1f6a4a;
  --ok-bg: rgba(31, 106, 74, 0.07);
  --ok-border: rgba(31, 106, 74, 0.3);
  --warn: #8a5a12;
  --warn-bg: rgba(138, 90, 18, 0.08);
  --warn-border: rgba(138, 90, 18, 0.3);
  --bad: #b8352b;
  --bad-bg: rgba(184, 53, 43, 0.06);
  --bad-border: rgba(184, 53, 43, 0.35);
  --verified: var(--ok);
  --verified-bg: var(--ok-bg);
  --verified-border: var(--ok-border);
  --verified-glow: rgba(31, 106, 74, 0.15);
  --compromised: var(--bad);
  --compromised-bg: var(--bad-bg);
  --compromised-border: var(--bad-border);
  --compromised-glow: rgba(184, 53, 43, 0.15);

  /* Rules & radii */
  --border: rgba(28, 27, 24, 0.2);
  --border-light: rgba(28, 27, 24, 0.1);
  --rule: rgba(28, 27, 24, 0.15);
  --radius: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --shadow-xs: 0 1px 2px rgba(28, 27, 24, 0.05);
  --shadow-sm: 0 1px 3px rgba(28, 27, 24, 0.06), 0 1px 2px rgba(28, 27, 24, 0.04);
  --shadow-md: 0 10px 26px -14px rgba(28, 27, 24, 0.45);
  --shadow-lg: 0 14px 30px -14px rgba(28, 27, 24, 0.5);

  /* Type */
  --serif: 'PT Serif Caption', 'Iowan Old Style', 'Times New Roman', serif;
  --sans: 'Albert Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Reserve the scrollbar gutter: a page that fits the viewport and one that
   scrolls must not shift the centred content sideways. */
html { scrollbar-gutter: stable; }

body {
  font-family: var(--sans);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(28, 27, 24, 0.028) 0.6px, transparent 0.6px);
  background-size: 14px 14px;
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }
button, input, textarea, select { font-family: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: rgba(28, 27, 24, 0.38); }
