/*!
 * GBZ420 - QA cart layer: bring the cart page states back onto the maquette charter.
 * Written 2026-09-23 by the qa-cart task. Local copy only (gbz420.test -> C:\Codex\GBZ420\site).
 * Owner: docs/sitewide-maquettes-20260921/qa-cart-20260923. Nothing else writes to this file.
 *
 * Reference : "gbz 2\05-product-thcx-godzilla-kush-hash.png" and "gbz 2\06-page-gbz-prime.png"
 *             - massive condensed display type, black / white / lime, thin frames, black buttons.
 * Charter   : docs/sitewide-maquettes-20260921/CHARTE-GRAPHIQUE.md sections 3, 4.4, 4.5, 6.4,
 *             6.5 and criteria 1-4, 10-13. The cart is a level-B surface (section 2.1).
 * Audit     : docs/sitewide-maquettes-20260921/qa-prime-finish-20260923/README.md finding V-11
 *             - legacy green accents, three pastel Bootstrap flats and 6-8px radii on the cart.
 * Evidence  : docs/sitewide-maquettes-20260921/qa-cart-20260923/ (before/after captures, probe
 *             JSON, before-after diffs and REPORT.md).
 *
 * Rules for this file:
 *  1. Presentation only. Nothing here changes display, visibility, order, markup, wording or
 *     behaviour: the empty-cart notice, the gift panel and every gift rule, the free-delivery
 *     notice, the totals, the voucher form, the disabled checkout button and every link keep
 *     their place, their text and their values. Only colour, border, radius, shadow, type and
 *     touch size move.
 *  2. The scope is the cart page. Every selector starts with `body#cart`, the body id the theme
 *     renders on /fr/panier, /en/cart and /de/warenkorb. No other surface can match.
 *  3. Tokens are consumed as var(--gbz-*) and never redeclared. The one custom property written
 *     here is the gift module's own `--mdgift-color`, scoped to its panel, so the module's hover
 *     ring and checkbox follow the charter lime instead of its private #b7ef22.
 *  4. The legacy green of gbz-cart-v1.css (#087747) and its legacy focus ring (#159463) are
 *     overridden here, never edited there: that file belongs to the cart family owner and this
 *     layer is meant to be dropped without residue.
 *  5. The gift and free-delivery hooks print their own <style> block inside the page body, i.e.
 *     after this file. Two id selectors (`body#cart ... #mdgifts-panel ...` against the hook's
 *     `#mdgifts-panel ...`) are what carry those rules. No declaration here carries the
 *     importance flag, so every property stays overridable by the family owner.
 *  6. No price, threshold, shipping value, gift rule, translation or product name is written
 *     here. The layer is a skin, so it cannot drift from the catalogue.
 *
 * Load point (when integrated): templates/checkout/cart.tpl, block `head`, after gbz-cart-v1.css.
 * Rollback: delete this file and the <link> that references it. No other file, cache or row is
 * involved.
 * ==========================================================================
 */

/* ----------------------------------------------------------------------------------------------
 * 1. Page title - the level-B display heading (charter 4.4 floor 30px, criterion 10)
 *
 * Measured before this layer: `.page-title` carried 36px in the theme body font (Karla), which is
 * the "banal H1" of the audit. The rule below reuses the exact stack and the exact clamp of
 * gbz-public-pages-v1.css:48-50 so the cart title matches the other level-B surfaces, plus the
 * 3px lime rule under the title that charter 4.2/6.5 keeps for section headings.
 * `gbz-cart-v1.css` hides that rule (`:after { display: none }`), hence the ::after block.
 * ------------------------------------------------------------------------------------------- */

body#cart #main.gbz-cart-page .page-title {
    color: var(--gbz-black);
    font-family: "GBZ Anton", "Bahnschrift SemiBold Condensed", "Bahnschrift Condensed", "Bahnschrift",
        "Arial Narrow", "Helvetica Neue", Karla, sans-serif;
    font-size: clamp(30px, 3.6vw, 56px);
    font-weight: var(--gbz-weight-display);
    letter-spacing: 0;
    line-height: 1.02;
    margin: 0 0 var(--gbz-space-4);
    text-transform: uppercase;
}

body#cart #main.gbz-cart-page .page-title::after {
    background-color: var(--gbz-accent);
    content: "";
    display: block;
    height: 3px;
    margin-top: var(--gbz-space-3);
    width: 56px;
}

/* ----------------------------------------------------------------------------------------------
 * 2. Notices
 *
 * Three Bootstrap flats were measured on the empty cart (audit V-11): the warning
 * rgb(255,235,220) of the empty-cart message, the peach rgb(255,242,229) of the locked gift chip
 * (section 4) and the cyan rgb(207,244,252) of the Colissimo countdown. All three become the
 * white / alt-grey / hairline language of the maquettes; the lime stays where the charter keeps
 * it - a 4px mise-en-avant filet, never text on white (criterion 2-3).
 * ------------------------------------------------------------------------------------------- */

body#cart #main.gbz-cart-page .alert {
    background-color: var(--gbz-surface);
    border: var(--gbz-hairline);
    border-left: 4px solid var(--gbz-hairline-color-strong);
    border-radius: var(--gbz-radius-sm);
    box-shadow: var(--gbz-shadow);
    color: var(--gbz-ink);
}

/* 2a. Empty-cart message: white panel, accent filet, ink text. */
body#cart #main.gbz-cart-page .cart-overview > .alert-warning {
    background-color: var(--gbz-surface);
    border-left-color: var(--gbz-accent);
    color: var(--gbz-ink);
}

/* 2b. Free-delivery countdown (module iqitfreedeliverycount): quiet alt panel, ink heading,
 *     muted sentence. Its text, its amount and its place in the summary are untouched. */
body#cart #main.gbz-cart-page .alert-info.iqitfreedeliverycount {
    background-color: var(--gbz-surface-alt);
    border: var(--gbz-hairline);
    border-left-color: var(--gbz-hairline-color-strong);
    color: var(--gbz-ink);
    font-size: var(--gbz-fs-body);
}

body#cart #main.gbz-cart-page .alert-info.iqitfreedeliverycount .iqitfreedeliverycount-title,
body#cart #main.gbz-cart-page .alert-info.iqitfreedeliverycount strong {
    color: var(--gbz-ink);
    font-weight: var(--gbz-weight-display);
}

body#cart #main.gbz-cart-page .alert-info.iqitfreedeliverycount p {
    color: var(--gbz-muted);
    font-size: var(--gbz-fs-body);
    margin-bottom: 0;
}

/* 2c. The other Bootstrap flavours keep the same frame so a voucher error or a success message
 *     cannot reintroduce a colour outside the palette. Danger keeps the strongest available
 *     signal in a black / white / lime system: a black band with white text (21:1). */
body#cart #main.gbz-cart-page .alert-success {
    border-left-color: var(--gbz-black);
}

body#cart #main.gbz-cart-page .alert-danger {
    background-color: var(--gbz-black);
    border-color: var(--gbz-black);
    border-left-color: var(--gbz-accent);
    color: var(--gbz-on-dark);
}

/* ----------------------------------------------------------------------------------------------
 * 3. Actions
 *
 * Charter 6.5: two shapes only - a black pill with white text for the primary action, an outlined
 * pill for the secondary one, lime on hover in both cases, and the lime is never used as text.
 * The theme already gets the button radius from gbz-tokens.css section 7; what this layer fixes
 * is the colour of the two cart actions that gbz-cart-v1.css paints with the legacy green
 * (`a.btn-secondary` "Continuer mes achats", `.cart-detailed-actions .btn-primary`), the disabled
 * checkout button and the 44px touch floor (charter 4.4).
 * ------------------------------------------------------------------------------------------- */

body#cart #main.gbz-cart-page .btn {
    border-radius: var(--gbz-radius-pill);
    font-weight: var(--gbz-weight-display);
    transition: var(--gbz-transition);
}

/* 3a. Continue shopping / voucher submit: outlined pill, dark text, lime on hover. */
body#cart #main.gbz-cart-page .btn-secondary {
    background-color: var(--gbz-white);
    border: 1px solid var(--gbz-black);
    color: var(--gbz-black);
}

body#cart #main.gbz-cart-page .btn-secondary:hover,
body#cart #main.gbz-cart-page .btn-secondary:focus,
body#cart #main.gbz-cart-page .btn-secondary:not(:disabled):not(.disabled):active {
    background-color: var(--gbz-accent);
    border-color: var(--gbz-black);
    color: var(--gbz-accent-ink);
}

body#cart #main.gbz-cart-page a.btn-secondary {
    align-items: center;
    display: inline-flex;
    gap: var(--gbz-space-2);
    min-height: 44px;
    padding: var(--gbz-space-3) var(--gbz-space-5);
}

/* 3b. Primary action (Proceed to checkout / Commander): black pill, white label. */
body#cart #main.gbz-cart-page .btn-primary {
    background-color: var(--gbz-black);
    border-color: var(--gbz-black);
    color: var(--gbz-white);
    font-size: var(--gbz-fs-body);
    min-height: 52px;
    text-transform: none;
}

body#cart #main.gbz-cart-page .btn-primary:hover,
body#cart #main.gbz-cart-page .btn-primary:focus,
body#cart #main.gbz-cart-page .btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--gbz-accent);
    border-color: var(--gbz-accent);
    color: var(--gbz-accent-ink);
}

/* 3c. Disabled checkout (the empty cart renders it disabled on purpose): the grey alt surface is
 *     more readable than gbz-cart-v1's faded green and states "not yet" without a colour outside
 *     the palette. The disabled attribute and the disabled flow are untouched. */
body#cart #main.gbz-cart-page .btn-primary.disabled,
body#cart #main.gbz-cart-page .btn-primary:disabled {
    background-color: var(--gbz-surface-alt);
    border-color: var(--gbz-hairline-color);
    color: var(--gbz-muted);
    opacity: 1;
}

/* ----------------------------------------------------------------------------------------------
 * 4. Gift panel (module mdgiftproduct)
 *
 * The gifts are not hidden, reordered, relabelled or recalculated: the four rule cards, their
 * "Ajoutez encore ... EUR" thresholds, their products, their checkboxes and the close button keep
 * the behaviour the hooks give them. Only the skin moves: the hook's private palette
 * (#fcfff7 / #fffaf5 / #b7ef22) and its 6px radius + drop shadow give way to white / alt-grey,
 * hairs, square corners and `box-shadow: none` (charter 3.3-4 and 6.4).
 * ------------------------------------------------------------------------------------------- */

/* 4a. Panels and rule cards. */
body#cart #mdgifts-panel {
    --mdgift-color: var(--gbz-accent);
}

body#cart #mdgifts-panel .gift-widget-wrapper {
    background-color: var(--gbz-surface);
    border: var(--gbz-hairline);
    border-radius: var(--gbz-radius-0);
    box-shadow: var(--gbz-shadow);
}

body#cart #mdgifts-panel .gift-widget-wrapper.disabled-gift {
    background-color: var(--gbz-surface-alt);
    border-color: var(--gbz-hairline-color);
}

body#cart #mdgifts-panel .gift-widget-title,
body#cart #mdgifts-panel .title-spend {
    color: var(--gbz-ink);
    font-size: var(--gbz-fs-body);
    font-weight: var(--gbz-weight-display);
}

body#cart #mdgifts-panel .gift-widget-wrapper > p {
    color: var(--gbz-muted);
    font-size: var(--gbz-fs-small);
}

/* 4b. Gift tiles: white card, hairline, square corners; the selected state is the module's own
 *     black border over a lime inner ring (the `--mdgift-color` above supplies the lime). */
body#cart #mdgifts-panel .giftProduct {
    background-color: var(--gbz-white);
    border: var(--gbz-hairline);
    border-radius: var(--gbz-radius-sm);
    box-shadow: var(--gbz-shadow);
}

body#cart #mdgifts-panel .giftProduct:hover,
body#cart #mdgifts-panel .giftProduct.selected,
body#cart #mdgifts-panel .selected-gift .giftProduct {
    border-color: var(--gbz-black);
    box-shadow: inset 0 0 0 2px var(--gbz-accent);
}

/* 4c. State chips. Locked = quiet white chip with a hairline and muted text (6.4:1 on white);
 *     unlocked = the accent chip of charter 6.5 with black text (17.5:1). Square, no pill. */
body#cart #mdgifts-panel .mdgift-card-state {
    border-radius: var(--gbz-radius-sm);
    letter-spacing: 0;
}

body#cart #mdgifts-panel .mdgift-card-state--locked {
    background-color: var(--gbz-surface);
    border: var(--gbz-hairline-strong);
    color: var(--gbz-muted);
}

body#cart #mdgifts-panel .mdgift-card-state--unlocked {
    background-color: var(--gbz-accent);
    border: 1px solid var(--gbz-accent);
    color: var(--gbz-accent-ink);
}

/* 4d. Thumbnails and names. The product photo keeps its frame and its object-fit; only the tinted
 *     background and the 5px radius move. */
body#cart #mdgifts-panel .mdgift-thumb-frame {
    background-color: var(--gbz-white);
    border: var(--gbz-hairline);
    border-radius: var(--gbz-radius-sm);
}

body#cart #mdgifts-panel .mgift_thumb {
    background-color: var(--gbz-white);
    border-radius: var(--gbz-radius-sm);
}

body#cart #mdgifts-panel .gp-name,
body#cart #mdgifts-panel .combination_name,
body#cart #mdgifts-panel .mgift_ipa {
    color: var(--gbz-ink);
}

body#cart #mdgifts-panel .mdgift-thumb-frame--missing::before {
    color: var(--gbz-muted);
}

/* 4e. Gift panel heading and progress bar. Both are kept visible (the cart family re-enables them
 *     over the hook's `display:none`); this layer only gives them the display face and the accent
 *     fill that gbz-cart-v1.css paints with the legacy green. */
body#cart #main.gbz-cart-page .gbz-cart-gifts-title {
    color: var(--gbz-black);
    font-family: "GBZ Anton", "Bahnschrift SemiBold Condensed", "Bahnschrift Condensed", "Bahnschrift",
        "Arial Narrow", "Helvetica Neue", Karla, sans-serif;
    font-size: clamp(20px, 2.2vw, 28px);
    font-weight: var(--gbz-weight-display);
    letter-spacing: 0;
    line-height: 1.05;
    text-transform: uppercase;
}

body#cart #main.gbz-cart-page .gbz-gift-progress {
    background-color: var(--gbz-surface-alt);
    border: var(--gbz-hairline);
    border-radius: var(--gbz-radius-0);
}

body#cart #main.gbz-cart-page .gbz-gift-progress > span {
    background-color: var(--gbz-accent);
    border-radius: 0;
}

body#cart #mdgifts-panel .rbutton {
    accent-color: var(--gbz-accent);
}

/* 4f. Panel close button: the layer keeps the control and its hit area, and gives it the dark
 *     hairline language of the surrounding panel instead of the theme's grey disc. */
body#cart #mdgifts-panel .btn-close {
    background-color: var(--gbz-white);
    border: var(--gbz-hairline-strong);
    border-radius: var(--gbz-radius-sm);
    box-shadow: var(--gbz-shadow);
    color: var(--gbz-ink);
    min-height: 44px;
    min-width: 44px;
    opacity: 1;
}

/* ----------------------------------------------------------------------------------------------
 * 5. Order summary
 *
 * The summary is the second black-button surface of the page: panel radius 0 (the 8px of
 * gbz-cart-v1.css is what criterion 4 rejects), display heading with the lime rule, totals in the
 * display face, hairline separators. No amount, tax line, voucher field or gateway is touched.
 * ------------------------------------------------------------------------------------------- */

body#cart #main.gbz-cart-page .card.cart-summary,
body#cart #main.gbz-cart-page .cart-summary {
    background-color: var(--gbz-surface);
    border: var(--gbz-hairline);
    border-radius: var(--gbz-radius-0);
    box-shadow: var(--gbz-shadow);
}

body#cart #main.gbz-cart-page .gbz-cart-summary-title {
    color: var(--gbz-black);
    font-family: "GBZ Anton", "Bahnschrift SemiBold Condensed", "Bahnschrift Condensed", "Bahnschrift",
        "Arial Narrow", "Helvetica Neue", Karla, sans-serif;
    font-size: clamp(20px, 2.2vw, 28px);
    font-weight: var(--gbz-weight-display);
    letter-spacing: 0;
    line-height: 1.05;
    text-transform: uppercase;
}

body#cart #main.gbz-cart-page .gbz-cart-summary-title::after {
    background-color: var(--gbz-accent);
    content: "";
    display: block;
    height: 3px;
    margin-top: var(--gbz-space-3);
    width: 40px;
}

body#cart #main.gbz-cart-page .cart-summary-line,
body#cart #main.gbz-cart-page .cart-summary-line .label,
body#cart #main.gbz-cart-page .cart-summary-line .value {
    color: var(--gbz-ink);
}

body#cart #main.gbz-cart-page .cart-total {
    color: var(--gbz-black);
    font-family: "GBZ Anton", "Bahnschrift SemiBold Condensed", "Bahnschrift Condensed", "Bahnschrift",
        "Arial Narrow", "Helvetica Neue", Karla, sans-serif;
    font-size: 1.375rem;
    font-weight: var(--gbz-weight-display);
}

body#cart #main.gbz-cart-page .cart-summary hr,
body#cart #main.gbz-cart-page .cart-summary .cart-summary-line + hr {
    border-color: var(--gbz-hairline-color);
}

/* 5b. Voucher / promo field: square hairline field (tokens section 8 already does the field; the
 *     layout of the input group and of the submit button is untouched). */
body#cart #main.gbz-cart-page .cart-voucher input[name="discount_name"] {
    border: var(--gbz-hairline-strong);
    border-radius: var(--gbz-radius-0);
}

body#cart #main.gbz-cart-page .cart-voucher-area {
    background-color: var(--gbz-surface-alt);
    border: var(--gbz-hairline);
    border-radius: var(--gbz-radius-sm);
}

/* 5c. Reassurance block under the summary keeps its module content and icons; only the hairline
 *     colour is aligned with the frame language. */
body#cart #main.gbz-cart-page .blockreassurance_product__item {
    border-top: var(--gbz-hairline);
}

/* ----------------------------------------------------------------------------------------------
 * 6. Filled-cart carry-over
 *
 * The cart family file (gbz-cart-v1.css) owns the two-column cart line grid; this layer does not
 * re-layout it. It only removes the last round corners and the text colours that stayed outside
 * the charter, so an empty and a filled cart read as the same page.
 * ------------------------------------------------------------------------------------------- */

body#cart #main.gbz-cart-page .cart-item {
    background-color: var(--gbz-surface);
    border: var(--gbz-hairline);
    border-radius: var(--gbz-radius-0);
    box-shadow: var(--gbz-shadow);
}

body#cart #main.gbz-cart-page .cart-item .product-line-info > .label {
    color: var(--gbz-ink);
}

body#cart #main.gbz-cart-page .cart-item .product-price,
body#cart #main.gbz-cart-page .cart-item .price {
    color: var(--gbz-ink);
}

body#cart #main.gbz-cart-page .cart-item .unit-price,
body#cart #main.gbz-cart-page .gbz-cart-remove .remove-from-cart {
    color: var(--gbz-muted);
}

body#cart #main.gbz-cart-page .cart-items .product-image img {
    background-color: var(--gbz-white);
}

/* 6b. Free-gift line (module addifyfreegifts). Its own front.css marks the line with a private
 *     green (#16a34a / rgba(22,163,74,.08)) and colours its label and price #166534. The gift, its
 *     label, its price (0,00) and its place in the list are untouched: the line keeps a visible
 *     mise-en-avant, in the accent filet the rest of this layer uses, and the badge becomes the
 *     lime chip of charter 6.5 with black text (17.5:1). The 0.7rem badge of the module is lifted
 *     to the 12px small-text floor (criterion 11). */
body#cart #main.gbz-cart-page .addifyfreegifts-free-line {
    background-color: var(--gbz-surface-alt);
    border-left: 4px solid var(--gbz-accent);
}

body#cart #main.gbz-cart-page .addifyfreegifts-free-line .product-price,
body#cart #main.gbz-cart-page .addifyfreegifts-free-line .price,
body#cart #main.gbz-cart-page .addifyfreegifts-free-line .current-price,
body#cart #main.gbz-cart-page .addifyfreegifts-gift-label {
    color: var(--gbz-ink);
}

body#cart #main.gbz-cart-page .addifyfreegifts-free-badge {
    background-color: var(--gbz-accent);
    border-radius: var(--gbz-radius-sm);
    color: var(--gbz-accent-ink);
    font-size: var(--gbz-fs-small);
    letter-spacing: 0;
}

/* 6c. Line actions: gbz-cart-v1.css sizes the "Retirer" link at 40px. That is the only control of
 *     the filled cart below the 44px touch floor (charter 4.4 / criterion 11); the rule below
 *     lifts it to 44px without touching the link, its label or its behaviour. */
body#cart #main.gbz-cart-page .cart-item .remove-from-cart {
    min-height: 44px;
}

/* ----------------------------------------------------------------------------------------------
 * 7. Focus ring
 *
 * gbz-cart-v1.css paints a 3px #159463 ring on every cart control. This layer restores the dark
 * ring of gbz-tokens.css section 9 (2px, offset 2) and, for the black primary pill, the token's own
 * two-ring pattern so the indicator is visible on both surfaces (charter criterion 3, 4.4).
 * ------------------------------------------------------------------------------------------- */

body#cart #main.gbz-cart-page :is(a, button, input, select, textarea):focus-visible {
    outline: 2px solid var(--gbz-black);
    outline-offset: 2px;
}

body#cart #main.gbz-cart-page .btn-primary:focus-visible {
    box-shadow: var(--gbz-focus-ring);
    outline-offset: 2px;
}

/* ----------------------------------------------------------------------------------------------
 * 8. Small screens
 *
 * No new layout: the two columns of the gift panel and the cart grid are the module's and the
 * family's business. This block only protects the two bounds of charter 4.4 on a phone - the page
 * title keeps its 30px floor, the touch floor stays at 44px, and a long FR / DE string may wrap
 * instead of leaving its chip.
 * ------------------------------------------------------------------------------------------- */

@media (max-width: 767.98px) {
    body#cart #main.gbz-cart-page .page-title {
        font-size: clamp(30px, 8vw, 40px);
        margin-bottom: var(--gbz-space-3);
    }

    body#cart #main.gbz-cart-page .gbz-cart-summary-title,
    body#cart #main.gbz-cart-page .gbz-cart-gifts-title {
        font-size: 1.375rem;
    }

    body#cart #main.gbz-cart-page a.btn-secondary,
    body#cart #main.gbz-cart-page .btn-primary {
        width: 100%;
    }

    body#cart #mdgifts-panel .mdgift-card-state {
        font-size: 0.6875rem;
        white-space: normal;
    }
}
