﻿.page-produits {
    padding-top: 1rem;
}

.titre-page {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.carte-style {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}

.bloc-filtres {
    position: sticky;
    top: 95px;
    padding: 1.5rem;
}

.titre-section {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.liste-filtres {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .liste-filtres li + li {
        margin-top: 0.75rem;
    }

.lien-filtre {
    color: #374151;
    text-decoration: none;
    display: inline-block;
    transition: all 0.15s ease;
}

    .lien-filtre:hover {
        color: #111827;
    }

    .lien-filtre.actif {
        font-weight: 700;
        color: #111827;
    }

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.grille-produits {
    padding: 1.5rem;
}

.carte-produit {
    border: 1px solid #f1f5f9;
    border-radius: 18px;
    background: #fff;
    height: 100%;
    /* Pas de overflow:hidden ici : il rognait les infobulles des allergènes.
       Le rognage de l'image est assuré par .image-produit-container. */
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .carte-produit:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 24px rgba(0,0,0,0.06);
    }

.image-produit-container {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Reprend l'arrondi que la carte assurait via son overflow */
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

    .image-produit-container img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.contenu-produit {
    padding: 1rem;
}

.titre-produit {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
   
    min-height: 2.7rem;
}

.prix-produit {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
   
}

.allergenes {
    margin: 0 0 0.7rem 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 34px;
}

    .allergenes .item {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        position: relative;
        cursor: pointer;
    }

.cercle-allergene {
    width: 30px;
    height: 25px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Emoji dans le cercle (remplace l'ancienne img) */
.icone-allergene-emoji {
    font-size: 15px;
    line-height: 1;
    filter: saturate(0) brightness(10); /* rend l'emoji blanc */
}

.allergenes .item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    /* Libellé sur plusieurs lignes plutôt qu'une bande qui sort de la carte */
    white-space: normal;
    width: max-content;
    max-width: 150px;
    text-align: center;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

/* Pastilles d'extrémité : on aligne l'infobulle sur le bord plutôt que de la centrer,
   sinon elle déborde du côté correspondant. */
.allergenes .item:first-child::after {
    left: 0;
    transform: none;
}

.allergenes .item:last-child::after {
    left: auto;
    right: 0;
    transform: none;
}

.allergenes .item:hover::after {
    opacity: 1;
}

.allergenes .item::before {
    content: '';
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

.allergenes .item:hover::before {
    opacity: 1;
}

.controle-quantite {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 0.75rem;
}

    .controle-quantite button {
        border: none;
        background: transparent;
        width: 48px;
        height: 45px;
        font-weight: 700;
        font-size: 1.10rem;
        line-height: 1;
    }

    .controle-quantite input {
        border: none;
        text-align: center;
        box-shadow: none !important;
        height: 45px;
        font-size: 1rem;
    }

    .controle-quantite button:hover {
        background: #f3f4f6;
    }

.bouton-ajout-panier {
    width: 100%;
    border-radius: 999px;
    padding: 0.8rem 1rem;
    font-weight: 600;
}

.etat-vide {
    padding: 2rem;
    text-align: center;
}

@media (max-width: 991.98px) {
    .bloc-filtres {
        position: static;
        margin-bottom: 1rem;
    }

    .image-carousel-boutique {
        height: 220px;
    }

    .carousel-caption {
        padding: 0.75rem 1rem;
        max-width: 90%;
    }

        .carousel-caption h2 {
            font-size: 1.2rem;
        }

        .carousel-caption p {
            font-size: 0.9rem;
            margin-bottom: 0;
        }
}

.carousel-boutique {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}

.image-carousel-boutique {
    height: 320px;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    max-width: 420px;
    bottom: 3rem;
}

.ligne-prix-delai {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
    margin-top: 4px;
}

.delai-fabrication-produit {
    color: #b02a37;
    background: #fdeaea;
    font-size: 0.80rem;
    font-weight: 500;
    padding: 3px 6px;
    border-radius: 4px;
 }

.zone-liste-produits-wrapper {
    position: relative;
    min-height: 420px;
}

.spinner-produits {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 420px;
}

    .spinner-produits.d-none {
        display: none;
    }

#zone-liste-produits.d-none {
    display: none !important;
}

.spinner-produits .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Badge promo "5+1 gratuit" sur les cartes produits */
.badge-promo {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #198754;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
    z-index: 2;
    letter-spacing: 0.3px;
}

/* Le conteneur d'image doit être positionné pour le badge */
.image-produit-container {
    position: relative;
}



