/* === Header et navigation === */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  z-index: 1000;
  max-height: 100px;
  transition: max-height 0.3s ease;
  box-shadow: 0 5px 10px rgba(175, 175, 175, 0.2);
}

header.scrolled {
  max-height: 60px;
}

header.scrolled .logo-header {
  max-height: 40px;
}

.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center; 
  padding: 0 10px;
  width: calc(100% - 20px);
  margin: 0 auto;
  height: 100%;
}

.nav-left, .nav-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.nav-left {
  justify-content: flex-start;
}

.nav-right {
  justify-content: flex-end;
}

.nav-center {
  flex: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}

.nav-left ul, .nav-right ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.nav-left li, .nav-right li {
  margin: 0 10px;
  position: relative;
}

.nav-right li:last-child {
  margin-right: 0;
}

.nav-left a, .nav-right a {
  text-decoration: none;
  color: #1c2526ff;
  display: block;
  padding: 2px 10px;
}

.nav-left a:hover {
  color: #006633;
}

.nav-right a:hover {
  color: #993333;
}

/* === Dropdown === */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  list-style: none;
  padding: 10px 0;
  margin: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1002;
  min-width: 175px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.1s ease, transform 0.1s ease;
}

.dropdown-menu li {
  margin: relative;
}

.dropdown-menu li ul {
  display: none;
  position: absolute;
  top: 0;
  left: 100%; /* décale à droite */
  background-color: #ffffff;
  min-width: 175px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1003;
  padding: 10px 0;
}

/* Affiche le sous-sous-menu au hover */
.dropdown-menu li:hover > ul {
  display: block;
}

.dropdown-menu a {
  padding: 10px 20px;
  font-size: 1rem;
  color: #333;
}

.header-nav a {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 1.8rem;
}

.dropdown-menu a:hover {
  background-color: #e0e0e0;
}

.dropdown:hover .dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown:not(:hover) .dropdown-menu {
  display: none;
  opacity: 0;
  transform: translateY(-10px);
}

.nav-left li.dropdown-submenu > a::after,
  .nav-right li.dropdown-submenu > a::after {
    content: "▶";
    font-size: 0.8rem;
    margin-left: 6px;
    vertical-align: middle;
    color: #000000;
    pointer-events: none;
  }

/* === Logo === */
.logo-header {
  max-height: 60px;
  width: auto;
  transition: max-height 0.3s ease;
}

@media (max-width: 1024px) {
  header {
    max-height: 60px;
  }
  .logo-header {
    max-height: 40px;
  }

  header.scrolled {
    max-height: 50px;
  }
  header.scrolled .logo-header {
    max-height: 30px;
  }
}

/* === Menu Burger === */
.menu-burger {
  position: fixed;
  z-index: 1001;
  top: 0;
  left: -100vw;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  padding-top: 60px;
  transition: left 0.5s ease;
  overflow-y: auto;
}

.menu-burger a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 3rem;
  color: #000000;
  display: block;
  transition: 0.3s;
}

.menu-burger a:hover {
  color: #111;
}

.menu-burger ul {
  display: none;
  background: #fff;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0; left: 0;
  z-index: 1;
  padding-top: 80px;
}

.menu-burger ul#burger-main-menu {
  display: block;
  position: static;
  z-index: 1;
}

.menu-burger ul.burger-submenu.active {
  display: block;
  z-index: 2;
}

.burger-back {
  font-weight: bold;
  font-size: 2rem;
  display: block;
  margin-bottom: 1em;
}

.menu-burger ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.menu-burger.active {
  left: 0;
}

.menu-toggle {
  position: relative;
  display: block;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1002;
}

.menu-toggle span {
  display: block;
  position: absolute;
  height: 4px;
  width: 100%;
  background: #1c2526ff;
  border-radius: 2px;
  opacity: 1;
  left: 0;
  transition: all 0.25s ease-in-out;
}

.menu-toggle span:nth-child(1) {
  top: 0px;
}

.menu-toggle span:nth-child(2) {
  top: 10px;
}

.menu-toggle span:nth-child(3) {
  top: 20px;
}

.menu-toggle.is-active span:nth-child(1) {
  transform: rotate(45deg);
  top: 10px;
}

.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 10px;
}

header.scrolled .menu-toggle {
  width: 25px;
  height: 20px;
}

header.scrolled .menu-toggle span {
  height: 4px;
}

/* Flèche à droite des liens ayant un sous-menu dans le menu burger */
.menu-burger .burger-link::after {
  content: "▶";
  font-size: 1.5rem;
  margin-left: 16px;
  vertical-align: middle;
  color: #000;
  display: inline-block;
}

/* On cache le burger en desktop */
@media (min-width: 1025px) {
  .header-nav {
    display: flex;
  }

  .burger-icon {
    display: none;
  }

  .menu-burger {
    display: none;
  }
}

/* On affiche le burger en mobile */
@media (max-width: 1024px) {
  .nav-left {
    display: none;
  }
  .nav-right {
    display: none;
  }

  .burger-icon {
    display: block;
    cursor: pointer;
  }

  .menu-burger {
    display: block;
  }
}

@media (min-width: 1025px) {
  .menu-toggle {
    display: none;
  }
}
@media (max-width: 1024px) {
  .menu-toggle {
    display: block;
  }
}
