/* En-tête commun : reste dans le flux puis au-dessus du contenu pendant le défilement. */
html {
  --public-header-height: 11rem;
  overflow-x: hidden;
  scroll-padding-top: calc(var(--public-header-height) + 1rem);
}

/* Le masquage horizontal est porté par la racine, sans créer de conteneur de défilement sur body. */
body { overflow-x: visible; }
@supports (overflow-x: clip) {
  html { overflow-x: clip; }
}

body .site-header.home-site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  width: 100%;
  background: var(--forest, #173a32);
  box-shadow: 0 1px 0 rgba(244, 238, 223, .14), 0 8px 20px rgba(13, 43, 36, .12);
}

/* La réserve d’ancrage suit la hauteur réelle du menu, sans cumuler les anciennes marges. */
.home-page #prochaines-colos,
.home-page #premiere-colo,
.photo-page #album-title,
.home-site-header ~ main .candidate-progress {
  scroll-margin-top: 0;
}
.home-site-header ~ main .candidate-progress {
  top: calc(var(--public-header-height) + .75rem);
}
@media (min-width: 981px) {
  .home-site-header ~ main .faq-category-heading,
  .home-site-header ~ main .terms-toc {
    top: calc(var(--public-header-height) + 1.25rem);
  }
}

@media (max-width: 1000px) {
  html { --public-header-height: 5rem; }
  /* Sans JavaScript, le menu complet reste parcourable même sur un petit écran. */
  body .site-header.home-site-header:not(.is-enhanced) { position: relative; }
}

@media print {
  html { scroll-padding-top: 0; overflow: visible; }
  body .site-header.home-site-header {
    position: static;
    box-shadow: none;
  }
}
