/**
 * base.css — Reset global & styles de base Altair Architecture
 * ============================================================
 * Styles universels applicables à TOUTES les pages du site.
 * À charger APRÈS tokens.css et AVANT les fichiers de page.
 *
 * Contenu :
 *   — Reset box-sizing
 *   — body
 *   — préférences accessibilité (reduced-motion)
 *   — styles focus visible
 */

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

html {
  overflow-y: scroll;          /* établit le contexte + scrollbar toujours présente */
  scrollbar-gutter: stable;    /* maintenant pris en compte */
}


body {
  font-family:      var(--font-family);
  font-weight:      var(--font-weight-light);
  background-color: var(--color-background);
  color:            var(--color-text);
  padding:          var(--body-padding);
  scrollbar-gutter: stable;
}

/* ═══════════════════════════════════════════════
   TITRES — h1 à h6
   Câblés sur l'échelle --fs-h* de tokens.css.
   La hiérarchie visuelle repose sur la TAILLE + le POIDS.
   Les pages ne redéfinissent QUE leurs écarts.
   ═══════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family:     var(--font-family);
  color:           var(--color-heading);
  line-height:     var(--line-height-tight);
  letter-spacing:  var(--letter-spacing-heading);
  text-wrap:       balance;   /* évite les veuves sur les titres */
  margin:          0 0 var(--space-md);
}

h1 { font-size: var(--fs-h1); font-weight: var(--font-weight-bold); }
h2 { font-size: var(--fs-h2); font-weight: var(--font-weight-bold); }
h3 { font-size: var(--fs-h3); font-weight: var(--font-weight-semibold);  }
h4 { font-size: var(--fs-h4); font-weight: var(--font-weight-semibold);  }
h5 { font-size: var(--fs-h5); font-weight: var(--font-weight-regular); }
h6 {
  font-size:      var(--fs-h6);
  font-weight:    var(--font-weight-regular);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;   /* h6 = label discret */
}

/* ═══ Corps de texte ═══ */
p {
  font-size:   var(--fs-base);
  line-height: var(--line-height-body);
  color:       var(--color-text);
  text-align:     justify;
}
p + p { margin-top: var(--space-md); }

/* Longueur de ligne lisible pour le texte courant.
   À activer sur un conteneur éditorial, pas globalement,
   pour ne pas brider les grilles/overlays. */
.prose { max-width: var(--measure); }
.prose h1, 
.prose h2 { margin-top: var(--space-3xl); }
.prose h3 { margin-top: var(--space-2xl); }
.prose h4,
.prose h5,
.prose h6 { margin-top: var(--space-xl); }
.prose > :first-child { margin-top: 0; }



main {
  padding: var(--space-xl);   /* marge intérieure, responsive */
}

/* ═══ Préférences accessibilité ═══ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration:        0.01ms !important;
    transition-duration:       0.01ms !important;
    animation-iteration-count: 1;
  }
}

/* ═══ Focus visible (accessibilité clavier) ═══ */
/* Les règles spécifiques aux composants (filter-btn, card-link…)
   sont dans components.css ou pages/projets.css.            */
   
   
   .visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}



   