/* FinanceEBC v2 — Fondation : polices locales, éléments de base, focus, impression.
   Aucune couleur en dur : uniquement des var(--fin-*) de tokens.css. */

/* — Polices locales (CSP 'self' : aucun CDN, aucune Google Font) — */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/jakarta-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/jakarta-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/jetbrains-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/jetbrains-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* — Base — */
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--fin-font);
  font-size: 15px;
  line-height: 1.5;
  background: var(--fin-bg);
  color: var(--fin-text);
  margin: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--fin-text); }
h1 { font-size: 1.5rem; margin: 0; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }

a { color: var(--fin-link); }
a:hover { color: var(--fin-primary-600); }
html[data-theme="sombre"] a:hover { color: var(--fin-text); }

hr { border: 0; border-top: 1px solid var(--fin-border); margin: var(--fin-space-5) 0; }

img, svg { max-width: 100%; }

/* Champs Bootstrap : accord avec les tokens (aucune couleur en dur). */
.form-control, .form-select {
  font-family: inherit;
  font-size: .95rem;
  color: var(--fin-text);
  background-color: var(--fin-surface);
  border-color: var(--fin-border-strong);
  border-radius: var(--fin-radius-sm);
  min-height: 42px;
  transition: border-color var(--fin-transition), box-shadow var(--fin-transition);
}
.form-control:focus, .form-select:focus {
  color: var(--fin-text);
  background-color: var(--fin-surface);
  border-color: var(--fin-primary);
  box-shadow: 0 0 0 3px var(--fin-primary-bg);
}
.form-control::placeholder { color: var(--fin-text-muted); opacity: 1; }
.form-control:disabled, .form-select:disabled { background-color: var(--fin-surface-2); opacity: .7; }
textarea.form-control { min-height: 96px; }

/* — Accessibilité — */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--fin-primary); color: var(--fin-text-invert);
  padding: var(--fin-space-3) var(--fin-space-4);
  border-radius: 0 0 var(--fin-radius) 0;
}
.skip-link:focus { left: 0; color: var(--fin-text-invert); }

:focus-visible { outline: 3px solid var(--fin-accent); outline-offset: 2px; }

/* — Montants : mono, tabulaires, alignés à droite (§3.2) — */
.num {
  font-family: var(--fin-font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* — Impression — */
@media print {
  .fin-sidebar, .fin-topbar, .fin-toast-zone, .fin-public-header,
  .fin-public-footer, .page-actions, .no-print { display: none !important; }
  /* Mot-clé et non un hex : V-06 réserve les hex à tokens.css. */
  body { background: white; color: black; }
  .fin-content { padding: 0; }
}
