/* ══════════════════════════════════════════════════════════════
   QUATRE — NAV COMPONENT
   ═════════════════════════════════════════════════════════════ */

/* Par défaut : texte sombre (pages à fond clair) */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: transparent;
  border-bottom: none;
  color: #0f0f0f;
  transition: color 0.2s ease;
}

/* Section sombre détectée : nav passe en blanc */
.nav.is-dark {
  color: #ffffff;
}

.nav.is-dark .logo img {
  filter: brightness(0) invert(1);
}

.nav-inner {
  max-width: none;
  margin-inline: auto;
  padding: 0 var(--pad-x);
  min-height: clamp(76px, 4.4vw, 96px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: var(--text-base-size);
  line-height: var(--text-base-lh);
}

.nav-links a {
  opacity: 0.5;
  transition: opacity 0.25s ease;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-links a.is-active {
  opacity: 1;
}

/* Liens désactivés (soon) */
.nav-links .nav-disabled {
  color: rgba(0, 0, 0, 0.30);
  cursor: default;
  pointer-events: none;
}

.nav.is-dark .nav-links .nav-disabled {
  color: rgba(255, 255, 255, 0.30);
}

/* "Soon" en exposant dans la nav */
.nav-soon {
  font-family: "GTFlexaMono", monospace;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #e05c00;
  vertical-align: super;
  line-height: 0;
}

/* ─── Bouton Contact pill ─── */
.nav-contact-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: #0f0f0f;
  color: #ffffff;
  border-radius: 9999px;
  font-size: var(--text-base-size);
  line-height: var(--text-base-lh);
  white-space: nowrap;
  opacity: 1 !important;
  transition: transform 0.25s ease;
}

.nav-contact-btn:hover {
  transform: scale(1.04);
}

.nav.is-dark .nav-contact-btn {
  background: #ffffff;
  color: #0f0f0f;
}

/* Badge notification — hors du bouton, coin supérieur droit */
.nav-contact-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e02020;
  flex-shrink: 0;
  pointer-events: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  color: inherit;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

/* Mobile responsive */
@media (max-width: 820px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.96);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 14px;
    display: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links.is-open {
    display: flex;
  }
}

/* ── Nav dropdown (Expertise) ── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  /* Zone tampon invisible de 6px entre le trigger et la modale
     pour que la souris puisse y passer sans refermer le dropdown */
  padding-top: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
}

.nav-dropdown-menu-inner {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.13), 0 2px 6px rgba(0,0,0,0.07);
  white-space: nowrap;
  margin-top: 2px; /* ~8px sous "Expertise" au total (6px padding-top + 2px marge) */
}

.nav-dropdown-menu a {
  display: block;
  padding: 7px 14px;
  border-radius: 4px;
  color: #0f0f0f !important;
  opacity: 0.65;
  font-size: var(--text-sm-size);
  line-height: var(--text-sm-lh);
  transition: background 0.14s ease, opacity 0.14s ease;
}

.nav-dropdown-menu a:hover {
  background: rgba(0,0,0,0.04);
  opacity: 1;
}

/* Dark mode adaptations */
.nav.is-dark .nav-dropdown-menu-inner {
  background: #1a1a1a;
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}

.nav.is-dark .nav-dropdown-menu a {
  color: #ffffff !important;
}

.nav.is-dark .nav-dropdown-menu a:hover {
  background: rgba(255,255,255,0.08);
}

/* Mobile: dropdown inlined */
@media (max-width: 820px) {
  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .nav-dropdown-menu-inner {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 0 16px;
    gap: 0;
  }
  .nav-dropdown-menu a {
    color: rgba(255,255,255,0.65) !important;
    padding: 6px 0;
    font-size: var(--text-sm-size);
    border-radius: 0;
  }
  .nav-dropdown-menu a:hover {
    background: transparent;
    opacity: 1;
    color: #ffffff !important;
  }
}

/* ── Segmented control mode grille ── */
.grid-seg {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.055);
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 99px;
  padding: 3px;
  gap: 1px;
}

.grid-seg__btn {
  padding: 4px 13px;
  border-radius: 99px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  letter-spacing: 0.03em;
  color: rgba(0, 0, 0, 0.45);
  transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
  white-space: nowrap;
  line-height: 1.4;
}

.grid-seg__btn:hover:not(.is-active) {
  color: rgba(0, 0, 0, 0.70);
}

.grid-seg__btn.is-active {
  background: #0a0a0a;
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

/* Dark nav mode */
.nav.is-dark .grid-seg {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.18);
}
.nav.is-dark .grid-seg__btn {
  color: rgba(255, 255, 255, 0.50);
}
.nav.is-dark .grid-seg__btn:hover:not(.is-active) {
  color: rgba(255, 255, 255, 0.80);
}
.nav.is-dark .grid-seg__btn.is-active {
  background: #fff;
  color: #0a0a0a;
}
