/* ==========================================================
   Panier moderne WooCommerce EC14
========================================================== */

body.woocommerce-cart {
    --ec14-border: #e1e1e1;
}

body.woocommerce-cart .content-area {
    padding: 44px 0 76px;
    background: var(--ec14-surface);
}

body.woocommerce-cart .site-main {
    width: min(100% - 40px, 1240px);
    margin: 0 auto;
}

.ec14-cart-intro {
    margin: 0 0 30px;
    text-align: center;
}

.ec14-cart-intro h1 {
    margin: 0;
    color: var(--ec14-text);
    font-size: clamp(34px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -.03em;
}

.ec14-cart-intro h1::after {
    display: block;
    width: 54px;
    height: 2px;
    margin: 18px auto 0;
    background: var(--ec14-gold);
    content: "";
}

.ec14-cart-intro p {
    margin: 18px auto 0;
    color: var(--ec14-muted);
    font-size: 15px;
    line-height: 1.6;
}

body.woocommerce-cart .wp-block-woocommerce-cart {
    margin: 0;
    padding: clamp(22px, 3vw, 36px);
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(20, 20, 20, .04);
}

body.woocommerce-cart .wc-block-cart {
    align-items: start;
    gap: 42px;
}

body.woocommerce-cart .wc-block-cart__main {
    width: calc(66% - 21px);
    padding-right: 0;
}

body.woocommerce-cart .wc-block-cart__sidebar {
    position: sticky;
    top: 104px;
    width: calc(34% - 21px);
    padding: 24px;
    background: var(--ec14-surface);
    border: 1px solid var(--ec14-border);
    border-radius: 5px;
}

body.woocommerce-cart .wc-block-cart-items {
    margin: 0;
    border-collapse: collapse;
}

body.woocommerce-cart .wc-block-cart-items th {
    padding: 0 0 13px;
    color: var(--ec14-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}

body.woocommerce-cart .wc-block-cart-items__row td {
    padding-top: 18px;
    padding-bottom: 18px;
    border-color: var(--ec14-border);
    vertical-align: top;
}

body.woocommerce-cart .wc-block-cart-item__image {
    width: 76px;
    padding-right: 16px;
}

body.woocommerce-cart .wc-block-cart-item__image img {
    display: block;
    width: 60px;
    height: 60px;
    padding: 3px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    object-fit: contain;
}

body.woocommerce-cart .wc-block-components-product-name {
    color: var(--ec14-text);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.35;
    text-decoration: none;
}

body.woocommerce-cart .wc-block-components-product-name:hover {
    color: var(--ec14-red);
}

/* Les descriptions complètes alourdissent inutilement le panier. */
body.woocommerce-cart .wc-block-components-product-metadata__description {
    display: none;
}

body.woocommerce-cart .wc-block-components-product-price,
body.woocommerce-cart .wc-block-cart-item__total-price-and-sale-badge-wrapper {
    color: #353b43;
    font-size: 13px;
}

body.woocommerce-cart .wc-block-components-quantity-selector {
    min-height: 34px;
    margin-top: 10px;
    border: 1px solid #d7dadd;
    border-radius: 3px;
}

body.woocommerce-cart .wc-block-components-quantity-selector input {
    min-width: 34px;
    color: var(--ec14-text);
    font-size: 13px;
}

body.woocommerce-cart .wc-block-components-quantity-selector button {
    color: #4e5660;
}

body.woocommerce-cart .wc-block-cart-item__remove-link {
    margin-top: 9px;
    color: var(--ec14-muted);
    font-size: 12px;
    text-decoration-color: #bbb;
    text-underline-offset: 3px;
}

body.woocommerce-cart .wc-block-cart-item__remove-link:hover {
    color: var(--ec14-red);
}

body.woocommerce-cart .wc-block-components-totals-wrapper {
    padding: 17px 0;
    border-color: var(--ec14-border);
}

body.woocommerce-cart .wc-block-components-totals-coupon-link,
body.woocommerce-cart .wc-block-components-totals-shipping__change-address__link {
    color: var(--ec14-red);
    font-weight: 600;
    text-decoration-color: rgba(127, 23, 37, .35);
    text-underline-offset: 3px;
}

body.woocommerce-cart .wc-block-components-totals-coupon__input input {
    min-height: 42px;
    background: #fff;
    border: 1px solid #d7dadd;
    border-radius: 3px;
    box-shadow: none;
}

body.woocommerce-cart .wc-block-components-totals-coupon__input input:focus {
    outline: none;
    border-color: var(--ec14-gold);
    box-shadow: 0 0 0 3px rgba(198, 161, 91, .16);
}

body.woocommerce-cart .wc-block-components-totals-footer-item {
    padding-top: 20px;
    color: var(--ec14-text);
    font-size: 19px;
    font-weight: 700;
}

body.woocommerce-cart .wc-block-cart__submit-container {
    margin-top: 18px;
}

body.woocommerce-cart .wc-block-cart__submit-button {
    min-height: 48px;
    background: var(--ec14-red) !important;
    border: 1px solid var(--ec14-red) !important;
    border-radius: 3px !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    box-shadow: none !important;
    transition: background-color .18s ease, border-color .18s ease;
}

body.woocommerce-cart .wc-block-cart__submit-button:hover {
    background: var(--ec14-red-dark) !important;
    border-color: var(--ec14-red-dark) !important;
}

body.woocommerce-cart .wc-block-components-button:not(.wc-block-cart__submit-button) {
    border-radius: 3px;
}

body.woocommerce-cart .wc-block-components-notice-banner {
    border-radius: 4px;
}

@media (max-width: 900px) {
    body.woocommerce-cart .wc-block-cart {
        gap: 28px;
    }

    body.woocommerce-cart .wc-block-cart__main {
        width: calc(62% - 14px);
    }

    body.woocommerce-cart .wc-block-cart__sidebar {
        width: calc(38% - 14px);
        padding: 18px;
    }
}

@media (max-width: 700px) {
    body.woocommerce-cart .content-area {
        padding: 24px 0 48px;
    }

    body.woocommerce-cart .site-main {
        width: calc(100% - 12px);
    }

    .ec14-cart-intro {
        margin-bottom: 20px;
        padding: 0 8px;
    }

    .ec14-cart-intro h1 {
        font-size: 32px;
    }

    .ec14-cart-intro p {
        margin-top: 15px;
        font-size: 13px;
    }

    body.woocommerce-cart .wp-block-woocommerce-cart {
        padding: 14px 10px 96px;
    }

    body.woocommerce-cart .wc-block-cart {
        display: block;
    }

    body.woocommerce-cart .wc-block-cart__main,
    body.woocommerce-cart .wc-block-cart__sidebar {
        width: 100%;
    }

    body.woocommerce-cart .wc-block-cart__sidebar {
        position: static;
        margin-top: 22px;
        padding: 16px;
    }

    body.woocommerce-cart .wc-block-cart-items__row td {
        padding-top: 15px;
        padding-bottom: 15px;
    }

    body.woocommerce-cart .wc-block-cart-item__image {
        width: 58px;
        padding-right: 10px;
    }

    body.woocommerce-cart .wc-block-cart-item__image img {
        width: 48px;
        height: 48px;
    }

    body.woocommerce-cart .wc-block-components-product-name {
        font-size: 12px;
    }

    body.woocommerce-cart .wc-block-components-product-price,
    body.woocommerce-cart .wc-block-cart-item__total-price-and-sale-badge-wrapper {
        font-size: 11px;
    }

    body.woocommerce-cart .wc-block-cart__submit-container--sticky {
        padding: 9px;
        background: rgba(255, 255, 255, .97);
        border-top: 1px solid var(--ec14-border);
        box-shadow: 0 -6px 18px rgba(20, 20, 20, .08);
        transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    }

    body.woocommerce-cart.ec14-cart-footer-visible .wc-block-cart__submit-container--sticky {
        opacity: 0;
        pointer-events: none;
        transform: translateY(100%);
        visibility: hidden;
    }

    body.woocommerce-cart .wc-block-cart__submit-container--sticky .wc-block-cart__submit-button {
        min-height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.woocommerce-cart .wc-block-cart__submit-button,
    body.woocommerce-cart .wc-block-components-product-name {
        transition: none;
    }
}
