@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600;700;800;900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}



.navigation {
  position: fixed;
  inset: 0px 0 0px 0px; /* 20 0 20 20*/
  width: 75px;
  /*min-height: 500px;*/
  background: rgb(211, 211, 211);
  transition: 0.5s;
  display: flex;
  justify-content: center;
  align-items: center;
}

.navigation.open {
  width: 250px;
}

.navigation .menu-toggle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  cursor: pointer;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 0 20px;
}

.navigation .menu-toggle::before {
  content: '';
  position: absolute;
  width: 30px;
  height: 2px;
  background: #333;
  transform: translateY(-8px);
  transition: 0.5s;
}

.navigation.open .menu-toggle::before {
  transform: translateY(0) rotate(45deg);
}

.navigation .menu-toggle::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 2px;
  background: #333;
  transform: translateY(8px);
  transition: 0.5s;
  box-shadow: 0 -8px 0 #333;
}

.navigation.open .menu-toggle::after {
  transform: translateY(0) rotate(-45deg);
  box-shadow: none;
}

.navigation ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}


.navigation ul li {
  list-style: none;
  position: relative;
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 0 10px;
  cursor: pointer;
  transition: 0.5s;
}

.navigation ul li.active {
  transform: translateX(7px);
}

.navigation.open ul li.active {
  transform: translateX(10px);
}

.navigation ul li a {
  text-decoration: none;
  position: relative;
  display: flex;
  justify-content: flex-start;
  text-align: center;
  align-items: center;
  width: 55px;
}

.navigation ul li a .icon {
  position: relative;
  display: block;
  min-width: 55px;
  height: 55px;
  line-height: 60px;
  color: #222;
  border-radius: 10px;
  font-size: 1.75em;
  transition: 0.5s;
}

.navigation ul li.active a .icon {
  color: #fff;
  background: var(--color);
}

.navigation ul li a .icon::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: var(--color);
  filter: blur(8px);
  opacity: 0;
  transition: 0.5s;
}

.navigation ul li.active a .icon::before {
  opacity: 0.5;
}

.navigation ul li a .text {
  position: relative;
  padding: 0 15px;
  height: 60px;
  display: flex;
  align-items: center;
  text-align:left;
  color: #333;
  opacity: 0;
  visibility: hidden;
  transition: 0.5s;
}

.navigation.open ul li a .text {
  opacity: 1;
  visibility: visible;
}

.navigation ul li.active a .text {
  color: var(--color);
}

/* Pour les petits écrans : navigation en haut */
@media (max-width: 768px) {
  body {
    margin-left: 0;
  }

  .navigation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px; /* Hauteur de la barre */
    /*min-height: 50px;*/
    background: rgb(211, 211, 211);
    display: flex;
    justify-content: space-between; /* Aligne les éléments horizontalement */
    align-items: center;
    padding: 0 10px;
    transition: height 0.5s;
    overflow: hidden; /* Cache les éléments quand fermé */
  }

  .navigation.open {
    height: auto; /* Permet d'afficher tout le contenu */
    width: 100%;
  }

  .navigation ul {
    flex-direction: column; /* Aligne les éléments verticalement */
    gap: 15px;
    margin: 0;
    padding: 0;
    width: auto;
    visibility: hidden; /* Cache les éléments quand fermé */
    opacity: 0; /* Cache les éléments quand fermé */
  }

  .navigation.open ul {
    visibility: visible; /* Affiche les éléments quand ouvert */
    opacity: 1; /* Affiche les éléments quand ouvert */
  }

  .navigation ul li {
    width: auto; /* Ajuste la largeur des items */
    height: auto;
    padding: 0;

  }

  .navigation ul li a {
    width: auto;
    display: flex;
    align-items: center;
  }

  .navigation .menu-toggle {
    display: flex; /* Affiche le bouton menu */
  }
}