/* ECM V0.5.0 - single readable layout, native purchase and galleries retained */
#main.ecm-v5-page .product__grid.ecm-v5-ready{display:block!important;max-width:1460px;margin:auto;--ecm:#064d8b;--ecm-pale:#f0f6fc;--ecm-line:#dce6f0}
#main.ecm-v5-page .ecm-v5-occasion{--ecm:#e75b07;--ecm-pale:#fff5ed;--ecm-line:#f4dccc}
#main.ecm-v5-page .ecm-v5-banner{padding:19px 26px;margin:10px 0 22px;border-radius:7px;background:#064d8b;color:#fff;font-size:clamp(20px,2vw,29px);font-weight:800;letter-spacing:.01em}
#main.ecm-v5-page .ecm-v5-occasion .ecm-v5-banner{background:#e95b06}
#main.ecm-v5-page .ecm-v5-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.14fr);gap:24px;align-items:start;margin:0 0 26px}
#main.ecm-v5-page .ecm-v5-hero>*{min-width:0}
#main.ecm-v5-page .ecm-v5-gallery{padding:16px;border:1px solid #e1e5ea;border-radius:9px;background:#fff}
#main.ecm-v5-page .ecm-v5-gallery .product__images__wrapper{width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;float:none!important;display:block!important;position:static!important}
#main.ecm-v5-page .ecm-v5-right{display:flex;flex-direction:column;gap:18px;min-width:0}
#main.ecm-v5-page .ecm-v5-summary{padding:4px 2px 0}
#main.ecm-v5-page .ecm-v5-brand{font-size:23px;font-weight:800;color:#064d8b;margin-bottom:10px;line-height:1.2}
#main.ecm-v5-page .ecm-v5-brand img{max-width:180px;max-height:54px;object-fit:contain}
#main.ecm-v5-page .ecm-v5-summary .product-title-wrapper{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;background:none!important;box-shadow:none!important;text-align:left!important;position:static!important}
#main.ecm-v5-page .ecm-v5-summary h1{font-size:clamp(21px,2vw,30px)!important;line-height:1.22!important;font-weight:800!important;color:#152c4a!important;margin:0 0 14px!important;text-align:left!important;max-width:none!important}
#main.ecm-v5-page .ecm-v5-summary h1:before,#main.ecm-v5-page .ecm-v5-summary h1:after{display:none!important}
#main.ecm-v5-page .ecm-v5-origin{background:var(--ecm-pale);border-left:3px solid var(--ecm);padding:12px 15px;margin:8px 0 0;line-height:1.5;font-size:14px}
#main.ecm-v5-page .ecm-v5-summary .product-description-short{font-size:15px;line-height:1.55;margin:12px 0}
#main.ecm-v5-page .ecm-v5-purchase{background:var(--ecm-pale);border:1px solid var(--ecm-line);padding:19px 20px;border-radius:9px}
#main.ecm-v5-page .ecm-v5-purchase .product__main-infos__wrapper,#main.ecm-v5-page .ecm-v5-purchase .product__main-infos,#main.ecm-v5-page .ecm-v5-purchase .prices-add-cart-wrapper{display:block!important;position:static!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;float:none!important;background:transparent!important;box-shadow:none!important}
#main.ecm-v5-page .ecm-v5-purchase .product-prices{font-size:28px;font-weight:800;color:#184f39}
#main.ecm-v5-page .ecm-v5-more{display:block!important;width:100%!important;max-width:none!important;margin:16px 0 24px!important}
#main.ecm-v5-page .ecm-v5-more .nav-tabs{display:flex;flex-wrap:wrap;gap:4px;border-bottom:2px solid var(--ecm)}
#main.ecm-v5-page .ecm-v5-more .nav-tabs .nav-link{padding:12px 16px;border-radius:5px 5px 0 0;background:var(--ecm-pale);color:#1d3c5e;font-weight:700}
#main.ecm-v5-page .ecm-v5-more .nav-tabs .nav-link.active{background:var(--ecm);color:white}
#main.ecm-v5-page .ecm-v5-internal,#main.ecm-v5-page .ecm-v5-suppressed-panel{display:none!important}
@media(max-width:850px){#main.ecm-v5-page .ecm-v5-hero{grid-template-columns:1fr;gap:15px}#main.ecm-v5-page .ecm-v5-banner{padding:15px 18px}}

/* ECM V0.8.0 - PALETTE MARQUES */
#main.ecm-v5-page .ecm-v5-ready {
    --ecm: #185A9D;
    --ecm-pale: #EFF5FC;
    --ecm-line: #D5E3F2;
}

#main.ecm-v5-page .ecm-v5-ready.ecm-brand-stihl {
    --ecm: #ED7900;
    --ecm-pale: #FFF5E9;
    --ecm-line: #F5D7B7;
}

#main.ecm-v5-page .ecm-v5-ready.ecm-brand-oleomac {
    --ecm: #C95112;
    --ecm-pale: #FFF1E8;
    --ecm-line: #EEC9B5;
}

#main.ecm-v5-page .ecm-v5-ready.ecm-brand-staub {
    --ecm: #183E70;
    --ecm-pale: #EDF2FA;
    --ecm-line: #CFDDED;
}

#main.ecm-v5-page .ecm-v5-ready.ecm-brand-honda {
    --ecm: #C62828;
    --ecm-pale: #FFF0F0;
    --ecm-line: #F0CCCC;
}

#main.ecm-v5-page .ecm-v5-ready.ecm-brand-iseki {
    --ecm: #176CB2;
    --ecm-pale: #EFF6FC;
    --ecm-line: #D0E2F2;
}

#main.ecm-v5-page .ecm-v5-ready.ecm-brand-echo {
    --ecm: #D97706;
    --ecm-pale: #FFF5E8;
    --ecm-line: #F1D7B5;
}

#main.ecm-v5-page .ecm-v5-ready.ecm-brand-dolmar {
    --ecm: #C52D32;
    --ecm-pale: #FFF0F1;
    --ecm-line: #F0CFD1;
}

#main.ecm-v5-page .ecm-v5-ready.ecm-brand-robin {
    --ecm: #A32B30;
    --ecm-pale: #FFF0F1;
    --ecm-line: #EBCDD0;
}

#main.ecm-v5-page .ecm-v5-ready.ecm-brand-makita {
    --ecm: #087D87;
    --ecm-pale: #EAF7F7;
    --ecm-line: #C6E6E8;
}

/* Occasion : prioritaire sur la couleur de marque */
#main.ecm-v5-page .ecm-v5-ready.ecm-v5-occasion {
    --ecm: #386B54;
    --ecm-pale: #EAF3EE;
    --ecm-line: #C9DDD0;
}

/* Bandeaux et accents */
#main.ecm-v5-page .ecm-v5-ready .ecm-v5-banner {
    background: var(--ecm);
}

#main.ecm-v5-page .ecm-v5-ready .ecm-v5-brand {
    color: var(--ecm);
}

/* ECM V0.8.0 - HUSQVARNA */
#main.ecm-v5-page .ecm-v5-ready.ecm-brand-husqvarna {
    --ecm: #185A9D;
    --ecm-pale: #EFF5FC;
    --ecm-line: #D5E3F2;
}


/* ECM CORRECTIF REGROUPE V0.8.0 */

/* Prix : conserver la structure native PrestaShop */
#main.ecm-v5-page .ecm-v5-purchase .product-prices {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

#main.ecm-v5-page .ecm-v5-purchase .current-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

#main.ecm-v5-page .ecm-v5-purchase .current-price .price {
    color: var(--ecm);
    font-size: clamp(25px, 2.5vw, 34px);
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

/* Ne pas imposer de disposition aux formulaires natifs */
#main.ecm-v5-page .ecm-v5-purchase .prices-add-cart-wrapper {
    min-width: 0;
}

/* Onglets : presentation coherente */
#main.ecm-v5-page .ecm-v5-more {
    clear: both;
    overflow: visible;
}

#main.ecm-v5-page .ecm-v5-more .nav-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 6px;
}

#main.ecm-v5-page .ecm-v5-more .nav-tabs .nav-link {
    display: block;
    border: 1px solid var(--ecm-line);
    color: var(--ecm);
    background: var(--ecm-pale);
}

#main.ecm-v5-page .ecm-v5-more .nav-tabs .nav-link.active {
    color: #fff;
    background: var(--ecm);
    border-color: var(--ecm);
}

/* Occasion : couleur unique, independante de la marque */
#main.ecm-v5-page .ecm-v5-ready.ecm-v5-occasion {
    --ecm: #386B54;
    --ecm-pale: #EAF3EE;
    --ecm-line: #C9DDD0;
}


/* ECM OCCASION CONTROLEE V0.8.0 */
#main.ecm-v5-page .ecm-occasion-controlee {
    background: #EAF3EE;
    border: 1px solid #C9DDD0;
    border-left: 4px solid #386B54;
    border-radius: 8px;
    padding: 16px 18px;
    margin: 12px 0 0;
    color: #234737;
    font-size: 14px;
    line-height: 1.55;
}

#main.ecm-v5-page .ecm-occasion-controlee-titre {
    color: #285A43;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 9px;
}

#main.ecm-v5-page .ecm-occasion-controlee p {
    margin: 8px 0 0;
}

#main.ecm-v5-page .ecm-occasion-machine strong {
    color: #204B36;
}


/* ECM PRIX FORMAT FR V080 */
#main.ecm-v5-page .current-price .divided-format__price {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 0 !important;
    white-space: nowrap !important;
}

#main.ecm-v5-page .current-price .divided-format__price .unit {
    display: inline !important;
    font-size: 42px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
}

#main.ecm-v5-page .current-price .divided-format__price .right {
    display: inline-flex !important;
    flex-direction: row-reverse !important;
    align-items: baseline !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

#main.ecm-v5-page .current-price .divided-format__price .cent {
    display: inline !important;
    font-size: 42px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
}

#main.ecm-v5-page .current-price .divided-format__price .cent::before {
    content: "," !important;
}

#main.ecm-v5-page .current-price .divided-format__price .currency {
    display: inline !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    margin-left: 8px !important;
}

/* =========================================================
   ECM STIHL V0.8.1 - VUES ECLATEES ASSOCIEES
   ========================================================= */

.ecm-stihl-views {
    width: 100%;
    margin: 32px 0;
    padding: 26px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-top: 4px solid #f36b21;
    border-radius: 10px;
    box-sizing: border-box;
}

.ecm-stihl-views > h2 {
    margin: 0 0 12px;
    color: #222222;
    font-size: 24px;
    font-weight: 700;
}

.ecm-stihl-views > p {
    margin: 0 0 22px;
    color: #666666;
    font-size: 14px;
}

.ecm-stihl-view-card {
    margin: 14px 0;
    padding: 18px 20px;
    background: #fffaf6;
    border: 1px solid #f2dfd2;
    border-radius: 8px;
}

.ecm-stihl-view-card h3 {
    margin: 0 0 12px;
    color: #d95b16;
    font-size: 17px;
    font-weight: 700;
}

.ecm-stihl-view-card ul {
    margin: 0;
    padding-left: 20px;
}

.ecm-stihl-view-card li {
    margin: 8px 0;
    line-height: 1.5;
}

.ecm-stihl-view-card a {
    color: #b94b0d;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ecm-stihl-view-card a:hover,
.ecm-stihl-view-card a:focus {
    color: #813107;
    text-decoration-thickness: 2px;
}

@media (max-width: 767px) {
    .ecm-stihl-views {
        margin: 22px 0;
        padding: 16px;
    }

    .ecm-stihl-views > h2 {
        font-size: 20px;
    }

    .ecm-stihl-view-card {
        padding: 14px;
    }
}
/* ECM STIHL MODAL V081 */

.ecm-stihl-access {
    margin: 16px 0;
    padding: 12px 16px;
    background: #f5f8f5;
    border: 1px solid #d9e5d9;
    border-radius: 8px;
}

.ecm-stihl-access-link {
    color: #267a36;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.ecm-stihl-modal[hidden] {
    display: none !important;
}

.ecm-stihl-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.65);
}

.ecm-stihl-modal-content {
    position: relative;
    width: 100%;
    max-width: 950px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 55px 25px 25px;
    background: #fff;
    border-radius: 10px;
}

.ecm-stihl-modal-close {
    position: absolute;
    top: 12px;
    right: 15px;
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f5f5f5;
    color: #222;
    font-weight: 600;
    cursor: pointer;
}

.ecm-stihl-modal .ecm-stihl-views {
    margin: 0;
    padding: 0;
}

@media (max-width: 600px) {
    .ecm-stihl-modal {
        padding: 10px;
    }

    .ecm-stihl-modal-content {
        max-height: 95vh;
        padding: 55px 15px 20px;
    }
}

/* ECM STIHL POSITION PANIER V081 */

#main .product-add-to-cart {
    position: relative;
}

#main a.ecm-stihl-access-link {
    display: block;
    width: fit-content;
    margin: 12px 0 8px auto;
    padding: 10px 14px;
    color: #0066CC !important;
    background: #EDF5FF;
    border: 1px solid #B8D8FF;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    clear: both;
}

#main a.ecm-stihl-access-link:hover {
    color: #004A99 !important;
    background: #DCEBFF;
}

/* ECM V0.8.4 - Zone achat transparente - Pieces neuves uniquement */
#main.ecm-v5-page:not(.ecm-v5-occasion) .ecm-v5-purchase {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}


/* =========================================================
   ECM V0.8.9 - BLOC ACHAT NEUF
   ========================================================= */

#main.ecm-v5-page .ecm-v5-ready:not(.ecm-v5-occasion)
.ecm-v5-purchase {
    padding: 14px 0 !important;
}

#main.ecm-v5-page .ecm-v5-ready:not(.ecm-v5-occasion)
.ecm-v5-purchase .prices-add-cart-wrapper {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
}

#main.ecm-v5-page .ecm-v5-ready:not(.ecm-v5-occasion)
.ecm-v5-purchase .product-prices {
    margin: 0 0 4px !important;
    padding: 0 0 10px !important;
    border-bottom: 1px solid #e5e9ed !important;
}

#main.ecm-v5-page .ecm-v5-ready:not(.ecm-v5-occasion)
.ecm-v5-purchase .product__quantity__add {
    display: grid !important;
    grid-template-columns: 145px minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 12px !important;
    width: 100% !important;
}

#main.ecm-v5-page .ecm-v5-ready:not(.ecm-v5-occasion)
.ecm-v5-purchase .product__quantity__add > .add {
    min-width: 0 !important;
    width: 100% !important;
}

#main.ecm-v5-page .ecm-v5-ready:not(.ecm-v5-occasion)
.ecm-v5-purchase button.add-to-cart {
    width: 100% !important;
    min-height: 46px !important;
    border-radius: 7px !important;
}

#main.ecm-v5-page .ecm-v5-ready:not(.ecm-v5-occasion)
.ecm-v5-purchase a.ecm-stihl-access-link {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    margin: 8px 0 0 !important;
    padding: 10px 12px !important;
}

#main.ecm-v5-page .ecm-v5-ready:not(.ecm-v5-occasion)
.ecm-v5-purchase .product-infos-reassurance {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
}

#main.ecm-v5-page .ecm-v5-ready:not(.ecm-v5-occasion)
.ecm-v5-purchase .product-information {
    order: 1 !important;
    margin: 0 !important;
    padding: 10px 0 !important;
    border-top: 1px solid #e5e9ed !important;
}

#main.ecm-v5-page .ecm-v5-ready:not(.ecm-v5-occasion)
.ecm-v5-purchase .product-reassurance {
    order: 2 !important;
    margin: 0 !important;
    padding: 8px 0 0 !important;
    border-top: 1px solid #e5e9ed !important;
}

@media (max-width: 600px) {
    #main.ecm-v5-page .ecm-v5-ready:not(.ecm-v5-occasion)
    .ecm-v5-purchase .product__quantity__add {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
}

/* ECM - Animation douce de la livraison */
@keyframes ecmLivraisonClignote {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

#main.ecm-v5-page .ecm-v5-ready:not(.ecm-v5-occasion)
.ecm-v5-purchase .product-information .product-quantities:first-child {
    animation: ecmLivraisonClignote 1.5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    #main.ecm-v5-page .ecm-v5-ready:not(.ecm-v5-occasion)
    .ecm-v5-purchase .product-information .product-quantities:first-child {
        animation: none !important;
    }
}
