/* ═══════════════════════════════════════════════
   ProfiSaison — Navigation CSS
   Fixed Nav, Dropdowns, Mobile Menu
   ═══════════════════════════════════════════════ */

/* ── Main Nav ─────────────────────────────────── */

.ps-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-height);
  background: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.ps-nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--chefchaouen);
}

.ps-nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ps-nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  height: 100%;
  font-family: var(--font-sans);
}

@media (min-width: 1024px) {
  .ps-nav__inner {
    padding: 0 2rem;
  }
}

/* ── Logo ─────────────────────────────────────── */

.ps-nav__logo {
  flex-shrink: 0;
}

.ps-nav__logo img {
  height: 40px;
  width: auto;
}

/* ── Desktop Menu ─────────────────────────────── */

.ps-nav__menu {
  display: none;
  align-items: center;
  gap: 0;
  margin-left: auto;
}

@media (min-width: 768px) {
  .ps-nav__menu {
    display: flex;
  }
}

/* ── Nav Items ────────────────────────────────── */

.ps-nav-item {
  position: relative;
}

.ps-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.5rem 1rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--van-dyke);
  text-decoration: none;
  transition: color 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.ps-nav-link:hover,
.ps-nav-link:focus {
  color: var(--chefchaouen);
}

.ps-nav-item.current-menu-item > .ps-nav-link,
.ps-nav-item.current-menu-ancestor > .ps-nav-link,
.ps-nav-item.current-menu-parent > .ps-nav-link {
  color: var(--chefchaouen);
}

/* ── Chevron ──────────────────────────────────── */

.ps-nav-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.ps-nav-has-dropdown:hover .ps-nav-chevron,
.ps-nav-has-dropdown.open .ps-nav-chevron {
  transform: rotate(180deg);
}

/* ── Dropdown ─────────────────────────────────── */

.ps-dropdown {
  position: absolute;
  top: 80px;
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  overflow: hidden;
  padding: 0.5rem 0;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.95);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.ps-nav-has-dropdown:hover .ps-dropdown,
.ps-nav-has-dropdown.open .ps-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.ps-dropdown-item {
  display: block;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: var(--van-dyke);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.ps-dropdown-item:hover {
  color: var(--chefchaouen);
  background: rgba(0, 0, 0, 0.02);
}

.ps-dropdown-item.current-menu-item {
  color: var(--chefchaouen);
  background: rgba(0, 0, 0, 0.02);
}

/* ── Contact Button ───────────────────────────── */

.ps-nav__contact {
  margin-left: 1.5rem;
}

.ps-nav__contact a {
  display: inline-block;
  padding: 0.625rem 1.5rem;
  border: 2px solid var(--van-dyke);
  color: var(--van-dyke);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-radius: 2px;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.ps-nav__contact a:hover {
  background: var(--chefchaouen);
  border-color: var(--chefchaouen);
  color: #fff;
}

/* ── Mobile Toggle ────────────────────────────── */

.ps-nav__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--van-dyke);
}

@media (min-width: 768px) {
  .ps-nav__toggle {
    display: none;
  }
}

.ps-nav__toggle svg {
  width: 28px;
  height: 28px;
}

/* ── Mobile Menu ──────────────────────────────── */

.ps-mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 49;
  overflow-y: auto;
  padding: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.ps-mobile-menu.open {
  display: block;
}

@media (min-width: 768px) {
  .ps-mobile-menu {
    display: none !important;
  }
}

.ps-mobile-menu__item {
  border-bottom: 1px solid var(--text-06);
}

.ps-mobile-menu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.05em;
  color: var(--van-dyke);
  text-decoration: none;
}

.ps-mobile-menu__link:hover {
  color: var(--chefchaouen);
}

.ps-mobile-menu__sub {
  display: none;
  padding-left: 1rem;
  padding-bottom: 0.5rem;
}

.ps-mobile-menu__sub.open {
  display: block;
}

.ps-mobile-menu__sub a {
  display: block;
  padding: 0.5rem 0;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: var(--text-70);
  text-decoration: none;
}

.ps-mobile-menu__sub a:hover {
  color: var(--chefchaouen);
}

.ps-mobile-menu__contact {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--van-dyke);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.05em;
  text-align: center;
  text-decoration: none;
  border-radius: 2px;
}
