/* ================================
   HEADER GLOBAL
================================ */
#header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: background 0.3s ease, transform .4s cubic-bezier(0.23, 1, 0.32, 1), height 0.3s;
  background: transparent;
}

/* #header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #141313 0%, rgba(20, 19, 19, 0) 100%);
  z-index: 0;
} */

.home #header {
  background: transparent !important;
}

#header.scrolled { 
  border-bottom: 0;
  transform: none;
}

.header-inner {
  margin: 0 auto;
  padding: 22px 20px 0;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  background: transparent;
}

/* ================================
   LOGO
================================ */
.logo {
  position: relative;
  z-index: 1000;
}

.logo img {
  height: 68px;
  width: auto;
  transition: all 0.3s ease;
}

/* ================================
   BOUTON BURGER
================================ */
.menu-toggle {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 1300; /* toujours au-dessus du blur */
}

.menu-toggle span {
  position: absolute;
  width: 100%;
  height: 3px;
  background: #111;
  border-radius: 3px;
  transition: all 0.8s ease;
}

.menu-toggle span:nth-child(1) {
  top: 0;
}
.menu-toggle span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}
.menu-toggle span:nth-child(3) {
  bottom: 0;
}
 
/* Animation croix */
.menu-toggle.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  background: #fff;
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
  background: #fff;
}

/* ================================
   MENU MOBILE
================================ */
#nav-main {
  position: absolute;
  top: 24px;
  left: 50%;
  height: auto;
  display: flex;
  align-items: center;
  z-index: 1;
  width: fit-content !important;
  max-width: calc(100% - 32px);
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateX(-50%) scale(1);
  transform-origin: center top;
  transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 450ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  #nav-main:hover {
    transform: translateX(-50%) scale(1.04);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  }
}

#nav-main ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#nav-main ul.menu {
  display: flex;
  align-items: center;
  gap: 30px;
  white-space: nowrap;
  width: max-content;
  min-width: max-content;
}

#nav-main ul.menu > li {
  display: block;
  flex: 0 0 auto;
  margin: 0;
  border-radius: 999px;
}

#nav-main a {
  color: #1e1e1e;
  text-decoration: none;
  font-size: 16px;
  padding: 8px 18px;
  display: block;
  border-radius: 999px;
  transition: color 0.3s, background-color 0.3s;
}

#nav-main ul.menu > li.current-menu-item > a {
  background: rgba(237, 116, 141, 0.8);
  color: #fff;
}

#nav-main ul.menu > li:hover > a,
#nav-main ul.menu > li.current-menu-item:hover > a {
  background: rgba(237, 116, 141, 0.8);
  color: #fff;
}

#nav-main ul.menu:has(> li:hover) > li.current-menu-item:not(:hover) > a {
  background: transparent;
  color: #1e1e1e;
}

/* ================================
   OVERLAY FLUO + BLUR
================================ */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
  z-index: 1100; /* au-dessus du header, sous le menu */
}

.menu-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

@media (max-width: 991px) {
  .header-inner {
    height: auto;
    padding-top: 16px;
    justify-content: center;
  }

  .logo-container {
    display: none;
  }

  #nav-main {
    position: static;
    top: 16px;
    width: fit-content !important;
    max-width: calc(100% - 24px);
    height: auto;
    transform: scale(1);
    justify-content: center;
    padding: 8px 14px;
  }

  #nav-main ul.menu {
    width: 100%;
    min-width: 0;
    justify-content: center;
    gap: 16px;
    flex-wrap: nowrap;
  }

  #nav-main a {
    font-size: 14px;
    padding: 8px 12px;
  }

  #nav-main:hover {
    transform: scale(1.04);
  }

  .menu-toggle,
  .menu-overlay,
  #nav-main .socials,
  .header-cta {
    display: none;
  }
}

/* Quand le menu est ouvert, header sous le blur */
body.menu-open #header {
  z-index: 1000; /* sous overlay (1100) mais au-dessus du contenu */
}

/* ================================
   RESEAUX SOCIAUX
================================ */
.socials {
  display: flex;
  gap: 2px;
  padding: 0;
  width: 100%;
}

.socials li {
  width: 50%;
}

.socials a {
  color: white;
  font-size: 20px;
  transition: color 0.3s;
  background: var(--enzomichaud-color-main-70);
  text-align: center;
}

.socials a:hover {
  color: var(--enzomichaud-color-main-90);
}

.menu li.current_page_item a {
  background: transparent;
}

.menu li.current_page_item a:hover {
  color: var(--enzomichaud-color-main) !important;
}

/* ================================
   HEADER CTA (téléphone)
================================ */
.header-cta {
  display: none;
}