/* =====================================================================
   BOUTIQUE — shop-cart.css
   Page panier : lignes, quantités, code promo, choix de livraison,
   récapitulatif, suggestions.
   ===================================================================== */

.ct-wrap { padding: 26px 0 40px; }

.ct-head { margin-bottom: 22px; }
.ct-head .shop-h1 { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ct-head .count { font-size: .5em; font-weight: 600; color: var(--shop-muted); letter-spacing: 0; }

.ct-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px; align-items: start;
}
@media (max-width: 900px) { .ct-layout { grid-template-columns: minmax(0, 1fr); } }

/* ── Lignes ─────────────────────────────────────────────────────────── */
.ct-lines {
    background: var(--shop-surface);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-sh-sm);
    overflow: hidden;
}
.ct-line {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto auto;
    gap: 16px; align-items: center;
    padding: 18px;
    border-bottom: 1px solid var(--shop-line);
}
.ct-line:last-child { border-bottom: 0; }

.ct-thumb {
    width: 92px; height: 116px; border-radius: var(--shop-radius-sm);
    object-fit: cover; background: var(--shop-surface-3); display: block;
}
.ct-thumb-empty { display: grid; place-items: center; color: var(--shop-muted); font-size: .68rem; }

.ct-info { min-width: 0; }
.ct-name {
    font-family: 'Montserrat', sans-serif; font-size: .98rem; font-weight: 700;
    letter-spacing: -.02em; line-height: 1.3; margin: 0 0 4px;
}
.ct-name a { color: var(--shop-ink); text-decoration: none; }
.ct-name a:hover { color: var(--shop-accent); }
.ct-var { font-size: .81rem; color: var(--shop-muted); margin-bottom: 3px; }
.ct-opts { font-size: .78rem; color: var(--shop-muted); }
.ct-opts b { color: var(--shop-body); font-weight: 600; }
.ct-unit { font-size: .82rem; color: var(--shop-body); margin-top: 6px; }
.ct-unit s { color: var(--shop-muted); margin-left: 5px; }
.ct-stockwarn { font-size: .77rem; color: var(--shop-warn); font-weight: 700; margin-top: 5px; }

.ct-line-total {
    font-family: 'Montserrat', sans-serif; font-size: 1.05rem; font-weight: 800;
    color: var(--shop-ink); white-space: nowrap; text-align: right;
    font-variant-numeric: tabular-nums;
}

.ct-remove {
    width: 32px; height: 32px; border: 0; border-radius: 50%;
    background: transparent; color: var(--shop-muted);
    display: grid; place-items: center; cursor: pointer;
    transition: all var(--shop-tr);
}
.ct-remove:hover { background: var(--shop-ko-bg); color: var(--shop-ko); }
.ct-remove svg { width: 16px; height: 16px; }

@media (max-width: 620px) {
    .ct-line { grid-template-columns: 76px minmax(0, 1fr) auto; grid-template-areas: "thumb info remove" "thumb qty total"; row-gap: 10px; }
    .ct-thumb { grid-area: thumb; width: 76px; height: 96px; }
    .ct-info { grid-area: info; }
    .ct-remove { grid-area: remove; align-self: start; }
    .ct-qty-cell { grid-area: qty; }
    .ct-line-total { grid-area: total; align-self: center; }
}

.ct-actions {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; padding: 16px 18px;
    background: var(--shop-surface-2);
}
.ct-actions .link {
    font-size: .84rem; font-weight: 700; color: var(--shop-muted);
    background: none; border: 0; cursor: pointer; text-decoration: none;
}
.ct-actions .link:hover { color: var(--shop-ko); }

/* ── Aside récapitulatif ────────────────────────────────────────────── */
.ct-aside { position: sticky; top: var(--shop-sticky-top); display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 900px) { .ct-aside { position: static; } }

.ct-box {
    background: var(--shop-surface); border-radius: var(--shop-radius);
    box-shadow: var(--shop-sh-sm); padding: 20px;
}
.ct-box-title {
    font-family: 'Montserrat', sans-serif; font-size: .95rem; font-weight: 800;
    color: var(--shop-ink); margin: 0 0 14px; letter-spacing: -.02em;
}

.ct-promo-form { display: flex; gap: 8px; }
.ct-promo-form input {
    flex: 1; padding: 10px 13px; border-radius: var(--shop-radius-sm);
    border: 1.5px solid var(--shop-line-strong);
    font-family: inherit; font-size: .87rem; text-transform: uppercase;
}
.ct-promo-form input:focus { outline: none; border-color: var(--shop-accent); }
.ct-promo-active {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 11px 13px; border-radius: var(--shop-radius-sm);
    background: var(--shop-ok-bg); color: #0a6b45;
    font-size: .86rem; font-weight: 700;
}
.ct-promo-active button { background: none; border: 0; color: #0a6b45; cursor: pointer; font-size: 1rem; opacity: .7; }
.ct-promo-active button:hover { opacity: 1; }

/* Les styles .ct-ship-* sont dans shop-base.css : ils sont partagés
   avec le checkout. */

.ct-freeship-hint {
    margin-top: 12px; padding: 11px 13px;
    background: var(--shop-surface-2); border-radius: var(--shop-radius-sm);
    font-size: .81rem; color: var(--shop-body); line-height: 1.5;
}
.ct-freeship-hint strong { color: var(--shop-accent); }
.ct-freeship-bar { height: 5px; border-radius: 999px; background: var(--shop-line); margin-top: 9px; overflow: hidden; }
.ct-freeship-bar i { display: block; height: 100%; background: var(--shop-accent); border-radius: 999px; transition: width 400ms ease; }

.ct-cta { margin-top: 16px; }
.ct-secure {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    margin-top: 12px; font-size: .77rem; color: var(--shop-muted);
}
.ct-secure svg { width: 14px; height: 14px; }

.ct-suggest { margin-top: 44px; }
.ct-suggest-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ct-suggest-head h2 { font-family: 'Montserrat', sans-serif; font-size: 1.1rem; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.ct-suggest-head .line { flex: 1; height: 1px; background: var(--shop-line); }

/* Ligne en cours de recalcul côté serveur */
.ct-line.is-busy { opacity: .55; pointer-events: none; }
.ct-line-total { transition: background 600ms ease; border-radius: 6px; }
