/* =============================================================================
   tokens.css — socle graphique partagé (DGTCFM).
   Polices embarquées, jetons de style et cadre global (barre de commande,
   sous-barre, pied de page), plus quelques primitives réutilisables.
   CE FICHIER EXISTE EN DEUX EXEMPLAIRES, l'un servi par le poste, l'autre par le
   site public : toute modification est faite des deux côtés, au caractère près.

   Les couleurs du cadre sont écrites en hexadécimal littéral (celui de la charte)
   pour que les barres s'affichent à l'identique, même sur une page dont le :root
   déclare encore d'anciennes variables de thème sombre. Seule la teinte d'accent
   lit var(--brand). Charger ce fichier AVANT la feuille propre à chaque page.
   ============================================================================= */

/* ---- self-hosted fonts (latin subset, woff2) --------------------------------
   Newsreader & Libre Franklin are variable fonts (one file per family, weight
   range); IBM Plex Mono ships static per-weight files. font-display: swap. */
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/newsreader.woff2) format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 400 600; font-display: swap; src: url(fonts/newsreader-italic.woff2) format('woff2'); }
@font-face { font-family: 'Libre Franklin'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/librefranklin.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibmplexmono-400.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibmplexmono-500.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibmplexmono-600.woff2) format('woff2'); }

:root {
  /* type families (each carries an offline fallback stack) */
  --tba-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --tba-sans: 'Libre Franklin', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --tba-mono: 'IBM Plex Mono', 'Consolas', ui-monospace, monospace;

  /* surfaces & ink */
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-2: #eef2f0;
  --surface-3: #fbfcfb;
  --ink: #1b2621;
  --ink-2: #37423c;
  --muted: #647069;
  --faint: #94a09a;
  --line: #dde4e0;
  --hairline: #eef2f0;
  --hairline-2: #f0f3f1;

  /* brand green (accent is themeable in one place) */
  --brand: #1f5a48;
  --brand-deep: #143a2e;
  --brand-mid: #2c7a5f;
  --brand-tint: #eaf1ed;
  --on-brand: #eaf3ee;
  --header-muted: #9fbdb0;

  /* severity — CONFORME / info-good */
  --pass: #2f8f5b;
  --pass-text: #25784f;
  --pass-dot: #3a8f6a;
  --pass-tint: #e8f3ec;
  /* severity — ANOMALIE */
  --fail: #c8483f;
  --fail-text: #b83d34;
  --fail-tint: #f9ece9;
  --fail-tint-2: #fdf4f2;
  --fail-border: #f0d9d5;
  /* severity — attention / avis */
  --attention: #c98a1e;
  --attention-text: #8a6414;
  --attention-tint: #faf5e6;
  --attention-tint-2: #f6efdc;
  --attention-border: #eadfc2;
  /* severity — info */
  --info: #3a8f6a;
  --info-text: #2f7a58;
  --info-tint: #e9f3ee;

  /* official documents */
  --doc-navy: #1f4e79;
  --doc-navy-pv: #1f3864;
  --doc-canvas: #e8eaed;

  /* radii */
  --r-monogram: 10px;
  --r-card: 16px;
  --r-panel: 14px;
  --r-inner: 12px;
  --r-control: 10px;
  --r-chip: 8px;
  --r-pill: 999px;

  /* shadows */
  --sh-card: 0 1px 3px rgba(20,58,46,.05);
  --sh-card-2: 0 1px 2px rgba(20,58,46,.04);
  --sh-header: 0 1px 0 rgba(255,255,255,.06), 0 6px 20px rgba(10,30,24,.14);
  --sh-float: 0 6px 20px rgba(20,58,46,.10);
  --sh-btn: 0 2px 8px rgba(20,58,46,.2);
  --sh-sheet: 0 1px 8px rgba(0,0,0,.22);
}

@keyframes tbaRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- base page defaults (page stylesheets may still override on their own body) */
body {
  margin: 0;
  font-family: var(--tba-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: #cfe3d8; color: #123; }

/* =============================================================================
   Global chrome — command bar, sub-bar, footer. Colours are literal to stay
   stable across pages; only the monogram accent reads var(--brand).
   ============================================================================= */
.tba-header {
  position: sticky; top: 0; z-index: 20;
  background: #143a2e; color: #eaf3ee;
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 6px 20px rgba(10,30,24,.14);
}
.tba-header-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 30px;
  height: 62px; display: flex; align-items: center; gap: 16px;
}
.tba-monogram {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand, #1f5a48); border: 1px solid rgba(255,255,255,.20);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--tba-mono); font-size: 1.15rem; font-weight: 600; color: #eaf3ee;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
}
.tba-wordmark-title { font-family: var(--tba-serif); font-size: 1.06rem; font-weight: 600; letter-spacing: .01em; line-height: 1.05; }
.tba-wordmark-sub { font-size: .63rem; letter-spacing: .18em; text-transform: uppercase; color: #9fbdb0; margin-top: 1px; }
.tba-nav { display: flex; gap: 3px; margin-left: 20px; flex-wrap: wrap; }
.tba-tab {
  appearance: none; border: none; background: transparent; font: inherit;
  cursor: pointer; padding: 7px 13px; border-radius: 8px;
  font-size: .83rem; font-weight: 600; line-height: 1.2;
  color: #9fbdb0; text-decoration: none; transition: color .15s, background .15s;
}
.tba-tab:hover { color: #eaf3ee; }
.tba-tab.is-active { color: #fff; background: rgba(255,255,255,.12); }
.tba-header-status { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tba-status-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--tba-mono); font-size: .72rem; color: #9fbdb0;
  border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 4px 11px;
}
.tba-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #5fd39a; box-shadow: 0 0 0 3px rgba(95,211,154,.18); }

.tba-subbar { position: sticky; top: 62px; z-index: 15; background: #fff; border-bottom: 1px solid #dde4e0; }
.tba-subbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 30px;
  min-height: 52px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
}
.tba-crumb-root { font-size: .8rem; color: #647069; }
.tba-crumb-sep { color: #c4cdc8; }
.tba-crumb-current { font-size: .8rem; color: #1b2621; font-weight: 600; }

.tba-footer { border-top: 1px solid #dde4e0; background: #fff; }
.tba-footer-inner {
  max-width: 1120px; margin: 0 auto; padding: 20px 30px;
  color: #647069; font-size: .8rem; line-height: 1.5; text-align: center;
}

/* main content column, aligned to the chrome */
.tba-main { max-width: 1120px; margin: 0 auto; padding: 30px 30px 72px; }

/* =============================================================================
   Reusable primitives (prefixed .tba- to avoid colliding with existing page
   CSS classes like .card / .chip / .mono).
   ============================================================================= */
.tba-btn-primary {
  appearance: none; border: none; font: inherit; cursor: pointer;
  background: var(--brand, #1f5a48); color: #fff; font-weight: 600; font-size: .9rem;
  padding: 10px 18px; border-radius: 10px; box-shadow: 0 2px 8px rgba(20,58,46,.2);
  transition: filter .15s;
}
.tba-btn-primary:hover { filter: brightness(1.08); }
.tba-btn-ghost {
  appearance: none; font: inherit; cursor: pointer;
  background: #fff; color: var(--brand, #1f5a48); border: 1px solid #dde4e0;
  font-weight: 600; font-size: .9rem; padding: 9px 16px; border-radius: 10px;
  transition: background .15s;
}
.tba-btn-ghost:hover { background: var(--brand-tint, #eaf1ed); }
.tba-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.tba-chip {
  display: inline-flex; gap: 7px; align-items: baseline;
  background: #f4f7f5; border: 1px solid #e3eae6; border-radius: 8px;
  padding: 5px 11px; font-family: var(--tba-mono); font-size: .8rem;
}
.tba-mono { font-family: var(--tba-mono); font-variant-numeric: tabular-nums; }
.tba-card { background: #fff; border: 1px solid #dde4e0; border-radius: 16px; box-shadow: 0 1px 3px rgba(20,58,46,.05); }

/* section eyebrow with the italic Newsreader numeral, e.g. "01  ÉQUILIBRE GÉNÉRAL" */
.tba-eyebrow-row { display: flex; align-items: center; gap: 14px; margin: 34px 0 15px; }
.tba-eyebrow-num { font-family: var(--tba-serif); font-style: italic; font-size: 1.15rem; color: var(--brand, #1f5a48); }
.tba-eyebrow { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: #37423c; }
.tba-eyebrow-rule { flex: 1; height: 1px; background: #dde4e0; }

/* chrome never prints (documents page prints only its #page sheet) */
@media print { .tba-chrome { display: none !important; } }
