/* Styles pour les filtres horizontaux */
.trier {
    display: flex;
    padding: 10px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 100;
    font-family: 'LXGW Marker Gothic', sans-serif;
    gap: 5px;
    align-items: center;
}

.filter-group {
    position: relative;
    margin-right: 5px;
}

.filter-checkbox {
    display: none;
}

.filter-final {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

#nbre {
    margin: 0 20px;
    font-weight: 400;
}

.up {
    display: flex;
    justify-content: space-between;
    gap: 20px;
        flex-wrap: wrap;
    padding: 5px;
}

.filter-label {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 4px;
}

.filter-label:hover {
    background: #f0f0f09a;
}

.display-mode {
    display: flex;
    gap: 7px;
    align-items: center;
}

.display-mode div i {
    padding: 0;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    color: rgb(162, 169, 176);
    font-size: 18px;
}

.display-mode div {
    padding: 0;
    background: white;
}

.display-mode div i:hover,
.display-mode div.active i {
    color: rgb(11, 18, 21);
}

.filter-label i {
    margin-left: 8px;
    transition: transform 0.3s;
}

.filter-checkbox:checked + .filter-label i {
    transform: rotate(180deg);
}

.filter-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
    min-width: 300px;
    padding: 10px;
    margin-top: 5px;
}

.filter-checkbox:checked ~ .filter-content {
    display: block;
}

.filter-options {
    display: flex;
    flex-direction: column;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 10px;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding-left: 0;
    scrollbar-width: none;
}

.filter-options li {
    padding: 8px 10px;
    white-space: nowrap;
}

/* Styles pour les filtres sélectionnés */
.selected-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
}

.selected-filter {
    display: flex;
    align-items: center;
    background: #e9ecef;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 13px;
    color: #495057;
}

.selected-filter .remove-filter {
    margin-left: 6px;
    cursor: pointer;
    color: #6c757d;
    font-size: 12px;
}

.selected-filter .remove-filter:hover {
    color: #dc3545;
}

/* Boutons de filtrage */
.filter-actions {
    display: flex;
    gap: 5px;
    margin-left: 5px;
}

.apply-filters-btn {
    background: #000;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.apply-filters-btn:hover {
    background: #333;
}

.reset-filters {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    color: #6c757d;
    font-size: 14px;
    transition: all 0.3s;
}

.reset-filters:hover {
    background: #e9ecef;
    color: #495057;
}
/* Styles pour mobiles */
@media (max-width: 768px) {
    .up {
        flex-direction: column;
        gap: 10px;
        padding: 20px 10px;
    }

    .filter-group {
        width: 100%;
    }

    .filter-label {
        width: 100%;
        justify-content: space-between;
        padding: 8px 12px;
        font-size: 14px;
    }

    .filter-content {
        position: relative;
        top: 0;
        left: 0;
        max-width: 100px !important;
        min-width: 100%;
        padding: 10px;
        margin-top: 5px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .filter-options {
        max-height: 180px;
        padding-right: 5px;
        gap: 6px;
    }

    .filter-actions {
        flex-direction: row;
        gap: 8px;
        margin-left: 0;
        margin: 20px 0 0 0;
        width: 100%;
    }

    .apply-filters-btn, .reset-filters {
        width: 100%;
        text-align: center;
        font-size: 14px;
        padding: 10px 0;
    }

    .display-mode {
        justify-content: flex-start;
        gap: 10px;
    }

    .display-mode div i {
        font-size: 20px;
        padding: 5px;
    }
    .photo-container{
        height: 450px !important;
    }

}


/* Message aucun produit */
.no-products {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.no-products .btn {
    background: #000;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.3s;
}

.no-products .btn:hover {
    background: #333;
}

/* Styles pour les produits */
.listProducts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 4px;
} 
    @media (max-width: 768px) {
        .listProducts {
            grid-template-columns: repeat(2, 1fr);
        }
    }

.produit {
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.photo-container {
    position: relative;
    height: 450px;
    overflow: hidden;
    flex-shrink: 0;
}

.photo {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 0.5s ease-in-out;
    flex: 0 0 100%;
}

.haut {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 10px;
    z-index: 2;
}

.reduction {
    background: rgb(251, 221, 218);
    color: rgb(250, 128, 117);
    padding: 3px 8px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 500;
}

.favoris ,.favori {
    color: black;
    font-size: 20px;
    background: none !important;
}

.favoris.active  , .favori.active{
    color: rgb(240, 89, 75);
}

.fleche {
    position: absolute;
    top: 50%;
    width: 100%;
    display: none;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 1;
    align-items: center;
    height: 100%;
}
@media (max-width: 768px) {
    .fleche {
    display: flex;
}
}

.photo-container:hover .fleche {
    display: flex;
}
.fleche-btn  {
    color: black;
    height: 100%;
     display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    cursor: pointer;
    margin: 0 8px;
    font-weight: 100;
}
.fleche-btn  i{
    color: black;
    width: 20px;
    height: 20px;
   
}

.bas {
    position: absolute;
    bottom: 0;
    width: 100%;
    color: black;
    padding: 10px 5px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
    background: none !important;
}

.photo-container:hover .bas {
    opacity: 1;
}

.addpanier {
    margin-bottom: 8px;
    font-size: 14px;
}

.tailles {
    display: none;
    justify-content: center;
    gap: 5px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.size {
    width: 54px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    background: rgba(32, 34, 35, 0.518);
    padding: 7px;
    color: white;
    text-align: center;
    font-weight: 500;
    border-radius: 1.5px;
}

.size:hover {
    background: #f0f0f0;
    color: black;
}

.under {
    padding: 12px 5px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.type {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 2px;
}

.descript {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    margin-bottom: 10px;
    flex-grow: 1;
}

.prix {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 5px;
    font-weight: 500;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
}

.prix span:first-child {
    text-decoration: line-through;
    color: rgb(243, 92, 78) !important;
    font-size: 15px;
}

.colors {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.color-option {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    border: 1px solid #eee;
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

/* Styles de lien */
a.produit-link {
    text-decoration: none;
    color: inherit;
}
/* Styles de base pour les options de couleur */
.colors {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.color-option {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

/* Styles pour les filtres sélectionnés */
.selected-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
}

.selected-filter {
    display: flex;
    align-items: center;
    background: #e9ecef;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 13px;
    color: #495057;
}

.selected-filter .remove-filter {
    margin-left: 6px;
    cursor: pointer;
    color: #6c757d;
    font-size: 12px;
}

.selected-filter .remove-filter:hover {
    color: #dc3545;
}
.product-description pre {
    white-space: pre-wrap;   /* garde les sauts de ligne mais permet aussi le wrap */
    word-wrap: break-word;   /* casse les mots trop longs si besoin */
    overflow-wrap: break-word;
    width: 100%;             /* prend la largeur de son parent */
    box-sizing: border-box;  /* évite de dépasser à cause des padding */
}

/* Styles pour le tri et les filtres */
.trier {
    display: flex;
    padding: 10px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 100;
    font-family: 'LXGW Marker Gothic', sans-serif;
    gap: 5px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.filter-group {
    position: relative;
    margin-right: 5px;
}

.filter-label {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 4px;
}

.filter-actions {
    margin-left: 5px;
}

/* Styles pour les boutons */
.reset-filters {
    gap: 5px;
    background:white;
    border: none;
    padding: 4px 10px;
    border-radius: 1px;
    cursor: pointer;
    color: #000;
    font-size: 14px;
    margin-left: 5px;
}

.reset-filters:hover {
    background: #e9ecef;
}

.apply-filters-btn {
    background: #000;
    color: white;
    border: none;
    padding: 4px 13px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 0;
    margin-left:8px;
}

.apply-filters-btn:hover {
    background: #333;
}

/* Style pour le message "Aucun produit" */
.no-products {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top:100px;
}

.no-products .btn {
    background: #000;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}

.no-products .btn:hover {
    background: #333;
}
.spinner.overlay {
        transform: rotateZ(45deg);
        perspective: 1000px;
        border-radius: 50%;
        width: 48px;
        height: 48px;
        color: #fff;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
      }
        .spinner.overlay:before,
        .spinner.overlay:after {
          content: '';
          display: block;
          position: absolute;
          top: 0;
          left: 0;
          width: inherit;
          height: inherit;
          border-radius: 50%;
          transform: rotateX(70deg);
          animation: 1s spin linear infinite;
        }
        .spinner.overlay:after {
          color: var(--primary-color);
          transform: rotateY(70deg);
          animation-delay: .4s;
        }

      @keyframes rotate {
        0% {
          transform: translate(-50%, -50%) rotateZ(0deg);
        }
        100% {
          transform: translate(-50%, -50%) rotateZ(360deg);
        }
      }

      @keyframes rotateccw {
        0% {
          transform: translate(-50%, -50%) rotate(0deg);
        }
        100% {
          transform: translate(-50%, -50%) rotate(-360deg);
        }
      }

      @keyframes spin {
        0%,
        100% {
          box-shadow: .2em 0px 0 0px currentcolor;
        }
        12% {
          box-shadow: .2em .2em 0 0 currentcolor;
        }
        25% {
          box-shadow: 0 .2em 0 0px currentcolor;
        }
        37% {
          box-shadow: -.2em .2em 0 0 currentcolor;
        }
        50% {
          box-shadow: -.2em 0 0 0 currentcolor;
        }
        62% {
          box-shadow: -.2em -.2em 0 0 currentcolor;
        }
        75% {
          box-shadow: 0px -.2em 0 0 currentcolor;
        }
        87% {
          box-shadow: .2em -.2em 0 0 currentcolor;
        }
      }
   