/* ==========================================================================
   Venaqi — En-tête / Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 4px 20px rgba(0, 0, 0, .06); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 24px;
}

/* ----- Logo ----- */
.site-logo { display: inline-flex; align-items: center; }
.site-logo--text {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.site-logo--text span { color: var(--color-primary); }
.site-logo--text:hover { color: var(--color-text); }
.custom-logo { max-height: 36px; width: auto; }

/* ----- Menu ----- */
.site-nav { display: flex; align-items: center; }

.primary-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.primary-menu__item { position: relative; }

.primary-menu__item > a,
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  background: none;
  border: none;
  border-radius: 6px;
}
.primary-menu__item > a:hover,
.dropdown-toggle:hover { background: var(--color-bg); color: var(--color-text); }

.dropdown-caret { transition: transform .2s ease; }

/* ----- Dropdown ----- */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .10);
  padding: 8px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.has-dropdown:hover .dropdown,
.has-dropdown.is-open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.has-dropdown:hover .dropdown-caret,
.has-dropdown.is-open .dropdown-caret { transform: rotate(180deg); }

.dropdown li a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
}
.dropdown li a:hover { background: var(--color-accent-bg); }
.dropdown__title { font-weight: 600; font-size: 15px; }
.dropdown__desc { font-size: 13px; color: var(--color-text-muted); }

.primary-menu__item--cta { margin-left: 4px; }
.primary-menu__item--cta:first-of-type { margin-left: 12px; }

/* ----- Burger ----- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
}
.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----- Responsive ----- */
@media (max-width: 980px) {
  .nav-toggle { display: flex; }

  .primary-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 16px 20px 40px;
    background: #fff;
    border-top: 1px solid var(--color-border);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .28s ease;
  }
  .primary-menu.is-open { transform: translateX(0); }

  .primary-menu__item > a,
  .dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 14px 12px;
    font-size: 17px;
    border-radius: var(--radius-sm);
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    min-width: 0;
    padding: 0 0 8px 12px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .has-dropdown.is-open .dropdown { max-height: 600px; }
  .has-dropdown:hover .dropdown { /* désactive le hover en mobile */ max-height: 0; }
  .has-dropdown.is-open:hover .dropdown { max-height: 600px; }

  .primary-menu__item--cta { margin: 8px 0 0; }
  .primary-menu__item--cta:first-of-type { margin-top: 16px; }
  .primary-menu__item--cta .btn { width: 100%; }
}
