/* ============================================================
   PANIER REFONTE — page « Panier » (maquette)
   Fond blanc, liste d'articles à gauche, récapitulatif à droite.
   Scopé sous .cart-v2.
   ============================================================ */

.cart-v2 {
    --crt-navy: #0e295e;
    --crt-blue: #003ecd;
    --crt-blue-deep: #0030a8;
    --crt-ink: #10214a;
    --crt-text: #46506b;
    --crt-muted: #8a93ab;
    --crt-border: #e5e9f4;
    --crt-line: #eef1f8;
    --crt-soft: #f5f7fc;
    --crt-red: #e5484d;
    --crt-green: #18a32a;

    margin-top: -80px;
    padding-top: clamp(96px, 10vw, 116px);
    padding-bottom: 72px;
    min-height: 100vh;
    background: #fff;
    color: var(--crt-ink);
}
@media (max-width: 575px) { .cart-v2 { margin-top: -68px; padding-top: 88px; } }

.cart-v2 a { text-decoration: none; }
.cart-v2 *, .cart-v2 *::before, .cart-v2 *::after { box-sizing: border-box; }

.cart-wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 992px) { .cart-wrap { padding: 0 24px; } }

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: clamp(28px, 4vw, 48px);
    align-items: start;
}
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; gap: 32px; } }

/* ============================================================
   ARTICLES
   ============================================================ */
.cart-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.cart-head-title { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; color: var(--crt-navy); margin: 0; letter-spacing: -0.02em; }
.cart-count-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--crt-muted); }

.cart-items { margin-top: 8px; }

.cart-item {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) auto;
    gap: clamp(14px, 2vw, 26px);
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--crt-line);
}
.cart-item:first-child { padding-top: 8px; }

.cart-item-media {
    display: block;
    width: 132px;
    height: 132px;
    border-radius: 16px;
    background: var(--crt-soft);
    padding: 14px;
    overflow: hidden;
}
.cart-item-media img { width: 100%; height: 100%; object-fit: contain; }

.cart-item-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cart-item-info { display: flex; flex-direction: column; gap: 7px; }
.cart-item-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--crt-navy);
    line-height: 1.3;
}
.cart-item-name:hover { color: var(--crt-blue); }
.cart-item-meta { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; }
.cart-item-meta-label { color: var(--crt-muted); }
.cart-item-meta-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--crt-navy); box-shadow: inset 0 0 0 1px rgba(14, 25, 55, 0.15); }
.cart-item-meta-val { color: var(--crt-ink); font-weight: 600; }

.cart-item-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.cart-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--crt-border);
    border-radius: 11px;
    overflow: hidden;
    height: 46px;
}
.cart-qty-btn {
    display: grid; place-items: center;
    width: 42px; height: 100%;
    border: none; background: #fff; color: var(--crt-ink);
    cursor: pointer; line-height: 0;
    transition: background 0.18s ease;
}
.cart-qty-btn:hover { background: var(--crt-soft); }
.cart-qty-input {
    width: 46px; height: 100%;
    border: none; text-align: center;
    font-size: 0.98rem; font-weight: 700; color: var(--crt-ink);
    background: #fff; outline: none;
}
.cart-remove {
    background: none; border: none;
    color: var(--crt-red);
    font-size: 0.88rem; font-weight: 600;
    cursor: pointer; padding: 4px 2px;
    transition: color 0.18s ease;
}
.cart-remove:hover { color: #b91c22; text-decoration: underline; }
.cart-remove:disabled { opacity: 0.5; cursor: default; text-decoration: none; }

.cart-item-price { font-size: 1.2rem; font-weight: 800; color: var(--crt-navy); white-space: nowrap; text-align: right; align-self: start; padding-top: 4px; }

/* Bandeau promo */
.cart-promo-note {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
    padding: 18px 20px;
    background: rgba(0, 62, 205, 0.06);
    border: 1px solid rgba(0, 62, 205, 0.14);
    border-radius: 14px;
}
.cart-promo-ic {
    display: grid; place-items: center;
    width: 38px; height: 38px; flex: 0 0 auto;
    border-radius: 10px;
    background: rgba(0, 62, 205, 0.12);
    color: var(--crt-blue);
}
.cart-promo-note p { margin: 0; font-size: 0.85rem; line-height: 1.5; color: var(--crt-text); }

/* ============================================================
   RÉCAPITULATIF
   ============================================================ */
.cart-summary { position: sticky; top: 96px; }
.cart-summary-card {
    background: #fff;
    border: 1px solid var(--crt-border);
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 16px 40px rgba(20, 40, 90, 0.06);
}
.cart-summary-title { font-size: 1.22rem; font-weight: 800; color: var(--crt-navy); margin: 0 0 22px; }

.cart-summary-rows { display: flex; flex-direction: column; gap: 16px; }
.cart-summary-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.92rem; }
.cart-summary-row > span:first-child { color: var(--crt-muted); }
.cart-summary-row > span:last-child { color: var(--crt-ink); font-weight: 700; }
.cart-summary-free { color: var(--crt-blue) !important; }

.cart-summary-divider { height: 1px; background: var(--crt-line); margin: 22px 0; }

.cart-summary-total { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cart-summary-total > span:first-child { font-size: 1rem; font-weight: 700; color: var(--crt-ink); letter-spacing: 0.02em; }
.cart-summary-total > span:last-child { font-size: 1.4rem; font-weight: 800; color: var(--crt-navy); }

.cart-summary-eta { font-size: 0.85rem; color: var(--crt-muted); margin: 0 0 20px; }
.cart-summary-eta strong { color: var(--crt-ink); font-weight: 700; }

.cart-coupon { margin-bottom: 16px; }
.cart-coupon-field {
    display: flex;
    align-items: center;
    border: 1px solid var(--crt-border);
    border-radius: 12px;
    padding: 0 10px 0 4px;
    height: 50px;
    transition: border-color 0.2s ease;
}
.cart-coupon-field:focus-within { border-color: var(--crt-blue); }
.cart-coupon-field input {
    flex: 1;
    border: none; outline: none; background: transparent;
    padding: 0 12px;
    font-size: 0.9rem; color: var(--crt-ink);
}
.cart-coupon-field button {
    display: grid; place-items: center;
    width: 38px; height: 38px; flex: 0 0 auto;
    border: none; border-radius: 9px;
    background: var(--crt-soft); color: var(--crt-muted);
    cursor: pointer; line-height: 0;
    transition: background 0.18s ease, color 0.18s ease;
}
.cart-coupon-field button:hover { background: var(--crt-navy); color: #fff; }
.cart-coupon-feedback { margin: 8px 2px 0; font-size: 0.8rem; color: var(--crt-red); }

.cart-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    height: 54px;
    background: var(--crt-blue);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 26px rgba(0, 62, 205, 0.22);
}
.cart-checkout:hover { background: var(--crt-blue-deep); color: #fff; transform: translateY(-2px); box-shadow: 0 16px 32px rgba(0, 62, 205, 0.30); }

/* ============================================================
   ÉTAT VIDE
   ============================================================ */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 70px 20px;
    color: var(--crt-muted);
}
.cart-empty svg { color: #c2cadb; }
.cart-empty h1 { font-size: 1.5rem; font-weight: 800; color: var(--crt-navy); margin: 8px 0 0; }
.cart-empty p { margin: 0; font-size: 0.95rem; }
.cart-empty-cta { width: auto; padding: 0 26px; margin-top: 14px; }

/* ── Responsive : article compact ── */
@media (max-width: 560px) {
    .cart-item { grid-template-columns: 92px minmax(0, 1fr); grid-template-areas: "media body" "price price"; gap: 14px; }
    .cart-item-media { width: 92px; height: 92px; grid-area: media; }
    .cart-item-body { grid-area: body; }
    .cart-item-price { grid-area: price; text-align: left; padding-top: 0; }
}
