/* Barre de navigation fixe en haut */
  .navigation {
    background-color: #f57c00; /* Couleur orange */
    padding: 10px 0;
    text-align: center;
    z-index: 160; /* Assure que la barre reste au-dessus du contenu */
    box-shadow: 0 0 5px rgb(255, 255, 255); /* Ombre légère */
    margin-top: 45px; /* Décalage depuis le haut */
    position: fixed;
    width: 100%; /* Occupe toute la largeur */
    height: 130px; 
    left: 0;
    right: 0; 
    border-bottom: 1px solid rgba(255, 255, 255); /* Bordure légère */
    border-radius: 0 0 8px 8px; /* Coins arrondis */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3); /* Ombre légère */
  }




  /* Conserve ton style existant, j’ajoute juste la flèche */
.categories-wrapper {
  position: relative;
  margin: 0 auto;
}

/* Petit dégradé à droite pour indiquer qu’il y a encore du contenu
.categories-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50px;
  height: 100%;
  background: linear-gradient(to left, #f57c00 0%, transparent 100%);
  pointer-events: none;
} */







  /* Conteneur principal des catégories */
  .categories-container-navigation {
    width: 80%;  /* Définit une largeur de 80% pour centrer */
    margin: 0 auto; /* Centre l'élément */
    position: relative; /* Nécessaire pour le positionnement des boutons de défilement */
    overflow-x: auto;
    overflow-y: hidden; /* Empêche le défilement vertical */
    white-space: nowrap; /* Empêche les éléments de passer à la ligne */
    scroll-behavior: smooth; /* Défilement fluide */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #f57c00 transparent; /* Couleur orange */
    -ms-overflow-style: auto; /* IE et Edge */
  }

  .categories-container-navigation::-webkit-scrollbar {
    height: 1px; /* Taille fine */
    background: transparent;
  }

  .categories-container-navigation::-webkit-scrollbar-track {
    background: transparent;
  }

  .categories-container-navigation::-webkit-scrollbar-thumb {
    background-color: #f57c00; /* Orange identique */
    border-radius: 999px;
  }

  .categories-container-navigation::-webkit-scrollbar-thumb:hover {
    background-color: #d46600;
  }

  @media (max-width: 768px) {
    .categories-container-navigation {
      scrollbar-width: thin;
      scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    }

    .categories-container-navigation::-webkit-scrollbar {
      height: 1px;
    }

    .categories-container-navigation::-webkit-scrollbar-thumb {
      background-color: rgba(0, 0, 0, 0.2);
    }
  }


  /* Conteneur des catégories défilantes */
  .categories-navigation {
    display: flex;
    padding: 5px 0; /* Espace en haut et en bas */ 
    gap: 10px; /* Espacement entre les éléments */
    margin-top: 5px;

  }

  .categories-container-navigation::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }

  @media (max-width: 768px) {
    .categories-container-navigation {
      scrollbar-width: thin;
      -ms-overflow-style: auto;
    }

    .categories-container-navigation::-webkit-scrollbar {
      display: block;
      height: 1px !important;
    }
  }


  /* Style des éléments individuels des catégories */
  .categories-item-navigation {
  /*  display: inline-block;*/
  display:flex;
    text-align: center;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-width: 110px; /* Largeur minimale pour chaque catégorie */
    max-width: 120px; /* Largeur maximale pour chaque catégorie */ 
    /*height: 60px; /* Hauteur fixe pour chaque catégorie */
    background: none; /* Fond transparent */
    cursor: pointer; /* Curseur pointeur pour indiquer que c'est cliquable */
    border: none;
    padding: 0;
  
  }

  /* Style des images des catégories */
  .categories-item-navigation img {
    margin-top: 5px;
    width: 26px;
    height: 26px;
    text-align: center;
    align-items: center ;
    justify-content: center;
    object-fit: contain; /* Garde l'image entière sans distorsion */
  }

  .categories-nom-navigation{
    font-size: 10px;
    font-family: 'Montserrat', sans-serif;
    color: rgb(255, 255, 255); /* Couleur du texte */
    margin-top: 2px; /* Espace entre l'image et le texte */
    text-align: center; /* Centre le texte sous l'image */
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Cache le texte qui dépasse */
    text-overflow: ellipsis; /* Affiche des points de suspension si le texte est trop long */
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
    width: 100%; /* Prend toute la largeur de l'élément */
  }






  /* Conteneur de la barre de recherche */
  .search-container-navigation {
      color: #333;
      position: relative; 
      width: 80%; 
      max-width: 500px; 
      margin: 2px auto; 
      padding: 5px;
      border-radius: 25px; 
      background: none; /* Fond transparent */
  }

  /* Style de la barre de recherche */
  .search-bar-navigation {
    background-color: #f5f5f5;
    color: #333; 
      width: 100%;
      padding: 5px 15px; /*Espace pour le bouton */ 
      border-radius: 25px;
      border: 1px solid rgb(169, 168, 168); 
      outline: none;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
      transition: box-shadow 0.3s ease;
      font-size: 16px;
      height: 32px;
  }

  /* Effet focus */
  .search-bar-navigation:focus {
      box-shadow: 0 0 10px rgba(0, 123, 255, 0.6);
      border: 2px solid #007bff;
      height: 32px; /* Assure que la hauteur reste constante */
  }

  /* Bouton de recherche intégré */
  .search-button-navigation {
    position: absolute; 
    transform: translateY(-50%); 
    background: rgb(169, 168, 168); 
    border: none; 
    cursor: pointer; 
    padding: 5px; 
    width: 40px; 
    height: 31px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    top: 50%; 
    right: 5px;
    border-radius: 0 20px 20px 0; /* top-left | top-right | bottom-right | bottom-left */
    transition: background 0.3s ease;
  }

  /* Effet hover sur le bouton */
  .search-button-navigation:hover {
      background:rgb(77, 75, 75);
  }

  /* Icône du bouton */
  .search-button-navigation img {
      width: 16px;
      height: 16px;
  }


  /* Style des boutons de défilement gauche et droite */
  .scroll-button {
    background: rgba(245, 124, 0, 0.9); /* Couleur orange */
    border: none;
    font-size: 20px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 12px 10px; /* Hauteur plus grande que la largeur */
    border-radius: 10px; /* Coins légèrement arrondis */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
    display: none; /* Caché par défaut */
    color: white;

    }




  /* Effet au survol des boutons */

  .scroll-button:hover {
    background-color: rgba(223, 114, 11, 0.8);
    color: white;
  }


  /* Effet au clic */
  .scroll-button:active {
    transform: translateY(-50%) scale(0.95);
  }

  /* Ajustement pour le bouton gauche */
  .left {
    left: 60px;
  }

  /* Ajustement pour le bouton droit */
  .right {
    right: 60px;
  }

  /* Faire disparaître les boutons sur mobile */
  @media (max-width: 768px) 
  {
    .scroll-button {
      display: none !important;
    }


    /* Ajuster les catégories pour qu'elles prennent 100% de la largeur */
    .categories-container-navigation {
      width: 100%;
      max-width: 100%;
      overflow-x: hidden;
    }

    /* Ajustement des éléments des catégories */
    .categories-navigation {
      width: 100%;
      max-width: 100%;
      padding: 5px 0;
      gap: 3px;
      margin-top: 7px;
      scrollbar-width: none; /* Firefox */
      -ms-overflow-style: none;  /* IE et Edge */
      margin-left: 0 !important;
      overflow-x: auto;
      overflow-y: hidden;
    }



    /* Style des éléments individuels des catégories */
    .categories-item-navigation {
      min-width: 90px; /* Largeur minimale pour chaque catégorie */
      max-width: 100px; /* Largeur maximale pour chaque catégorie */ 
    }

  }















  .categories-wrapper {
    /* Positionnement relatif pour que les sous-catégories soient positionnées par rapport à ce conteneur */
    position: relative; 
  }

  .overlay {
    position: fixed;
    border-top: 1px solid rgba(255, 255, 255); /* Bordure légère */
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    backdrop-filter: blur(8px); /* floute tout derrière */
    background: rgba(0, 0, 0, 0.2); /* assombrit légèrement */
    z-index: 999; 
    display: none; /* caché par défaut */
    overflow-x: hidden;
}

.subcategories-container {
    display: none;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    padding: 8px 0;
    position: fixed;
    top: 130px; /* Juste en dessous de la barre de navigation */ 
    z-index: 100;
    min-width: 160px;
    border: 3px solid #f57c00;
    width: 100%;
    z-index: 9999;
    border-radius: 10px;
    left: 0;
}



.subcategory-item {
    /* display: block; */
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 6px 16px;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
}
.subcategory-item:hover {
    background: #f5f5f5;
}


.subcategories {
  display: grid;
  gap: 10px; /* espace entre les items */

  /* Par défaut (mobile) → 2 colonnes */
  grid-template-columns: repeat(2, 1fr);
}

/* À partir des petits smartphones (≥576px, bootstrap "sm") → 3 colonnes */
@media (min-width: 576px) {
  .subcategories {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablettes (≥768px) → 4 colonnes */
@media (min-width: 768px) {
  .subcategories {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Ordinateurs (≥992px) → 6 colonnes */
@media (min-width: 992px) {
  .subcategories {
    grid-template-columns: repeat(6, 1fr);
  }
}




