/*
 * Hop We Care — Reset CSS
 * ─────────────────────────────────────────────────────────────────────────────
 * Basé sur le Custom CSS Reset de Josh W. Comeau + principes modern-normalize.
 * Minimal et intentionnel : aucun avis sur la typographie (délégué aux composants).
 * Dépend de tokens.css pour les custom properties.
 * ─────────────────────────────────────────────────────────────────────────────
 */

/* 1 — Box sizing universel ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2 — Suppression marges par défaut ────────────────────────────────────────── */
* {
  margin: 0;
}

/* 3 — Racine ───────────────────────────────────────────────────────────────── */
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  min-height: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-dark);
  background-color: var(--color-white-off);
}

/* 4 — Médias ────────────────────────────────────────────────────────────────── */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

/* 5 — Formulaires : héritage police ─────────────────────────────────────────── */
input,
button,
textarea,
select {
  font: inherit;
}

/* 6 — Prévention débordements texte ────────────────────────────────────────── */
p,
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* 7 — Liens ─────────────────────────────────────────────────────────────────── */
a {
  color: inherit;
  text-decoration: none;
}

/* 8 — Lien "Aller au contenu" (accessibilité) ──────────────────────────────── */
.skip-link {
  position: absolute;
  top: -9999px;
  left: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--color-teal);
  color: var(--color-white-off);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  z-index: var(--z-toast);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-white-off);
  outline-offset: 2px;
}

/* 9 — Utilitaire screen-reader only ─────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 10 — Focus visible accessible (anneau teal) ──────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 3px;
}

/* Supprime l'outline par défaut quand :focus-visible est supporté */
:focus:not(:focus-visible) {
  outline: none;
}

/* 11 — Listes sémantiques avec role="list" ──────────────────────────────────── */
ul[role="list"],
ol[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 12 — Mouvement réduit ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 13 — Print ─────────────────────────────────────────────────────────────────── */
@media print {
  .site-header,
  .site-footer nav {
    display: none;
  }
}
