/* Core Scroll Snap Implementation */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

html {
    scroll-padding-top: 4rem;
}

.snap-container {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* --- NAVIGATION --- */
@media (min-width: 768px) {
    nav {
        gap: 3rem;
        padding: 0 4rem;
        height: 4rem;
    }
}

/* --- SECTIONS GÉNÉRIQUES --- */
section {
    min-height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    box-sizing: border-box;
    position: relative;
}

/* --- SECTION PRODUITS (#menu) --- */
#menu {
    justify-content: flex-start !important;
    background-color: white !important;
    padding-top: 2rem !important;
}

#menu h2 {
    margin-top: 0 !important;
    margin-bottom: 2rem !important;
    font-size: clamp(1.8rem, 3vw, 2.5rem) !important;
    border: none !important;
}

/* --- FIX FINAL : BARRE DE FILTRE IMMOBILE --- */
#filter-buttons {
    margin-bottom: 3rem !important;
    gap: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100% !important;
    max-width: 500px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.filter-btn {
    flex: none !important;
    width: 100px !important;
    padding: 10px 0 !important;
    text-align: center;
    font-size: 14px !important;
}

/* --- GRILLE DE PRODUITS --- */
#product-grid {
    display: grid;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
    padding: 0 20px 40px 20px;
    min-height: 400px;
}

@media (min-width: 768px) {
    #product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- DESIGN DES CARTES --- */
.product-card {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, box-shadow 0.3s ease;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #f1f5f9 !important;
    border-radius: 4px !important;
    overflow: hidden;
}

.product-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.product-card .bg-cover {
    aspect-ratio: 1 / 1;
    height: auto;
    width: 100%;
    background-size: cover;
    background-position: center !important;
}

.product-card .p-3 {
    padding: 1.5rem 1rem !important;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card h3 {
    font-weight: 700 !important;
    color: #1a202c;
    margin-bottom: 8px !important;
    font-size: clamp(0.85rem, 4vw, 1.25rem) !important;
}

.product-card p {
    font-size: 1rem;
    color: #a0aec0;
    margin-bottom: 2rem;
}

.product-card .product-price {
    font-weight: 800 !important;
    color: #000;
    font-size: clamp(1rem, 5vw, 1.5rem) !important;
}

.product-card button {
    margin-top: 1rem;
    width: 100%;
    padding: 12px 0;
    font-weight: bold;
    border-radius: 0 !important;
}

/* --- SECTION VIDEO & TEMOIGNAGES --- */
#promo .max-w-6xl {
    width: 100%;
    max-width: 1000px;
}

#promo {
    padding-top: 2rem !important;
}

#temoignage {
    padding-top: 6rem !important;
    justify-content: flex-start !important;
}

/* --- FOOTER --- */
footer,
.footer-text,
#temoignage > p:last-child {
    position: absolute !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    white-space: nowrap;
    text-align: center;
    margin: 0 !important;
    opacity: 0.8;
}

/* Theming */
:root {
    --farm-green: #2d5a27;
    --soft-bg: #ffffff;
}

body {
    background-color: var(--soft-bg);
    color: #333;
    font-family: 'Segoe UI', sans-serif;
}

.accent-text {
    color: var(--farm-green);
}

#fleche {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 2rem;
}

/* --- MODAL / POP-UP CUSTOM --- */
@keyframes pop-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-pop {
    animation: pop-in 0.2s ease-out forwards;
}

#contactModal:not(.hidden) {
    display: flex !important;
}

/* --- MOBILE (Modifié UNIQUEMENT pour la dernière section) --- */
@media (max-width: 767px) {
    section {
        height: 100vh !important;
        min-height: 100vh;
        padding: 0 1rem !important;
        display: flex;
        flex-direction: column;
        justify-content: center !important;
        align-items: center;
    }

    #fleche{
       bottom: 2.5rem !important;
       }

    #promo {
        justify-content: center !important;
        padding-bottom: 10vh !important;
    }

    #menu {
        height: auto !important;
        justify-content: flex-start !important;
        padding-top: 4rem !important;
    }

    #filter-buttons {
        max-width: 340px !important;
        gap: 8px;
    }

    .filter-btn {
        width: 75px !important;
        font-size: 11px !important;
    }

    #product-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 0 4px 15px 4px !important;
    }
    #product-grid::after {
        content: "";
        display: block;
        grid-column: 1 / -1; /* Prend toute la largeur de la grille */
        height: 150px;       /* L'espace que tu veux ajouter */
        width: 100%;
    }

    .product-card .bg-cover {
        aspect-ratio: 1 / 1 !important;
        background-position: center !important;
    }

    .product-card h3 {
        font-size: 0.85rem !important;
        margin-bottom: 2px !important;
    }

    .product-card p {
        font-size: 10px !important;
        margin-bottom: 6px !important;
    }

    /* --- LA SEULE MODIF ICI --- */
    #temoignage {
        height: auto !important; /* On débloque la hauteur */
        min-height: 100vh !important;
        scroll-snap-align: start !important; /* On s'aligne au début */
        scroll-snap-stop: normal !important; /* On permet de continuer le scroll */
    }

    footer,
    .footer-text,
    #temoignage > p:last-child {
        position: relative !important; /* Le footer se met à la suite du texte */
        bottom: 0 !important;
        left: 0 !important;
        transform: none !important;
        margin-top: 2rem !important;
        display: block !important;
        padding-bottom: 2rem !important;
    }
}

.status-badge {
    display: inline-block;
    width: 85px;
    text-align: center;
}

.product-price {
    white-space: nowrap !important;
    display: inline-block;
    margin-top: 4px; /* Crée un petit espace propre avec le badge */
}

#prixAcompte {
    white-space: nowrap !important;
    display: inline-block;
    margin-left: 8px;
}
/* Nouvelle Animation Zoom (Bounce) au clic */
@keyframes cardClickZoom {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05); /* Ombre normale */
    }
    50% {
        transform: scale(1.05); /* S'agrandit de 5% */
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* Grosse ombre pour l'effet de soulèvement */
        z-index: 10; /* Passe au-dessus des autres cartes */
    }
    100% {
        transform: scale(1);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05); /* Revient à la normale */
    }
}

.mobile-click-anim {
    animation: cardClickZoom 0.2s ease-in-out; /* On utilise la nouvelle animation */
    pointer-events: none; /* Empêche les clics multiples pendant l'animation */
}
/* On cible spécifiquement la product-card qui a la classe anim-click */
.product-card.anim-click {
    animation: cardZoomEffect 0.2s ease-out !important;
    z-index: 999 !important;
    position: relative !important;
}

@keyframes cardZoomEffect {
    0% { transform: scale(1); }
    50% { transform: scale(1.04); }
    100% { transform: scale(1); }
}
