/* =============================================================================
   Socle — base commune (après tokens.css, avant composants.css)
   Police, remise à zéro légère, typographie, focus, mouvement. Aucune mise en page de site.
   ============================================================================= */

/* Inter variable (100–900), auto-hébergée : aucun service externe (CSP font-src 'self', Caisse hors ligne). Licence : ../polices/. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../polices/inter-variable.woff2") format("woff2");
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--couleur-fond);
  color: var(--couleur-texte);
  font-family: var(--police-texte);
  font-size: var(--taille-md);
  line-height: var(--interligne);
  font-feature-settings: "cv11", "ss01";   /* Inter : « a » à un étage, chiffres et lettres plus lisibles */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--espace-3);
  line-height: var(--interligne-serre);
  font-weight: var(--graisse-forte);
  letter-spacing: var(--approche-titre);
  text-wrap: balance;
}
h1 { font-size: var(--taille-titre); }
h2 { font-size: var(--taille-xl); }
h3 { font-size: var(--taille-lg); }
h4 { font-size: var(--taille-md); }

p { margin: 0 0 var(--espace-4); text-wrap: pretty; }

img, svg, video { display: block; max-width: 100%; height: auto; }

a {
  color: var(--couleur-lien);
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: text-decoration-color var(--duree-rapide) ease, color var(--duree-rapide) ease;
}
a:hover { text-decoration-color: currentColor; }

button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }

:focus-visible {
  outline: var(--epaisseur-focus) solid var(--couleur-focus);
  outline-offset: 2px;
}

::selection { background: color-mix(in srgb, var(--couleur-accent) 45%, transparent); color: var(--couleur-texte); }

/* Montants, quantités, heures : chiffres de même largeur (colonnes alignées, aucun « saut »). */
.p-chiffres, .p-montant { font-variant-numeric: tabular-nums; font-feature-settings: "tnum", "cv11"; }

/* Masqué à l'écran, lu par les lecteurs d'écran. */
.p-lecteur-seul {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

/* Filet de sécurité : si l'appareil demande moins d'animations, aucune ne dure. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
