@import url("https ://fonts.googleapis.com/css2 ?family=Roboto&display=swap");
@import url("https ://fonts.googleapis.com/css2 ?family=Andika&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Andika&family=Rubik&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
}
html {
  font-size: 10px;
  /* 1 rem 10px */
}
body {
  font-family: "Andika", sans-serif;
  font-family: "Rubik", sans-serif;
  font-size: 1.6rem;
}

.info {
  height: 30px;
  background-color: #000000;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .info {
    height: auto;
    min-height: 30px;
    padding: 8px 15px;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
  }

  .info :nth-child(1),
  .info :nth-child(2) {
    margin: 0;
  }
}

@media (max-width: 480px) {
  .info {
    font-size: 11px;
    padding: 6px 10px;
  }
}
.info i {
  font-size: 17px;
  margin-right: 5px;
}
.info :nth-child(1) {
  display: flex;
  margin-left: 50px;
  align-items: center;
  justify-content: center;
}
.info :nth-child(2) {
  display: flex;
  margin-right: 50px;
}

nav {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  text-decoration: none;
  overflow: hidden;
  padding: 0 40px;
}


nav .logo img {
  display: block;
  height: 140px;
  width: 180px;
  object-fit: cover;
}

nav .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Lobster", cursive;
  text-decoration: none;
  max-width: 180px;
}

nav .containernav{
  width: 100%;
  max-width: 500px;
  min-width: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

nav .containernav form {
  display: flex;
  align-items: center;
  justify-content: center;
}
nav .containernav form #search {
  height: 35px;
  width: 350px;
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
  border: 2px solid rgba(193, 193, 193, 0.652);
  padding: 2px 20px;
  font-size: 15px;
  outline: none;
  transition: all 0.5s;
}
nav .containernav form #search:hover {
  background-color: #a4f5f511;
  box-shadow: 0 0 7px 2px #e4144c47;
}
nav .containernav form #search:focus {
  background-color: #a4f5f511;
  box-shadow: 0 0 7px 2px #e4144c47;
}

nav .containernav #submit {
  display: none;
}
nav .containernav form label {
  display: flex;
  width: 50px;
  align-items: center;
  justify-content: center;
  height: 35px;
  width: 0 10px;
  background-color: #2c3e50;
  display: block;
  position: relative;
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
}
nav .containernav form label i {
  font-size: 20px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  left: 50%;
  color: white;
}

nav .box {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin: 0 50px;
}

nav .box button {
  padding: 5px 13px;
  font-size: 15px;
  font-weight: 600;
  text-transform: capitalize;
  border: none;
  border-radius: 7px;
  display: block;
  margin: 0 10px;
  background-color: #95a5a6;
  color: white;
  cursor: pointer;
  transition: all 0.5s ease-in-out;
  background-color: #000000;
}
nav .box button:hover {
  background-color: #2c3e50;
}
nav .box a {
  text-decoration: none;
  margin-left: 20px;
}
nav .box .dconn {
  padding: 7px 14px;
  font-size: 16px;
  font-weight: 600;
  text-transform: capitalize;
  border: none;
  border-radius: 5px;
  display: block;
  margin: 0 10px;
  background-color: #95a5a6;
  color: white;
  cursor: pointer;
  transition: all 0.5s ease-in-out;
  background-color: #000000;
}
nav .box .dconn:hover {
  background-color: #722b1b;
}
nav .box :nth-child(3) button {
  background-color: #722b1b;
}
nav .box :nth-child(3) button:hover {
  background-color: #000000;
}

nav .box1 {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 20px;
  width: 100px;
}
nav .box1 span {
  height: 40px;
  width: 40px;
  position: relative;
}
nav .box1 span i {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 30px;
}

nav .containernav .users {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 30px;
}

nav .containernav .users p {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-right: 20px;
}
nav .containernav .users img {
  height: 60px;
  width: 60px;
  border-radius: 100%;
  object-fit: cover;
}

.section1 {
  background-color: #636363;
  min-height: 35px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 8px 15px;
  gap: 10px;
  transition: height 0.4s ease;
}

@media (max-width: 768px) {
  .section1 {
    padding: 10px;
    gap: 8px;
  }

  .section1 a {
    font-size: 12px;
    margin: 5px;
  }

  .section1 div span i {
    font-size: 24px;
  }
  
  /* Cacher les catégories au-delà de la 3ème en responsive avec transition */
  .section1 .category-link.category-hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    transform: translateY(-10px);
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out, margin 0.4s ease-out, padding 0.4s ease-out, transform 0.4s ease-out;
  }
  
  /* Afficher toutes les catégories quand on clique sur le bouton */
  .section1.show-all-categories .category-link.category-hidden {
    max-height: 100px;
    opacity: 1;
    margin: 5px;
    padding: 0;
    transform: translateY(0);
    transition: max-height 0.5s ease-in, opacity 0.5s ease-in 0.1s, margin 0.4s ease-in, padding 0.4s ease-in, transform 0.5s ease-in 0.1s;
  }
  
  /* Style pour le bouton toggle avec animation */
  .section1 div span.toggle-categories-btn {
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    display: inline-block;
  }
  
  .section1 div span.toggle-categories-btn:hover {
    opacity: 0.8;
    transform: scale(1.1);
  }
  
  .section1 div span.toggle-categories-btn:active {
    opacity: 0.6;
    transform: scale(0.95);
  }
  
  /* Animation pour l'icône */
  .section1 div span.toggle-categories-btn i {
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  
  .section1.show-all-categories div span.toggle-categories-btn i {
    transform: rotate(90deg);
  }

  nav {
    padding: 0 10px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: auto;
  }

  nav .logo img {
    display: block;
    height: 60px;
    width: 140px;
    object-fit: cover;
  }
  
  nav .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Lobster", cursive;
    text-decoration: none;
    max-width: 180px;
  }
}

@media (max-width: 480px) {
  .section1 {
    padding: 8px 5px;
  }

  .section1 a {
    font-size: 11px;
    margin: 3px;
  }
}

.section1 a {
  text-decoration: none;
  font-size: 13px;
  color: white;
  display: block;
  margin-left: 20px;
  text-transform: capitalize;
  font-family: "Nunito", sans-serif;
  transition: color 0.3s ease, transform 0.2s ease;
}

.section1 a:hover {
  color: #918a44;
  transform: translateY(-2px);
}

.section1 div span i {
  font-size: 30px;
  color: white;
}
