/* Navigation enhancements — 20/08/2026
   Ajouts sobres : en-tête compact au défilement, repère de page actif,
   navigation interne légère sur les pages longues. */

/* 1) En-tête : compact au défilement sans modifier la structure du site */
body > nav:first-of-type,
.site-nav {
  transition: height .24s ease, box-shadow .24s ease, background-color .24s ease;
}

body > nav:first-of-type .nav-inner,
.site-nav .nav-inner,
body > nav:first-of-type .nav-wordmark,
.site-nav .nav-wordmark {
  transition: height .24s ease, font-size .24s ease, transform .24s ease;
}

body.nav-condensed > nav:first-of-type,
body.nav-condensed .site-nav {
  height: 62px !important;
  box-shadow: 0 8px 24px rgba(44, 51, 66, .09);
  background: rgba(245, 239, 230, .985) !important;
}

body.nav-condensed > nav:first-of-type .nav-logo,
body.nav-condensed .site-nav .nav-logo {
  height: 44px !important;
}

body.nav-condensed > nav:first-of-type .nav-wordmark,
body.nav-condensed .site-nav .nav-wordmark {
  font-size: 1.2rem !important;
}

body.nav-condensed > .nav-mobile,
body.nav-condensed .nav-mobile {
  top: 62px !important;
}

/* 2) Repère de page actif : un filet doré plutôt qu'un gros cartouche */
.nav-links a:not(.nav-cta):not(.nav-need) {
  position: relative;
}

.nav-links a:not(.nav-cta):not(.nav-need).active,
.nav-links a:not(.nav-cta):not(.nav-need)[aria-current="page"] {
  color: var(--or, var(--gold, #C79441)) !important;
  background: transparent !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  border-bottom: 0 !important;
}

.nav-links a:not(.nav-cta):not(.nav-need).active::after,
.nav-links a:not(.nav-cta):not(.nav-need)[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -.58rem;
  width: 22px;
  height: 1px;
  background: var(--or, var(--gold, #C79441));
  transform: translateX(-50%);
}

/* 3) Navigation interne des pages longues */
.section-jump-nav {
  position: sticky !important;
  top: 76px !important;
  left: auto !important;
  right: auto !important;
  z-index: 82 !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: rgba(245, 239, 230, .96) !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(199, 148, 65, .22) !important;
  box-shadow: 0 8px 18px rgba(44, 51, 66, .045) !important;
  backdrop-filter: blur(14px) !important;
  overflow: visible !important;
}

body.nav-condensed .section-jump-nav {
  top: 62px !important;
}

.section-jump-inner {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: .15rem !important;
  width: min(100% - 3rem, 1080px) !important;
  max-width: 1080px !important;
  margin: 0 auto !important;
  padding: .45rem 0 !important;
  background: transparent !important;
  border: 0 !important;
  overflow-x: auto !important;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.section-jump-inner::-webkit-scrollbar {
  display: none;
}

.section-jump-nav a {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex !important;
  align-items: center;
  min-height: 34px;
  padding: .42rem .8rem !important;
  border: 0 !important;
  border-radius: 999px;
  background: transparent !important;
  color: var(--text-soft, #5A6B7A) !important;
  font-family: "Inter", sans-serif;
  font-size: .67rem !important;
  font-weight: 600 !important;
  line-height: 1.1;
  letter-spacing: .07em !important;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease;
}

.section-jump-nav a:hover,
.section-jump-nav a.is-active {
  color: var(--anthracite, #2C3342) !important;
  background: rgba(199, 148, 65, .13) !important;
}

.section-jump-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: .2rem;
  width: 18px;
  height: 1px;
  background: var(--or, var(--gold, #C79441));
  transform: translateX(-50%);
}

/* Les ancres ne doivent pas disparaître derrière les deux niveaux de navigation. */
[data-jump-target],
#strategie, #web, #graphique, #reseaux, #presse, #tarifs,
#projets, #atelier-coutellerie-sophie, #clochette-et-coupon,
#etudes-prospectives, #a-propos-projets, #choix, #vocabulaire, #accompagnement {
  scroll-margin-top: 142px;
}

@media (max-width: 1180px) {
  .section-jump-inner {
    justify-content: flex-start;
    width: 100% !important;
    padding-left: 1.15rem !important;
    padding-right: 1.15rem !important;
  }
}

@media (max-width: 680px) {
  body.nav-condensed > nav:first-of-type,
  body.nav-condensed .site-nav {
    height: 58px !important;
  }

  body.nav-condensed > .nav-mobile,
  body.nav-condensed .nav-mobile {
    top: 58px !important;
  }

  .section-jump-nav {
    top: 68px !important;
  }

  body.nav-condensed .section-jump-nav {
    top: 58px !important;
  }

  .section-jump-nav a {
    min-height: 32px;
    padding: .4rem .72rem !important;
    font-size: .64rem !important;
  }

  [data-jump-target],
  #strategie, #web, #graphique, #reseaux, #presse, #tarifs,
  #projets, #atelier-coutellerie-sophie, #clochette-et-coupon,
  #etudes-prospectives, #a-propos-projets, #choix, #vocabulaire, #accompagnement {
    scroll-margin-top: 124px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body > nav:first-of-type,
  .site-nav,
  body > nav:first-of-type .nav-inner,
  .site-nav .nav-inner,
  .section-jump-nav a {
    transition: none !important;
  }
}
