/* =============================================
   NAV.CSS — Navigation fixe + menu hamburger mobile
   ============================================= */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 64px;
  background: rgba(13, 15, 20, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

/* Logo */
.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  z-index: 101;
}

.nav-logo span {
  color: var(--accent);
}

/* Liens desktop */
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
  border-radius: 2px;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  width: 100%;
}

/* Bouton CTA */
.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-weight: 500 !important;
  transition: opacity 0.2s !important;
}

.nav-cta:hover {
  opacity: 0.85;
}

.nav-cta::after {
  display: none !important;
}

/* Hamburger button */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}

.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger → X animation */
.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu overlay */
.nav-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 15, 20, 0.97);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.nav-mobile-menu.open {
  display: flex;
}

.nav-mobile-menu a {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}

.nav-mobile-menu a:hover,
.nav-mobile-menu a.active {
  color: #fff;
}

.nav-mobile-menu .nav-cta-mobile {
  font-size: 1.2rem !important;
  color: var(--accent) !important;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }
}
