/* Panier et checkout mobile (< 768 px) — maquettes « Panier mobile » et « Checkout mobile »
   corrigées le 23/11 (informations vraies). Sélecteurs préfixés par html pour passer devant
   custom.css, chargé après. Rouge #FF0000 réservé au bouton de commande. */

@media (max-width: 767.98px) {
    /* Écran plein : l'en-tête, le pied de page et la barre d'onglets du site laissent la place
       à l'en-tête de page et à la barre du bas de la maquette. */
    html body:has(.azc) header.header,
    html body:has(.azc) .offer-bar,
    html body:has(.azc) #mobile_app_bar,
    html body:has(.azc) .gm-pf,
    html body:has(.azc) footer.footer,
    html body:has(.azc) .back-to-top,
    html body:has(.azc) .social-chat-icons { display: none !important; }
    html body:has(.azc) .main-content { padding: 0 !important; margin: 0 !important; gap: 0 !important; }
    html body:has(.azc) { background: #F1F5F9; }

    html .azc {
        --azc-navy: #000080;
        --azc-navy-soft: #EAF2FF;
        --azc-link: #0366CF;
        --azc-text: #0F172A;
        --azc-muted: #475569;
        --azc-subtle: #64748B;
        --azc-line: #E2E8F0;
        --azc-field: #CBD5E1;
        --azc-bg: #F1F5F9;
        --azc-red: #FF0000;
        --azc-warn: #B45309;
        background: var(--azc-bg);
        color: var(--azc-text);
        font-family: 'Inter', system-ui, sans-serif;
        font-feature-settings: 'cv11', 'ss01';
        min-height: 100vh;
        padding-bottom: 180px;
    }
    html .azc *, html .azc *::before, html .azc *::after { box-sizing: border-box; }
    html .azc h1, html .azc h2 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; color: var(--azc-text); }
    html .azc a { color: var(--azc-link); text-decoration: none; }
    html .azc label, html .azc h1, html .azc h2 { text-transform: none; }

    /* En-tête de page */
    html .azc-top { position: sticky; top: 0; z-index: 20; background: #FFFFFF; border-bottom: 1px solid var(--azc-line); padding: 6px 8px; }
    html .azc-top__row, html .azc--cart .azc-top { display: flex; align-items: center; gap: 4px; }
    html .azc--cart .azc-top { height: 56px; padding: 0 8px; }
    html .azc-top__back { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--azc-text) !important; flex-shrink: 0; }
    html .azc-top__title { margin: 0; font-size: 18px; line-height: 1.2; }
    html .azc-top__secure { margin-left: auto; padding-right: 8px; display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: #15803D; }
    html .azc-steps { margin: 2px 0 6px; padding: 0 8px; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; font-size: 12px; font-weight: 600; color: var(--azc-subtle); }
    html .azc-steps li { display: flex; flex-direction: column; gap: 4px; }
    html .azc-steps li::before { content: ''; height: 4px; border-radius: 9999px; background: var(--azc-field); }
    html .azc-steps li.is-done { color: var(--azc-navy); }
    html .azc-steps li.is-done::before { background: var(--azc-navy); }

    html .azc-body { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
    html .azc-card { background: #FFFFFF; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 14px; }
    html .azc-card h2 { margin: 0; font-size: 16px; }
    html .azc-link { height: 44px; display: inline-flex; align-items: center; border: 0; background: transparent; padding: 0; font: 600 13px 'Inter', sans-serif; color: var(--azc-link) !important; }

    html .azc-banner { background: var(--azc-navy-soft); color: var(--azc-navy); border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 1.4; }
    html .azc-banner svg { flex-shrink: 0; }

    /* Boutique et articles */
    html .azc-shop__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: -6px; }
    html .azc-shop__name { display: flex; align-items: center; gap: 6px; min-width: 0; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 15px; }
    html .azc-shop__name a { color: var(--azc-text) !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    html .azc-shop__name svg { flex-shrink: 0; }
    html .azc-sep { height: 1px; background: var(--azc-line); }
    html .azc-item { display: flex; gap: 12px; }
    html .azc-item--off .azc-item__img img { opacity: .5; }
    html .azc-item__img { width: 84px; height: 84px; flex-shrink: 0; border-radius: 10px; background: var(--azc-bg); overflow: hidden; }
    html .azc-item__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
    html .azc-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
    html .azc-item__name { font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--azc-text) !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    html .azc-item__variant { font-size: 12px; color: var(--azc-muted); }
    html .azc-item__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
    html .azc-item__prices { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
    html .azc-item__total { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
    html .azc-item__unit { font-size: 12px; color: var(--azc-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
    html .azc-item__remove { align-self: flex-start; height: 36px; border: 0; background: transparent; padding: 0; font: 500 13px 'Inter', sans-serif; color: var(--azc-muted); }

    html .azc-chip { align-self: flex-start; min-height: 22px; padding: 0 6px; border-radius: 4px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; }
    html .azc-chip--warn { background: #FFFBEB; color: var(--azc-warn); }
    html .azc-chip--muted { background: var(--azc-bg); color: #334155; }
    html .azc-chip--danger { background: #FEF2F2; color: #B91C1C; }

    html .azc-qty { display: flex; align-items: center; border: 1px solid var(--azc-field); border-radius: 8px; height: 40px; background: #FFFFFF; }
    html .azc-qty--warn { border: 1.5px solid #F59E0B; }
    html .azc-qty__btn { width: 36px; height: 38px; border: 0; background: transparent; font-size: 18px; color: #334155; padding: 0; }
    html .azc-qty__btn:disabled { color: #CBD5E1; }
    html .azc-qty__input { width: 38px; height: 38px; border: 0; padding: 0; text-align: center; font: 600 16px 'Inter', sans-serif; font-variant-numeric: tabular-nums; color: var(--azc-text); background: transparent; -moz-appearance: textfield; }
    html .azc-qty__input::-webkit-outer-spin-button, html .azc-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

    html .azc-tier { background: var(--azc-navy-soft); border-radius: 8px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--azc-navy); line-height: 1.4; margin-top: -4px; }
    html .azc-tier__btn { flex-shrink: 0; height: 40px; padding: 0 12px; border-radius: 8px; border: 1.5px solid var(--azc-navy); background: #FFFFFF; color: var(--azc-navy); font: 600 13px 'Inter', sans-serif; }

    /* Champs et boutons */
    html .azc-input, html .azc-select { width: 100%; height: 48px; border: 1px solid var(--azc-field); border-radius: 8px; padding: 0 12px; font: 500 16px 'Inter', sans-serif; color: var(--azc-text); background: #FFFFFF; }
    html .azc-input:focus, html .azc-select:focus { outline: none; border-color: var(--azc-navy); box-shadow: 0 0 0 1px var(--azc-navy); }
    html .azc-input::placeholder { color: #94A3B8; font-weight: 400; }
    html .azc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent; font: 600 14px 'Inter', sans-serif; text-decoration: none; }
    html .azc-btn--ghost { border-color: var(--azc-field); background: #FFFFFF; color: var(--azc-text) !important; }
    html .azc-btn--navy { background: var(--azc-navy); color: #FFFFFF !important; }
    html .azc-btn--red { width: 100%; height: 50px; border: 0; background: var(--azc-red); color: #FFFFFF !important; font-size: 16px; }
    html .azc-btn--red:disabled, html .azc-btn--red.is-loading { opacity: .6; }

    html .azc-coupon { gap: 10px; }
    html .azc-coupon__label { font-size: 13px; font-weight: 600; margin: 0; }
    html .azc-coupon__row { display: flex; gap: 8px; }
    html .azc-coupon__row .azc-input { height: 44px; font-size: 15px; font-weight: 400; min-width: 0; flex: 1; text-transform: uppercase; }
    html .azc-coupon__row .azc-input::placeholder { text-transform: none; }
    html .azc-coupon__applied { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; color: #15803D; }

    html .azc-summary { gap: 8px; font-size: 14px; font-variant-numeric: tabular-nums; }
    html .azc-summary h2 { margin-bottom: 4px; }
    html .azc-summary__row { display: flex; justify-content: space-between; gap: 12px; }
    html .azc-summary__row > span:first-child { color: var(--azc-muted); }
    html .azc-summary__row > span:last-child { white-space: nowrap; }
    html .azc-summary__row--minus > span:last-child { color: #15803D; }

    html .azc-trust { margin: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: var(--azc-muted); text-align: center; }

    html .azc-empty { align-items: center; text-align: center; padding: 32px 16px; gap: 10px; }
    html .azc-empty__title { margin: 0; font-size: 18px; }
    html .azc-empty__text { margin: 0 0 6px; font-size: 14px; color: var(--azc-muted); }

    /* Barre du bas */
    html .azc-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: #FFFFFF; border-top: 1px solid var(--azc-line); box-shadow: 0 -8px 24px rgba(15, 23, 42, .08); padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
    html .azc-bar__total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
    html .azc-bar__total span { font-size: 14px; color: var(--azc-muted); }
    html .azc-bar__total strong { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; color: var(--azc-text); white-space: nowrap; }
    html .azc-bar__alert { margin: 0; font-size: 12px; color: var(--azc-warn); line-height: 1.4; }
    html .azc-bar__hint { font-size: 12px; color: var(--azc-muted); text-align: center; }
    html .azc-bar__hint a { color: var(--azc-link) !important; }

    /* Checkout */
    html .azc-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; margin: 0; }
    html .azc-field__opt { font-weight: 400; color: var(--azc-subtle); }
    html .azc-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    html .azc-phone { display: flex; height: 48px; border: 1.5px solid var(--azc-navy); border-radius: 8px; overflow: hidden; background: #FFFFFF; }
    html .azc-phone__code { padding: 0 12px; display: flex; align-items: center; background: #F8FAFC; border-right: 1px solid var(--azc-line); font-weight: 600; font-size: 15px; }
    html .azc-phone__input { flex: 1; min-width: 0; border: 0; padding: 0 12px; font: 500 16px 'Inter', sans-serif; color: var(--azc-text); outline: none; }
    html .azc-geo { align-self: flex-start; height: 44px; border: 0; background: transparent; padding: 0; display: flex; align-items: center; gap: 6px; font: 600 14px 'Inter', sans-serif; color: var(--azc-link); }
    html .azc-geo__ok { font-size: 12px; font-weight: 500; color: #15803D; }
    html .azc-option { min-height: 56px; border: 1px solid var(--azc-field); border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; margin: 0; cursor: pointer; }
    html .azc-option:has(input:checked) { border: 1.5px solid var(--azc-navy); background: var(--azc-navy-soft); }
    html .azc-option input { width: 20px; height: 20px; accent-color: var(--azc-navy); margin: 0; flex-shrink: 0; }
    html .azc-option__text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
    html .azc-option__title { font-size: 14px; font-weight: 600; }
    html .azc-option__sub { font-size: 12px; color: var(--azc-muted); }
    html .azc-option__price { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
    html .azc-note { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--azc-muted); line-height: 1.5; margin: 0; }
    html .azc-note svg { flex-shrink: 0; margin-top: 1px; }
    html .azc-error { margin: 0; font-size: 12px; color: #B91C1C; }
    html .azc-input.is-invalid, html .azc-phone.is-invalid { border-color: #DC2626; box-shadow: 0 0 0 1px #DC2626; }
}
