/** Fondations accessibles et styles de document indépendants des écrans. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--color-paper);
}

body {
  margin: 0;
  color: var(--color-ink);
  background: var(--color-paper);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.08;
  text-wrap: balance;
}

a {
  color: inherit;
  text-underline-offset: 0.3em;
  text-decoration-thickness: 1px;
}

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

address {
  font-style: normal;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 6px;
}

/* Les ancres reçoivent le focus sans ajouter un contour à toute la section. */
[tabindex='-1']:focus {
  outline: none;
}

::selection {
  color: var(--color-paper);
  background: var(--color-ink);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  color: var(--color-paper);
  background: var(--color-ink);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.7;
}

/* Arrêt doux entre écrans sur grand écran, jamais obligatoire ni sur mobile. */
@media (min-width: 701px) and (min-height: 650px) and (prefers-reduced-motion: no-preference) {
  html:has(.is-one-page):not(.has-screen-navigation) {
    scroll-snap-type: y proximity;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Le contrôleur JS anime le document : pas de seconde animation CSS concurrente. */
html.has-screen-navigation {
  scroll-behavior: auto;
  scroll-snap-type: none;
}
