/* Style général du header */
.main-header {
  background-color: hsl(231, 68%, 21%);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  min-height: 60px;
}

.header {
  position: fixed; /* Si le header est fixe */
  top: 0; /* Aligner en haut de la page */
  left: 0;
  width: 100%;
  z-index: 1000; /* Assurez-vous que ce z-index est inférieur à celui du menu déroulant */
}


.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: hsl(231, 68%, 21%);
  z-index: 1000;
  padding: 10px 0;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

/* Style des boutons dans le header */
.navbar-items-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.navbar-item {
  margin: 0 10px;
}

.header-container img {
  max-width: 150px;
  height: auto;
}

/* Style des liens de navigation */
.navbar-link-item {
  text-decoration: none;
  padding: 10px 20px;
  color: white;
  display: inline-block;
  font-size: 16px;
  border-radius: 30px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Style des boutons "S'inscrire" et "Se connecter" */
#register-button,
#login-button {
  background-color: hsl(231, 68%, 21%);
  color: #fff;
  border: 2px solid hsl(231, 68%, 21%);
}

#register-button:hover,
#login-button:hover {
  background-color: hsl(335, 87%, 53%);
  border-color: hsl(335, 87%, 53%);
  color: #fff;
}

/* Style du bouton "Réserver un Cours de Langue" */
#reserve-button {
  background-color: hsl(335, 87%, 53%);
  color: #fff;
  border: 2px solid hsl(335, 87%, 53%);
}

/* Style du menu hamburger */
.nav-open-btn,
.nav-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
  display: none; /* Caché par défaut */
}

/* Styles pour le menu mobile */
.navbar-mobile {
  display: none; /* Caché par défaut */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: hsl(231, 68%, 21%);
  overflow: auto;
  z-index: 1000;
}

.navbar-mobile .nav-close-btn {
  display: block;
}

.navbar-mobile .navbar-items-list {
  flex-direction: column;
  margin-top: 60px;
}

.navbar-mobile .navbar-item {
  margin: 10px 0;
}


/* Afficher le menu hamburger et le menu mobile sur les petits écrans */
@media (max-width: 768px) {
  .nav-open-btn {
    display: block;
  }

  .navbar-responsive {
    display: none;
  }

  .navbar-mobile.active {
    display: block;
  }
}

/* Style pour le menu overlay */
.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

/* Afficher le menu overlay lorsque le menu mobile est actif */
.navbar-mobile.active ~ .menu-overlay {
  display: block;
}
/* Style du sélecteur de langue */
.lang-selector-container {
  margin-left: 20px;
}

.lang-dropdown {
  padding: 5px;
  border-radius: 30px;
  background-color: hsl(231, 68%, 21%);
  color: #fff;
  border: none;
  font-size: 14px;
  cursor: pointer;
}


.lang-dropdown option {
  background-color: hsl(231, 68%, 21%);
  color: #fff;
  text-decoration: #fff;
  text-decoration-color: #fff;
  outline-color: #fff;
}

/* Conteneur du sous-menu */
.dropdown-services-menu {
  display: none; /* Caché par défaut */
  position: absolute;
  background-color: hsl(231, 68%, 21%);
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  margin-top: 5px;
  z-index: 1000;
}

.navbar-item.dropdown {
  position: relative; /* Position relative pour permettre le positionnement absolu du sous-menu */
}

.navbar-item.dropdown:hover .dropdown-services-menu {
  display: block; /* Afficher le sous-menu au survol */
}

/* Style des liens dans le sous-menu */
.dropdown-services-menu li {
  list-style: none;
  margin-bottom: 5px;
}

.dropdown-services-menu li a {
  text-decoration: none;
  padding: 8px 15px;
  display: block;
  color: white;
  background-color: hsl(231, 68%, 21%);
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Effet au survol des éléments du sous-menu */
.dropdown-services-menu li a:hover {
  background-color: hsl(335, 87%, 53%);
  color: white;
}
/* Style du conteneur du menu déroulant du profil */
.navbar-item.dropdown {
  position: relative; /* Position relative pour permettre le positionnement absolu du sous-menu */
}

.dropdown-profile-menu {
  display: none; /* Caché par défaut */
  position: absolute;
  top: 100%; /* Positionner juste en dessous de l'icône */
  right: 0; /* Alignement à droite */
  background-color: hsl(231, 68%, 21%); /* Couleur de fond */
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); /* Ombre subtile */
  z-index: 1000; /* Assurez-vous que le menu a un z-index suffisamment élevé */
  width: 200px; /* Largeur du menu */
  box-sizing: border-box;
}

/* Afficher le menu au clic ou au survol de l'élément parent */
.navbar-item.dropdown:hover .dropdown-profile-menu,
.navbar-item.dropdown .dropdown-profile-menu.show {
  display: block;
}

/* Style des liens dans le sous-menu */
.dropdown-profile-menu li {
  list-style: none;
  margin-bottom: 5px;
}

.dropdown-profile-menu li a {
  text-decoration: none;
  padding: 10px 15px; /* Espacement des éléments */
  display: block;
  color: white; /* Couleur du texte */
  background-color: hsl(231, 68%, 21%); /* Couleur de fond */
  border-radius: 5px; /* Bordures arrondies */
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Effet au survol des éléments du sous-menu */
.dropdown-profile-menu li a:hover {
  background-color: hsl(335, 87%, 53%); /* Couleur de fond au survol */
  color: white; /* Couleur du texte au survol */
}

/* Style de l'icône de profil */
.navbar-link-item ion-icon {
  font-size: 4rem; /* Taille de l'icône */
  color: white; /* Couleur de l'icône */
  transition: color 0.3s ease;
}

.navbar-link-item ion-icon:hover {
  color: hsl(335, 87%, 53%); /* Couleur de l'icône au survol */
}

/* Styles pour les écrans plus petits */
@media (max-width: 768px) {
  /* Adapter le menu déroulant pour mobile */
  .dropdown-profile-menu {
    position: static; /* Positionner le menu en flux normal */
    width: 100%; /* Occuper toute la largeur */
    box-shadow: none; /* Supprimer les ombres */
    border-radius: 0; /* Pas de coins arrondis sur mobile */
    padding: 10px 0; /* Espacement sur mobile */
  }

  /* Styliser les liens pour mobile */
  .dropdown-profile-menu li a {
    padding: 15px; /* Augmenter l'espacement pour faciliter le toucher */
    font-size: 1.2rem; /* Agrandir légèrement le texte */
    text-align: center; /* Centrer le texte sur mobile */
    border-bottom: 1px solid #f1f1f1; /* Ajouter une bordure de séparation */
  }
}

