/* =========================================================================
   Base — remise à zéro, éléments HTML, accessibilité
   ========================================================================= */

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

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

body {
  margin: 0;
  font-family: var(--f-texte);
  font-size: var(--fs-base);
  line-height: var(--lh-texte);
  font-weight: var(--fw-normal);
  color: var(--c-encre);
  background: var(--c-creme);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--f-titre);
  font-weight: var(--fw-noir);
  line-height: var(--lh-titre);
  letter-spacing: var(--ls-titre);
  text-wrap: balance;
}

h1 { font-size: var(--fs-6xl); }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-xl); letter-spacing: var(--ls-sous-titre); }
h4 { font-size: var(--fs-md); letter-spacing: var(--ls-sous-titre); }

p { margin: 0; }
p + p { margin-top: var(--sp-4); }

figure, blockquote, dl, dd { margin: 0; }

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

a {
  color: inherit;
  text-decoration: none;
}

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

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

button { cursor: pointer; }

strong { font-weight: var(--fw-demi); }

/* ---- Focus visible et stylé ------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--c-vert-accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.sur-sombre :focus-visible,
.section--sombre :focus-visible {
  outline-color: var(--c-blanc);
}

/* ---- Lien d'évitement -------------------------------------------------- */
.evitement {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  z-index: 100;
  padding: var(--sp-3) var(--sp-5);
  background: var(--c-vert);
  color: var(--c-blanc);
  font-size: var(--fs-sm);
  font-weight: var(--fw-demi);
  border-radius: var(--r-pill);
  transform: translateY(-200%);
  transition: transform var(--tr-rapide);
}
.evitement:focus-visible { transform: translateY(0); }

/* ---- Utilitaires ------------------------------------------------------- */
.visuellement-cache {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- Mouvement réduit -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
