* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #222;
    background: #f6f7f4;
}

header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 16px 6%;
    background: #174d32;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo,
nav a {
    color: white;
    font-weight: bold;
    text-decoration: none;
}

.logo {
    font-size: 1.25rem;
}

nav ul {
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

main {
    width: min(1100px, 90%);
    margin: 40px auto;
}

.intro {
    padding: 32px;
    margin-bottom: 40px;
    background: white;
    border-radius: 12px;
}

h1 {
    color: #174d32;
}

.liste-produits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
}

.liste-produits > p {
    grid-column: 1 / -1;
}

.produit {
    display: flex;
    flex-direction: column;
    padding: 16px;
    text-align: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 12px #00000012;
}

.produit img {
    width: 100%;
    height: 200px;
    object-fit: contain;
}

.produit h3 {
    display: flex;
    min-height: 2.6em;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.produit > p:not(.prix) {
    flex-grow: 1;
    line-height: 1.5;
}

.prix {
    min-height: 1.5em;
    color: #167a35;
    font-weight: bold;
}

.image-manquante {
    display: grid;
    min-height: 200px;
    place-items: center;
    color: #666;
    background: #f0f1ee;
    border-radius: 8px;
}

.produit-indisponible {
    opacity: 0.65;
}

.ajouter-panier,
#commander-whatsapp,
.bouton-contact {
    display: inline-block;
    padding: 11px 16px;
    color: white;
    background: #174d32;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
}

.produit .ajouter-panier {
    align-self: center;
    margin-top: auto;
}

.ajouter-panier:hover,
#commander-whatsapp:hover:not(:disabled),
.bouton-contact:hover {
    background: #236b46;
}

.ajouter-panier:disabled,
#commander-whatsapp:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#panier {
    margin-top: 40px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 12px #00000012;
}

#liste-panier {
    padding-left: 20px;
}

#liste-panier li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

#liste-panier li span {
    margin-right: auto;
}

#liste-panier button {
    padding: 6px 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
}

#contact {
    margin-top: 48px;
}

/* Panier toujours visible pendant le défilement */
.panier-flottant {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 48vw;
    padding: 14px 18px;
    color: white;
    background: #174d32;
    border-radius: 14px;
    box-shadow: 0 4px 16px #0003;
    text-decoration: none;
}

.panier-flottant:hover {
    background: #236b46;
}

.panier-flottant-icone {
    font-size: 1.6rem;
}

/* Bouton WhatsApp toujours visible */
.bouton-whatsapp {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    color: white;
    background: #25d366;
    border-radius: 50px;
    box-shadow: 0 4px 14px #0003;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.bouton-whatsapp:hover {
    background: #1eaf54;
    transform: translateY(-2px);
}

.bouton-whatsapp span {
    font-size: 1.4rem;
}

@media (max-width: 500px) {
    nav {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    nav ul {
        gap: 16px;
    }

    #panier {
        padding: 18px;
    }

    #liste-panier li {
        align-items: flex-start;
    }

    .panier-flottant {
        left: 10px;
        bottom: 12px;
        max-width: 46vw;
        gap: 7px;
        padding: 10px;
        font-size: 0.8rem;
    }

    .panier-flottant-icone {
        font-size: 1.3rem;
    }

    .bouton-whatsapp {
        right: 10px;
        bottom: 12px;
        gap: 6px;
        padding: 11px 12px;
        font-size: 0.8rem;
    }

    .bouton-whatsapp span {
        font-size: 1.1rem;
    }
}