/* =========================================================================
   MOMA — Reset
   Reset moderne et minimal. Ne contient aucune decision esthetique :
   celles-ci vivent dans base.css et typography.css.
   ========================================================================= */

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

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

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote,
dl, dd, ol, ul {
  margin: 0;
  padding: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Les titres ne doivent jamais heriter d'une graisse ou d'une taille
   qui empecherait de choisir le niveau semantique correct. */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* Media : jamais de debordement horizontal, jamais d'espace fantome sous
   les images (display: block). */
img,
picture,
video,
canvas,
svg,
iframe {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

iframe {
  border: 0;
}

/* Les controles de formulaire n'heritent pas de la police par defaut. */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration-skip-ink: auto;
}

/* Cible tactile : jamais en dessous de 24x24 CSS px (WCAG 2.2, SC 2.5.8).
   Les composants interactifs visent 44x44 dans components.css. */
button,
a[href],
[role="tab"] {
  min-height: 24px;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Ancrage : compense la hauteur du header sticky pour que la cible d'une
   ancre ne se retrouve pas cachee dessous. */
:target {
  scroll-margin-top: calc(var(--header-h) + var(--sp-5));
}

/* Reduction de mouvement : neutralise tout, y compris le smooth scroll.
   Regle globale et non negociable. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
