/*
 * Socle commun : remise à zéro, typographie, mise en page générale.
 * Chaque composant a son fichier dans css/composants/, chaque page dans css/pages/.
 */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--papier);
  color: var(--encre);
  font: 400 1rem/1.5 var(--texte);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0 0 var(--esp-3);
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  font-size: 1.75rem;
  font-weight: 800;
}

h2 {
  font-size: 1.25rem;
  font-weight: 800;
}

p {
  margin: 0 0 var(--esp-3);
}

a {
  color: var(--vermillon);
  text-underline-offset: 3px;
}

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

:focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--anneau);
}

/* Contenu principal, centré et lisible sur tous les écrans */
.page {
  flex: 1;
  width: 100%;
  max-width: var(--largeur-contenu);
  margin: 0 auto;
  padding: var(--esp-4) calc(var(--esp-4) + var(--zone-droite)) var(--esp-6) calc(var(--esp-4) + var(--zone-gauche));
}

.page:focus {
  outline: none;
}

/* Lu par les lecteurs d'écran, invisible à l'écran (annonces, précisions). */
.visuellement-cache {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
