/* Menu desktop */
#menu {
  margin: 30px 50px;
}

#menu a {
  text-decoration: none;
  font-size: 27px;
  color: black;
  transition: all 0.3s ease;
  position: relative;
}

/* Add underline effect using ::after */
#menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: black;
  transition: width 0.3s ease;
}

/* Expand underline on hover */
#menu a:hover::after {
  width: 100%;
}

/* Active link with static underline */
#menu a.active::after {
  width: 100%;
  background-color: black;
}

#menu li {
  list-style: none;
  margin-bottom: 16px;
}

#menu ul {
  padding: 0;
  margin: 0;
}
/* Menu burger - caché par défaut */
.burger-menu {
  display: none;
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 1001;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  background: #ffffff99;
  /* padding: 10px; */
}

.burger-icon {
  width: 30px;
  height: 3px;
  background-color: black;
  margin: 6px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Animation du burger */
.burger-menu.active .burger-icon:nth-child(1) {
  transform: rotate(-45deg) translate(-9px, 6px);
}

.burger-menu.active .burger-icon:nth-child(2) {
  opacity: 0;
}

.burger-menu.active .burger-icon:nth-child(3) {
  transform: rotate(45deg) translate(-8px, -8px);
}

/* Menu mobile coulissant */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background-color: white;
  z-index: 1000;
  transition: right 0.3s ease;
  padding-top: 80px;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu li {
  margin-bottom: 20px;
  padding: 0 30px;
}

.mobile-menu a {
  text-decoration: none;
  font-size: 24px;
  color: black;
  display: block;
  padding: 8px 0;
  transition: color 0.3s ease;
}

.mobile-menu a:hover {
  color: #555;
}

.mobile-menu a.active {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* Overlay pour fermer le menu */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Media queries pour responsive */
@media (max-width: 768px) {
  #menu {
    display: none;
  }

  .burger-menu {
    display: block;
  }
}

@media (max-width: 550px) {
  .mobile-menu {
    width: 280px;
  }

  .mobile-menu a {
    font-size: 20px;
  }
}
