/* ==========================================================================
   Base : reset léger, typographie, accessibilité.
   ========================================================================== */

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

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

/* Le pied de page reste en bas même sur une page courte. */
body {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  margin: 0;
  overflow-x: hidden;
  background: var(--color-ivory);
  color: var(--color-navy);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
}

.site-main {
  flex: 1 0 auto;
}

/* Marges par défaut du navigateur retirées hors du contenu éditable
   (content.css gère son propre rythme vertical). */
:where(h1, h2, h3, h4, p, ul, ol, figure, blockquote) {
  margin: 0;
}

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

img {
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
}

/* Arrière-plan ivoire et halos, derrière tout le contenu. */
.association-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 30%, rgb(253 172 13 / 10%), transparent 22%),
    radial-gradient(circle at 92% 31%, rgb(253 172 13 / 8%), transparent 20%),
    radial-gradient(ellipse at 50% 0%, rgb(255 255 255 / 80%), transparent 55%),
    var(--color-ivory);
}

/* Masqué à l'écran, lu par les lecteurs d'écran. */
.visually-hidden,
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.u-nowrap {
  white-space: nowrap;
}

/* Lien d'évitement : visible uniquement au clavier. */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-small);
  background: var(--color-navy);
  color: var(--color-white);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
