/* A discreet active state that follows the visible section on all four layouts. */
body { --scrollspy-accent: #b2883e; }
body.modern-site { --scrollspy-accent: #087a63; }
body.prestige-site { --scrollspy-accent: #efcf90; }

/* Keep the navigation visible in the original design, too. */
body > header:not(.site-header) {
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 6px 20px rgba(6, 41, 33, .06);
}

header nav[aria-label="Navigation principale"] > a.scrollspy-active:not(.nav-register) {
  color: var(--scrollspy-accent);
  position: relative;
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease;
}
header nav[aria-label="Navigation principale"] > a.scrollspy-active:not(.nav-register)::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.primary-nav > a.nav-register.scrollspy-active {
  outline: 2px solid var(--scrollspy-accent);
  outline-offset: 4px;
  transition: outline-color 180ms ease, background-color 180ms ease;
}

@media (max-width: 800px) {
  .primary-nav > a.scrollspy-active:not(.nav-register) {
    border-left: 3px solid var(--scrollspy-accent);
    padding-left: 12px;
  }
  .primary-nav > a.scrollspy-active:not(.nav-register)::after { display: none; }
}
@media (max-width: 650px) {
  body > header:not(.site-header) {
    height: auto;
    min-height: 76px;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 5% 0;
  }
  body > header:not(.site-header) nav {
    display: flex;
    order: 3;
    flex-basis: 100%;
    gap: 22px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 0 12px;
  }
  html:has(body > header:not(.site-header)) { scroll-padding-top: 130px; }
  body > header:not(.site-header) nav a.scrollspy-active::after { bottom: -4px; }
}
