/* Carousel */
.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    animation: scroll 15s linear infinite;
}


.carousel-container img {
    width: 99%;
    max-height: 400px;
    object-fit: cover;
    margin-right: 0.5em ;
    margin-left: 0.5em ;
}

.carousel-slides {
    display: flex;
    transition: transform 1s ease-in-out;
    width: 300%; /* ou 100% * nb d'images */
}

.carousel-slide {
    width: 100%;
    flex-shrink: 0;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translate(-50%, -0.5em);
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background-color 0.3s;
}

.carousel-dot.active {
    background-color: rgba(255, 255, 255, 0.9);
}




/* Catégories */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.categorie-box {
    position: relative;
    aspect-ratio: 1 / 1; /* carré */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    background-color: #111; /* fallback */
}

.categorie-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1);
    transition: transform 0.4s ease-in-out;
    z-index: 1;
}

.categorie-label {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 10px 15px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

.categorie-box:hover .categorie-bg {
    transform: scale(1.1); /* zoom image seulement */
}



/* Meilleures ventes */
.meilleures-ventes {
    padding: 2em;
}
.produits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5em;
}
.produit {
    border: 1px solid #ccc;
    padding: 1em;
    text-align: center;
    border-radius: 10px;
    background: #fafafa;
}
.produit img {
    max-width: 100%;
    height: 180px;
    object-fit: cover;
}
.produit h3 {
    margin: 0.5em 0 0.2em;
    font-size: 1.1em;
}
.produit p {
    color: #333;
    font-weight: bold;
}


@media (max-width: 1100px) {
    .carousel-container img{
        width: 98%;
    }
}


@media (max-width: 600px) {
    .carousel-container img{
        width: 95%;
    }
}
