:root{  
  --rail-w: 32px;
}

@media screen and (max-width: 997px) {
  :root{
    --filters-w: 100%;
    --header-h: 193px; /* ajuste plus tard */
  }
}

@media screen and (min-width: 998px) {
  :root{
    --filters-w: 320px;
    --header-h: 213px; /* ajuste plus tard */
  }
}



html, body{
  height: 100%;
  margin: 0;
}

/* Header fixe */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 1000;
}

/* Pas de scroll global (desktop) */
body{
  overflow: hidden;
}



/* Zone sous header */
.page-produits{
  margin-top: var(--header-h);
  height: calc(100vh - var(--header-h));
  display: flex;
  gap: 2px; /* Largeur entre Filtres et Produits */
  min-height: 0;
}


    .col-filtres{
    position: relative;
    width: var(--filters-w);
    background-color: rgb(217, 202, 202);
    min-height: 0;
    padding: 0; /* important : le padding va dans le scroll-wrapper */
    overflow: hidden; /* <-- plus de scrollbar sur l’aside */
    border-right: 1px solid rgba(255,255,255,0.12);
    transition: width .2s ease;
  
}



/* Contenu filtres */ /* Ajouté par moi */
.filtres-inner{
  transition: opacity .15s ease;
}


/* LA zone qui scrolle */
.filtres-scroll{
  height: 100%;
  overflow-y: auto;
  min-height: 0;
  padding: 10px;
  /* réserve la place du rail */
  /* padding-right: calc(var(--rail-w) + 16px); */
  padding-right: calc(var(--rail-w) + 5px);
  -webkit-overflow-scrolling: touch;
}

/* Bouton ouvert */
.filters-rail-btn{
  position: absolute;
  top: 1px;
  /*top: var(--header-h);*/
  right: 0px;
  width: var(--rail-w);
  height: 120px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /*border: 1px solid rgba(255,255,255,0.18);*/
  border-radius: 10px 0px 0px 10px;
  background: rgba(0,0,0,0.05);
  color: #fff;
  background-color: rgb(32, 31, 31);
  cursor: pointer;
  z-index: 5; /* au-dessus */
}

.filters-rail-btn:hover{
  /*background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.28);*/
  background-color: rgb(91, 87, 87);
}

.filters-rail-btn .rail-text{
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: .18em;
  font-size: 12px;
  opacity: .95;
  border: 1px solid white;
  border-radius: 6px;
  padding-top: 8px;
  padding-bottom: 8px;
}

/* Colonne produits */
.col-produits{
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-left: 0px;
  padding-right: 0px;
  padding-top: 0px;
  padding-bottom: 0px;
  background-color: white;
}

/* Bonus iOS */
.col-filtres, .col-produits{
  -webkit-overflow-scrolling: touch;
}



/* --- Replié --- apparence*/
#pageProduits.filters-collapsed .col-filtres{
  width: var(--rail-w);
  background-color: rgb(32, 31, 31);
}

#pageProduits.filters-collapsed .filtres-scroll{
  opacity: 0;
  pointer-events: none;
  user-select: none;
  height: 0;
  padding: 0;
  overflow: hidden;
}

/* Cache le contenu filtres ****************************************************/
#pageProduits.filters-collapsed .filtres-inner{
  opacity: 0;
  pointer-events: none;
  user-select: none;
  height: 0;
  overflow: hidden;
}

#pageProduits.filters-collapsed .filters-rail-btn{
  position: sticky;
  top: 1px;
  right: 0;
  left: 0;
  margin: 0 auto;
  height: 120px;
  border-radius: 0px 10px 10px 0px;
}



.barre-droite-filtres {
  width: var(--rail-w);
  background-color: black;
}

.zone-filtres {
  min-width: calc(var(--filters-w) - var(--rail-w));
}





/*********************************************************************************************************/
/* Barre d'outils produits                                                                               */
/*********************************************************************************************************/

.menu-produits {
    background-color: rgb(44, 44, 116);
    width:auto;
    padding-left: 10px;
    padding-right: 10px;
    border-collapse: collapse;
    border-radius: 10px 10px 0px 0px;
    border: solid 1px white;
    height: 47px;
}

/* Bouton RAZ quand OK */
.bt-effacer-liste-ok {
    height: 30px;
    width: 70px;
    border: 0;
    line-height: 2;
    padding: 0 10px;
    /*font-size: 1rem;*/
    font-size: 12px;
    font-style: italic;
    text-align: center;
    font-size: 12px;
    color: #fff;
    text-shadow: 1px 1px 1px #000;
    border-radius: 8px;
    cursor: pointer;
    background-color: rgb(220 0 0 / 100%);
    background-image: linear-gradient(
      to top left,
      rgb(0 0 0 / 20%),
      rgb(0 0 0 / 20%) 30%,
      rgb(0 0 0 / 0%)
    );
    
    box-shadow:
      inset 2px 2px 3px rgb(255 255 255 / 60%),
      inset -2px -2px 3px rgb(0 0 0 / 60%);
      
  }

  /* Bouton RAZ quand pas OK */
  .bt-effacer-liste-no-ok {
    height: 30px;
    width: 70px;
    border: 0;
    line-height: 2;
    padding: 0 10px;
    /*font-size: 1rem;*/
    font-size: 12px;
    font-style: italic;
    text-align: center;
    font-size: 12px;
    color: #2b2828;
    text-shadow: 1px 1px 1px #000;
    border-radius: 8px;
    cursor:default;
    background-color: rgb(85, 81, 81);
    background-image: linear-gradient(
      to top left,
      rgb(0 0 0 / 20%),
      rgb(0 0 0 / 20%) 30%,
      rgb(0 0 0 / 0%)
    );
    box-shadow:
      inset 2px 2px 3px rgb(255 255 255 / 60%),
      inset -2px -2px 3px rgb(0 0 0 / 60%);
  }

.barre-outils{
  width: 100%;
}

.barre-outils .bt-effacer-liste-ok{
  vertical-align: middle;
}
.barre-outils .bt-effacer-liste-no-ok{
  vertical-align: middle;
}


/* Select des familles */
.select-produit-categorie {
  text-align: center;
  background-color: #2b2525;
  color: #fff;
  font-style: italic;
  font-weight: bold;
}

/* Select de tri */
.select-tri {
  float: right; 
}

/**********************************************************************************/
/* Zone Liste des Icones de catégories de produits                               */
/**********************************************************************************/
.icones-choix-categorie {
    padding-top: 20px;
}

.zone-categorie-famille {
    width:auto;
    background-color: #999;
    padding-left: 20px;
    padding-right: 20px;
    text-align: center;
    border: solid 1px black;
    font-weight: bold;
    font-style: italic;
}

.zone-liste-icones-categories {
    background-color: white;
    vertical-align: middle;
    width: 100px;
    margin-left: 30px;
    margin-right: 30px;
    display: inline-block;
    text-align: center;
    font-size: 12px;
    font-style: italic;
    margin-bottom: 20px;
    cursor: pointer;

}


.liste-icones-categories img{
    margin-bottom: 5px; /* 5px entre l'image et le texte du dessous */
    height: 100px;
    width: 100px;
    cursor: pointer;
}

/* Bouton Conseils choix des composants */
.bt-conseils {
    width: 250px;
    margin-top: 10px;
    margin-bottom: 20px;
    margin-left: 30px;
    margin-right: 30px;
    padding-bottom: 5px;
    padding-top: 5px;
    cursor: pointer;
    text-align: center; 
    /*vertical-align: middle;*/            
    background-color: #1d1c1c;    
    color: #fff;                 
    text-decoration: none;        
    border: 1px solid #0a0a0a;
    border-radius: 4px;
    box-shadow: 2px 2px #cccccc;
}

.bt-conseils a {
    margin-left: 10px;
    margin-right: 10px;
    font-size: 12px;
}

.bt-conseils :hover {
    color: #ff0000;
    border-color: #ff0000;
}
/* Fin CSS ICONES Catégories Produits */

.form-switch .form-check-input {
 /* background-image: url(/ball-147676_640.png);*/
  background-color: rgb(223, 223, 212);
  border-color: #070707;
  cursor: pointer;
}

.form-switch .form-check-input:focus {
  box-shadow: 0 0 4px 4px rgb(252, 60, 1);
  border-color: #000;
}

.form-switch .form-check-label {
  cursor: pointer;
}


.affichage_nb_filtres_total {
  float: right;
  margin-top: 3px;
  width:20px;
  text-align: center;
  font-size: 10px;
  text-decoration: none;
  background-color: #383a3c;  
  color:#FFF;
  border: 1px solid black;
  border-radius: 4px;
  /*padding-left: 5px;
  padding-right: 5px;*/
  cursor: default;
}
.affichage_nb_filtres_vert {
  float: right;
  margin-top: 3px;
  width:20px;
  margin-right: 2px;
  text-align: center;
  font-size: 10px;
  text-decoration: none;
  background-color: rgb(57, 216, 57);  
  color:#000;
  border: 1px solid black;
  border-radius: 4px;
  cursor: default;

}

.affichage_nb_filtres_zero {
  float: right;
  margin-top: 3px;
  width:20px;
  margin-right: 2px;
  text-align: center;
  font-size: 10px;
  text-decoration: none;
  background-color: rgb(144, 155, 144);  
  color:#000;
  border: 1px solid black;
  border-radius: 4px;
  cursor: default;

}


/***********************************************************************************************************************/
/* AFFICHAGE LISTE DES ARTICLES                                                                                        */
/***********************************************************************************************************************/

.liste-produits {
    width: 100%;
    margin-top: 0px;
    border-width : 0;
    border-top: 1px solid black;
    border-spacing: 0;
}

.ligne-affichage-produits td{
    margin-left: 10px;
    border-top: 1px solid grey; /* ligne de séparation entre les produits */
    border-spacing: 0;
}

.ligne-affichage-produits a{
    text-decoration: none;
}


/* Affichage mini image produit */
.miniimage-produits {
    width: 100px; /* Largeur de la colonne mini-images */
    text-align: center;
}

/* Fixe la taille de la mini image produit à 80px */
.miniimage-produits img {
    max-width: 78px;
    max-height: 78px;
    /* Fixe le alt à 10px au cas où l'image manquerait */
    font-size: 10px;
}

.miniimage-produits a{ /* Pour contrer Bootstrap */
    text-decoration: none;
    color: black;
}

.miniimage-produits a:hover{ /* Pour contrer Bootstrap */
    text-decoration: none;
    color: black;
}
/* Fin CCS affichage mini image produit */

.descriptif-produits {
    width:auto; /* La colonne descriptifs produits prend toute la place restante */
    text-decoration: none;
}

.img_marque {
    margin-left: 10px; 
    margin-bottom: 7px;
    opacity: 90%; /* Eclaircissement du logo pour trancher avec le descriptif court */

}

.affichage-ref-produit {
    font-size: 10px;
    text-align: center;
    font-style: italic;
}


.descriptif-court-produits {
    font-size: 14px;
    font-weight: bold;
    margin-left: 10px;
    margin-right: 10px;
    text-decoration: none;
    color: black;
}

.descriptif-court-produits a{
    text-decoration: none;
    color: black;
}

.descriptif-court-produits a:hover{ /* Pour contrer bootstrap */
    text-decoration: none;
    color: black;
}

.descriptif-long-produits {
    margin-left: 10px;
    margin-right: 10px;
    font-style: italic;
    font-size: 14px;
}



.descriptif-long-produits a {
    text-decoration: none;
    color: rgb(85, 82, 82);
}
.descriptif-long-produits a:hover {  /* Pour contrer bootstrap */
    text-decoration: none;
    color: rgb(85, 82, 82);
}

.dispo-produits {
    width: 30px; /* Fixe la colonne dispo à 30 px */
    text-align: center;
    margin-left: 10px;
    margin-right: 10px;
}


.quantite-dispo-produits {
    text-align: center;
    font-size: 10px;
    font-style: italic;
    color: green;
}

.prix-produits { 
    width: 120px; /* Fixe la taille de la colonne prix */
    text-align: center;
}
.prix-ttc-produits {
    font-size: 16px;
    font-weight: bold; 
    text-align: center;
    margin-top: 10px;
    cursor:default;
}
.prix-ht-produits{
    font-size: 10px;
    font-style: italic;
    text-align: center;
    cursor:default;
}


.ajouter-un-panier {
    margin-top: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

@media screen and (max-width: 600px) {

    .img_marque {
        display:none;

    }

    .descriptif-long-produits {
        display: none;
    }

    .descriptif-court-produits {
        font-size: 12px;
        margin-left: 10px;
        margin-right: 10px;
        text-decoration: none;
        color: black;
    }

    .dispo-produits {
        max-width: 20px; /* Fixe la colonne dispo à 30 px */
        margin-left: 0px;
        margin-right: 0px;
    }

    .prix-ttc-produits {
        font-size: 12px; 
    }

    .prix-ht-produits{
        font-size: 8px;
    }
}

.total-produits {
  width: 100%;
  padding-left: 10px;
  padding-right: 10px;
  text-align: left;
  font-size: 14px;
  background-color: black;
  color: white;
  
}

.message_bas_dispo {
    border-top: solid 1px black;
    font-size: 12px;
    font-style: italic; 
    padding-left: 10px; 
    padding-right: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
}


/***********************************************************************************************************************/
/* ZONE des FILTRES (à gauche)                                                                                         */
/***********************************************************************************************************************/

.entete-zone-filtres {
  width: auto;
  background-color: #999;
  padding-left: 10px;
  padding-right: 10px;
  text-align: center;
  color: black;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid black;
  cursor: default;
}

.raz-filtre {
  width: auto;
  text-align: center;
}

.raz-filtre .bt-effacer-liste-ok {
  width: 200px;
}

.interieur-filtre-stock {
  /*margin-left: 45px;*/
  background-color: white;
  font-size: 14px;
  padding-left: 45px;
  padding-right: 10px;
  padding-top: 15px;
  padding-bottom: 15px;
  border: 1px solid grey;
  border-radius: 0px 0px 5px 5px;
}

.entete-filtre {
  width: 100%;
  background-color: rgb(17, 79, 195);
  text-align: center;
  color: white;
  font-size: 14px;
  font-style: italic;
  border: 1px solid grey;
  border-radius: 5px 5px 0px 0px;
  cursor: pointer;
}

.intitule_filtre{
  border:none;
  background: none;
  
}

.zone-affichage-choix-filtres {
   width: 100%;
   background-color: white;
   border: 1px solid grey;
}
.affichage-choix-filtres {
  width: 100%;
  border: none;
  font-size: 12px;
  font-style: italic;
}

.interieur-filtre {
  background-color: white;
  font-size: 14px;
  padding-left: 10px;
  padding-right: 10px;
  padding-top: 15px;
  padding-bottom: 15px;
  border: 1px solid grey;
  border-radius: 0px 0px 5px 5px;

}

.interieur-filtre input{
  cursor: pointer;
}

.interieur-filtre label{
  cursor: pointer;
}

.zone-slide {
  width: 100%;
  display: grid;
  justify-items: center;
}

.interieur-filtre button {
  float: right;
}

.interieur-filtre input {
  margin-right: 5px;
}
  

/*********************************************************************************************************/
/* CORRECTIONS PB                                                                                        */
/*********************************************************************************************************/
/* Pour corriger le problème de hauteur du menu "home" quand on entre dans le menu "produits" */
.menu img {
  max-height: 23px;
  max-width: 23px;        
}