.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 60px;
  background: #fff;
  color: #333;
  transition: width 0.3s ease;
  z-index: 1000; /* Passe au-dessus de tout */
  overflow: hidden;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  transition: width 0.3s ease-in-out; 
}

.sidebar:hover {
  width: 200px;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.15);
  transition: width 0.1s ease-in-out; /* Transition plus rapide */

}
.sidebar a {
  text-decoration: none; /* Supprime le soulignement */
}
.logo {
  display: flex;
  align-items: center;
  padding: 15px;
}

.logo img {
  height: 30px;
  width: 30px;
  margin-right: 10px;
}

.logo .app-name {
  display: none;
  font-size: 16px;
  font-weight: bold;
  color: #007bff; /* Bleu moderne */

}

.sidebar:hover .logo .app-name {
  display: inline-block;
}

.menu {
  display: flex;
  align-items: start;
  justify-content: start;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 10px;
}

.menu a { 
  display: flex; 
  align-items: start; 
  justify-content: start;
  width: 100%;
  cursor: pointer;
  border-radius: 10px;
  padding: 10px 15px;
  transition: background 0.3s ease;
  text-decoration: none;
  color: #333; 
}

.menu a:hover {
  background: #e6f0ff !important;
}

.menu a.active { /* Surlignage de l'onglet actif */

  border-radius: 10px; 
}
.menu a.active .icon{ /* Surlignage de l'onglet actif */
  color: #007bff
}

/* 
.menu a.active:hover {
  background: #0056b3 !important;
} */

.menu a .icon { /* Formatage des icônes */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-right: 10px;
  color: inherit;
  flex-shrink: 0; 
  width: 30px; 
}

.menu a .menu-text { /* Masquage du texte quand la barre est fermée */
  display: none; 
  font-size: 14px;
  font-weight: bold;
  color: inherit;
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
  max-width: 0; 
  transition: max-width 0.3s ease-in-out; 
}

.sidebar:hover .menu a .menu-text { /* Affichage du texte au survol */
  display: inline-block;
  max-width: 150px; 
}

.sidebar-link {
  color: #333;
} 
.burger-menu {
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001; /* Assurez-vous que le bouton est au-dessus de la sidebar */
}



@media (max-width: 768px) {
  .burger-menu {
    display: block;
  }
  .logo {
    margin-top: 55px!important;
  }
  .sidebar {
    width: 0;
    transition: width 0.3s ease-in-out;
    overflow-y: auto; /* Permettre le scroll si la liste est trop longue */

  }

  .sidebar.open {
    width: 200px;
}
/* Affiche les textes de la sidebar lorsque .open est activée */
.sidebar.open .menu a .menu-text {
  display: inline-block; 
  max-width: 150px; 
}

.sidebar.open .logo .app-name {
  display: inline-block; 
}

.sidebar.open {
  width: 200px;
}

.sidebar a .text {
  display: none;
}
.sidebar.open a .text {
  display: inline-block;
}
  .sidebar .toggle-btn {
    padding: 10px 15px;
  }
  
  .sidebar a {
    padding: 10px 15px;
  }

  .sidebar a i {
    font-size: 1.5rem;
  }
}
  