.dpp-offres {
    margin: 24px 0;
    clear: both;
}

.dpp-offres__title {
    margin: 0 0 14px;
    font-size: 1.25rem;
    line-height: 1.3;
}

.dpp-offres__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.dpp-offre-card {
    --dpp-accent: #3f454b;
    --dpp-accent-dark: #2e3338;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 225px;
    padding: 20px;
    border: 3px solid var(--dpp-accent);
    border-radius: 12px;
    background: var(--dpp-bg, #fff);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

/* 1 bouteille : anthracite */
.dpp-offre-card--qty-1 {
    --dpp-accent: #454b50;
    --dpp-accent-dark: #30353a;
    --dpp-bg: #f7f8f8;
}

/* 2 bouteilles : bleu DPP */
.dpp-offre-card--qty-2 {
    --dpp-accent: #315f7d;
    --dpp-accent-dark: #244b65;
    --dpp-bg: #f5f9fc;
}

/* 3 bouteilles : doré */
.dpp-offre-card--qty-3 {
    --dpp-accent: #c89b3c;
    --dpp-accent-dark: #a97d22;
    --dpp-bg: #fffaf0;
}

/* 6 bouteilles : vert */
.dpp-offre-card--qty-6 {
    --dpp-accent: #2f7a49;
    --dpp-accent-dark: #245f39;
    --dpp-bg: #f4fbf6;
}

.dpp-offre-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px color-mix(in srgb, var(--dpp-accent) 22%, transparent);
}

.dpp-offre-card--best {
    box-shadow: 0 9px 25px rgba(200, 155, 60, .24);
}

.dpp-offre-card__badge {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    min-height: 28px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: -7px 0 12px;
    padding: 6px 4px;
    border-radius: 999px;
    background: var(--dpp-accent);
    color: #fff;
    font-size: 10px !important;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: visible;
}

.dpp-offre-card__badge--shipping {
    background: #2f7a49;
}

.dpp-offre-card__qty {
    margin-bottom: 9px;
    font-size: 1.05rem;
    font-weight: 700;
}

.dpp-offre-card__price {
    margin-bottom: 6px;
    font-size: 1.42rem;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
}

.dpp-offre-card__price small {
    display: inline;
    margin-left: 4px;
    font-size: .70rem;
    font-weight: 500;
    opacity: .72;
    white-space: nowrap;
}

.dpp-offre-card__discount {
    margin-bottom: 7px;
    color: var(--dpp-accent-dark);
    font-weight: 800;
}

.dpp-offre-card__saving {
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-top: 1px;
    font-size: .80rem;
    line-height: 1.25;
    white-space: nowrap;
}

.dpp-offre-card__saving strong {
    color: var(--dpp-accent-dark);
    font-size: 1.03em;
}

.dpp-offre-card__button.button {
    width: 100%;
    margin-top: auto !important;
    border: 1px solid var(--dpp-accent) !important;
    background: var(--dpp-accent) !important;
    color: #fff !important;
    text-align: center;
    font-weight: 700 !important;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease !important;
}

.dpp-offre-card__button.button:hover,
.dpp-offre-card__button.button:focus {
    background: var(--dpp-accent-dark) !important;
    border-color: var(--dpp-accent-dark) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 7px 16px color-mix(in srgb, var(--dpp-accent) 25%, transparent);
}

@supports not (color: color-mix(in srgb, black, white)) {
    .dpp-offre-card:hover {
        box-shadow: 0 12px 28px rgba(0, 0, 0, .14);
    }
    .dpp-offre-card__button.button:hover,
    .dpp-offre-card__button.button:focus {
        box-shadow: 0 7px 16px rgba(0, 0, 0, .16);
    }
}

@media (max-width: 640px) {
    .dpp-offres__grid {
        grid-template-columns: 1fr;
    }

    .dpp-offre-card {
        min-height: 0;
    }

    .dpp-offre-card__price {
        white-space: nowrap;
    }

    .dpp-offre-card__saving {
        white-space: nowrap;
        font-size: .83rem;
    }

    .dpp-offre-card__badge {
        font-size: 9px !important;
        padding-left: 3px;
        padding-right: 3px;
    }
}


/* V3.1.4 — correction forcée des badges, avec nouveau fichier CSS pour contourner les caches */
body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;
    width: auto !important;
    max-width: calc(100% - 8px) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    margin: -7px auto 12px !important;
    padding: 7px 10px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: normal !important;
    flex-shrink: 1 !important;
}

@media (max-width: 900px) {
    body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge {
        font-size: 11px !important;
        padding-left: 7px !important;
        padding-right: 7px !important;
    }
}

/* V3.1.5 — badge reconstruit : icône et texte séparés, aucun débordement */
body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: center !important;
    column-gap: 4px !important;
    align-self: center !important;
    width: calc(100% - 14px) !important;
    max-width: calc(100% - 14px) !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin: -7px auto 12px !important;
    padding: 7px 6px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge-icon {
    display: block !important;
    flex: none !important;
    font-size: 12px !important;
    line-height: 1 !important;
}

body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge-text {
    display: block !important;
    min-width: 0 !important;
    overflow: visible !important;
    color: #fff !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: -.15px !important;
    text-align: center !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

@media (max-width: 900px) {
    body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge-text {
        font-size: 9px !important;
        letter-spacing: -.25px !important;
    }
    body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge-icon {
        font-size: 11px !important;
    }
}

/* V3.1.6 — badge pleine largeur, texte toujours complet */
body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    align-self: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin: -7px 0 12px !important;
    padding: 8px 6px !important;
    border-radius: 999px !important;
    overflow: visible !important;
    white-space: nowrap !important;
}

body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge-icon {
    display: inline-block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    font-size: 13px !important;
    line-height: 1 !important;
}

body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge-text {
    display: inline-block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    overflow: visible !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

@media (max-width: 900px) {
    body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge {
        gap: 4px !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
    body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge-text {
        font-size: 10px !important;
    }
    body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge-icon {
        font-size: 11px !important;
    }
}


/* V3.1.7 — correction définitive : libellés en casse normale, sans rognage */
body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge {
    width: auto !important;
    max-width: calc(100% - 8px) !important;
    align-self: center !important;
    padding: 8px 12px !important;
    gap: 5px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge-text {
    display: block !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    white-space: nowrap !important;
}

body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge-icon {
    flex: 0 0 auto !important;
    font-size: 13px !important;
}

@media (max-width: 900px) {
    body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge {
        max-width: calc(100% - 4px) !important;
        padding: 7px 9px !important;
        gap: 4px !important;
    }
    body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge-text {
        font-size: 11px !important;
    }
    body.single-product .dpp-offres .dpp-offre-card .dpp-offre-card__badge-icon {
        font-size: 12px !important;
    }
}


/* DPP Précommandes */
.dpp-preorder-notice{
    margin:0 0 16px;
    padding:14px 16px;
    border:1px solid #e7d3a5;
    border-left:5px solid #c8941f;
    border-radius:10px;
    background:#fff8e8;
    color:#0b2348;
}
.dpp-preorder-notice__title{
    display:inline-block;
    margin-bottom:6px;
    padding:5px 9px;
    border-radius:999px;
    background:#c8941f;
    color:#fff;
    font-size:12px;
    font-weight:800;
    letter-spacing:.5px;
}
.dpp-preorder-notice__line{display:block;font-size:13px;line-height:1.45}
.dpp-preorder-notice__delivery{font-weight:700;margin-top:2px}
.dpp-preorder-badge{background:#c8941f!important;color:#fff!important}


/* ==========================================================
   V3.2.5 — Elementor Produit unique
   Placement automatique sous Ajouter au panier
========================================================== */

body.single-product .dpp-offres--elementor{
    width:100%!important;
    max-width:100%!important;
    margin:18px 0 16px!important;
    padding:0!important;
    clear:both!important;
    box-sizing:border-box!important;
}

body.single-product .dpp-offres--elementor .dpp-offres__title{
    margin:0 0 10px!important;
    color:#06264A!important;
    font-family:Arial,Helvetica,sans-serif!important;
    font-size:17px!important;
    font-weight:700!important;
    line-height:1.3!important;
}

body.single-product .dpp-offres--elementor .dpp-offres__grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
    width:100%!important;
}

body.single-product .dpp-offres--elementor .dpp-offre-card{
    min-height:0!important;
    padding:12px!important;
    border-width:2px!important;
    border-radius:10px!important;
    box-shadow:0 3px 10px rgba(6,38,74,.06)!important;
}

body.single-product .dpp-offres--elementor .dpp-offre-card:hover{
    transform:none!important;
    box-shadow:0 5px 14px rgba(6,38,74,.09)!important;
}

body.single-product .dpp-offres--elementor .dpp-offre-card__badge{
    margin:-2px 0 8px!important;
    padding:6px 5px!important;
    font-size:10px!important;
}

body.single-product .dpp-offres--elementor .dpp-offre-card__badge-text{
    font-size:10px!important;
}

body.single-product .dpp-offres--elementor .dpp-offre-card__qty{
    margin-bottom:5px!important;
    font-size:14px!important;
}

body.single-product .dpp-offres--elementor .dpp-offre-card__price{
    margin-bottom:4px!important;
    font-size:18px!important;
}

body.single-product .dpp-offres--elementor .dpp-offre-card__price small{
    font-size:10px!important;
}

body.single-product .dpp-offres--elementor .dpp-offre-card__discount{
    margin-bottom:4px!important;
    font-size:13px!important;
}

body.single-product .dpp-offres--elementor .dpp-offre-card__saving{
    margin:0 0 8px!important;
    font-size:11px!important;
    white-space:normal!important;
}

body.single-product .dpp-offres--elementor .dpp-offre-card__button.button{
    min-height:36px!important;
    padding:8px 10px!important;
    border-radius:7px!important;
    font-size:12px!important;
    line-height:1.2!important;
}

@media(max-width:767px){
    body.single-product .dpp-offres--elementor .dpp-offres__grid{
        grid-template-columns:1fr!important;
    }

    body.single-product .dpp-offres--elementor{
        margin-top:14px!important;
    }
}

/* ==========================================================
   V3.2.7 — Image produit adaptative Elementor
   Offres actives : agrandissement visuel de 18 % sur desktop.
   Offres inactives : aucun changement.
========================================================== */

@media (min-width: 768px) {

    /* Elementor / WooCommerce : autorise l'image à dépasser son cadre normal. */
    body.single-product.dpp-offers-active .elementor-widget-woocommerce-product-images,
    body.single-product.dpp-offers-active .elementor-widget-woocommerce-product-images .elementor-widget-container,
    body.single-product.dpp-offers-active .elementor-widget-woocommerce-product-images .woocommerce-product-gallery,
    body.single-product.dpp-offers-active .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__wrapper,
    body.single-product.dpp-offers-active .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__image {
        overflow: visible !important;
    }

    /*
     * Le scale est volontairement utilisé plutôt qu'une largeur >100 % :
     * Elementor/WooCommerce peut imposer width/max-width:100% sur l'image.
     * transform:scale() reste donc visible même avec ces contraintes.
     */
    body.single-product.dpp-offers-active
    .elementor-widget-woocommerce-product-images
    .woocommerce-product-gallery__wrapper {
        transform: scale(1.18) !important;
        transform-origin: center center !important;
        position: relative !important;
        z-index: 2 !important;
    }

    /* Sécurité pour les modèles où Elementor rend directement l'image principale. */
    body.single-product.dpp-offers-active
    .elementor-widget-woocommerce-product-images
    img.wp-post-image {
        transform-origin: center center !important;
    }
}

/* Tablette/mobile : taille Elementor normale. */
@media (max-width: 767px) {
    body.single-product.dpp-offers-active
    .elementor-widget-woocommerce-product-images
    .woocommerce-product-gallery__wrapper {
        transform: none !important;
    }
}
