/* ═══════════════════════════════════════════════════════════════
   01-BASE — Remise à zéro, typographie, conteneurs, utilitaires.
   Ne contient aucune décoration : uniquement les fondations.
   ═══════════════════════════════════════════════════════════════ */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01";
  overflow-x: hidden;
}

/* Empêche le défilement de l'arrière-plan quand le menu mobile est ouvert */
body.menu-ouvert { overflow: hidden; }

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

/* Une section masquée doit disparaître même si elle porte un display
   explicite (le hero est en flex). Sans ce !important, mettre une
   section à "actif": false n'aurait aucun effet visible. */
[hidden] { display: none !important; }

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

ul, ol { margin: 0; padding: 0; }

em { font-style: italic; }

/* ---------- CONTENEURS ---------- */

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.container-etroit {
  max-width: var(--maxw-narrow);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* ---------- BANDES ALTERNÉES ---------- */

section.band {
  padding: var(--space-12) 0 var(--space-12-bas);
  position: relative;
}
.band-cream { background: var(--bg-primary); }

.band-warm  { background: var(--bg-secondary); }

/* ---------- ACCESSIBILITÉ ---------- */

/* Lien d'évitement : invisible, apparaît à la première tabulation */
.saut-contenu {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  z-index: var(--z-menu);
  padding: var(--space-3) var(--space-5);
  background: var(--ink);
  color: var(--bg-primary);
  border-radius: var(--radius-pill);
  font-size: var(--fs-s);
  font-weight: 600;
  transform: translateY(calc(-1 * var(--space-11)));
  transition: transform var(--t-fast) var(--ease);
}
.saut-contenu:focus { transform: translateY(0); }

/* Texte réservé aux lecteurs d'écran */
.lecture-seule {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus clavier visible partout */
:focus-visible {
  outline: var(--bw-thick) solid var(--gold-deep);
  outline-offset: var(--space-half);
  border-radius: var(--radius-s);
}
:focus:not(:focus-visible) { outline: none; }

/* ---------- APPARITION AU DÉFILEMENT ---------- */

.reveal {
  opacity: 0;
  transform: translateY(var(--space-6));
  transition:
    opacity var(--t-reveal) var(--ease),
    transform var(--t-reveal) var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-d1 { transition-delay: 0.06s; }
.reveal-d2 { transition-delay: 0.14s; }
.reveal-d3 { transition-delay: 0.22s; }
.reveal-d4 { transition-delay: 0.30s; }

/* Sans JavaScript, tout reste visible */
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- MOUVEMENT RÉDUIT ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- IMPRESSION ---------- */

@media print {
  .nav, .menu-mobile, .saut-contenu, footer, .scroll-hint { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
}
