/* ==========================================================================
   A4W Lists — front (1.5.0)
   Maquette : canevas « Maquettes Gumuche », pages Compte client et Fiche produit.
   ========================================================================== */

/* Variables du module, déclarées sur ses propres blocs et non plus sur `:root` :
   elles n'ont rien à faire sur tout le document (règle F2). Chaque valeur lit un
   jeton du thème, avec repli. L'encre (filets, pictos, textes d'accent) vient de
   `--accent-ink-color` et jamais de `--primary-color`, que certains thèmes règlent
   en couleur de FOND (gumuchev2 : blanc cassé). */
.a4w-lists-button,
.a4w-lists-nav,
.a4w-mylists,
.a4w-lists-cart,
.a4w-lists-account-link {
    --a4w-lists-ink: var(--accent-ink-color, var(--bs-primary, #593322));
    --a4w-lists-ink-title: var(--h3-color, var(--a4w-lists-ink));
    --a4w-lists-ink-accent: var(--a4w-lists-ink);
    --a4w-lists-outline: var(--a4w-lists-ink);
    --a4w-lists-action-bg: var(--btn-primary-bg, var(--bs-primary, #593322));
    --a4w-lists-on-primary: var(--btn-primary-color, var(--button-text-color, #fff));
    --a4w-lists-primary-hover: var(--btn-primary-hover-bg, var(--primary-hover-color, #382015));
    --a4w-lists-on-primary-hover: var(--btn-primary-hover-color, var(--button-text-color, #fff));
    --a4w-lists-secondary: var(--light-bg, var(--bs-secondary-bg, #FFF5FB));
    --a4w-lists-text: var(--text-color, var(--bs-body-color, #1D191B));
    --a4w-lists-muted: var(--medium-gray, #6B5E58);
    --a4w-lists-bg: var(--background-color, var(--bs-body-bg, #fff));
    --a4w-lists-border: var(--border-color-light, #EADDE3);
    --a4w-lists-light: var(--light-bg, #FFF5FB);
    --a4w-lists-danger: var(--bs-danger, #A12B2B);
    --a4w-lists-radius: var(--btn-radius, 4px);
    --a4w-lists-shadow: var(--box-shadow, 0 8px 24px rgba(29, 25, 27, 0.12));
}

/* ==========================================================================
   Bouton « Ajouter aux favoris »
   ========================================================================== */
.a4w-lists-button {
    position: relative;
    display: inline-block;
}

.a4w-lists-button--page {
    display: block;
    margin-top: 16px;
}

.a4w-lists-button--card {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
}

.a4w-lists-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--a4w-lists-ink);
    border-radius: 22px;
    background: var(--a4w-lists-bg);
    color: var(--a4w-lists-ink);
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--a4w-transition, 0.15s);
}

.a4w-lists-trigger:hover,
.a4w-lists-trigger:focus-visible {
    background: var(--a4w-lists-light);
    color: var(--a4w-lists-ink);
}

.a4w-lists-trigger__icon {
    flex: 0 0 auto;
    width: 1.25em;
    height: 1.25em;
}

.a4w-lists-trigger__heart {
    fill: none;
}

.a4w-lists-trigger--active {
    background: var(--a4w-lists-light);
}

.a4w-lists-trigger--active .a4w-lists-trigger__heart {
    fill: currentColor;
}

.a4w-lists-button--card .a4w-lists-trigger {
    width: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--a4w-lists-shadow);
}

/* ==========================================================================
   Panneau « Ajouter à une liste »
   ========================================================================== */
.a4w-lists-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 30;
    width: 360px;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: var(--a4w-lists-bg);
    border: 1px solid var(--a4w-lists-border);
    border-radius: 8px;
    box-shadow: var(--a4w-lists-shadow);
    color: var(--a4w-lists-text);
}

.a4w-lists-dropdown[hidden] {
    display: none;
}

/* Position calculée par le JS (placeDropdown) : le panneau sort du flux de la colonne
   collante de la fiche produit, qui le rognait. Au-dessus de l'en-tête collant du
   thème ; défilement interne quand l'écran est trop court. */
.a4w-lists-dropdown.is-fixed {
    position: fixed;
    right: auto;
    z-index: 1040;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.a4w-lists-button--card .a4w-lists-dropdown {
    left: auto;
    right: 0;
    width: 320px;
}

.a4w-lists-dropdown__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 8px 8px 24px;
}

.a4w-lists-dropdown__title {
    font-size: var(--font-size-h5, 1.125rem);
    font-weight: 600;
    color: var(--a4w-lists-ink-title);
}

.a4w-lists-dropdown__close {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--a4w-lists-muted);
    font-size: 1.25rem;
    cursor: pointer;
}

.a4w-lists-dropdown__items {
    list-style: none;
    margin: 0;
    padding: 0 8px;
    max-height: 264px;
    overflow-y: auto;
}

.a4w-lists-dropdown__item {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 48px;
    margin: 0;
    padding: 0 16px;
    border-radius: var(--a4w-lists-radius);
    font-weight: 400;
    color: var(--a4w-lists-text);
    cursor: pointer;
}

.a4w-lists-dropdown__item:hover {
    background: var(--a4w-lists-light);
}

.a4w-lists-dropdown__item input[type="checkbox"] {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--a4w-lists-ink);
}

.a4w-lists-dropdown__name {
    flex: 1 1 auto;
    min-width: 0;
}

.a4w-lists-dropdown__count {
    flex: 0 0 auto;
    font-size: 0.75rem;
    color: var(--a4w-lists-muted);
}

.a4w-lists-dropdown__empty {
    padding: 8px 16px;
    color: var(--a4w-lists-muted);
}

.a4w-lists-dropdown__create {
    display: flex;
    gap: 8px;
    margin: 8px 16px 0;
    padding-top: 16px;
    border-top: 1px solid var(--a4w-lists-border);
}

.a4w-lists-dropdown__create input {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    box-sizing: border-box;
    padding: 0 16px;
    border: 1px solid var(--a4w-lists-border);
    border-radius: var(--a4w-lists-radius);
    background: var(--a4w-lists-bg);
    color: var(--a4w-lists-text);
    font: inherit;
}

.a4w-lists-dropdown__create .btn,
.a4w-lists-nav__form .btn,
.a4w-mylists__rename-form .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    min-height: 44px;
    padding-block: 0;
}

.a4w-lists-dropdown__feedback {
    margin: 8px 24px 0;
    font-size: 0.8125rem;
    color: var(--a4w-lists-ink);
}

.a4w-lists-dropdown__feedback:empty {
    display: none;
}

.a4w-lists-dropdown__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding: 16px 24px;
    border-top: 1px solid var(--a4w-lists-border);
    color: var(--a4w-lists-ink);
    font-size: 0.875rem;
    text-decoration: none;
}

.a4w-lists-dropdown__sr,
.a4w-mylists__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ==========================================================================
   Bloc « Mes listes » (hook displayA4wListsNav)
   ========================================================================== */
.a4w-lists-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
    padding: 24px;
    border: 1px solid var(--a4w-lists-border);
    border-radius: 8px;
    background: var(--a4w-lists-bg);
    color: var(--a4w-lists-text);
}

.a4w-lists-nav__title {
    margin: 0;
    font-size: var(--font-size-h4, 1.25rem);
    font-weight: 600;
    color: var(--a4w-lists-ink-title);
}

.a4w-lists-nav__items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.a4w-lists-nav__link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: var(--a4w-lists-radius);
    color: var(--a4w-lists-text);
    text-decoration: none;
}

.a4w-lists-nav__link:hover {
    background: var(--a4w-lists-light);
    color: var(--a4w-lists-text);
}

.a4w-lists-nav__link.is-current {
    background: var(--a4w-lists-light);
    font-weight: 600;
}

.a4w-lists-nav__name {
    flex: 1 1 auto;
    min-width: 0;
}

.a4w-lists-nav__star {
    flex: 0 0 auto;
    color: var(--a4w-lists-ink);
}

.a4w-lists-nav__count {
    flex: 0 0 auto;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--a4w-lists-border);
    border-radius: 12px;
    background: var(--a4w-lists-bg);
    font-size: 0.75rem;
    font-weight: 400;
}

.a4w-lists-nav__new {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px dashed var(--a4w-lists-ink);
    border-radius: var(--a4w-lists-radius);
    background: var(--a4w-lists-bg);
    color: var(--a4w-lists-ink);
    font: inherit;
    font-size: 0.875rem;
    cursor: pointer;
}

.a4w-lists-nav__form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.a4w-lists-nav__form[hidden] {
    display: none;
}

.a4w-lists-nav__label {
    width: 100%;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--a4w-lists-muted);
}

.a4w-lists-nav__form .form-control {
    flex: 1 1 160px;
    min-width: 0;
}

.a4w-lists-nav__limit {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--a4w-lists-muted);
}

/* Sous 768 px : les listes deviennent des pastilles qui défilent à l'horizontale,
   au-dessus du contenu (le menu du compte est masqué par le thème à cette taille). */
@media (max-width: 767.98px) {
    /* min-width: 0 : sans lui, la rangée de pastilles (élément flex en
       overflow-x) impose sa largeur totale à la colonne, et toute la page déborde. */
    .a4w-lists-nav,
    .a4w-lists-nav__items,
    .a4w-mylists {
        min-width: 0;
        max-width: 100%;
    }

    .a4w-lists-nav {
        margin-bottom: 16px;
        padding: 0;
        border: 0;
        gap: 8px;
    }

    .a4w-lists-nav__title {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .a4w-lists-nav__items {
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        padding-bottom: 8px;
    }

    .a4w-lists-nav__items li {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .a4w-lists-nav__link {
        border: 1px solid var(--a4w-lists-ink);
        border-radius: 22px;
        color: var(--a4w-lists-ink);
        white-space: nowrap;
    }

    .a4w-lists-nav__link.is-current {
        background: var(--a4w-lists-ink);
        color: var(--a4w-lists-bg);
    }

    .a4w-lists-nav__link.is-current .a4w-lists-nav__star {
        color: var(--a4w-lists-bg);
    }

    .a4w-lists-nav__link .a4w-lists-nav__count {
        border: 0;
        background: transparent;
        color: inherit;
        padding: 0;
    }

    .a4w-lists-nav__new {
        border-radius: 22px;
    }
}

/* ==========================================================================
   Page « Mes listes »
   ========================================================================== */
.a4w-mylists {
    display: flex;
    flex-direction: column;
    gap: 24px;
    color: var(--a4w-lists-text);
}

.a4w-mylists__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--a4w-lists-border);
}

.a4w-mylists__heading {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.a4w-mylists__title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.a4w-mylists__title-row[hidden] {
    display: none;
}

.a4w-mylists__name {
    margin: 0;
    font-size: var(--font-size-h4, 1.5rem);
    color: var(--a4w-lists-ink-title);
}

.a4w-mylists__badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    background: var(--a4w-lists-light);
    color: var(--a4w-lists-ink);
    font-size: 0.75rem;
}

.a4w-mylists__meta {
    margin: 0;
    font-size: 0.875rem;
    color: var(--a4w-lists-muted);
}

.a4w-mylists__rename-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.a4w-mylists__rename-form[hidden] {
    display: none;
}

.a4w-mylists__rename-form .form-control {
    flex: 1 1 240px;
    min-width: 0;
}

.a4w-mylists__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.a4w-mylists__add-all {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 56px;
}

.a4w-mylists__add-all-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.a4w-mylists__add-all-amount {
    font-weight: 700;
    white-space: nowrap;
}

.a4w-mylists__add-all:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.a4w-mylists__menu {
    position: relative;
}

.a4w-mylists__menu-toggle {
    width: 56px;
    height: 56px;
    border: 1px solid var(--a4w-lists-ink);
    border-radius: var(--a4w-lists-radius);
    background: var(--a4w-lists-bg);
    color: var(--a4w-lists-ink);
    font-size: 1.375rem;
    line-height: 1;
    cursor: pointer;
}

.a4w-mylists__menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    width: 240px;
    padding: 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: var(--a4w-lists-bg);
    border: 1px solid var(--a4w-lists-border);
    border-radius: 8px;
    box-shadow: var(--a4w-lists-shadow);
}

.a4w-mylists__menu-panel[hidden] {
    display: none;
}

.a4w-mylists__menu-panel button {
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--a4w-lists-radius);
    background: transparent;
    color: var(--a4w-lists-text);
    font: inherit;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
}

.a4w-mylists__menu-panel button:hover,
.a4w-mylists__menu-panel button:focus-visible {
    background: var(--a4w-lists-light);
}

.a4w-mylists__menu-panel .a4w-mylists__menu-danger {
    margin-top: 8px;
    border-top: 1px solid var(--a4w-lists-border);
    border-radius: 0;
    color: var(--a4w-lists-text);
}

/* Lignes produit : une grille par ligne, colonnes fixes pour l'alignement */
.a4w-mylists__table {
    display: flex;
    flex-direction: column;
}

.a4w-mylists__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px 140px 112px 48px;
    align-items: center;
    gap: 24px;
    padding: 24px 0;
    border-top: 1px solid var(--a4w-lists-border);
}

.a4w-mylists__row--head {
    padding: 0 0 8px;
    border-top: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: none;
    color: var(--a4w-lists-muted);
}

.a4w-mylists__row.is-unavailable {
    opacity: 0.7;
}

.a4w-mylists__col-product {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

.a4w-mylists__col-total {
    text-align: right;
    font-weight: 600;
}

.a4w-mylists__thumb {
    flex: 0 0 96px;
    width: 96px;
    height: 96px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--a4w-lists-light);
}

.a4w-mylists__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.a4w-mylists__info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.a4w-mylists__product {
    font-weight: 600;
    color: var(--a4w-lists-text);
    text-decoration: none;
}

.a4w-mylists__product:hover {
    color: var(--a4w-lists-ink);
}

.a4w-mylists__variant {
    font-size: 0.875rem;
    color: var(--a4w-lists-muted);
}

.a4w-mylists__unit-mobile {
    display: none;
}

.a4w-mylists__unavailable {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    background: #FBEAEA;
    color: #8A2323;
    font-size: 0.75rem;
}

/* Compteur de quantité : même cadre que ceux du site (theme_a4w 3.9.1) */
.a4w-mylists__qty {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    width: 140px;
    height: 48px;
    box-sizing: border-box;
    border: 1px solid var(--a4w-lists-ink);
    border-radius: var(--a4w-lists-radius);
    overflow: hidden;
    background: var(--a4w-lists-bg);
}

.a4w-mylists__qty button {
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--a4w-lists-ink);
    font-size: 1.125rem;
    cursor: pointer;
}

.a4w-mylists__qty button:hover {
    background: var(--a4w-lists-light);
}

.a4w-mylists__qty input {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--a4w-lists-text);
    text-align: center;
    font: inherit;
    -moz-appearance: textfield;
}

.a4w-mylists__qty input::-webkit-outer-spin-button,
.a4w-mylists__qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.a4w-mylists__remove {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--a4w-lists-radius);
    background: transparent;
    color: var(--a4w-lists-muted);
    cursor: pointer;
}

.a4w-mylists__remove:hover,
.a4w-mylists__remove:focus-visible {
    background: var(--a4w-lists-light);
    color: var(--a4w-lists-text);
}

.a4w-mylists__row.is-busy {
    opacity: 0.5;
    pointer-events: none;
}

/* Récapitulatif */
.a4w-mylists__summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 32px;
    padding: 24px;
    border-radius: 8px;
    background: var(--a4w-lists-light);
}

.a4w-mylists__summary-text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.a4w-mylists__summary-meta {
    font-size: 0.875rem;
    color: var(--a4w-lists-muted);
}

.a4w-mylists__summary-total {
    font-size: var(--font-size-h3, 1.5rem);
    font-weight: 700;
    white-space: nowrap;
}

.a4w-mylists__summary .a4w-mylists__add-all {
    min-height: 56px;
}

/* États vides */
.a4w-mylists__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 48px 32px;
    border-radius: 8px;
    background: var(--a4w-lists-light);
    text-align: center;
}

.a4w-mylists__empty-icon {
    color: var(--a4w-lists-ink);
}

.a4w-mylists__empty-title {
    margin: 0;
    font-size: var(--font-size-h5, 1.125rem);
    font-weight: 600;
}

.a4w-mylists__empty-text {
    max-width: 48ch;
    margin: 0;
    line-height: 1.6;
    color: var(--a4w-lists-muted);
}

.a4w-mylists__feedback {
    margin: 0;
    color: var(--a4w-lists-ink);
}

.a4w-mylists__feedback[hidden] {
    display: none;
}

.a4w-mylists__feedback.is-error {
    color: var(--a4w-lists-danger);
}

/* Tablette : les colonnes prix et total se resserrent */
@media (max-width: 991.98px) {
    .a4w-mylists__row {
        grid-template-columns: minmax(0, 1fr) 140px 96px 48px;
    }

    .a4w-mylists__col-price {
        display: none;
    }

    .a4w-mylists__unit-mobile {
        display: block;
        font-size: 0.875rem;
    }

    .a4w-mylists__thumb {
        flex-basis: 72px;
        width: 72px;
        height: 72px;
    }
}

/* Mobile : une carte par produit, barre d'achat collée en bas de l'écran */
@media (max-width: 767.98px) {
    .a4w-mylists__row--head {
        display: none;
    }

    .a4w-mylists__row {
        grid-template-columns: minmax(0, 1fr) auto 44px;
        grid-template-areas:
            "product product remove"
            "qty total total";
        gap: 16px;
        padding: 16px 0;
    }

    .a4w-mylists__col-product { grid-area: product; gap: 16px; }
    .a4w-mylists__col-qty { grid-area: qty; }
    .a4w-mylists__col-total { grid-area: total; }
    .a4w-mylists__col-remove { grid-area: remove; align-self: start; }

    .a4w-mylists__qty {
        width: 132px;
        height: 44px;
    }

    .a4w-mylists__header {
        flex-wrap: nowrap;
        align-items: flex-start;
    }

    .a4w-mylists__actions {
        flex: 0 0 auto;
    }

    .a4w-mylists__header .a4w-mylists__add-all {
        display: none;
    }

    .a4w-mylists__menu {
        margin-left: auto;
    }

    .a4w-mylists__menu-toggle {
        width: 44px;
        height: 44px;
    }

    .a4w-mylists__summary {
        position: sticky;
        bottom: 0;
        z-index: 20;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin: 0;
        padding: 16px 0;
        border-radius: 0;
        border-top: 1px solid var(--a4w-lists-border);
        background: var(--a4w-lists-bg);
        box-shadow: 0 -8px 24px rgba(29, 25, 27, 0.08);
    }

    .a4w-mylists__summary-text {
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
    }

    .a4w-mylists__summary-total {
        font-size: 1.125rem;
    }

    .a4w-mylists__summary .a4w-mylists__add-all {
        justify-content: center;
        width: 100%;
        min-height: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .a4w-lists-trigger {
        transition: none;
    }
}

/* ==========================================================================
   Lien « Mes listes » dans le bloc compte client
   ========================================================================== */
.a4w-lists-account-link {
    color: var(--a4w-lists-text);
}

.a4w-lists-account-link:hover {
    color: var(--a4w-lists-ink);
}

/* ==========================================================================
   Page panier — « enregistrer le panier » / « charger une liste »
   ========================================================================== */
.a4w-lists-cart {
    background: var(--a4w-lists-bg);
    border: 1px solid var(--a4w-lists-border);
    border-radius: 6px;
    padding: 16px;
    margin-top: 16px;
    color: var(--a4w-lists-text);
}

.a4w-lists-cart--top {
    margin: 0 0 24px;
}

/* Rendu en fin de body puis remonte par le JS : masque tant qu'il n'est pas place */
.a4w-lists-cart--pending {
    display: none;
}

.a4w-lists-cart--summary {
    margin: 0 0 16px;
    border: 0;
    border-bottom: 1px solid var(--a4w-lists-border);
    border-radius: 0;
    padding: 0 0 16px;
}

.a4w-lists-cart__login {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.a4w-lists-cart__login a {
    color: var(--a4w-lists-ink-accent);
}

.a4w-lists-cart__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.a4w-lists-cart__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--a4w-lists-bg);
    border: 1px solid var(--a4w-lists-outline);
    color: var(--a4w-lists-outline);
    border-radius: var(--border-radius-round, 4px);
    padding: 8px 14px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.a4w-lists-cart__toggle:hover:not(:disabled) {
    background: var(--a4w-lists-action-bg);
    color: var(--a4w-lists-on-primary);
}

.a4w-lists-cart__toggle:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.a4w-lists-cart__toggle .material-icons {
    font-size: 20px;
}

.a4w-lists-cart__panel {
    margin-top: 12px;
    padding: 12px;
    background: var(--a4w-lists-light);
    border-radius: 6px;
}

.a4w-lists-cart__panel[hidden],
.a4w-lists-cart__feedback[hidden],
.a4w-lists-cart__load-form[hidden],
.a4w-lists-cart__name-row[hidden],
.a4w-lists-cart__empty[hidden] {
    display: none;
}

.a4w-lists-cart__label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--a4w-lists-muted);
}

.a4w-lists-cart__panel select,
.a4w-lists-cart__panel input[type="text"] {
    width: 100%;
    max-width: 360px;
    margin-bottom: 10px;
}

.a4w-lists-cart__panel .btn-primary {
    background: var(--a4w-lists-action-bg);
    border-color: var(--a4w-lists-action-bg);
    color: var(--a4w-lists-on-primary);
}

.a4w-lists-cart__panel .btn-primary:hover {
    background: var(--a4w-lists-primary-hover);
    border-color: var(--a4w-lists-primary-hover);
    color: var(--a4w-lists-on-primary-hover);
}

.a4w-lists-cart__panel .material-icons {
    vertical-align: middle;
    margin-right: 4px;
    font-size: 18px;
}

.a4w-lists-cart__hint,
.a4w-lists-cart__limit {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--a4w-lists-muted);
}

.a4w-lists-cart__feedback {
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--a4w-lists-ink-accent);
}

.a4w-lists-cart__feedback--error {
    color: #c0392b;
}

/* ==========================================================================
   « Mettre de côté » sur le panier (1.6.0)
   Maquette Panier.dc.html : lien à picto horloge à côté de « Retirer », zone « Mis de côté (N
   articles) » sous le panier. Jetons du thème avec repli (F1), pas de :root (F2). Toutes les
   règles sont à un niveau de classe (F3). Cibles de 44 px de haut.
   ========================================================================== */
.a4w-sfl,
.a4w-sfl-zone {
    --a4w-sfl-ink: var(--text-color, #1D191B);
    --a4w-sfl-ink-2: var(--medium-gray, #565254);
    --a4w-sfl-line: var(--border-color, #E4E3E4);
    --a4w-sfl-field-line: var(--input-border-color, #8E8C8D);
    --a4w-sfl-pressed: var(--pressed-bg-color, #F0EAE4);
    --a4w-sfl-error: var(--alert-danger-color, #9B2C2C);
    --a4w-sfl-radius: var(--border-radius, 3px);
}

.a4w-sfl {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 8px;
}

.a4w-sfl-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin: 0;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: var(--a4w-sfl-radius);
    background: transparent;
    color: var(--a4w-sfl-ink);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
}

.a4w-sfl-btn:hover {
    border-color: var(--a4w-sfl-field-line);
    color: var(--a4w-sfl-ink);
    text-decoration: none;
}

.a4w-sfl-btn:active {
    background: var(--a4w-sfl-pressed);
}

.a4w-sfl-btn:focus-visible,
.a4w-sfl-restore:focus-visible {
    outline: 2px solid var(--a4w-sfl-ink);
    outline-offset: 2px;
}

.a4w-sfl-btn.is-busy,
.a4w-sfl-restore.is-busy {
    opacity: 0.6;
    cursor: progress;
}

.a4w-sfl-btn__icon {
    flex: none;
    width: 1.125em;
    height: 1.125em;
}

.a4w-sfl__error {
    flex: 1 0 100%;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--a4w-sfl-error);
}

/* Zone « Mis de côté » */
.a4w-sfl-zone__title {
    margin: 0;
}

.a4w-sfl-zone__title:focus-visible {
    outline: 2px solid var(--a4w-sfl-ink);
    outline-offset: 4px;
}

.a4w-sfl-zone__count {
    font-size: 1rem;
    font-weight: 400;
    color: var(--a4w-sfl-ink-2);
}

.a4w-sfl-zone__intro {
    max-width: 65ch;
    margin: 8px 0 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--a4w-sfl-ink-2);
}

.a4w-sfl-zone__list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.a4w-sfl-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    padding: 24px 0;
    border-bottom: 1px solid var(--a4w-sfl-line);
}

.a4w-sfl-item__image {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: cover;
    border: 1px solid var(--a4w-sfl-line);
    border-radius: var(--a4w-sfl-radius);
}

.a4w-sfl-item__image--empty {
    background: var(--light-bg, #FAF7F4);
}

.a4w-sfl-item__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    min-width: 0;
}

.a4w-sfl-item__info {
    display: flex;
    flex: 1 1 16rem;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.a4w-sfl-item__name {
    font-family: var(--font-family-title, inherit);
    font-size: 1.0625rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--a4w-sfl-ink);
}

.a4w-sfl-item__meta {
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--a4w-sfl-ink-2);
    font-variant-numeric: tabular-nums;
}

.a4w-sfl-item__status {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--a4w-sfl-ink);
}

.a4w-sfl-item__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 24px;
}

.a4w-sfl-restore {
    min-height: 44px;
}

.a4w-sfl-zone__message {
    max-width: 65ch;
    margin: 16px 0 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--a4w-sfl-error);
}

@media (max-width: 575.98px) {
    .a4w-sfl-item__actions {
        flex: 1 0 100%;
    }
}
