/* Wrapper général du hamburger */
#custom-hamburger-wrapper {
  position: relative;
  z-index: 999999 !important;
  overflow: visible;
}

#custom-hamburger-wrapper.position-top {
  position: absolute;
  top: 0;
  right: 0;
  margin: 20px 30px 0 0;
}

/* Icône hamburger */
#custom-hamburger-icon {
  width: 35px;
  height: 38px;
  cursor: pointer;
  position: relative;
  z-index: 1000000 !important;
  overflow: visible;
}

#custom-hamburger-icon span {
  background: #1980ff;
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  margin: 0;
  transition: 0.3s ease;
  transform-origin: center;
}

/* Position des barres */
#custom-hamburger-icon span:nth-child(1) {
  top: 4px;
}
#custom-hamburger-icon span:nth-child(2) {
  top: 17px;
}
#custom-hamburger-icon span:nth-child(3) {
  top: 30px;
}

/* Animation en croix */
#custom-hamburger-icon.open span:nth-child(1) {
  transform: rotate(45deg);
  top: 16px;
}
#custom-hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}
#custom-hamburger-icon.open /* Wrapper général du hamburger */
#custom-hamburger-wrapper {
  position: relative;
  z-index: 999999 !important;
  overflow: visible;
}

#custom-hamburger-wrapper.position-top {
  position: absolute;
  top: 0;
  right: 0;
  margin: 20px 30px 0 0;
}

/* Icône hamburger */
#custom-hamburger-icon {
  width: 35px;
  height: 38px;
  cursor: pointer;
  position: relative;
  z-index: 1000000 !important;
  overflow: visible;
}

#custom-hamburger-icon span {
  background: #1980ff;
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  margin: 0;
  transition: 0.3s ease;
  transform-origin: center;
}

/* Position des barres */
#custom-hamburger-icon span:nth-child(1) {
  top: 4px;
}
#custom-hamburger-icon span:nth-child(2) {
  top: 17px;
}
#custom-hamburger-icon span:nth-child(3) {
  top: 30px;
}

/* Animation en croix */
#custom-hamburger-icon.open span:nth-child(1) {
  transform: rotate(45deg);
  top: 16px;
}
#custom-hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}
#custom-hamburger-icon.open span:nth-child(3) {
  transform: rotate(-45deg);
  top: 16px;
}

/* Menu déroulant */
#custom-hamburger-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #1e1e1e;
  color: #fff;
  padding: 1rem;
  max-width: 350px;
  min-width: 250px;
  max-height: 60vh;
  overflow-y: auto; /* ← Ajouté pour scroll vertical */
  z-index: 9999;
  display: none;
}

.menu-hidden {
  display: none;
}

#custom-hamburger-menu:not(.menu-hidden) {
  display: block;
}

/* Liste */
.hamburger-nav,
.hamburger-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Cacher les sous-menus de niveau 3 */
#custom-hamburger-menu ul ul ul {
  display: none;
}

/* Afficher niveau 3 si parent ouvert */
#custom-hamburger-menu li.menu-open > ul {
  display: block;
}

/* Supprimer toutes les fausses flèches du thème */
#custom-hamburger-menu li.menu-item-has-children > a::after,
#custom-hamburger-menu ul ul > li.menu-item-has-children > a::after,
.hamburger-nav .menu-item-has-children.menu-open > a::after {
  content: none;
}

/* Bouton flèche injecté par JS */
#custom-hamburger-menu .submenu-toggle {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 0.8em;
  margin-left: 5px;
  cursor: pointer;
  font-family: inherit;
  vertical-align: middle;
}

/* RESET des LI : plus de padding ni bordure ici */
.hamburger-nav li {
  margin: 0;
  padding: 0;
}

/* Liens de menu */
.hamburger-nav li a {
  color: #fff !important;
  font-family: 'Questrial', sans-serif;
  font-weight: bold;
  text-decoration: none;
  display: block;
  padding: 0.9rem 0;
  font-size: 1.4rem;
  border-bottom: 2px solid white;
}

/* Sous-menus (niveaux 2 et 3) : indentation + taille réduite */
.hamburger-nav ul.sub-menu {
  padding-left: 1.8rem;
}

.hamburger-nav ul.sub-menu li a {
  font-size: 1.1rem;
  color: #fff !important;
}
 {
  transform: rotate(-45deg);
  top: 16px;
}

/* Menu déroulant */
#custom-hamburger-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #1e1e1e;
  color: #fff;
  padding: 1rem;
  max-width: 350px;
  min-width: 250px;
  z-index: 9999;
  display: none;
}

.menu-hidden {
  display: none;
}

#custom-hamburger-menu:not(.menu-hidden) {
  display: block;
}

/* Liste */
.hamburger-nav,
.hamburger-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Cacher les sous-menus de niveau 3 */
#custom-hamburger-menu ul ul ul {
  display: none;
}

/* Afficher niveau 3 si parent ouvert */
#custom-hamburger-menu li.menu-open > ul {
  display: block;
}

/* Supprimer toutes les fausses flèches du thème */
#custom-hamburger-menu li.menu-item-has-children > a::after,
#custom-hamburger-menu ul ul > li.menu-item-has-children > a::after,
.hamburger-nav .menu-item-has-children.menu-open > a::after {
  content: none;
}

/* Bouton flèche injecté par JS */
#custom-hamburger-menu .submenu-toggle {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 0.8em;
  margin-left: 5px;
  cursor: pointer;
  font-family: inherit;
  vertical-align: middle;
}

/* RESET des LI : plus de padding ni bordure ici */
.hamburger-nav li {
  margin: 0;
  padding: 0;
}

/* Liens de menu */
.hamburger-nav li a {
  color: #fff !important;
  font-family: 'Questrial', sans-serif;
  font-weight: bold;
  text-decoration: none;
  display: block;
  padding: 0.9rem 0;
  font-size: 1.4rem;
  border-bottom: 2px solid white;
}

/* Sous-menus (niveaux 2 et 3) : indentation + taille réduite */
.hamburger-nav ul.sub-menu {
  padding-left: 1.8rem;
}

.hamburger-nav ul.sub-menu li a {
  font-size: 1.1rem;
  color: #fff !important;
}
