/* =====================================================
   Bionaturels — Mise En Avant (MEA)
   Bannière fixe + popup produit
   ===================================================== */

/* ── Variables ── */
:root {
    --mea-green:    #5d6e4d;
    --mea-green-dk: #4a5a3c;
    --mea-white:    #ffffff;
    --mea-radius:   8px;
    --mea-z-banner: 9000;
    --mea-z-popup:  9100;
    --mea-banner-h: 3rem;
}

/* ══════════════════════════════════════════
   BANNIÈRE FIXE
   ══════════════════════════════════════════ */
.mea-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--mea-z-banner);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: .5rem 2rem .5rem 1rem; /* right padding laisse place au bouton fermer */

    background-color: var(--mea-green);
    color: var(--mea-white);
    font-size: 0.875rem;
    line-height: 1.2;
    cursor: pointer;
    height: var(--mea-banner-h);
}

/* Décale le body pour éviter que le contenu passe sous la bannière */
body.mea-banner-visible {
    padding-top: var(--mea-banner-h) !important;
    scroll-padding-top: var(--mea-banner-h);
}

/* Décale les headers sticky du thème */
body.mea-banner-visible .uk-sticky-fixed,
body.mea-banner-visible [data-uk-sticky] {
    top: var(--mea-banner-h) !important;
}

.mea-banner__message {
    margin: 0;
    opacity: 0.9;
}

.mea-banner__name {
    font-weight: 600;
}

.mea-banner__price {
    opacity: 0.85;
}
.mea-banner__price .woocommerce-Price-amount {
    color: inherit;
}

.mea-banner__cta {
    display: inline-block;
    padding: 4px 14px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 100px;
    color: var(--mea-white);
    text-decoration: none;
    font-size: 0.8125rem;
    white-space: nowrap;
    transition: background-color 0.2s, border-color 0.2s;
}
.mea-banner__cta:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--mea-white);
    color: var(--mea-white);
    text-decoration: none;
}

.mea-banner__close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--mea-white);
    font-size: 1.5rem;
    line-height: 1.25rem;
    cursor: pointer;
    padding: 2px 8px 8px 8px;
    opacity: 0.75;
    transition: opacity 0.2s;
}
.mea-banner__close:hover { opacity: 1; }

/* ══════════════════════════════════════════
   POPUP
   ══════════════════════════════════════════ */
.mea-popup {
    position: fixed;
    inset: 0;
    z-index: var(--mea-z-popup);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mea-popup[hidden] { display: none; }

/* Overlay semi-transparent */
.mea-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

/* Carte produit */
.mea-popup__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 94vw;
    width: 62rem;
    /* overflow: hidden; */

    /* Animation d'entrée */
    animation: meaPopupIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.mea-popup__inner .product{
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    background-color: var(--color-orange-200);
    padding: 1rem;
    border-radius: 10px;
}
.mea-popup__product-img {
    margin-right: 1rem;
    border-radius: 4px;
    width: 24rem;
    aspect-ratio: 1;
    flex-shrink: 0;
    align-self: flex-start;
    overflow: hidden;
}
.mea-popup__product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mea-popup__product-body{
    width: auto;
    display: flex;
    flex-direction: column;
}

.mea-popup__inner__introduction{
}
.mea-popup__inner__introduction h2, .mea-popup__inner__introduction p{
    color: white;
}
.mea-popup__inner__introduction h2{
    margin-bottom: 0;
}
.mea-popup__product-name a{
    color: var(--color-black);
    line-height: 1;
}
 .mea-popup__inner__introduction p{
    margin-bottom: 1rem;
 }

@keyframes meaPopupIn {
    from { opacity: 0; transform: scale(0.88) translateY(16px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.mea-popup__close {
    position: absolute;
    bottom: -4rem;
    left: 0;
    z-index: 2;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

/* Message d'accroche (champ libre ACF) */
.mea-popup__tagline {
    margin: 0;
    padding: 14px 20px 0;
    font-size: 0.8125rem;
    color: var(--mea-green);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

/* ── Carte produit WooCommerce dans la popup ── */
.mea-popup__products {
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
}

/* Réinitialise les styles de grille shop sur le <li> */
.mea-popup__products .product {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    text-align: center;
}


/* ── Formulaire quantité + ajouter au panier ── */
.mea-popup__cart {
    align-items: center;
    gap: 8px;
    margin: 0;
}

.mea-popup__cart .quantity {
    flex-shrink: 0;
}
.mea-popup__cart .quantity input {
    width: 5rem;
}

.mea-popup__cart .qty {
    width: 60px;
    text-align: center;
}

.mea-popup__add-to-cart {
    flex: 1;
    margin: 0 !important;
    white-space: nowrap;
}

/* Masque le lien "Voir le panier" (WooCommerce) et le message "Item Added"
   (plugin quantity-field-on-shop-page) injectés après l'ajout au panier.
   Le CTA statique "Voir le produit" (.mea-popup__product-cta) n'est pas concerné. */
.mea-popup .added_to_cart,
.mea-popup .confirm_add {
    display: none !important;
}

/* ── Bulle flottante ── */
.mea-bubble {
    position: fixed;
    bottom: 1.8rem;
    right: 10rem;
    z-index: var(--mea-z-banner);

    display: flex;
    align-items: center;
    gap: 0;

    height: 3rem;
    border-radius: 6px;
    border: none;
    padding: 0;
    cursor: pointer;
    overflow: hidden;

    background-color: white;
    color: var(--mea-white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: box-shadow 0.2s;
}
.mea-bubble:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.mea-bubble__text {
    padding: 0 1.25rem;
    font-size: 1rem;
    line-height: 1.3;
    text-align: left;
    max-width: 480px;
    white-space: normal;
    font-weight: 400 !important;
    display: block;
    color: black;
    font-size: 1.15rem;
}
.mea-bubble__text *{
    margin-bottom: 0;
}
.mea-bubble__text strong{
    font-weight: 600 !important;
}


.mea-bubble__img {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    object-fit: cover;
    display: block;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .mea-banner {
        height: var(--mea-banner-h);
        min-height: var(--mea-banner-h);
        padding: 8px 44px 8px 12px;
        gap: 6px;
    }
    body.mea-banner-visible {
        padding-top: 0 !important;
    }
    .mea-banner__message {  }
}
