/* DelivCo / Europa shop — feuille unique, sans dépendance.
 *
 * Règle du fichier : aucune valeur brute dans les composants. Couleur, espacement, rayon,
 * ombre, durée : tout vient d'un jeton. C'est ce qui permet aux deux enseignes et aux deux
 * thèmes de partager les mêmes règles, et ce qui rend la charte contrôlable mécaniquement.
 * Voir docs/CHARTE.md.
 */

/* ========================================================================== JETONS === */
:root {
    color-scheme: light;

    /* Surfaces neutres, communes aux deux enseignes. Contrastes vérifiés AA. */
    --paper: #ffffff;
    --paper-2: #f9fafb;
    --bg: #f4f5f7;
    --line: #e2e5ea;
    --line-strong: #c9cfd8;
    --ink: #14181f;
    --muted: #5a6472;

    /* Marque : redéfinie par .brand-*, jamais employée en dur.
     *
     * ATTENTION, ces deux valeurs ne sont pas un simple repli. Les teintes dérivées plus bas
     * sont déclarées ici, donc calculées avec le `--brand` de `:root` — et non avec celui que
     * `.brand-delivco` ou `.brand-europa` posent sur le `<body>`. Y toucher déplace les deux
     * enseignes à la fois.
     *
     * Les deux enseignes s'en sont affranchies : chaque classe redéclare ses teintes dérivées,
     * donc calculées sur sa propre marque (DelivCo d'abord, Europa depuis le 21/09/2026). Ces
     * valeurs ne servent plus qu'à une page sans classe d'enseigne. */
    --brand: #123c69;
    --brand-ink: #ffffff;
    --accent: #f2a900;
    --accent-ink: #14181f;
    /* Teintes dérivées. Elles ne suivent PAS l'enseigne : voir l'avertissement ci-dessus. */
    --brand-soft: color-mix(in oklab, var(--brand) 8%, var(--paper));
    --brand-line: color-mix(in oklab, var(--brand) 24%, var(--line));
    --brand-ring: color-mix(in oklab, var(--brand) 22%, transparent);

    /* Signe de l'enseigne. Le logo est dessiné pour un fond clair : sur fond sombre, son
     * navy s'efface (1,2 contre le papier). D'où la plaque, qui n'est un aplat que dans le
     * thème sombre — un jeton, pour qu'aucune règle de composant n'entre dans un bloc de thème. */
    --logo-size: 38px;
    --logo-plate: transparent;

    /* États. Valeurs assombries pour passer AA en petit texte (l'ancienne paire échouait). */
    --ok: #0f7a43;
    --ok-bg: #e8f6ee;
    --ok-line: #b5ddc6;
    --warn: #8a5200;
    --warn-bg: #fdf4e3;
    --warn-line: #eed49a;
    --ko: #b3261e;
    --ko-bg: #fdecea;
    --ko-line: #f2bbb6;

    /* Typographie fluide : une seule échelle, du plus petit au titre de page. */
    --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --fs-xs: .78rem;
    --fs-sm: .86rem;
    --fs-md: 1rem;
    --fs-lg: clamp(1.05rem, .98rem + .3vw, 1.2rem);
    --fs-xl: clamp(1.2rem, 1.1rem + .5vw, 1.45rem);
    --fs-2xl: clamp(1.5rem, 1.3rem + .9vw, 2rem);
    --fs-3xl: clamp(1.9rem, 1.5rem + 1.8vw, 2.8rem);

    /* Espacement : une seule échelle, pas de px au jugé dans les composants. */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 32px;
    --sp-7: 48px;
    --sp-8: 64px;

    --r-xs: 6px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-pill: 999px;
    --radius: var(--r-xs); /* conservé : d'anciennes règles peuvent encore y faire appel */

    --sh-1: 0 1px 2px rgba(16, 22, 32, .06);
    --sh-2: 0 4px 12px rgba(16, 22, 32, .08);
    --sh-3: 0 16px 40px rgba(16, 22, 32, .14);

    --dur: .18s;
    --ease: cubic-bezier(.2, .6, .3, 1);
    --focus: var(--brand);
    --overlay: rgba(8, 12, 20, .72);

    --wrap: 1240px;
    /* Hauteur maximale d'un panneau flottant (recherche instantanée) : il défile au-delà. */
    --panel-max-h: 70vh;

    /* Densité : surchargée par .density-*, jamais écrite en dur. */
    --d-card-min: 200px;
    --d-gap: var(--sp-4);
    --d-pad: var(--sp-4);
    --d-card-pad: var(--sp-3);
}

/* Enseignes. Seuls les jetons changent : aucune règle de composant n'est dupliquée.
 *
 * DelivCo porte la charte de Big Bag Delivery, commune au site bigbagdelivery.com et à
 * l'application iOS : le navy et le turquoise du signe (camion et « BIGBAG » en navy,
 * « DELIVERY » en turquoise). Références : l'icône de l'application, dont le favicon du site
 * est le même dessin, et `Brand.swift` (`gradientTop` / `gradientBottom`).
 *
 * Le turquoise retenu est celui déclaré par l'application (#2fa1a5, sa teinte de chargeurs)
 * et non celui du logo (#208f8f) : en fond de bouton, le premier tient 5,73 contre l'encre
 * sombre là où le second ne donne que 4,56 — au-dessus du seuil de 4,5, mais sans la marge
 * qu'on veut pour un libellé de bouton. */
/* DelivCo redéclare ici les teintes dérivées et l'anneau de focus. Déclarés sur `:root`, ils
 * sont calculés avec le `--brand` de `:root` et resteraient sur l'ancien bleu — la barre de
 * catégories et le dégradé d'accueil auraient gardé une teinte qui n'est plus celle de
 * l'enseigne. Les poser sur la classe les calcule avec le `--brand` du `<body>`, donc le navy,
 * et en thème sombre avec sa version éclaircie, sans rien redéclarer. Europa fait de même,
 * avec la charte Europa Drinks du 21/09/2026. */
.brand-delivco {
    --brand: #252a47; --accent: #2fa1a5; --accent-ink: #14181f;
    --brand-soft: color-mix(in oklab, var(--brand) 8%, var(--paper));
    --brand-line: color-mix(in oklab, var(--brand) 24%, var(--line));
    --brand-ring: color-mix(in oklab, var(--brand) 22%, transparent);
    --focus: var(--brand);
}
/* Europa porte la charte du 21/09/2026 (dépôt ERP, scripts/vitrine-europa/charte) : Marine
 * Europa #012E51, Vert Drinks #5EAF3F, fond gris bleuté. Les teintes dérivées sont
 * redéclarées ici, comme pour DelivCo, pour être calculées sur son marine et non sur le bleu
 * de `:root`. Le vert ne porte jamais de texte blanc (2,7) : c'est le marine qui va dessus
 * (5,1) — un bouton vert porte du texte marine. */
.brand-europa {
    --brand: #012E51; --brand-ink: #ffffff; --accent: #5EAF3F; --accent-ink: #012E51; --bg: #F3F6F8;
    --brand-soft: color-mix(in oklab, var(--brand) 8%, var(--paper));
    --brand-line: color-mix(in oklab, var(--brand) 24%, var(--line));
    --brand-ring: color-mix(in oklab, var(--brand) 22%, transparent);
    --focus: var(--brand);
}

/* Densité. Gros = compact (plus de références par écran), détail = confortable. */
.density-compact { --d-card-min: 190px; --d-gap: var(--sp-3); --d-card-pad: var(--sp-3); }
.density-confortable { --d-card-min: 230px; --d-gap: var(--sp-4); --d-card-pad: var(--sp-4); }

/* Thème sombre. Deux entrées, et deux seulement :
 *   — la préférence du système, sauf si la page force le thème clair ;
 *   — l'attribut data-theme="dark" sur <html>, qui sert aux captures et à un futur
 *     sélecteur de thème.
 * Seuls des jetons sont redéfinis ici. Aucune règle de composant, jamais. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
color-scheme: dark;
        --paper: #171b22;
        --paper-2: #1d222b;
        --bg: #0f1218;
        --line: #2b313c;
        --line-strong: #3a424f;
        --ink: #e9ebef;
        --muted: #9aa4b3;

        --brand-soft: color-mix(in oklab, var(--brand) 16%, var(--paper));
        --brand-line: color-mix(in oklab, var(--brand) 34%, var(--line));
        --logo-plate: #ffffff;

        --ok: #4ade80;
        --ok-bg: color-mix(in oklab, #4ade80 14%, var(--paper));
        --ok-line: color-mix(in oklab, #4ade80 32%, var(--line));
        --warn: #fbbf4a;
        --warn-bg: color-mix(in oklab, #fbbf4a 14%, var(--paper));
        --warn-line: color-mix(in oklab, #fbbf4a 32%, var(--line));
        --ko: #ff8a80;
        --ko-bg: color-mix(in oklab, #ff8a80 14%, var(--paper));
        --ko-line: color-mix(in oklab, #ff8a80 32%, var(--line));

        --sh-1: 0 1px 2px rgba(0, 0, 0, .5);
        --sh-2: 0 4px 12px rgba(0, 0, 0, .55);
        --sh-3: 0 16px 40px rgba(0, 0, 0, .65);
        --overlay: rgba(0, 0, 0, .78);

        /* Bac à sable : le rouge est remonté pour tenir 3,1:1 contre le fond teinté. */
        --sandbox-bg: #2a1a1a;
        --sandbox-banner: #ac4d4d;
    }
    /* Les rouges et bleus de logo sont trop sombres sur fond sombre : versions éclaircies.
     * Le navy de DelivCo est monté en clarté à teinte constante (231°), pour rester le bleu
     * du signe et non une autre couleur. */
    .brand-delivco {
        --brand: #9fa6d1; --brand-ink: #0f1218;
        --brand-soft: color-mix(in oklab, var(--brand) 16%, var(--paper));
        --brand-line: color-mix(in oklab, var(--brand) 34%, var(--line));
    }
    /* Le marine tombe à 1,3 sur le fond sombre : monté en clarté à teinte constante (207°),
     * comme le navy de DelivCo. Le vert Drinks reste tel quel, le marine sombre dessus tient. */
    .brand-europa {
        --brand: #9CC4E4; --brand-ink: #0f1218; --bg: #0f1218;
        --brand-soft: color-mix(in oklab, var(--brand) 16%, var(--paper));
        --brand-line: color-mix(in oklab, var(--brand) 34%, var(--line));
    }
}
:root[data-theme="dark"] {
color-scheme: dark;
        --paper: #171b22;
        --paper-2: #1d222b;
        --bg: #0f1218;
        --line: #2b313c;
        --line-strong: #3a424f;
        --ink: #e9ebef;
        --muted: #9aa4b3;

        --brand-soft: color-mix(in oklab, var(--brand) 16%, var(--paper));
        --brand-line: color-mix(in oklab, var(--brand) 34%, var(--line));
        --logo-plate: #ffffff;

        --ok: #4ade80;
        --ok-bg: color-mix(in oklab, #4ade80 14%, var(--paper));
        --ok-line: color-mix(in oklab, #4ade80 32%, var(--line));
        --warn: #fbbf4a;
        --warn-bg: color-mix(in oklab, #fbbf4a 14%, var(--paper));
        --warn-line: color-mix(in oklab, #fbbf4a 32%, var(--line));
        --ko: #ff8a80;
        --ko-bg: color-mix(in oklab, #ff8a80 14%, var(--paper));
        --ko-line: color-mix(in oklab, #ff8a80 32%, var(--line));

        --sh-1: 0 1px 2px rgba(0, 0, 0, .5);
        --sh-2: 0 4px 12px rgba(0, 0, 0, .55);
        --sh-3: 0 16px 40px rgba(0, 0, 0, .65);
        --overlay: rgba(0, 0, 0, .78);

        /* Bac à sable : le rouge est remonté pour tenir 3,1:1 contre le fond teinté. */
        --sandbox-bg: #2a1a1a;
        --sandbox-banner: #ac4d4d;
}
[data-theme="dark"] .brand-delivco {
        --brand: #9fa6d1; --brand-ink: #0f1218;
        --brand-soft: color-mix(in oklab, var(--brand) 16%, var(--paper));
        --brand-line: color-mix(in oklab, var(--brand) 34%, var(--line));
    }
[data-theme="dark"] .brand-europa {
        --brand: #9CC4E4; --brand-ink: #0f1218; --bg: #0f1218;
        --brand-soft: color-mix(in oklab, var(--brand) 16%, var(--paper));
        --brand-line: color-mix(in oklab, var(--brand) 34%, var(--line));
    }

/* ========================================================================== BASE ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font: var(--fs-md)/1.55 var(--font);
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
/* width: 100% est indispensable : main porte .wrap, donc margin-inline: auto, et une
 * marge automatique sur l'axe transversal d'un conteneur flex annule l'étirement —
 * sans cette ligne, main se réduit à la largeur de son contenu. */
main { flex: 1; width: 100%; padding-block: var(--sp-4) var(--sp-7); }
a { color: var(--brand); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; letter-spacing: -.015em; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-md); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--sp-4); }
.lead { color: var(--muted); font-size: var(--fs-lg); }
.muted { color: var(--muted); }
.muted.small, .note { color: var(--muted); font-size: var(--fs-sm); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-5) 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: var(--sp-2); border-radius: 0 0 var(--r-sm) 0; }
.skip:focus { left: 0; z-index: 200; }

/* Un seul anneau de focus pour tout le site, teinté par la marque. */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-xs); }

/* Icônes : sprite SVG unique, mises en couleur par currentColor. */
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ========================================================================== BOUTONS == */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
    background: var(--accent); color: var(--accent-ink);
    border: 1px solid transparent; border-radius: var(--r-sm);
    padding: 10px var(--sp-5); font: inherit; font-weight: 650; line-height: 1.2;
    text-decoration: none; cursor: pointer;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.btn:hover { box-shadow: var(--sh-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-secondary { background: var(--paper); color: var(--brand); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn-small { padding: 6px var(--sp-3); font-size: var(--fs-sm); }
.btn-big { padding: 14px var(--sp-6); font-size: var(--fs-lg); }
.btn.added { background: var(--ok); color: var(--paper); }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.link:hover { color: var(--brand); }

/* ========================================================================== BANDEAUX = */
.flash {
    background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok);
    padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); margin: var(--sp-4) 0;
}
.flash.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.flash.error { background: var(--ko-bg); border-color: var(--ko-line); color: var(--ko); }
/* Attente d'une réponse : ce n'est pas un avertissement, cela passe tout seul. D'où une
   variante neutre plutôt que --warn, qui est réservé à ce qui demande une décision. */
.flash.pending { background: var(--paper-2); border-color: var(--line); color: var(--muted); }
.flash ul { margin: 0; padding-left: var(--sp-5); }
.field-error { color: var(--ko); font-size: var(--fs-sm); margin: var(--sp-1) 0 0; }
.ok { color: var(--ok); font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); display: inline-block; }
.empty {
    background: var(--paper); border: 1px dashed var(--line-strong); border-radius: var(--r-md);
    padding: var(--sp-6); text-align: center; color: var(--muted);
}

/* ========================================================================== EN-TÊTE == */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3) var(--sp-4); flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: var(--sp-2); text-decoration: none; color: var(--ink); font-weight: 750; font-size: var(--fs-lg); letter-spacing: -.02em; }
.logo-mark {
    display: inline-grid; place-items: center; width: var(--logo-size); height: var(--logo-size);
    border-radius: var(--r-sm); background: var(--brand); color: var(--brand-ink);
    font-weight: 800; font-size: 1.1rem;
}
/* Pas de rembourrage : le signe n'a aucune marge interne (il occupe 97 % du fichier), et en
 * ajouter une le rendrait plus petit que la pastille qu'il remplace. La plaque tient donc
 * exactement le carré du signe, comme l'icône de l'application. */
.logo-img {
    width: var(--logo-size); height: var(--logo-size);
    border-radius: var(--r-sm); background: var(--logo-plate); object-fit: contain;
}

/* Le bloc de recherche porte la place dans le bandeau ; le formulaire et le panneau de la
 * recherche instantanée s'y logent, le panneau ancré sous le champ. */
.search-wrap { flex: 1 1 300px; min-width: 0; position: relative; }
.search { display: flex; position: relative; align-items: center; }
.search .icon { position: absolute; left: var(--sp-3); color: var(--muted); pointer-events: none; }
.search input {
    flex: 1; width: 100%; border: 1px solid var(--brand-line); border-radius: var(--r-pill);
    padding: 10px var(--sp-3) 10px var(--sp-7); font: inherit; background: var(--brand-soft); color: var(--ink);
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.search input:hover { border-color: var(--brand); background: var(--paper); }
.search input:focus { background: var(--paper); border-color: var(--brand); }
.search button {
    position: absolute; right: var(--sp-1); border: 0; background: var(--brand); color: var(--brand-ink);
    border-radius: var(--r-pill); width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer;
}
.search button:hover { background: color-mix(in oklab, var(--brand) 85%, black); }

.header-tools { display: flex; align-items: center; gap: var(--sp-4); margin-left: auto; }
.lang-switch { list-style: none; margin: 0; padding: 2px; display: flex; gap: 2px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-pill); }
.lang-switch a { display: inline-block; padding: 3px 9px; border-radius: var(--r-pill); text-decoration: none; font-size: var(--fs-xs); font-weight: 650; letter-spacing: .04em; color: var(--muted); }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current] { background: var(--brand); color: var(--brand-ink); }
.cart-link, .account-link { text-decoration: none; font-weight: 650; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.tools-label { white-space: nowrap; }
.cart-link:hover, .account-link:hover { color: var(--brand); }
.badge {
    display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px;
    border-radius: var(--r-pill); background: var(--brand); color: var(--brand-ink);
    font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums;
}

/* ================================================================== NAV CATÉGORIES == */
/* Plus de bandeau plein : surface teintée, la marque sert d'indicateur actif. */
.cat-nav { background: var(--brand-soft); border-bottom: 1px solid var(--line); }
.cat-nav > .wrap > ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.cat-nav li { position: relative; }
.cat-nav > .wrap > ul > li > a {
    display: block; padding: var(--sp-3) var(--sp-4); color: var(--ink); text-decoration: none;
    font-weight: 650; font-size: var(--fs-sm); border-bottom: 2px solid transparent;
    transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.cat-nav > .wrap > ul > li > a:hover { color: var(--brand); border-bottom-color: var(--brand-line); }
.cat-nav > .wrap > ul > li > a[aria-current] { color: var(--brand); border-bottom-color: var(--brand); }
.cat-nav .sub {
    display: none; position: absolute; left: 0; top: 100%; z-index: 60; min-width: 250px;
    background: var(--paper); border: 1px solid var(--line); border-radius: 0 0 var(--r-md) var(--r-md);
    list-style: none; margin: 0; padding: var(--sp-2) 0; box-shadow: var(--sh-3);
}
.cat-nav li:hover .sub, .cat-nav li:focus-within .sub { display: block; }
.cat-nav .sub a { display: flex; justify-content: space-between; gap: var(--sp-3); padding: 7px var(--sp-4); color: var(--ink); text-decoration: none; }
.cat-nav .sub a:hover { background: var(--brand-soft); color: var(--brand); }
.cat-nav .sub small { color: var(--muted); }

/* ========================================================================== CONTENU = */
/* Le bloc d'accroche n'a pas d'illustration : le dégradé de marque occupe la moitié droite,
 * qui sans lui se lisait comme une image manquante. */
.hero {
    background: linear-gradient(110deg, var(--paper) 0%, var(--paper) 42%, var(--brand-soft) 100%);
    border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--sp-7) var(--sp-6); margin: var(--sp-2) 0 var(--sp-6); box-shadow: var(--sh-1);
}
.hero h1 { font-size: var(--fs-3xl); max-width: 18ch; }
.hero p { color: var(--muted); max-width: 58ch; font-size: var(--fs-lg); }
.hero-search { display: flex; gap: var(--sp-2); max-width: 560px; margin-top: var(--sp-5); }
.hero-search input { flex: 1; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 11px var(--sp-3); font: inherit; background: var(--paper-2); color: var(--ink); }
.section { margin: var(--sp-6) 0; }
.section > h2 { font-size: var(--fs-xl); }

.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--d-gap); }
.cat-grid > li {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
    padding: var(--sp-4); transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.cat-grid > li:hover { box-shadow: var(--sh-2); border-color: var(--brand-line); }
.cat-grid > li > a { text-decoration: none; display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2); font-weight: 650; }
.cat-grid > li > a span { color: var(--muted); font-size: var(--fs-xs); font-weight: 400; font-variant-numeric: tabular-nums; }
.cat-children { list-style: none; margin: var(--sp-2) 0 0; padding: 0; font-size: var(--fs-sm); }
.cat-children a { text-decoration: none; color: var(--muted); }
.cat-children a:hover { color: var(--brand); }

.page-head h1 small { font-size: var(--fs-sm); color: var(--muted); font-weight: 400; margin-left: var(--sp-2); }
.cat-desc { color: var(--muted); max-width: 70ch; }

/* Pages d'information de l'enseigne (shop/page, issue #13) : texte à largeur de lecture,
 * cartes en grille comme les catégories. */
.info-page { max-width: 70ch; }
.info-section { margin: var(--sp-5) 0; }
.info-section > h2 { font-size: var(--fs-xl); }
.info-list { padding-left: var(--sp-5); display: grid; gap: var(--sp-1); }
.info-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: var(--d-gap); }
.info-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-4); min-width: 0; }
.info-card h3 { margin-top: 0; }
.info-card p { margin-bottom: 0; color: var(--muted); }
.info-contact { display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-2) var(--sp-4); }
.info-contact dt { font-weight: 650; }
.info-contact dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.info-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.subcats ul { list-style: none; margin: 0 0 var(--sp-4); padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.subcats a {
    display: inline-flex; gap: var(--sp-2); align-items: baseline; background: var(--paper);
    border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px var(--sp-3); text-decoration: none;
    font-size: var(--fs-sm); font-weight: 600; color: var(--ink);
}
.subcats a:hover { border-color: var(--brand); color: var(--brand); }
.subcats small { color: var(--muted); font-weight: 400; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); justify-content: flex-end; margin: 0 0 var(--sp-3); font-size: var(--fs-sm); }
/* Un champ de la barre = son libellé et sa liste, insécables ; les champs passent à la ligne un à un. */
.toolbar-field { display: inline-flex; align-items: center; gap: var(--sp-2); white-space: nowrap; }
.toolbar select { border: 1px solid var(--brand-line); border-radius: var(--r-sm); padding: var(--sp-2); font: inherit; font-size: var(--fs-sm); background: var(--brand-soft); color: var(--ink); }
.toolbar select:focus { background: var(--paper); border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.toolbar-reset { color: var(--brand); font-weight: 600; }

.breadcrumb ol { list-style: none; margin: 0 0 var(--sp-3); padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-1); font-size: var(--fs-sm); color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin: 0 6px; }
.breadcrumb a { text-decoration: none; }

/* ================================================================== GRILLE PRODUITS = */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--d-card-min), 1fr)); gap: var(--d-gap); }
.card {
    position: relative; background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--r-md); display: flex; flex-direction: column; overflow: visible;
    transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card { min-width: 0; }
.card:hover { box-shadow: var(--sh-2); border-color: var(--line-strong); transform: translateY(-2px); }
.card:focus-within { border-color: var(--brand-line); }
.card-img {
    display: block; aspect-ratio: 1; background: var(--paper);
    padding: var(--sp-4); overflow: hidden; border-radius: var(--r-md) var(--r-md) 0 0;
}
.card-img img { width: 100%; height: 100%; object-fit: contain; }

/* Repli d'image absente : gabarit centré, sobre, teinté par la marque. */
.no-img { display: grid; place-items: center; width: 100%; height: 100%; background: var(--paper-2); border-radius: var(--r-sm); color: var(--line-strong); }
.no-img svg { width: 46%; height: 46%; opacity: .55; }
.no-img.big { aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--r-md); }
.no-img.mini { width: 60px; height: 60px; flex: none; }

.card-body {
    padding: var(--d-card-pad); display: grid;
    /* Sept blocs, sept lignes : marque, titre, promo, prix, prix secondaire, état, action.
     * Hauteurs figées pour que la même information soit au même endroit sur toute la rangée. */
    grid-template-rows: 1.3em 2.7em 1.5em 1.9em 2.6em 1.9em auto;
    row-gap: var(--sp-1); align-items: start; flex: 1; min-width: 0;
}
/* Sans min-width: 0, un élément de grille refuse de se réduire sous la largeur de son
 * contenu : c'est ce qui faisait déborder les vignettes à deux colonnes sur mobile. */
.card-body > * { min-width: 0; max-width: 100%; }
.card-brand { margin: 0; color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-brand a { color: inherit; text-decoration: none; }
.card-brand a:hover { color: var(--brand); text-decoration: underline; }
.card-title { margin: 0; font-size: var(--fs-sm); font-weight: 650; line-height: 1.35em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--brand); }
.card-promo { margin: 0; white-space: nowrap; overflow: hidden; display: flex; align-items: center; gap: var(--sp-2); }
.card-price { margin: 0; display: flex; align-items: baseline; gap: var(--sp-2); white-space: nowrap; }
.price { font-size: var(--fs-lg); font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.price small { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.price-alt { margin: 0; color: var(--muted); font-size: var(--fs-xs); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price small, .product-price small { color: var(--muted); }
.price-before { color: var(--muted); font-weight: 400; font-size: var(--fs-xs); white-space: nowrap; text-decoration: line-through; }
.price-ht s { color: var(--muted); margin-left: var(--sp-1); }
.card-add { display: flex; flex-direction: column; gap: var(--sp-1); align-self: end; padding-top: var(--sp-2); width: 100%; }
.card-add-row { display: flex; gap: var(--sp-1); align-items: stretch; }
.card-add .qty {
    width: 54px; flex: 0 0 54px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
    padding: 4px 6px; font: inherit; font-size: var(--fs-sm); text-align: center;
    font-variant-numeric: tabular-nums; background: var(--paper); color: var(--ink);
}
.card-add-row .btn { flex: 1; min-width: 0; padding: 7px var(--sp-2); font-size: var(--fs-sm); }
/* Sans « :not(:empty) » : la ligne vide rendue par qty-presets quand un produit n'a ni
 * couche ni palette doit réserver la même hauteur, sinon « Ajouter au panier » n'est
 * plus au même Y d'une vignette à l'autre.
 *
 * 3,5em et non 3 : au-delà d'une vignette étroite les deux pastilles passent sur deux lignes,
 * qui demandent 54 px là où 3em n'en réservait que 48 — le bouton remontait alors de 9 px sur
 * les seuls produits ayant couche ET palette. La réserve loge donc le pire cas. */
.card-add .qty-presets { min-height: 3.5em; align-content: start; }

.card-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); min-width: 0; }
.card-meta .tiers { min-width: 0; }
.card-meta .tiers-from { overflow: hidden; text-overflow: ellipsis; }

/* Pastille de stock : fond doux plutôt que texte coloré — lisible, et conforme AA. */
.card-stock {
    margin: 0; font-size: var(--fs-xs); font-weight: 650; display: inline-flex; align-items: center;
    gap: 5px; padding: 2px var(--sp-2); border-radius: var(--r-pill); border: 1px solid transparent;
    justify-self: start;
}
.card-stock::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.card-stock.ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.card-stock.order { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.card-stock.ko { color: var(--ko); background: var(--ko-bg); border-color: var(--ko-line); }

/* ==================================================================== FICHE PRODUIT = */
.product {
    display: grid; grid-template-columns: minmax(280px, 1fr) 1.15fr; gap: var(--sp-6);
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--sp-6); box-shadow: var(--sh-1);
}
.product-gallery img { margin: 0 auto; max-height: 520px; width: auto; }
.product-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-3); margin: var(--sp-3) 0 var(--sp-1); }
.product-price .price { font-size: var(--fs-3xl); }
.price-ht, .deposit { color: var(--muted); font-size: var(--fs-sm); }
.add-form { display: flex; flex-wrap: wrap; align-items: end; gap: var(--sp-3); margin: var(--sp-4) 0 var(--sp-5); }
.add-form label { display: block; font-size: var(--fs-sm); color: var(--muted); }
.add-form input[type=number] { width: 92px; border: 1px solid var(--brand-line); border-radius: var(--r-sm); padding: 10px var(--sp-2); font: inherit; background: var(--brand-soft); color: var(--ink); }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-1) var(--sp-4); margin: 0; font-size: var(--fs-sm); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.product-desc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-5) var(--sp-6); max-width: 80ch; }

/* =============================================================== PAGINATION, PANIER = */
.pagination { display: flex; justify-content: center; align-items: center; gap: var(--sp-5); margin: var(--sp-6) 0; }
.pagination span { color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.cart { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.cart th, .cart td { padding: var(--sp-3); border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.cart th { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cart tr:last-child td { border-bottom: 0; }
.cart-prod { display: flex; align-items: center; gap: var(--sp-3); }
.cart-prod small { color: var(--muted); display: block; }
.cart-prod > span { display: inline-flex; flex-direction: column; gap: 2px; }
.qty-form { display: flex; gap: var(--sp-1); align-items: center; }
.qty-form input { width: 72px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 6px var(--sp-2); font: inherit; background: var(--paper); color: var(--ink); text-align: center; font-variant-numeric: tabular-nums; }
.cart-totals {
    margin: var(--sp-5) 0 0 auto; max-width: 420px; background: var(--paper);
    border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5); box-shadow: var(--sh-1);
}
.cart-totals dl { display: grid; grid-template-columns: 1fr auto; gap: 6px var(--sp-4); margin: 0 0 var(--sp-3); }
.cart-totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.cart-totals .grand { font-weight: 750; font-size: var(--fs-lg); border-top: 1px solid var(--line); padding-top: var(--sp-2); }
.cart-totals form { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* ===================================================================== PIED DE PAGE = */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); margin-top: var(--sp-6); padding: var(--sp-6) 0 var(--sp-4); font-size: var(--fs-sm); color: var(--muted); }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-5); }
.footer-cols h2 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
.footer-links { list-style: none; margin: var(--sp-2) 0 0; padding: 0; display: grid; gap: var(--sp-1); }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.legal { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); font-size: var(--fs-xs); }

/* ================================================================== CONTRÔLE D'ÂGE == */
.age-gate { position: fixed; inset: 0; background: var(--overlay); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 200; padding: var(--sp-4); }
.age-gate[hidden] { display: none; }
.age-box { background: var(--paper); border-radius: var(--r-lg); padding: var(--sp-7); max-width: 460px; text-align: center; box-shadow: var(--sh-3); }
.age-actions { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; margin: var(--sp-4) 0 0; }

/* ========================================================================= COMPTES == */
.form-page { max-width: 560px; margin: var(--sp-2) auto var(--sp-6); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-6); box-shadow: var(--sh-1); }
.form-page.wide { max-width: 880px; }
.form label { display: block; font-size: var(--fs-sm); font-weight: 650; margin: var(--sp-3) 0 var(--sp-1); }
.form label small { font-weight: 400; color: var(--muted); }
.form label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 0 var(--sp-4) 0 0; }
.form label.check { display: flex; align-items: flex-start; gap: var(--sp-2); margin: var(--sp-4) 0 0; font-weight: 400; line-height: 1.4; }
/* Zones de saisie : teintées par la marque (fond --brand-soft, filet --brand-line), jamais neutres —
 * demande de l'architecte du 21/09/2026 pour la charte Europa ; DelivCo suit avec son navy. */
.form input:not([type=radio]):not([type=checkbox]), .form select, .form textarea {
    width: 100%; border: 1px solid var(--brand-line); border-radius: var(--r-sm);
    padding: 10px var(--sp-3); font: inherit; background: var(--brand-soft); color: var(--ink);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.form textarea { font-family: inherit; }
.form .row { border: 0; padding: 0; margin: var(--sp-3) 0 0; }
.form .row.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.form .row.two label { margin-top: 0; }
.form-actions { display: flex; align-items: center; gap: var(--sp-4); margin: var(--sp-5) 0 0; flex-wrap: wrap; }
.form-alt { text-align: center; color: var(--muted); margin: var(--sp-4) 0 0; }
.form .static { margin: 0; padding: 10px 0; }
.form .account-type { margin: var(--sp-4) 0 0; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form .account-type legend { font-weight: 650; }
.form .pro-fields { margin: var(--sp-3) 0 0; }
.form .pro-fields .note { margin: 0 0 var(--sp-1); }
.form .pro { margin: var(--sp-3) 0 0; }
.form .pro summary { cursor: pointer; color: var(--brand); font-size: var(--fs-sm); }
.inline-form { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.inline-form input { width: 150px !important; font-size: var(--fs-xl); letter-spacing: .18em; text-align: center; font-variant-numeric: tabular-nums; }
.inline-form input[type=tel] { width: 210px !important; font-size: var(--fs-md); letter-spacing: 0; text-align: left; }
.resend { margin: var(--sp-2) 0 0; }
.verify-block { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5); margin: var(--sp-4) 0 0; }
.verify-block.done { background: var(--ok-bg); border-color: var(--ok-line); }
.verify-block h2 { font-size: var(--fs-lg); }
.verify-block h2 small { color: var(--muted); font-weight: 400; margin-left: var(--sp-2); }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--sp-4); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-5); box-shadow: var(--sh-1); }
.panel h2 { font-size: var(--fs-lg); }
.addresses { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.addresses li { border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--sp-3); }
.logout { margin: var(--sp-5) 0 0; text-align: right; }
.orders small { color: var(--muted); margin-left: 6px; }
/* Commande en attente de paiement : le bouton « Payer » vit sous le total, pas dans une colonne
   de plus, pour que le tableau tienne encore en largeur sur un téléphone. */
.orders .pay { margin-top: var(--sp-2); }
/* Payer et annuler une commande côte à côte, empilés si la place manque. */
.order-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.order-actions form, .orders .order-actions .pay { margin: 0; }
/* Statut d'une commande (issue #10) : une pastille à fond doux par statut, comme celles du
   stock, pour passer AA. En cours = marque, livré = ok, backorder = warn, facturé = neutre
   (la commande est close), annulé = ko. */
.order-status {
    display: inline-block; padding: 0 var(--sp-2); line-height: 1.8; border-radius: var(--r-pill); border: 1px solid var(--line);
    font-size: var(--fs-xs); font-weight: 650; white-space: nowrap; vertical-align: middle;
    background: var(--paper-2); color: var(--ink);
}
.order-status-open { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.order-status-delivered { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.order-status-backorder { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.order-status-invoiced { background: var(--paper-2); border-color: var(--line-strong); color: var(--ink); }
.order-status-canceled { background: var(--ko-bg); border-color: var(--ko-line); color: var(--ko); }
/* Produits en attente (issue #4) : une commande par bloc, ses lignes en tableau. Trois colonnes
   seulement ; la quantité est la deuxième, que le palier ≤ 720 px masque dans les autres
   tableaux .cart (prix unitaire) : ici elle reste. */
.backorder { margin: var(--sp-5) 0 0; }
.backorder h2 { font-size: var(--fs-lg); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-3); }
.backorder h2 small { font-size: var(--fs-sm); color: var(--muted); font-weight: 400; }
.cart.backorders th:nth-child(2), .cart.backorders td:nth-child(2) { display: table-cell; }
.cart.backorders .cart-prod > span { min-width: 0; overflow-wrap: break-word; }
.backorder-when-inline { display: none; }
/* Le nom de la fiche cliente, à côté du prénom : subordonné, il ne concurrence pas le compte. */
.client-courant .tools-label { font-weight: 400; color: var(--muted); }
.invoices .paid { color: var(--ok); font-weight: 650; }
.invoices .unpaid { color: var(--ko); font-weight: 650; }
.invoices .unpaid small { color: var(--muted); font-weight: 400; }

/* ============================================================ TUNNEL DE COMMANDE === */
.steps { list-style: none; margin: 0 0 var(--sp-5); padding: 0; display: flex; gap: var(--sp-1); }
.steps li { flex: 1; display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); background: var(--paper-2); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.steps li span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--line); color: var(--ink); font-weight: 700; font-size: var(--fs-xs); flex: none; }
.steps li.current { background: var(--brand); color: var(--brand-ink); }
.steps li.current span { background: var(--brand-ink); color: var(--brand); }
.steps li.done { color: var(--ok); background: var(--ok-bg); }
.steps li.done span { background: var(--ok); color: var(--paper); }
.choices { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--sp-3); }
.choices legend { font-weight: 650; margin-bottom: var(--sp-2); }
.choice {
    display: flex; gap: var(--sp-3); align-items: flex-start; border: 1px solid var(--line);
    border-radius: var(--r-md); padding: var(--sp-3); cursor: pointer;
    font-weight: 400 !important; margin: 0 !important;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.choice:hover { border-color: var(--line-strong); }
.choice:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.choice input { margin-top: 3px; }
.choice.date { text-align: center; justify-content: center; position: relative; }
.choice.date input { position: absolute; opacity: 0; }
.choice.date:has(input:checked) { background: var(--brand); color: var(--brand-ink); }
.new-address summary { cursor: pointer; font-weight: 650; color: var(--brand); margin: var(--sp-3) 0; }
.confirm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--sp-3); margin: 0 0 var(--sp-4); }
.delivery-note { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); }
/* Liste de choix des fiches clientes : c'est une liste .addresses, avec une rangée à deux
   colonnes pour que le bouton reste à la même place quelle que soit la longueur du nom, et
   l'indicateur d'état aux jetons de marque comme .choice, pas aux jetons de validation. */
.choix-clients { margin: var(--sp-4) 0; }
.choix-clients li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--sp-3); }
.choix-clients li.courant { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.choix-clients .nom { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.choix-clients .ok { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.choix-clients .ok .icon { color: var(--brand); }
.choix-clients form { margin: 0; }
/* « Mes produits » : premier du menu pour un compte connecté, et les deux contrôles de suivi.
   Le demi-gras est déjà celui de tous les liens de la barre : c'est l'icône et le filet qui
   distinguent l'élément, la couleur de marque restant réservée à l'état actif. */
.cat-nav li.mes-produits > a { display: inline-flex; align-items: center; gap: var(--sp-2); }
.cat-nav li.mes-produits { border-right: 1px solid var(--line); padding-right: var(--sp-3); margin-right: var(--sp-1); }
.card-suivi { margin: var(--sp-2) 0 0; }
.card-suivi .link { font-size: var(--fs-sm); }
.suivre-form { margin: 0 0 var(--sp-5); }
.delivery-note.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--ink); }
.delivery-note.ok { background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ink); }
.delivery-note.error { background: var(--ko-bg); border: 1px solid var(--ko-line); color: var(--ko); }
.delivery-note.error a { color: inherit; }
.delivery-note small { display: block; color: var(--muted); }
.delivery-mode { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); margin: 0 0 var(--sp-4); }
.delivery-mode .choice.mode { display: inline-flex; gap: var(--sp-2); align-items: center; border: 0; padding: 0 0 var(--sp-2); box-shadow: none; }
.delivery-mode .choices { margin-top: 6px; }

/* ==================================================== PROMOTIONS ET PRIX DÉGRESSIFS = */
.chip { display: inline-block; background: var(--accent); color: var(--accent-ink); font-size: var(--fs-xs); font-weight: 700; padding: 2px var(--sp-2); border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: .03em; }
.brand-europa .chip, .brand-europa .badge { background: var(--brand); color: var(--brand-ink); }
.chip-pct { white-space: nowrap; padding: 1px 7px; }
.promo-box { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--r-sm); padding: var(--sp-2) var(--sp-3); display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.promo-box small { color: var(--muted); }
.qty-presets { margin: 0; display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.chip-btn { border: 1px solid var(--line); background: var(--paper); color: var(--brand); border-radius: var(--r-pill); padding: 2px var(--sp-2); font: inherit; font-size: var(--fs-xs); font-weight: 650; cursor: pointer; white-space: nowrap; }
.chip-btn small { color: var(--muted); font-weight: 400; }
.chip-btn:hover { border-color: var(--brand); background: var(--brand-soft); }
.add-form .qty-presets { flex-basis: 100%; }

/* Paliers de prix : mention en clair sur la vignette, tableau complet sur la fiche. */
.tiers { position: relative; display: inline-flex; cursor: help; }
.tiers-from { font-size: var(--fs-xs); color: var(--brand); font-weight: 650; white-space: nowrap; }
.tiers-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: var(--fs-xs); font-weight: 700; }
.tiers-tip {
    display: none; position: absolute; left: 50%; bottom: calc(100% + var(--sp-2)); transform: translateX(-50%);
    z-index: 70; min-width: 200px; background: var(--paper); color: var(--ink);
    border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--sh-3);
    padding: var(--sp-3); font-size: var(--fs-sm); font-weight: 400; text-align: left;
}
.tiers-tip::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--paper); }
.tiers:hover .tiers-tip, .tiers:focus .tiers-tip, .tiers:focus-within .tiers-tip { display: block; }
.tiers-tip table { border-collapse: collapse; width: 100%; margin: var(--sp-1) 0; }
.tiers-tip td { padding: 2px var(--sp-1); border-top: 1px solid var(--line); white-space: nowrap; }
.tiers-tip td:last-child { text-align: right; font-weight: 650; }
.tiers-tip th { font-weight: 650; color: var(--muted); text-align: right; padding: 0 var(--sp-1); }
.tiers-tip th:first-child { text-align: left; }
.tiers-tip small { color: var(--muted); }
.tiers-table { border-collapse: collapse; margin: 0 0 var(--sp-4); font-size: var(--fs-sm); }
.tiers-table caption { text-align: left; font-weight: 650; margin-bottom: var(--sp-1); }
.tiers-table th, .tiers-table td { border: 1px solid var(--line); padding: var(--sp-1) var(--sp-3); text-align: left; }
.tiers-table th:not(:first-child), .tiers-table td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.card-meta .tiers .tiers-tip { left: auto; right: 0; transform: none; }
.card-meta .tiers .tiers-tip::after { left: auto; right: 6px; margin-left: 0; }

/* ======================================================= RECHERCHE INSTANTANÉE ===== */
/* Panneau sous le champ de l'en-tête (issue #7) : vignette, nom, prix, boutons d'ajout. Il
 * prend la largeur du champ ; quand elle ne suffit pas aux boutons, ils passent sous le nom
 * (requête de conteneur, et non de fenêtre : le champ n'a pas la même largeur d'un palier
 * à l'autre). */
.suggest {
    position: absolute; top: calc(100% + var(--sp-1)); left: 0; right: 0; z-index: 60;
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
    box-shadow: var(--sh-3); padding: var(--sp-2); max-height: var(--panel-max-h); overflow-y: auto;
    container: suggest / inline-size;
}
.suggest-items { list-style: none; margin: 0; padding: 0; }
.suggest-item {
    display: grid; grid-template-columns: var(--sp-7) minmax(0, 1fr) auto; align-items: center;
    gap: var(--sp-2) var(--sp-3); padding: var(--sp-2); border-radius: var(--r-sm);
}
.suggest-item:hover, .suggest-item:focus-within { background: var(--paper-2); }
.suggest-img { display: block; width: var(--sp-7); height: var(--sp-7); }
.suggest-img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.suggest-info { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.suggest-name { color: var(--ink); font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.suggest-name:hover { color: var(--brand); text-decoration: underline; }
.suggest-info .price { font-size: var(--fs-md); }
.suggest-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-2); min-width: 0; }
.suggest-add { margin: 0; }
.suggest-add .btn small { color: var(--muted); font-weight: 400; }
.suggest-empty { margin: var(--sp-3); color: var(--muted); }
.suggest-all {
    display: block; margin-top: var(--sp-2); padding: var(--sp-3); text-align: center;
    background: var(--paper-2); border-radius: var(--r-sm); color: var(--ink); font-weight: 650; text-decoration: none;
}
.suggest-all:hover { background: var(--brand-soft); color: var(--brand); }
@container suggest (max-width: 560px) {
    .suggest-actions { grid-column: 2 / -1; justify-content: flex-start; }
    .suggest-img { align-self: start; }
}

/* ============================================================ MESSAGE D'AJOUT (JS) == */
.toast {
    position: fixed; left: 50%; bottom: var(--sp-5); transform: translate(-50%, 20px); opacity: 0;
    pointer-events: none; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
    z-index: 150; background: var(--ink); color: var(--paper); padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-sm); box-shadow: var(--sh-3); max-width: calc(100% - var(--sp-6)); font-size: var(--fs-sm);
}
/* Le toast est inversé (fond encre, texte papier) : un lien en accent y tombait sous le seuil
 * en thème sombre (or sur encre claire : 2,86 ; turquoise : 2,60). Le papier souligné tient
 * dans les deux thèmes, comme le texte qu'il accompagne. */
.toast a { color: var(--paper); text-decoration: underline; font-weight: 650; margin-left: var(--sp-2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* ====================================================================== PALIERS ==== */
/* Quatre paliers : mobile, iPad portrait, iPad paysage, bureau. La largeur minimale des
 * vignettes vient du jeton de densité, donc chaque enseigne garde sa personnalité. */
@media (max-width: 599px) {
    /* La barre d'outils n'a plus la place : le nom de la fiche cliente s'efface, l'espace
       client le porte déjà. Sans cela le lien « Panier » sortait de l'écran sur un iPhone
       Pro Max, et sous 420 px il restait un lien vide mais focusable (contrôle du 22/09/2026). */
    .client-courant { display: none; }
    :root { --d-card-min: 0px; }          /* deux colonnes fermes, pas une seule */
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
    .cat-grid { grid-template-columns: 1fr; }
    main { padding-block: var(--sp-3) var(--sp-6); }
    .wrap { padding-inline: var(--sp-3); }
    .card-img { padding: var(--sp-2); }
    /* La ligne « promo », le plus souvent vide, sépare le titre du prix : c'est elle qu'on
     * resserre sur mobile, plutôt que de rogner l'interligne partout. Les sept lignes restent
     * figées, l'information garde sa place d'une vignette à l'autre. */
    .card-body { padding: var(--sp-2); grid-template-rows: 1.3em 2.7em 1.2em 1.9em 2.4em 1.9em auto; }
    .card-add-row { flex-direction: column; }
    .card-add .qty { width: 100%; flex: none; }
    .card-add-row .btn { white-space: normal; }
    .card-meta .tiers { display: none; }   /* le détail reste sur la fiche produit */
    .hero { padding: var(--sp-5) var(--sp-4); border-radius: var(--r-md); }
    .form-page { padding: var(--sp-4); border-radius: var(--r-md); }
    .header-row { gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); }
    .header-tools { margin-left: 0; width: 100%; justify-content: space-between; }
    .search-wrap { order: 3; flex-basis: 100%; }
    .steps li span { display: none; }
    .toolbar { justify-content: flex-start; }
    .toolbar-field { flex: 1 1 100%; justify-content: space-between; }
    .toolbar-field select { flex: 1 1 auto; min-width: 0; max-width: 60%; }
    .header-tools { gap: var(--sp-3); }
}
@media (min-width: 600px) and (max-width: 899px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) and (max-width: 1199px) {
    .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .product { grid-template-columns: 1fr; padding: var(--sp-4); }
    .cat-nav > .wrap > ul { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
    .cat-nav > .wrap > ul::-webkit-scrollbar { display: none; }
    /* La liste ne passait déjà plus à la ligne, mais le libellé, lui, se coupait : « Alcools &
     * spiritueux » tenait sur deux étages et doublait la hauteur du bandeau. Sur une recherche,
     * il mangeait une bonne part de l'écran (issue #2). */
    .cat-nav > .wrap > ul > li > a { white-space: nowrap; padding-block: var(--sp-2); }
    .cat-nav .sub { display: none !important; }
    .cart th:nth-child(2), .cart td:nth-child(2) { display: none; }
    .header-tools { margin-left: 0; }
}
@media (max-width: 600px) {
    .form .row.two { grid-template-columns: 1fr; }
    /* Produits en attente : la date d'arrivée passe sous le nom du produit. */
    .cart.backorders .backorder-when { display: none; }
    .backorder-when-inline { display: block; margin-top: var(--sp-1); }
}
@media (max-width: 420px) {
    .tools-label { display: none; }
    .logo-text { font-size: var(--fs-md); }
}

/* Mouvement : une seule règle, elle couvre tout le site. */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
    .card:hover, .btn:hover { transform: none; }
}

/* Inscription : l'encadré qui propose la raison sociale du registre européen.
   .panel est bâti pour poser --paper sur --bg ; imbriqué dans une carte --paper, il n'a plus
   que son filet pour se détacher, d'où --line-strong. Il n'a pas non plus de marge propre :
   ailleurs elle vient de la grille du parent, et .form n'en fournit aucune. */
.vat-confirm { margin: var(--sp-4) 0 0; border-color: var(--line-strong); }
/* La raison sociale vient du registre : la boutique ne maîtrise pas sa longueur, et un nom
   sans espace déborderait de la carte en mobile. Même remède que .choix-clients .nom. */
.vat-confirm p { margin: 0 0 var(--sp-2); min-width: 0; overflow-wrap: anywhere; }
.vat-confirm .vat-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: 0; }
/* Le texte d'aide permanent sous le numéro de TVA, et le mot qui explique le bouton désactivé
   pendant la recherche VIES : des .note, collées à ce qu'elles commentent. */
.form .vat-help { margin: var(--sp-1) 0 0; }
.form [data-vat-wait] { margin: var(--sp-4) 0 0; }

/* ====================================================== ADMINISTRATEUR « EN TANT QUE » ===
 * Un administrateur qui agit pour un client doit le voir sur chaque page : un bandeau en tête,
 * dans les couleurs d'avertissement — ce n'est pas une alerte, mais un état qu'on ne doit pas
 * oublier avant de passer une commande au nom de quelqu'un. */
.acting-banner {
    margin: 0;
    padding: var(--sp-1) var(--sp-3);
    background: var(--warn-bg);
    color: var(--warn);
    border-bottom: 1px solid var(--warn-line);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-align: center;
    text-wrap: balance;
}
.acting-banner a { color: inherit; text-decoration: underline; }

/* ======================================================================= BAC A SABLE ===
 * La boutique de développement porte une couleur qui ne trompe pas. Elle ne s'affiche que si
 * SHOP_SANDBOX est vrai dans le .env du serveur — absent en production.
 *
 * Un rouge SOURD, pas une alerte : on travaille des heures sur cet écran, un rouge vif
 * fatiguerait en dix minutes et ferait perdre toute valeur de signal aux vrais messages
 * d'erreur. Les jetons de thème sont redéfinis dans les deux blocs de thème plus haut, avec
 * tous les autres : les tenir à deux endroits et non à quatre est ce qui les garde d'accord.
 *
 * L'encre du bandeau reste blanche dans les deux thèmes — 8,2:1 en clair, 5,4:1 en sombre.
 * Une encre sombre sur le rouge sombre ne tenait que 3,4:1, sous les 4,5 de la charte.
 */
:root {
    --sandbox-bg: #f6e3e3;
    --sandbox-banner: #8c2f2f;
    --sandbox-ink: #ffffff;
}

body.is-sandbox { background: var(--sandbox-bg); }

.sandbox-banner {
    margin: 0;
    padding: var(--sp-1) var(--sp-3);
    background: var(--sandbox-banner);
    color: var(--sandbox-ink);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-align: center;
    text-wrap: balance;
    letter-spacing: .02em;
}
