/**
 * Header unifié – menu pro responsive pour toutes les pages
 * Un seul style : fond blanc, nav claire, dropdown Services, CTA
 */

/* ---- Barre principale ---- */
.nao-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.nao-header__bar {
  padding: 0.65rem 0;
}

.nao-header__bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nao-header__logo {
  flex-shrink: 0;
  display: block;
}

.nao-header__logo img {
  display: block;
  height: 64px;
  width: auto;
}

/* Bouton hamburger (masqué en desktop) */
.nao-header__burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.nao-header__burger:hover {
  background: #f3f4f6;
}

.nao-header__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #222;
  border-radius: 1px;
  margin: 0 auto;
  transition: transform 0.25s, opacity 0.25s;
}

.nao-header__burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nao-header__burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nao-header__burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav desktop ---- */
.nao-header__nav {
  display: none;
}

@media (min-width: 992px) {
  .nao-header__burger {
    display: none;
  }

  .nao-header__nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }

  .nao-header__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    row-gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .nao-header__list > li {
    position: relative;
  }

  .nao-header__list > li > a {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #222;
    text-decoration: none;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
  }

  .nao-header__list > li > a:hover {
    color: #5BBB7B;
    background: #f0fdf4;
  }

  /* Dropdown Services */
  .nao-header__item--dropdown {
    position: relative;
  }

  .nao-header__link--parent {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
  }

  .nao-header__link--parent .fa-chevron-down,
  .nao-header__link--parent .fa-solid {
    font-size: 0.7rem;
    transition: transform 0.2s;
  }

  .nao-header__item--dropdown:hover .nao-header__link--parent .fa-chevron-down,
  .nao-header__item--dropdown:hover .nao-header__link--parent .fa-solid {
    transform: rotate(180deg);
  }

  .nao-header__sub {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    margin: 4px 0 0;
    padding: 8px 0;
    list-style: none;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 1001;
  }

  .nao-header__item--dropdown:hover .nao-header__sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nao-header__sub li a {
    display: block;
    padding: 0.5rem 1.25rem;
    font-size: 0.9375rem;
    color: #374151;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
  }

  .nao-header__sub li a:hover {
    background: #f0fdf4;
    color: #5BBB7B;
  }

  .nao-header__cta {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

/* Padding sous le header fixe
   (éviter :first-of-type sur .body_content : le 1er div du .wrapper est souvent .preloader,
   donc le padding ne s'appliquait pas et tout le contenu passait sous la barre.) */
body:has(.nao-header) {
  padding-top: 0;
}

body:has(.nao-header) .body_content {
  padding-top: 58px;
}

/* ---- Overlay (mobile) ---- */
.nao-header__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1002;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.nao-header__overlay.is-open {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 992px) {
  .nao-header__overlay {
    display: none !important;
  }
}

/* ---- Tiroir mobile ---- */
.nao-header__drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  background: #fff;
  z-index: 1003;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
}

.nao-header__drawer.is-open {
  transform: translateX(0);
}

@media (min-width: 992px) {
  .nao-header__drawer {
    display: none !important;
  }
}

.nao-header__drawer-inner {
  padding: 2rem 1.5rem 3rem;
}

.nao-header__drawer-inner ul {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.nao-header__drawer-inner > ul > li {
  border-bottom: 1px solid #eee;
}

.nao-header__drawer-inner > ul > li > a {
  display: block;
  padding: 0.9rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: #222;
  text-decoration: none;
}

.nao-header__drawer-inner > ul > li > a:hover {
  color: #5BBB7B;
}

/* Sous-liste Services dans le tiroir */
.nao-header__drawer-parent ul {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0 0 0 1rem;
  border: none;
  display: none;
}

.nao-header__drawer-parent.is-open ul {
  display: block;
}

.nao-header__drawer-parent ul li {
  border: none;
}

.nao-header__drawer-parent ul a {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  color: #555;
  text-decoration: none;
}

.nao-header__drawer-parent ul a:hover {
  color: #5BBB7B;
}

.nao-header__drawer-parent > a {
  position: relative;
  padding-right: 1.5rem !important;
}

.nao-header__drawer-parent > a::after {
  content: '▾';
  position: absolute;
  right: 0.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: #6b7280;
  transition: transform 0.2s ease;
}

.nao-header__drawer-parent.is-open > a::after {
  transform: translateY(-50%) rotate(180deg);
}

.nao-header__drawer-inner .ud-btn {
  display: block;
  text-align: center;
  width: 100%;
}
