/* ==========================================================================
   Reset minimal + styles de base (typographie, focus, accessibilité)
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.15;
  margin: 0;
  text-transform: uppercase;
}

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: none;
  line-height: 1.1;
}

h3 {
  font-size: var(--fs-h3);
}

p {
  margin: 0 0 var(--space-sm);
  color: var(--color-text-muted);
}

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

input,
textarea {
  font-family: inherit;
  font-size: var(--fs-body);
}

/* ---- Accessibilité clavier ---- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  z-index: 1000;
  padding: var(--space-xs) var(--space-md);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top var(--transition-fast);
}

.skip-link:focus-visible {
  top: var(--space-sm);
}

/* ---- Respect des préférences de 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;
    scroll-behavior: auto !important;
  }
}
