/* ===== Header custom global ===== */
.home-header {
  --hh-primary: #2c5f2d; /* Secondary / Green — couleur du hover CTA */
  --hh-dark: #181818; /* Primary / Black */
  --hh-light: #fcfaf4; /* Background (blanc cassé) */
  --hh-text: #3a3a3a; /* Text */
  --hh-accent: #d4a373; /* Accent */
  --hh-radius: 9999px;

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0;
  transition: padding 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2.25rem 1rem 2.25rem;
  background: var(--hh-light);
  border-radius: 0;
  box-shadow: none;
  transition:
    padding 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.4s ease,
    box-shadow 0.4s ease,
    border-radius 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Logo */
.home-header__logo img {
  max-height: 85px;
  width: auto;
  display: block;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@media screen and (max-width: 767px) {
  .home-header__logo img {
    max-height: 60px;
  }
}

.home-header__logo-text {
  font-weight: 700;
  color: var(--hh-dark);
  text-decoration: none;
  font-size: 1.25rem;
}

/* Menu desktop */
.home-header__menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.home-header__menu a {
  color: var(--hh-dark);
  font-weight: 500;
  text-decoration: none;
  transition:
    opacity 0.3s,
    color 0.3s;
}
.home-header__menu a:hover {
  opacity: 0.65;
}

/* CTA */
.home-header__cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.5rem;
  background: var(--hh-primary);
  color: #fff;
  border-radius: 9999px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background 0.3s ease,
    transform 0.3s ease;
}
.home-header__cta-btn svg {
  width: 15px;
  height: 15px;
  transition: transform 0.3s ease;
}
.home-header__cta-btn:hover {
  background: var(--hh-light);
  transform: translateY(-2px);
  color: var(--hh-primary);
}
.home-header__cta-btn:hover svg {
  transform: translate(2px, -2px);
}

/* Burger (caché en desktop) */
.home-header__burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 16px !important;
  border: 0;
  border-radius: 100px;
  background: transparent;
  cursor: pointer;
  z-index: 1002;
}
.home-header__burger span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: white;
  border-radius: 2px;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease,
    background 0.3s ease;
}

/* ===== Sticky : pill flottant + shrink ===== */
.home-header.is-sticky {
  padding: 0.85rem 1rem;
}
.home-header.is-sticky .home-header__inner {
  padding: 0.6rem 1.5rem;
  background: var(--hh-light);
  border-radius: var(--hh-radius);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.1);
}
.home-header.is-sticky .home-header__logo img {
  max-height: 70px;
}
.home-header.is-sticky .home-header__menu a,
.home-header.is-sticky .home-header__logo-text {
  color: var(--hh-dark);
}

/* ===== Home : transparent par-dessus le hero ===== */
body.home .home-header:not(.is-sticky) .home-header__inner {
  background: transparent;
  box-shadow: none;
}
body.home .home-header:not(.is-sticky) .home-header__menu a,
body.home .home-header:not(.is-sticky) .home-header__logo-text {
  color: var(--hh-light);
}
body.home .home-header:not(.is-sticky) .home-header__burger span {
  background: var(--hh-light);
}

/* ===== Pages internes : compense le header fixed ===== */
body:not(.home) {
  padding-top: 96px;
}
#masthead {
  background: transparent !important;
  box-shadow: none !important;
}

/* ===== Panneau mobile (caché par défaut) ===== */
.home-header__panel {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #fcfaf4;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition:
    opacity 0.4s ease,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.4s;
}
.home-header__panel-nav {
  width: 100%;
  max-height: 100vh;
  overflow-y: auto;
  padding: 6rem 2rem 2rem; /* haut dégagé pour le burger-croix */
}
.home-header__panel-menu {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
}

/* Item de 1er niveau : lien + chevron sur une ligne, sous-menu en dessous */
.home-header__panel-menu > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.home-header__panel-menu > li > a {
  display: inline-block;
  padding: 0.75rem 0;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--hh-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}
.home-header__panel-menu > li > a:hover {
  color: var(--hh-primary);
}

/* Bouton chevron (injecté en JS) */
.home-header__submenu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: 0.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--hh-dark);
  cursor: pointer;
}
.home-header__submenu-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.home-header__panel-menu > li.is-open > .home-header__submenu-toggle svg {
  transform: rotate(180deg);
}

/* Sous-menu : accordéon (max-height piloté en JS) */
.home-header__panel-menu .sub-menu {
  flex-basis: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.home-header__panel-menu .sub-menu a {
  display: block;
  padding: 0.55rem 0;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--hh-dark);
  opacity: 0.75;
  text-decoration: none;
  transition:
    color 0.3s ease,
    opacity 0.3s ease;
}
.home-header__panel-menu .sub-menu a:hover {
  color: var(--hh-primary);
  opacity: 1;
}

.home-header__panel-cta {
  text-align: center;
  margin-top: 1rem;
}
.home-header__panel-cta .home-header__cta-btn {
  background: black;
  font-size: 1.05rem;
}

/* ===== État ouvert ===== */
body.hh-panel-open {
  overflow: hidden;
}
.home-header__panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.home-header__burger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.home-header__burger.is-active span:nth-child(2) {
  opacity: 0;
}
.home-header__burger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Breakpoint mobile ===== */
@media (max-width: 921px) {
  .home-header__nav {
    display: none;
  }
  .home-header > .home-header__inner > .home-header__cta {
    display: none;
  }
  .home-header__burger {
    display: flex;
  }
}
