/* Socle : reset léger, typographie, rythme des sections, utilitaires. */

/* Inter variable, sous-ensemble latin, servi depuis le site : la page ne fait
   aucune requête vers un tiers. Même famille que l'app (dsm/fonts).
   Servi en cache immutable 1 an (cf. firebase.json) : renommer le fichier à
   chaque mise à jour de la fonte. */
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter-latin-v20.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

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

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.04;
}

h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
  font-weight: 750;
}

h3 {
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Conteneurs & sections ---------- */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--section-y);
  background: var(--paper);
}

.section--tint {
  background: var(--paper-tint);
}

.section-head {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

/* Convention : les règles génériques d'un composant ne ciblent que les
   paragraphes sans classe, pour ne jamais écraser une variante nommée. */
.section-head p:not([class]) {
  color: var(--ink-soft);
  font-size: 1.06rem;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
}

/* ---------- Accessibilité ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Révélation au défilement (activée seulement si JS présent) ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
