/* ============================================================================
   BASE — remise à zéro et styles par défaut des balises HTML.
   ========================================================================= */

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--hauteur-header);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--police-texte);
  font-size: var(--taille-m);
  line-height: 1.6;
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--police-titre);
  font-weight: var(--graisse-titre);
  line-height: 1.15;
  color: var(--titre);
  text-wrap: balance;
}

/* Sur fond sombre (bandeaux pétrole, photo d'accueil), les titres passent en clair */
.section--sombre :is(h1, h2, h3, h4),
.hero :is(h1, h2, h3, h4),
.page-tete :is(h1, h2, h3, h4),
.footer :is(h1, h2, h3, h4) {
  color: inherit;
}

h1 { font-size: var(--taille-xxl); }
h2 { font-size: var(--taille-xl); }
h3 { font-size: var(--taille-l); }

p {
  text-wrap: pretty;
}

a {
  color: var(--accent);
}

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

:focus-visible {
  outline: 3px solid var(--sable);
  outline-offset: 3px;
}

/* Lien « Aller au contenu » pour la navigation au clavier */
.lien-evitement {
  position: absolute;
  left: var(--esp-3);
  top: -100px;
  z-index: 100;
  padding: var(--esp-2) var(--esp-3);
  background: var(--fond);
  border-radius: var(--rayon);
}

.lien-evitement:focus {
  top: var(--esp-3);
}

.visuellement-cache {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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