/* ═══════════════════════════════════════════════════════
   NAVIGATION — header, mobile drawer
   ═══════════════════════════════════════════════════════ */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}

/* Sur la homepage, la nav est transparente par défaut */
.site-nav--hero {
  background: transparent;
  border-bottom-color: transparent;
}

/* Après scroll ou hover sur hero-nav */
.site-nav--hero.site-nav--scrolled,
.site-nav--scrolled {
  background: var(--c-surface);
  border-bottom-color: var(--c-border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

/* ─── Logo ─────────────────────────────────────────────── */
.nav-logo img {
  height: 40px;
  width: auto;
  display: block;
  transition: var(--transition);
}
.nav-logo:hover img {
  opacity: .8;
}

/* ─── Liens desktop ────────────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.nav-links a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--c-text);
  padding: .4rem .75rem;
  border-radius: var(--radius-sm);
  position: relative;
  transition: var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: .75rem; right: .75rem;
  height: 2px;
  background: var(--c-primary);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform .2s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--c-primary);
}
.nav-links a.active::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-links a.btn-primary {
  color: #fff;
}

/* Couleurs nav sur fond sombre (hero transparent) */
.site-nav--hero:not(.site-nav--scrolled) .nav-links a {
  color: rgba(255,255,255,.9);
}
.site-nav--hero:not(.site-nav--scrolled) .nav-links a:hover,
.site-nav--hero:not(.site-nav--scrolled) .nav-links a.active {
  color: #fff;
}
.site-nav--hero:not(.site-nav--scrolled) .nav-links a::after {
  background: #fff;
}

/* ─── Bouton CTA ───────────────────────────────────────── */
.nav-cta {
  margin-left: var(--sp-4);
  padding: .5rem 1.25rem;
  font-size: .875rem;
}

/* ─── Burger mobile ────────────────────────────────────── */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-burger:hover {
  background: var(--c-primary-10);
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: var(--transition);
}
.site-nav--hero:not(.site-nav--scrolled) .nav-burger span {
  background: #fff;
}
.nav-burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-burger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Mobile drawer ────────────────────────────────────── */
.mobile-nav {
  position: fixed;
  top: 0; right: 0;
  z-index: 1100;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--c-surface);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: -8px 0 40px rgba(0,0,0,.15);
}
.mobile-nav--open {
  transform: translateX(0);
}

.mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--c-border);
}
.mobile-nav__header img {
  height: 36px;
  width: auto;
}
.mobile-nav__close {
  background: none;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--c-text-muted);
  transition: var(--transition);
}
.mobile-nav__close:hover {
  background: var(--c-bg);
  color: var(--c-text);
}

.mobile-nav__links {
  padding: var(--sp-4) var(--sp-4);
  flex: 1;
}
.mobile-nav__links a {
  display: block;
  padding: .875rem var(--sp-4);
  font-weight: 500;
  font-size: 1rem;
  color: var(--c-text);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.mobile-nav__links a:hover,
.mobile-nav__links a.active {
  color: var(--c-primary);
  background: var(--c-primary-10);
}

.mobile-nav__footer {
  padding: var(--sp-6);
  border-top: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.mobile-nav__footer a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: .875rem;
  color: var(--c-text-muted);
}
.mobile-nav__footer a:hover {
  color: var(--c-primary);
}
.mobile-nav__footer i {
  width: 16px;
  text-align: center;
  color: var(--c-primary);
}

/* ─── Backdrop ──────────────────────────────────────────── */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0,0,0,.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.nav-backdrop--visible {
  opacity: 1;
  pointer-events: auto;
}

/* ─── Scroll to top ────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: 900;
  width: 44px;
  height: 44px;
  background: var(--c-primary);
  color: #fff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: var(--transition);
  box-shadow: var(--shadow-primary);
}
.scroll-top--visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.scroll-top:hover {
  background: var(--c-primary-hover);
  transform: translateY(-2px);
  color: #fff;
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links,
  .nav-cta {
    display: none;
  }
  .nav-burger {
    display: flex;
  }
}
