/* ==========================================================================
   BASE — remise à zéro et typographie par défaut
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  background-color: var(--c-surface);
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: var(--lh-body);
  font-weight: var(--w-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

button { cursor: pointer; }

a {
  color: var(--c-brand-700);
  text-decoration-color: var(--c-brand-300);
  text-underline-offset: 0.2em;
}

a:hover { text-decoration-color: currentColor; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: var(--w-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  text-wrap: balance;
}

h1 { font-size: var(--t-4xl); font-weight: var(--w-bold); }
h2 { font-size: var(--t-3xl); }
h3 { font-size: var(--t-xl); }
h4 { font-size: var(--t-lg); letter-spacing: -0.012em; }

p { text-wrap: pretty; }

/* Référence technique en ligne (numéro de document, identifiant) hors des
   composants dédiés — cf. DESIGN-TOKENS.md §5, usage de --f-mono. */
.text-mono {
  font-family: var(--f-mono);
  letter-spacing: var(--ls-mono);
}

ul, ol { padding-inline-start: 1.15rem; }

hr {
  border: 0;
  border-top: 1px solid var(--c-line);
}

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

:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

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

.skip-link {
  position: absolute;
  inset-inline-start: var(--s-4);
  inset-block-start: -4rem;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background-color: var(--c-brand-700);
  color: var(--c-ink-inverse);
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: inset-block-start var(--dur-fast) var(--ease);
}

.skip-link:focus { inset-block-start: var(--s-4); }

@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;
  }
}
