/* Fondations : polices embarquées, remise à zéro, typographie, liens, focus, mouvement réduit. */

@font-face {
  font-family: Carlito;
  src: url("../vendor/polices/carlito-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: Carlito;
  src: url("../vendor/polices/carlito-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: Carlito;
  src: url("../vendor/polices/carlito-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police-texte);
  font-size: var(--t-base);
  line-height: var(--interligne);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--police-titre);
  font-weight: 700;
  line-height: var(--interligne-titre);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--t-4xl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-l); }
p { margin: 0; text-wrap: pretty; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--alerte-texte); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--texte); color: var(--fond); }

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

.icone { width: 18px; height: 18px; flex: 0 0 auto; }
.icone--s { width: 16px; height: 16px; }
.icone--l { width: 22px; height: 22px; }
.icone--xl { width: 32px; height: 32px; }

.nombre { font-variant-numeric: tabular-nums; }
.discret { color: var(--texte-discret); }
.alerte-texte { color: var(--alerte-texte); font-weight: 700; }

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

/* Lien d'évitement : premier élément focalisable de la page */
.evitement {
  position: absolute;
  left: var(--e-4); top: -100px;
  z-index: 100;
  padding: var(--e-3) var(--e-4);
  background: var(--action); color: var(--sur-action);
  font-weight: 700; text-decoration: none;
}
.evitement:focus { top: var(--e-3); color: var(--sur-action); }

/* Animation d'entrée du contenu (spécification 19.1 : fondu et léger glissement, 200 ms) */
@keyframes entree {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.entree { animation: entree var(--duree-entree) var(--courbe) both; }

/* Préférence « réduire les animations » : supprimées, état final immédiat */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .barre-haut, .menu-lateral, .notifications, .barre-chargement, .pied { display: none !important; }
  body { background: #ffffff; color: #000000; }
}
