/* Navbar principale */
.navbar {
  caret-color: transparent; /* rend le curseur invisible */
  user-select: none;
  width: fit-content;
  min-width: 100%;
  background: linear-gradient(135deg, #1a71b3, #324678);
  position: relative;
  z-index: 10;
}

/* Container pour alignement */
.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: fit-content;
}

/* Logo */
.logo img {
  padding: 10px;
  max-height: 60px;
  width: auto;
}

/* Bouton toggle (menu hamburger) - caché sur grand écran */
.toggle-button {
  background: none;
  border: none;
  font-size: 28px;
  color: white;
  cursor: pointer;
  display: none;
}

/* Liste principale des liens */
.navbar-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  width: fit-content;
}

/* Style des liens */
.navbar-links a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  font-size: 18px;
  padding: 0.4rem 0.7rem;
  transition: color 0.3s ease;
  white-space: nowrap;
}

/* Menu déroulant */
.dropdown {
  position: relative;

}

/* Contenu du menu déroulant */
.dropdown-content {
  padding: 0;
  margin: 0;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  color: black;
  min-width: 150px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  display: none;
  flex-direction: column;
  z-index: 1000;
  border-radius: 4px;
}

.dropdown-content li {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Liens dans le menu déroulant */
.dropdown-content li a {
  color: #333;
  padding: 10px 15px;
  display: block;
  font-weight: normal;
}

.dropdown-content li a:hover {
  background-color: #f0f0f0;

}

/* Affichage du menu déroulant au hover */
.dropdown:hover .dropdown-content {
  display: flex;

}

/* Responsive - pour écrans ≤ 768px */
@media (max-width: 1300px) {
  /* Afficher le bouton hamburger */
  .toggle-button {
    display: block;
  }

  /* Navigation verticale cachée par défaut */
  .navbar-links {
    flex-direction: column;
    display: none;
    width: 100%;
    background-color: #2a3d5e;
    margin-top: 1rem;
    border-radius: 6px;
  }

  /* Navigation visible quand active */
  .navbar-links.active {
    display: flex;
  }

  /* Menu déroulant en responsive devient statique et visible uniquement si parent actif */
  .dropdown-content {
    position: static;
    box-shadow: none;
    background-color: #3a4d7a;
    border-radius: 0;
  }

  /* Liens déroulant en responsive */
  .dropdown-content li a {
    color: white;
    padding: 0.5rem 1rem;
  }

  /* Désactiver l'apparition au hover en mobile */
  .dropdown:hover .dropdown-content {
    display: none;
  }

  /* Ajout d'un petit caret (flèche) après les liens avec dropdown */
  .dropdown > a::after {
    content: ' ▼';
  }
}
