/* =============================================================
   BASE — reset, typographie, layout global
   ============================================================= */

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Empêche les ancres de se cacher sous la nav fixe */
  scroll-padding-top: 120px;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

/* === TYPOGRAPHIE === */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-semi);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(var(--text-4xl), 7vw, var(--text-6xl)); }
h2 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); }
h3 { font-size: var(--text-2xl); }

p { text-wrap: pretty; }

/* === FOCUS — visible et lisible sur toutes surfaces === */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* === LAYOUT === */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-5);
}
.container--narrow { max-width: var(--container-narrow); }

/* === SKIP LINK === */
.skip-link {
  position: fixed;
  top: -100px;
  left: var(--s-4);
  z-index: 999;
  background: var(--navy);
  color: var(--paper);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  font-weight: var(--fw-semi);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--s-4); }

/* === PLACEHOLDERS — sections vides pour tester la nav === */
.section-placeholder {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.section-placeholder--hero { background: var(--navy); }
.section-placeholder--hero .placeholder-label { color: rgba(255,255,255,.5); border-color: rgba(255,255,255,.2); }
.section-placeholder--alt { background: var(--paper-alt); }
.placeholder-label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--muted);
  padding: var(--s-3) var(--s-4);
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
}

/* === REDUCED MOTION — tiering, pas kill-switch === */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Utilitaire : masquer visuellement, garder accessible */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}