/* ============================================================
   ERP+ : Typographie (CANONIQUE V1.3)

   Issu du split de brand.css par périmètre (DA15, socle 372, refs 364). Ce
   fichier porte les familles de polices (DA2), l'échelle typo --t-* et les
   classes de texte de base. La palette est dans erp-tokens.css ; les composants
   dans erp-components.css. Ordre de chargement : tokens, typography, components.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,600;1,6..72,400&family=Public+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   ALLOWLIST POLICES (correction 5.3) - DA2 FIGÉ
   Trio autorisé, AUCUNE autre famille tolérée :
     serif : "Newsreader"
     sans  : "Public Sans"
     mono  : "JetBrains Mono"
   Rejet explicite : Source Serif 4, Source Sans 3, IBM Plex Mono,
   et toute famille hors trio (primaire, fallback ou commentaire).
   ============================================================ */

:root {
  /* ---- Polices figées (DA2) ---- */
  --erp-font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --erp-font-sans:  "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --erp-font-mono:  "JetBrains Mono", ui-monospace, "Courier New", monospace;

  /* ─────────── Échelle typo ─────────── */
  --t-display: 56px; --t-display-lh: 1.08;
  --t-h1: 40px;      --t-h1-lh: 1.12;
  --t-h2: 28px;      --t-h2-lh: 1.2;
  --t-h3: 20px;      --t-h3-lh: 1.3;
  --t-eyebrow: 12px; --t-eyebrow-track: 0.2em;
  --t-body: 16px;    --t-body-lh: 1.55;
  --t-small: 14px;   --t-small-lh: 1.5;
  --t-meta: 12px;
  --t-kpi: 48px;
}

/* ============================================================
   Échelle print (E1, NOTE_VERDICTS_PDF_V1.3.md addendum 2026-06-10, refs #395)
   Corps en points pour le document A4 ; consommateur : gabarit PDF
   (templates/erp_template.html, injection au rendu par scripts/render.js).
   Plancher absolu : 7.5pt (--tp-meta), aucun corps en dessous.
   Les facsimilés Cerfa/ENSA conservent leurs corps propres (fidélité
   modèle, hors échelle --tp-*). Familles : --erp-font-* ci-dessus, sans
   duplication ; tracking eyebrow print : --t-eyebrow-track réutilisé.
   ============================================================ */

:root {
  --tp-title: 22pt;    --tp-title-lh: 1.15;   /* serif 500 : titre de garde */
  --tp-section: 13pt;  --tp-section-lh: 1.25; /* serif 600 : titres de section */
  --tp-sub: 10.5pt;    --tp-sub-lh: 1.3;      /* sans 600 : sous-sections, têtes de blocs et de cartes */
  --tp-body: 9pt;      --tp-body-lh: 1.45;    /* sans 400 : corps, cellules de tables */
  --tp-small: 8pt;     --tp-small-lh: 1.4;    /* sans 400 : légendes, notes, intro */
  --tp-meta: 7.5pt;    --tp-meta-lh: 1.35;    /* sans 400/600 : footers, mentions, eyebrows print */
  --tp-data: 8.5pt;                           /* mono 400/500 : données de référence */
}

/* ============================================================
   Typographie sémantique : classes de texte de base
   ============================================================ */

.erp-display, h1.erp-h1, .erp-h1 {
  font-family: var(--erp-font-serif); font-weight: 500;
  font-size: var(--t-display); line-height: var(--t-display-lh);
  letter-spacing: -0.01em; color: var(--erp-fg-1); margin: 0; text-wrap: balance;
}
h2.erp-h2, .erp-h2 {
  font-family: var(--erp-font-serif); font-weight: 500;
  font-size: var(--t-h1); line-height: var(--t-h1-lh);
  letter-spacing: -0.005em; color: var(--erp-fg-1); margin: 0; text-wrap: balance;
}
h3.erp-h3, .erp-h3 {
  font-family: var(--erp-font-serif); font-weight: 600;
  font-size: var(--t-h2); line-height: var(--t-h2-lh);
  color: var(--erp-fg-1); margin: 0;
}
h4.erp-h4, .erp-h4 {
  font-family: var(--erp-font-sans); font-weight: 600;
  font-size: var(--t-h3); line-height: var(--t-h3-lh);
  color: var(--erp-fg-1); margin: 0;
}

p.erp-body, .erp-body {
  font-family: var(--erp-font-sans); font-weight: 400;
  font-size: var(--t-body); line-height: var(--t-body-lh);
  color: var(--erp-fg-2); margin: 0;
}
.erp-lead {
  font-family: var(--erp-font-serif); font-weight: 400;
  font-size: 22px; line-height: 1.5; color: var(--erp-fg-2);
}
.erp-small { font-family: var(--erp-font-sans); font-size: var(--t-small); line-height: var(--t-small-lh); color: var(--erp-fg-3); }
.erp-meta  { font-family: var(--erp-font-sans); font-size: var(--t-meta);  line-height: 1.4;             color: var(--erp-fg-4); letter-spacing: 0.02em; }
.erp-mono  { font-family: var(--erp-font-mono); font-weight: 400; font-size: 13px; }
