/* ============================================================
   LIBERTY — Design system v1 (§23 du plan de construction)
   Mobile-first, léger (3G), prêt pour l'empaquetage WebView.
   ============================================================ */

:root {
    /* ------------------------------------------------------------------
       Palette Liberty v2 — « marché cosmique »
       DOMINANTE  : bleu clair            (--liberty / --azur)
       SECONDAIRE : orange cosmique       (--orange)
       ACCENTS    : or brillant (--or) + violet (--aqua / --violet)
       Les noms de variables historiques sont conservés (compatibilité
       totale des gabarits) ; seules leurs VALEURS changent.
       ------------------------------------------------------------------ */
    --encre:        #0A2540;   /* bleu nuit : barres, titres           */
    --liberty:      #1E90E8;   /* bleu clair : actions primaires        */
    --liberty-vif:  #48B0FF;   /* survol / dégradés                    */
    --or:           #FFC531;   /* or brillant : appels à l'action       */
    --or-doux:      #FFDE7C;   /* pastille active du dock              */
    --papier:       #F4F8FD;   /* fond général clair, légèrement bleuté */
    --carte:        #FFFFFF;
    --trait:        #DDE6F0;
    --texte:        #1E2A38;
    --texte-doux:   #5A6B7B;

    /* Couleurs secondaires nommées (nouveautés v2) */
    --orange:       #FF6B2C;   /* orange cosmique : couleur secondaire  */
    --orange-vif:   #FF8A45;
    --violet:       #7B5CFF;   /* violet : accents & lueurs             */
    --violet-doux:  #A98CFF;

    /* Accents VIFS & futuristes (icônes, dégradés, lueurs) */
    --aqua:         #7B5CFF;   /* alias historique -> violet            */
    --aqua-clair:   #A98CFF;
    --azur:         #2BB8FF;   /* bleu lumineux                        */
    /* Dégradé signature : bleu -> violet (boutons, FAB, icônes, avatars) */
    --degrade-vif:  linear-gradient(135deg, var(--liberty) 0%, var(--aqua) 100%);
    /* Dégradé chaud : or brillant -> orange cosmique (CTA « or ») */
    --degrade-or:   linear-gradient(135deg, var(--or) 0%, var(--orange) 100%);

    /* Lueurs (bordures « brillantes », discrètes) */
    --lueur-liberty: 0 0 0 1px rgba(123,92,255,.35), 0 8px 26px rgba(30,144,232,.22);
    --lueur-or:      0 6px 20px rgba(255,197,49,.32);
    --lueur-aqua:    0 0 18px rgba(123,92,255,.45);

    --rayon: 20px;
    --rayon-sm: 13px;
    --ombre: 0 1px 2px rgba(10,37,64,.05), 0 10px 30px rgba(10,37,64,.06);
    --ombre-haute: 0 16px 40px rgba(10,37,64,.16);
    --duree: .2s;
    --dock-h: 64px;

    --font-corps: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-titre: "Sora", var(--font-corps);
}

/* ---------- Base ---------- */
body {
    background:
        radial-gradient(1200px 460px at 88% -8%, rgba(123,92,255,.07), transparent 60%),
        radial-gradient(900px 380px at -5% 6%, rgba(43,184,255,.06), transparent 55%),
        var(--papier);
    background-attachment: fixed;
    color: var(--texte);
    font-family: var(--font-corps);
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, .marque {
    font-family: var(--font-titre);
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--encre);
}
h1 { letter-spacing: -.03em; }
.prix, .montant { font-variant-numeric: tabular-nums; font-family: var(--font-titre); }
a { color: var(--liberty); }
::selection { background: var(--aqua-clair); color: var(--encre); }

/* Espace réservé au dock sur mobile (+ encoche iPhone) */
.avec-dock { padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 12px); }
@media (min-width: 992px) { .avec-dock { padding-bottom: 0; } }

/* ---------- Barre haute ---------- */
.barre-haute {
    background: linear-gradient(120deg, #08203A 0%, var(--encre) 55%, #123f34 100%);
    padding-top: max(.55rem, env(safe-area-inset-top));
    padding-bottom: .55rem;
    border-bottom: 1px solid rgba(123,92,255,.18);
    box-shadow: 0 1px 0 rgba(123,92,255,.25), 0 6px 24px rgba(0,0,0,.14);
}
.barre-haute .nav-link { color: rgba(255,255,255,.82); border-radius: 999px; transition: color var(--duree), background var(--duree); }
.barre-haute .nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.marque { color: #fff !important; font-size: 1.25rem; }
/* Logo « Liberty Hub » (phénix + texte blanc) dans la barre haute sombre. */
.marque-logo { height: 34px; width: auto; display: block; }
.marque-icone {
    display: grid; place-items: center;
    width: 34px; height: 34px; border-radius: 11px;
    background: var(--degrade-vif);
    color: #fff; font-size: 1.05rem;
    box-shadow: var(--lueur-aqua);
}
.pastille-utilisateur {
    display: grid; place-items: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--liberty-vif); color: #fff;
    font-weight: 700; font-size: .9rem;
    padding: 0; border: none; cursor: pointer; line-height: 1;
}
/* Avatar utilisé comme toggle de menu : pas de flèche Bootstrap. */
.pastille-utilisateur.dropdown-toggle::after,
button.pastille-utilisateur::after { display: none; }

/* Barre haute — ajustements petits écrans : marque plus compacte, cloche et
   panier plus grands (plus lisibles et plus faciles à toucher au pouce). */
@media (max-width: 991.98px) {
    .barre-haute .marque { font-size: 1.05rem; gap: .35rem !important; }
    .barre-haute .marque-logo { height: 29px; }
    .barre-haute .marque-icone {
        width: 28px; height: 28px; font-size: .9rem; border-radius: 9px;
    }
    .barre-haute .lien-cloche i,
    .barre-haute .lien-panier i { font-size: 1.55rem; line-height: 1; }
    .barre-haute .lien-cloche,
    .barre-haute .lien-panier { display: inline-flex; align-items: center; }
}

/* ---------- Boutons ---------- */
.btn { border-radius: 999px; font-weight: 600; letter-spacing: .005em;
    transition: transform var(--duree), box-shadow var(--duree), filter var(--duree), background var(--duree); }
.btn:active { transform: scale(.97); }
.btn-or {
    background: var(--degrade-or); border: none; color: var(--encre); font-weight: 700;
    box-shadow: 0 4px 14px rgba(255,197,49,.24);
}
.btn-or:hover { color: var(--encre); box-shadow: var(--lueur-or); filter: brightness(1.04); }
.btn-liberty {
    background: var(--degrade-vif); border: none; color: #fff; font-weight: 600;
    box-shadow: 0 4px 14px rgba(30,144,232,.22);
}
.btn-liberty:hover { color: #fff; box-shadow: var(--lueur-liberty); filter: brightness(1.05); }
.btn-contour-clair {
    border: 1px solid rgba(255,255,255,.4); color: #fff; background: transparent;
}
.btn-contour-clair:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-contour {
    border: 1.5px solid var(--liberty); color: var(--liberty); background: transparent; font-weight: 600;
}
.btn-contour:hover { background: var(--liberty); color: #fff; box-shadow: var(--lueur-liberty); }
.btn-primary { background: var(--degrade-vif); border: none; }
.btn-primary:hover, .btn-primary:focus { box-shadow: var(--lueur-liberty); filter: brightness(1.05); }

/* ---------- Cartes ---------- */
.card {
    border: 1px solid var(--trait); border-radius: var(--rayon);
    box-shadow: var(--ombre); background: var(--carte);
    transition: transform var(--duree), box-shadow var(--duree), border-color var(--duree);
}
.carte-lien { transition: transform var(--duree), box-shadow var(--duree), border-color var(--duree); }
@media (hover: hover) {
    /* Bordure légèrement « brillante » aqua au survol */
    .carte-lien:hover,
    .carte-boutique:hover,
    .carte-produit--publique:hover {
        transform: translateY(-3px);
        border-color: rgba(123,92,255,.55);
        box-shadow: var(--ombre-haute), var(--lueur-aqua);
    }
}
.carte-produit img { aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--rayon-sm); }

/* ---------- Formulaires ---------- */
.form-control, .form-select {
    border-radius: var(--rayon-sm);
    border-color: var(--trait);
    padding: .65rem .9rem;
    transition: border-color var(--duree), box-shadow var(--duree);
}
.form-control:focus, .form-select:focus {
    border-color: var(--aqua);
    box-shadow: 0 0 0 .18rem rgba(123,92,255,.18), var(--lueur-aqua);
}

/* ---------- Héros (accueil) : signature « ciel cosmique » ---------- */
.heros {
    position: relative; overflow: hidden;
    /* Bleu nuit -> bleu clair, avec une pointe de violet en profondeur */
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(123,92,255,.55) 0%, transparent 55%),
        linear-gradient(140deg, var(--encre) 0%, var(--liberty) 68%, var(--liberty-vif) 100%);
    color: #fff;
    border-radius: 0 0 28px 28px;
}
.heros h1 { color: #fff; }
/* Trame géométrique très discrète (tissage lumineux) */
.heros::before {
    content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
    background-image:
        repeating-linear-gradient(45deg,  #fff 0 2px, transparent 2px 26px),
        repeating-linear-gradient(-45deg, #fff 0 2px, transparent 2px 26px);
}
.heros .sous-titre { color: rgba(255,255,255,.82); max-width: 560px; }
/* Double halo cosmique : violet en haut-droite, orange en bas-gauche */
.heros::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(320px 320px at calc(100% + 40px) -60px, rgba(123,92,255,.42), transparent 70%),
        radial-gradient(300px 300px at -40px calc(100% + 40px), rgba(255,107,44,.30), transparent 68%);
    filter: blur(6px);
}

/* ---------- Étapes de confiance (processus réel : 1→4) ---------- */
.etape { border-left: 3px solid var(--or); padding-left: 1rem; }
.etape .numero {
    font-family: "Sora", sans-serif; font-weight: 700;
    color: var(--or); font-size: .85rem; letter-spacing: .12em;
}
.icone-atout {
    display: grid; place-items: center;
    width: 54px; height: 54px; border-radius: 16px; margin-inline: auto;
    background: linear-gradient(135deg, rgba(123,92,255,.16), rgba(30,144,232,.12));
    color: var(--liberty); font-size: 1.4rem;
    border: 1px solid rgba(123,92,255,.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 6px 18px rgba(30,144,232,.12);
}

/* ---------- Badges de statut (base commune, Phase 4) ---------- */
.badge-statut { font-size: .72rem; letter-spacing: .04em; border-radius: 999px; padding: .35em .8em; }

/* ---------- Dock mobile ---------- */
.dock {
    position: fixed; left: 12px; right: 12px;
    bottom: calc(env(safe-area-inset-bottom) + 10px);
    height: var(--dock-h); z-index: 1030;
    display: flex; justify-content: space-around; align-items: stretch;
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border: 1px solid rgba(123,92,255,.22);
    border-radius: 24px;
    box-shadow: var(--ombre-haute), 0 0 0 1px rgba(255,255,255,.5) inset, 0 -2px 24px rgba(123,92,255,.12);
}
/* --- Onglets du dock : icônes seules au repos, nom révélé quand actif ---
   Contrainte de charte (skill liberty-design §4) : ce comportement est LA
   règle de toutes les barres de navigation mobiles du projet.
   Optimisation : transform/opacity uniquement (GPU), scintillement BREF
   (2 cycles, jamais d'animation infinie), reduced-motion respecté. */
.dock-item {
    position: relative;
    flex: 1; min-width: 44px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-decoration: none;
    color: var(--texte-doux); font-weight: 600;
    border-radius: 18px; margin: 6px 2px;
    transition: color var(--duree), background var(--duree),
                transform .22s cubic-bezier(.34, 1.4, .64, 1), opacity var(--duree);
}
.dock-item i { font-size: 1.35rem; line-height: 1; transition: transform var(--duree); }

/* Libellé : replié par défaut (icônes sans nom), révélé sous l'icône actif */
.dock-item span {
    font-size: .62rem; line-height: 1;
    max-height: 0; opacity: 0;
    transform: translateY(4px);
    overflow: hidden;
    transition: max-height .22s ease, opacity .18s ease .05s,
                transform .22s ease, margin-top .22s ease;
}

.dock-item:active { transform: scale(.92); }

/* Onglet ACTIF : nom visible, pastille or->orange, icône soulevée, halo chaud */
.dock-item.actif {
    color: var(--encre);
    background: linear-gradient(135deg, var(--or-doux) 0%, var(--or) 100%);
    box-shadow: 0 6px 16px rgba(255,150,40,.35);
    transform: scale(1.06);
}
.dock-item.actif span {
    max-height: 14px; opacity: 1; transform: translateY(0); margin-top: 2px;
}
.dock-item.actif i { transform: translateY(-1px); }

/* Les AUTRES reculent quand un onglet est actif (navigateurs avec :has ;
   sans :has, ils restent simplement à l'état de repos : dégradation propre) */
.dock:has(.actif) .dock-item:not(.actif) {
    transform: scale(.86);
    opacity: .55;
}
.dock:has(.actif) .dock-item:not(.actif):active { transform: scale(.8); }

/* Scintillement doré BREF autour de l'onglet qui vient d'être activé :
   pseudo-élément anime uniquement transform + opacity (GPU). */
.dock-item::after {
    content: "";
    position: absolute; inset: -4px;
    border-radius: 22px;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(closest-side,
                rgba(255, 197, 49, .45), rgba(255, 197, 49, 0) 72%);
}
.dock-item.actif::after {
    animation: dock-scintille .55s ease-out 2;
}
@keyframes dock-scintille {
    0%   { opacity: 0;   transform: scale(.7); }
    45%  { opacity: .9;  transform: scale(1.12); }
    100% { opacity: 0;   transform: scale(1.3); }
}

/* Accessibilité : sans animations, les états restent parfaitement lisibles */
@media (prefers-reduced-motion: reduce) {
    .dock-item, .dock-item span, .dock-item i { transition: none; }
    .dock-item.actif::after { animation: none; }
    .dock:has(.actif) .dock-item:not(.actif) { transform: none; opacity: .6; }
    .dock-item.actif { transform: none; }
}

/* ---------- Pied de page ---------- */
.pied { background: var(--encre); color: rgba(255,255,255,.85); }
.texte-or { color: var(--or-doux); }

/* ---------- Alertes ---------- */
.alert { border-radius: var(--rayon-sm); border: none; box-shadow: var(--ombre); }

/* ---------- Animations d'entrée, sobres et courtes ---------- */
@keyframes apparait {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}
.apparait   { animation: apparait .45s ease both; }
.apparait-2 { animation: apparait .45s ease .08s both; }
.apparait-3 { animation: apparait .45s ease .16s both; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Liens des documents legaux (pied de page, toutes tailles d'ecran) */
.liens-legaux a {
    color: rgba(255, 255, 255, .65);
    text-decoration: none;
}
.liens-legaux a:hover { color: var(--or, #E7B84B); text-decoration: underline; }
/* Sur mobile, laisser la place au dock fixe en bas */
@media (max-width: 991.98px) {
    .pied { padding-bottom: 6rem !important; }
}

/* ============ Lot 2B — Mes boutiques & assistant ============ */

/* Puce forfait (tableau de bord grossiste) */
.puce-forfait {
    display: inline-flex; align-items: center; gap: .4rem;
    background: var(--carte); border: 1px solid var(--trait);
    border-radius: 999px; padding: .25rem .75rem;
    font-size: .82rem; color: var(--texte-doux);
}
.puce-forfait i { color: var(--or); }

/* Cartes boutique */
.carte-boutique { transition: transform var(--duree), box-shadow var(--duree); }
.carte-boutique:hover { transform: translateY(-2px); box-shadow: var(--ombre-haute); }
.logo-boutique {
    width: 52px; height: 52px; border-radius: 14px; object-fit: cover;
    flex: 0 0 auto;
}
.logo-boutique--grand { width: 72px; height: 72px; border-radius: 18px; }
.logo-boutique--initiale {
    display: grid; place-items: center; font-family: "Sora", sans-serif;
    font-weight: 700; font-size: 1.3rem; color: #fff;
    background: linear-gradient(135deg, var(--liberty), var(--liberty-vif));
}
.badge-doux { background: var(--papier); color: var(--texte-doux); border: 1px solid var(--trait); }
/* Sert à la fois pour un <img> (espace grossiste) et un <div> à
   background-image (vitrine publique) : les propriétés background sont
   sans effet sur un <img>, celles d'objet sans effet sur un <div>. */
.banniere-boutique {
    width: 100%; height: 160px; object-fit: cover;
    background-size: cover; background-position: center;
    background-repeat: no-repeat; background-color: var(--papier);
}
.texte-ok { color: var(--liberty-vif); }

/* Rapport de vérification affiché au revendeur (§7.1.9) */
.rapport-controle { border: 1px solid transparent; }
.rapport-controle--ok { background: #DFF3E4; border-color: #B8E3C4; }
.rapport-controle--ko { background: #FBE0DD; border-color: #F3C2BC; }

/* Boutons-icônes d'accès rapide sur les cartes produit (couleur du site) */
.carte-produit-lien { display: block; color: inherit; }
.carte-produit-actions {
    display: flex; gap: .5rem; justify-content: center;
    padding: .25rem .5rem .5rem;
}
.btn-icone {
    width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--degrade-vif); color: #fff; border: 1px solid rgba(123,92,255,.4);
    font-size: 1.1rem; cursor: pointer; text-decoration: none;
    box-shadow: 0 4px 12px rgba(30,144,232,.22);
    transition: box-shadow var(--duree), transform .12s, filter var(--duree), background var(--duree), color var(--duree);
}
.btn-icone:hover { color: #fff; box-shadow: var(--lueur-aqua), 0 6px 16px rgba(30,144,232,.28); filter: brightness(1.06); transform: translateY(-1px); }
.btn-icone:active { transform: scale(.94); }
.btn-icone--contour {
    background: #fff; color: var(--liberty); border-color: rgba(30,144,232,.35); box-shadow: none;
}
.btn-icone--contour:hover { background: var(--degrade-vif); color: #fff; border-color: rgba(123,92,255,.4); }
.btn-icone:disabled, .btn-icone[disabled] {
    opacity: .4; cursor: not-allowed; background: #fff; color: var(--texte-doux);
    border-color: var(--trait); box-shadow: none; filter: none; transform: none;
}

/* Sélecteur de quantité +/- côte à côte (panier), épuré, couleur du site */
.pas-quantite {
    display: inline-flex; align-items: center;
    border: 1.5px solid var(--liberty); border-radius: 999px; overflow: hidden;
}
.pas-quantite form { display: inline-flex; margin: 0; }
.pas-btn {
    width: 34px; height: 34px; border: 0; background: transparent;
    color: var(--liberty); font-size: 1rem; line-height: 1; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.pas-btn:hover { background: rgba(30, 144, 232, .1); }
.pas-btn:active { background: rgba(30, 144, 232, .2); }
.pas-valeur {
    min-width: 2.2ch; text-align: center; font-weight: 700;
    color: var(--encre); padding: 0 .2rem;
}

/* Bulle flottante de confirmation d'ajout au panier (légère, bleu ciel).
   Flotte au-dessus du dock sur mobile ; en bas de l'écran sur grand écran. */
.bulle-panier {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 12px);
    z-index: 1040; pointer-events: none;
    width: max-content; max-width: 92vw;
    display: none;
}
.bulle-panier--visible { display: block; }
@media (min-width: 992px) {
    .bulle-panier { bottom: 24px; }         /* pas de dock sur grand écran */
}
.bulle-message {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .55rem 1rem; border-radius: 999px;
    background: rgba(135, 206, 235, .82);   /* bleu ciel, légèrement transparent */
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    color: #0A3A52; font-weight: 600; font-size: .92rem;
    border: 1px solid rgba(255, 255, 255, .5);
    box-shadow: 0 6px 20px rgba(10, 58, 82, .18);
    animation: bulleEntre .25s cubic-bezier(.2, .8, .3, 1) both;
}
.bulle-message .bi { font-size: 1.1rem; }
.bulle-message--ko {
    background: rgba(224, 72, 59, .85); color: #fff;
    border-color: rgba(255, 255, 255, .35);
}
.bulle-message--sortie { animation: bulleSort .3s ease forwards; }
@keyframes bulleEntre {
    from { opacity: 0; transform: translateY(10px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes bulleSort {
    to { opacity: 0; transform: translateY(10px) scale(.98); }
}
@media (prefers-reduced-motion: reduce) {
    .bulle-message, .bulle-message--sortie { animation-duration: .01ms; }
}

/* Notation par étoiles (avis à la clôture) */
.notation { display: inline-flex; }
.notation input { display: none; }
.notation label {
    color: #d5d5d5; font-size: 1.55rem; cursor: pointer; padding: 0 .06rem;
    transition: color .1s, transform .1s;
}
.notation label:hover, .notation label:hover ~ label,
.notation input:checked ~ label { color: var(--or); }
.notation label:hover { transform: scale(1.12); }

/* Choix de l'opérateur Mobile Money (§10) */
.choix-operateur { cursor: pointer; }
.choix-operateur span { transition: border-color .15s, background .15s; }
.choix-operateur input:checked + span {
    border-color: var(--or) !important; background: #FBF7EC; font-weight: 600;
}
.choix-operateur input:focus-visible + span { outline: 2px solid var(--or); }
.icone-atout--ko { background: #FBE0DD; color: #B02A18; }
.min-w-0 { min-width: 0; }

/* Fil des etapes de l'assistant (signature) */
.assistant-fil {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem;
}
.assistant-fil li {
    border-left: 3px solid var(--trait);
    padding: .15rem 0 .15rem .75rem;
    color: var(--texte-doux); font-size: .9rem;
    transition: border-color var(--duree), color var(--duree);
}
.assistant-fil li .numero { display: block; }
.assistant-fil li.active { border-color: var(--or); color: var(--texte); }
.assistant-fil li.faite  { border-color: var(--liberty-vif); }
.assistant-fil li.faite .numero { color: var(--liberty-vif); }

/* Carte de position */
.carte-position {
    height: 320px; border-radius: var(--rayon); overflow: hidden;
    border: 1px solid var(--trait); background: var(--papier);
}
@media (max-width: 575.98px) { .carte-position { height: 260px; } }

/* Recap etape 3 */
.recap-assistant dd { font-weight: 600; }

/* ============ Lot 2C — Produits ============ */
.vignette-produit {
    width: 56px; height: 56px; border-radius: 12px; object-fit: cover;
    flex: 0 0 auto; background: var(--papier); border: 1px solid var(--trait);
}
.vignette-produit--vide { display: grid; place-items: center; color: var(--texte-doux); }
.carte-produit--masquee { opacity: .6; }
.carte-fiche { border-left: 3px solid var(--or); }
.pastille-couleur {
    --pastille: #ccc;
    width: 14px; height: 14px; border-radius: 50%;
    display: inline-block; background: var(--pastille);
    border: 1px solid rgba(0,0,0,.15);
}
.pastille-couleur--epuisee { opacity: .35; }
.ligne-couleur .form-check { min-width: 24px; }

/* ---------- Marketplace publique (Phase 3) ---------- */
.etoiles { color: var(--or); white-space: nowrap; font-size: .9em; }
.etoiles-nb { color: var(--texte-doux); margin-left: .15rem; }

.carte-produit--publique { overflow: hidden; transition: transform var(--duree), box-shadow var(--duree); }
.carte-produit--publique:hover { transform: translateY(-2px); box-shadow: var(--ombre-haute); }
.carte-produit--publique img { width: 100%; }
.carte-produit-sans-photo {
    aspect-ratio: 1 / 1; display: grid; place-items: center;
    background: var(--papier); color: var(--texte-doux); font-size: 1.8rem;
}
.carte-produit-nom {
    color: var(--texte); font-weight: 600; line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 2.5em;
}
.carte-produit-gros { color: var(--liberty-vif); }

/* Barre de recherche signature : pleine largeur, meme hauteur que les
   filtres (.form-select), LUEUR VERDATRE qui scintille et respire. */
.barre-recherche {
    display: flex; align-items: center; gap: .5rem;
    width: 100%;
    /* meme hauteur rendue que .form-select (padding .65rem + bordures) */
    min-height: calc(1.5em + 1.3rem + 2px);
    position: relative; z-index: 0;
    background: var(--carte); border: 1px solid var(--trait);
    border-radius: 999px; padding: .25rem .45rem .25rem 1rem;
    box-shadow: var(--ombre);
}
.barre-recherche::after {
    content: ""; position: absolute; inset: -3px; border-radius: 999px;
    z-index: -1;
    /* deux couches : un eclat qui balaie + une lueur verte constante */
    background:
        linear-gradient(100deg,
            rgba(30, 144, 232, 0)     12%,
            rgba(30, 144, 232, .50)   38%,
            rgba(123, 92, 255, .95) 50%,
            rgba(30, 144, 232, .50)   62%,
            rgba(30, 144, 232, 0)     88%),
        rgba(30, 144, 232, .30);
    background-size: 220% 100%, 100% 100%;
    filter: blur(5px);
    animation: scintille-vert 2.8s linear infinite,
               souffle-vert 2.8s ease-in-out infinite;
}
.barre-recherche:focus-within { border-color: var(--liberty); }
.barre-recherche:focus-within::after { filter: blur(7px); }
@keyframes scintille-vert {
    from { background-position: 190% 0, 0 0; }
    to   { background-position: -90% 0, 0 0; }
}
@keyframes souffle-vert {
    0%, 100% { opacity: .6; }
    50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .barre-recherche::after {
        animation: none;
        background: rgba(30, 144, 232, .30);
        opacity: 1;
    }
}
.barre-recherche input {
    border: 0; outline: 0; background: transparent; flex: 1 1 auto;
    min-width: 0; font-size: 1rem; color: var(--texte);
}
.barre-recherche .btn { border-radius: 999px; }

/* Pastilles de catégories (accueil + filtres) */
.puce-categorie {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .4rem .85rem; border-radius: 999px;
    background: var(--carte); border: 1px solid var(--trait);
    color: var(--texte); text-decoration: none; font-size: .9rem;
    transition: border-color var(--duree), background var(--duree);
}
.puce-categorie:hover, .puce-categorie.active {
    border-color: rgba(123,92,255,.6); background: rgba(123,92,255,.08); color: var(--encre);
    box-shadow: var(--lueur-aqua);
}
/* Icône en dégradé vif (glyphe Bootstrap Icons coloré via background-clip) */
.puce-categorie .bi {
    background: var(--degrade-vif);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}

/* Indicateur HTMX : visible pendant la requête seulement */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline-block; }

/* Galerie de la fiche produit */
.galerie-principale {
    aspect-ratio: 1 / 1; border-radius: var(--rayon); overflow: hidden;
    border: 1px solid var(--trait);
    background: repeating-conic-gradient(#EDECE6 0% 25%, #FFFFFF 0% 50%) 0 0/18px 18px;
    display: flex; align-items: center; justify-content: center;
}
.galerie-principale img { width: 100%; height: 100%; object-fit: contain; }
.galerie-vignettes { display: flex; gap: .5rem; margin-top: .5rem; }
.galerie-vignettes button {
    width: 64px; height: 64px; border-radius: var(--rayon-sm);
    border: 2px solid var(--trait); overflow: hidden; padding: 0;
    background: var(--carte); flex: 0 0 auto;
}
.galerie-vignettes button.active { border-color: var(--or); }
.galerie-vignettes img { width: 100%; height: 100%; object-fit: cover; }


/* ---------- Accueil : rangées horizontales + carrousel (Phase 3) ---------- */
/* Défilement gauche→droite, aligné au doigt (scroll-snap), léger en 3G. */
.rangee-scroll {
    display: flex; gap: .6rem;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding: .25rem .25rem .75rem;
    margin: 0 -.25rem;
    scrollbar-width: thin;
}
.rangee-scroll::-webkit-scrollbar { height: 6px; }
.rangee-scroll::-webkit-scrollbar-thumb {
    background: var(--trait); border-radius: 999px;
}
.rangee-item {
    flex: 0 0 46%; max-width: 46%;
    scroll-snap-align: start;
}
@media (min-width: 576px) { .rangee-item { flex-basis: 31%; max-width: 31%; } }
@media (min-width: 768px) { .rangee-item { flex-basis: 23%; max-width: 23%; } }
@media (min-width: 992px) { .rangee-item { flex-basis: 18%; max-width: 18%; } }
.rangee-item .carte-produit--publique { height: 100%; }

.sentinelle-accueil { min-height: 40px; }

/* Carrousel d'annonces */
.carrousel-annonces { border-radius: var(--rayon); overflow: hidden;
    box-shadow: var(--ombre); }
.carrousel-annonces .carousel-item img {
    width: 100%; height: 220px; object-fit: cover; display: block;
}
@media (min-width: 768px) { .carrousel-annonces .carousel-item img { height: 320px; } }
.carrousel-legende {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 1.25rem 1rem .9rem; color: #fff; text-align: left;
    background: linear-gradient(to top,
        rgba(10, 37, 64, .88) 0%, rgba(10, 37, 64, .45) 55%, transparent 100%);
}
.carrousel-legende h3 { color: #fff; font-family: "Sora", sans-serif; }

/* ---------- Chips de catégories (onboarding revendeur) ---------- */
.chip-categorie {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .35rem .5rem .35rem .85rem; border-radius: 999px;
    background: #FFF8E6; border: 1px solid var(--or);
    color: var(--encre); font-size: .9rem; font-weight: 600;
}
.chip-categorie .chip-x {
    border: 0; background: transparent; color: var(--texte-doux);
    font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0 .1rem;
}
.chip-categorie .chip-x:hover { color: #dc3545; }

/* ---------- Badge panier (Phase 4) ---------- */
.lien-panier { color: #fff; }
.badge-panier-slot { position: absolute; top: 2px; right: 0; }
.badge-panier-pastille {
    display: inline-block; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: var(--or); color: var(--encre);
    font-size: .72rem; font-weight: 700; line-height: 18px; text-align: center;
}

/* ---------- Cloche de notifications (badge poll HTMX) ---------- */
.lien-cloche { color: #fff; }
.badge-notif-slot { position: absolute; top: 0; right: -2px; }
.badge-notif-pastille {
    display: inline-block; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: #E0483B; color: #fff;
    font-size: .72rem; font-weight: 700; line-height: 18px; text-align: center;
}
.icone-notif {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(123,92,255,.18), rgba(43,184,255,.14));
    color: var(--liberty); font-size: 1.15rem;
    border: 1px solid rgba(123,92,255,.25);
}
.notif-non-lue { background: #FBF7EC; }
.point-non-lu {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: #E0483B; flex: 0 0 auto;
}

/* ---------- Badges de statut de commande (couleurs stables, §5/§13.4) ---------- */
.badge-statut {
    display: inline-block; padding: .2rem .55rem; border-radius: 999px;
    font-size: .78rem; font-weight: 600; white-space: nowrap;
    border: 1px solid transparent;
}
.statut-SOUMISE            { background: #EAF1FB; color: #1B4B8A; }
.statut-EN_PREPARATION     { background: #FFF3D6; color: #8A5A00; }
.statut-APPRETEE           { background: #FDECC8; color: #8A4B00; }
.statut-EN_VERIFICATION    { background: #E7E2F7; color: #4B3A8A; }
.statut-CONFORME           { background: #DFF3E4; color: #1E7A45; }
.statut-NON_CONFORME       { background: #FBE0DD; color: #B02A18; }
.statut-MARCHANDISE_PAYEE  { background: #DDF0EC; color: #1E90E8; }
.statut-EXPEDIEE           { background: #E1EEF5; color: #1B5E7A; }
.statut-EXPEDITION_PAYEE   { background: #DDF0EC; color: #1E90E8; }
.statut-EN_LIVRAISON_FINALE{ background: #E1EEF5; color: #1B5E7A; }
.statut-LIVREE             { background: #DFF3E4; color: #1E7A45; }
.statut-CLOTUREE           { background: #E7E5DF; color: #4A4A44; }
.statut-ANNULEE            { background: #EDEDED; color: #777; }
.statut-LITIGE             { background: #FBE0DD; color: #B02A18; }

/* ---------- Messagerie (Phase 9) ---------- */
/* Bouton flottant (FAB) */
.fab-messagerie {
    position: fixed; right: 16px;
    bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 16px);
    z-index: 1035; width: 58px; height: 58px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--degrade-vif); color: #fff; font-size: 1.5rem;
    text-decoration: none;
    border: 1px solid rgba(123,92,255,.5);
    box-shadow: 0 8px 24px rgba(30,144,232,.35), var(--lueur-aqua);
    transition: transform var(--duree), box-shadow var(--duree), filter var(--duree);
}
.fab-messagerie:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.06); }
.fab-messagerie:active { transform: scale(.94); }
@media (min-width: 992px) { .fab-messagerie { bottom: 24px; right: 24px; } }
.fab-badge-slot { position: absolute; top: -2px; right: -2px; }

/* Bouton flottant du CONTRÔLEUR (service client) — au-dessus de celui des
   messages, sur petit écran : accès direct aux commandes à traiter. */
.fab-controleur {
    position: fixed; right: 16px;
    bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 16px + 70px);
    z-index: 1035; width: 58px; height: 58px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--degrade-or, linear-gradient(135deg, #FFC531, #FF6B2C));
    color: #0A2540; font-size: 1.45rem; text-decoration: none;
    border: 1px solid rgba(255,197,49,.55);
    box-shadow: 0 8px 24px rgba(120,90,0,.30);
    transition: transform var(--duree), filter var(--duree);
}
.fab-controleur:hover { color: #0A2540; transform: translateY(-2px); filter: brightness(1.05); }
.fab-controleur:active { transform: scale(.94); }
.fab-badge {
    display: inline-block; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 999px; background: #E0483B; color: #fff;
    font-size: .72rem; font-weight: 700; line-height: 20px; text-align: center;
    border: 2px solid var(--papier);
}

/* Page de conversation PLEIN ÉCRAN (n'étend pas base.html) */
.chat-plein {
    min-height: 100vh; min-height: 100dvh;
    display: flex; flex-direction: column;
    background:
        radial-gradient(900px 380px at 90% -6%, rgba(123,92,255,.06), transparent 60%),
        var(--papier);
}
.chat-barre {
    position: sticky; top: 0; z-index: 6;
    display: flex; align-items: center; gap: .6rem;
    padding: max(.55rem, env(safe-area-inset-top)) .9rem .55rem;
    background: linear-gradient(120deg, #08203A 0%, var(--encre) 60%, #123f34 100%);
    color: #fff;
    box-shadow: 0 1px 0 rgba(123,92,255,.25), 0 4px 18px rgba(0,0,0,.16);
}
.chat-retour { color: #fff; font-size: 1.35rem; line-height: 1; text-decoration: none; }
.chat-retour:hover { color: var(--aqua-clair); }
.chat-titre { font-family: var(--font-titre); font-weight: 700; font-size: 1.02rem; min-width: 0; }
.chat-banniere {
    background: rgba(43,184,255,.12); color: #0A3A52;
    border-bottom: 1px solid rgba(43,184,255,.25);
    font-size: .76rem; font-weight: 600; text-align: center;
    padding: .3rem .8rem;
}
.chat-fil {
    flex: 1 1 auto; overflow-y: auto;
    display: flex; flex-direction: column; gap: .35rem;
    padding: .7rem .7rem 1rem; scroll-behavior: smooth;
}
.chat-pied {
    position: sticky; bottom: 0;
    padding: .5rem .7rem calc(.5rem + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--trait);
}
.chat-pied .barre-saisie { position: static; }

/* Fil de discussion */
.banniere-arnaque {
    background: rgba(43,184,255,.12); border: 1px solid rgba(43,184,255,.3);
    color: #0A3A52; border-radius: 12px; padding: .5rem .8rem;
    font-size: .82rem; font-weight: 600;
}
.fil-messages {
    display: flex; flex-direction: column; gap: .35rem;
    max-height: 62vh; overflow-y: auto; padding: .5rem .25rem;
    scroll-behavior: smooth;
}
.msg { display: flex; flex-direction: column; max-width: 80%; }
.msg--moi { align-self: flex-end; align-items: flex-end; }
.msg--autre { align-self: flex-start; align-items: flex-start; }
.msg-bulle {
    padding: .5rem .8rem; border-radius: 16px; font-size: .95rem;
    line-height: 1.35; word-break: break-word;
}
.msg--moi .msg-bulle {
    background: var(--degrade-vif); color: #fff; border-bottom-right-radius: 5px;
}
.msg--autre .msg-bulle {
    background: #fff; color: var(--texte); border: 1px solid var(--trait);
    border-bottom-left-radius: 5px;
}
.msg-heure { font-size: .68rem; color: var(--texte-doux); margin: 1px 4px 0; }
.msg-filtre { color: #E0483B; }
.msg-lu { color: var(--azur); }              /* accusé de lecture (double coche bleue) */

/* Indicateur « en train d'écrire » : trois points qui pulsent */
.msg-frappe { display: inline-flex; gap: 4px; align-items: center; padding: .55rem .8rem; }
.point-frappe {
    width: 7px; height: 7px; border-radius: 50%; background: var(--texte-doux);
    display: inline-block; animation: frappe 1.1s infinite ease-in-out both;
}
.point-frappe:nth-child(2) { animation-delay: .18s; }
.point-frappe:nth-child(3) { animation-delay: .36s; }
@keyframes frappe {
    0%, 80%, 100% { transform: scale(.6); opacity: .4; }
    40%           { transform: scale(1);  opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .point-frappe { animation: none; } }
.msg-systeme {
    align-self: center; text-align: center; max-width: 92%;
    background: rgba(255,197,49,.12); border: 1px solid rgba(255,197,49,.3);
    color: #7a5600; border-radius: 12px; padding: .4rem .7rem;
    font-size: .78rem; margin: .25rem 0;
}
/* Carte d'offre de négociation (§8.4) */
.carte-offre {
    background: #fff; border: 1.5px solid var(--or);
    border-radius: 16px; padding: .6rem .8rem; min-width: 200px;
    box-shadow: 0 4px 14px rgba(255,197,49,.14);
}
.msg--moi .carte-offre { border-color: rgba(123,92,255,.6); box-shadow: var(--lueur-aqua); }
.offre-entete {
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--texte-doux);
    display: flex; align-items: center; gap: .35rem;
}
.offre-entete .bi { color: var(--or); }
.offre-statut { margin-left: auto; }
.offre-produit { font-weight: 600; margin-top: .25rem; }
.offre-prix { font-family: var(--font-titre); font-size: 1.15rem; font-weight: 700; color: var(--encre); }
.offre-prix .small { font-size: .7rem; color: var(--texte-doux); font-weight: 400; }
.offre-actions { display: flex; gap: .4rem; margin-top: .5rem; }
.offre-actions form { margin: 0; }
.btn-contre-offre {
    display: inline-flex; align-items: center; gap: .3rem;
    background: none; border: 1px solid var(--or); color: var(--encre);
    border-radius: 999px; font-weight: 600;
}
.btn-contre-offre:hover { background: rgba(255,197,49,.12); }
.statut-offre-ACCEPTEE { border-color: #1E7A45; }
.statut-offre-ACCEPTEE .offre-statut { color: #1E7A45; }
.statut-offre-REFUSEE, .statut-offre-EXPIREE { opacity: .7; border-color: var(--trait); }

/* Vignette du produit dans la carte d'offre */
.offre-produit { display: flex; align-items: center; gap: .5rem; }
.offre-photo {
    width: 42px; height: 42px; border-radius: 8px; object-fit: cover;
    flex: 0 0 auto; border: 1px solid var(--trait); background: #fff;
}

/* Produit épinglé au-dessus du composeur (préparer une offre de prix) */
.produit-epingle {
    display: flex; align-items: center; gap: .6rem;
    background: rgba(255,197,49,.10); border: 1px solid rgba(255,197,49,.35);
    border-radius: 12px; padding: .4rem .5rem; margin-bottom: .5rem;
}
.produit-epingle-photo {
    width: 46px; height: 46px; border-radius: 8px; object-fit: cover;
    flex: 0 0 auto; border: 1px solid var(--trait); background: #fff;
}
.produit-epingle-info { min-width: 0; flex: 1 1 auto; }
.produit-epingle-nom { font-weight: 600; font-size: .92rem; }
.produit-epingle-prix { font-size: .78rem; color: var(--texte-doux); }
.produit-epingle-fermer {
    color: var(--texte-doux); flex: 0 0 auto; padding: .25rem .45rem;
    text-decoration: none; font-size: .85rem;
}

/* --- Swipe-to-reply façon WhatsApp --------------------------------------- */
/* pan-y : on laisse le scroll vertical au navigateur, on gère l'horizontal. */
.msg { position: relative; touch-action: pan-y; }
.msg-swipe-icone {
    position: absolute; top: 50%; transform: translateY(-50%);
    color: var(--or); font-size: 1.05rem; opacity: 0;
    transition: opacity .12s ease; pointer-events: none; z-index: 0;
}
.msg--autre .msg-swipe-icone { left: -26px; }
.msg--moi   .msg-swipe-icone { right: -26px; }
.msg.repondre-arme .msg-swipe-icone { opacity: 1; }

/* Message cité façon Messenger : bulle grise NETTE, séparée, au-dessus de la
   réponse et alignée du même côté. Cliquable → saut vers la source. */
.msg-reponse-a {
    display: block; width: fit-content; max-width: 100%;
    text-decoration: none; cursor: pointer;
    background: #E7E4DB; color: var(--texte-doux);
    border-radius: 16px; padding: .4rem .8rem;
    margin-bottom: 4px;
    font-size: .77rem; line-height: 1.25;
    transition: filter .15s ease;
}
.msg--moi .msg-reponse-a { margin-left: auto; }     /* citation à droite comme la réponse */
.msg-reponse-a:hover { filter: brightness(.96); }
.msg-reponse-a-auteur {
    display: block; font-weight: 700; font-size: .7rem;
    color: var(--liberty); margin-bottom: 1px;
}
.msg-reponse-a-texte { display: block; color: var(--texte-doux); }

/* Surbrillance du message source quand on clique sa citation */
@keyframes flash-msg {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,197,49,0); }
    25%      { box-shadow: 0 0 0 3px rgba(255,197,49,.6); }
}
.msg-surligne .msg-bulle,
.msg-surligne .carte-offre { animation: flash-msg 1.5s ease; }
@media (prefers-reduced-motion: reduce) {
    .msg-surligne .msg-bulle, .msg-surligne .carte-offre { animation: none; }
}

/* Bannière de réponse au-dessus du composeur */
.reponse-apercu {
    display: flex; align-items: center; gap: .5rem;
    background: rgba(255,197,49,.10); border: 1px solid rgba(255,197,49,.35);
    border-left: 3px solid var(--or); border-radius: 10px;
    padding: .35rem .5rem; margin-bottom: .45rem;
}
.reponse-apercu > .bi-reply-fill { color: var(--or); flex: 0 0 auto; }
.reponse-apercu-corps { min-width: 0; flex: 1 1 auto; }
.reponse-apercu-auteur { font-weight: 700; font-size: .8rem; color: var(--encre); }
.reponse-apercu-texte { font-size: .78rem; color: var(--texte-doux); }
.reponse-apercu-fermer {
    background: none; border: 0; color: var(--texte-doux);
    flex: 0 0 auto; padding: .2rem .4rem; font-size: .85rem;
}

/* Bouton « Filtres » repliable de la recherche : chevron qui pivote */
.chevron-filtres { transition: transform .2s ease; }
.bouton-filtres:not(.collapsed) .chevron-filtres { transform: rotate(180deg); }

.barre-saisie {
    display: flex; gap: .5rem; align-items: center;
    position: sticky; bottom: 0;
}
.barre-saisie .form-control { border-radius: 999px; }
.barre-saisie .btn { border-radius: 50%; width: 44px; height: 44px; flex: 0 0 auto; padding: 0; }

/* Boutons image / micro */
.btn-media {
    width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%;
    border: 1px solid var(--trait); background: #fff; color: var(--liberty);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem; cursor: pointer; margin: 0;
    transition: background var(--duree), color var(--duree), box-shadow var(--duree);
}
.btn-media:hover { background: var(--liberty); color: #fff; }
.btn-media.enregistre { background: #E0483B; color: #fff; border-color: #E0483B; animation: pulse-rec 1s infinite; }
@keyframes pulse-rec { 0%,100% { box-shadow: 0 0 0 0 rgba(224,72,59,.5); } 50% { box-shadow: 0 0 0 6px rgba(224,72,59,0); } }
.etat-micro { font-size: .78rem; color: #E0483B; font-weight: 600; text-align: center; min-height: 1rem; }
.frappe-live {
    display: flex; align-items: center; gap: 5px;
    padding: .1rem .2rem .3rem; color: var(--texte-doux); font-size: .78rem;
}

/* Contenus image / audio dans les bulles */
.msg-image { max-width: 220px; max-height: 260px; border-radius: 12px; display: block; cursor: pointer; }
.msg-image:hover { filter: brightness(.95); }

/* Popup photo (lightbox) */
.modal-image-contenu { background: transparent; border: 0; align-items: center; }
.modal-image-photo {
    max-width: 100%; max-height: 82vh; border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.modal-image-fermer {
    position: absolute; top: -6px; right: -6px; z-index: 2;
    background-color: rgba(0,0,0,.55); border-radius: 50%; padding: .5rem;
    opacity: 1;
}
.msg--moi .msg-bulle:has(.msg-image), .msg--autre .msg-bulle:has(.msg-image) { padding: 4px; }
.msg-audio { max-width: 230px; height: 40px; }
.msg-duree { font-size: .7rem; color: var(--texte-doux); margin-left: 4px; }
.btn-signaler {
    border: 0; background: transparent; color: var(--texte-doux);
    font-size: .8rem; padding: 0 2px; cursor: pointer; opacity: .55;
}
.btn-signaler:hover { color: #E0483B; opacity: 1; }

/* Entonnoir du tableau de bord staff */
.entonnoir-barre { height: 8px; border-radius: 999px; background: var(--papier); overflow: hidden; }
.entonnoir-barre span {
    display: block; height: 100%;
    background: var(--degrade-vif); border-radius: 999px;
    transition: width .4s ease;
}

/* ---------- Réseau social des grossistes (§25) ---------- */
.post-carte { border: 1px solid var(--trait); }
.post-media { width: 100%; border-radius: 12px; object-fit: cover; max-height: 360px; }
video.post-media { object-fit: contain; background: #000; }
.post-produit {
    background: var(--papier); border: 1px solid var(--trait);
    border-radius: 14px; padding: .5rem .65rem;
}
.post-produit:hover { border-color: rgba(123,92,255,.5); }
.post-actions .btn-social {
    border: 0; background: transparent; color: var(--texte-doux);
    font-weight: 600; font-size: .95rem; cursor: pointer; padding: .25rem .3rem;
    text-decoration: none; display: inline-flex; align-items: center; gap: .35rem;
    border-radius: 999px; transition: color var(--duree), background var(--duree), transform .1s;
}
.post-actions .btn-social .bi { font-size: 1.2rem; }
.post-actions .btn-social:hover { color: var(--liberty); background: rgba(30,144,232,.06); }
.post-actions .btn-social:active { transform: scale(.9); }

/* Cœur « J'aime » : dégradé vif + animation pop au clic */
.post-actions .btn-social.aime { color: #FF3D68; }
.post-actions .btn-social.aime .bi {
    background: linear-gradient(135deg, #FF6A9C 0%, #FF2D55 55%, #E0102F 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    filter: drop-shadow(0 2px 6px rgba(255,45,85,.45));
    animation: coeur-pop .45s cubic-bezier(.2,.8,.3,1.4);
}
.post-actions .btn-social.aime:hover { color: #FF2D55; background: rgba(255,45,85,.08); }
@keyframes coeur-pop {
    0%   { transform: scale(.4) rotate(-12deg); }
    45%  { transform: scale(1.35) rotate(6deg); }
    70%  { transform: scale(.9); }
    100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .post-actions .btn-social.aime .bi { animation: none; } }

/* Commentaires en bulles (popup) */
.commentaires-bulles { display: flex; flex-direction: column; gap: .45rem; }
.commentaire-bulle {
    align-self: flex-start; max-width: 88%;
    background: var(--papier); border: 1px solid var(--trait);
    border-radius: 16px; border-bottom-left-radius: 5px;
    padding: .45rem .75rem;
}
.commentaire-bulle--moi {
    align-self: flex-end; background: rgba(123,92,255,.12);
    border-color: rgba(123,92,255,.35);
    border-bottom-left-radius: 16px; border-bottom-right-radius: 5px;
}
.commentaire-auteur { font-weight: 700; font-size: .74rem; color: var(--liberty); }
.commentaire-texte { font-size: .9rem; line-height: 1.35; word-break: break-word; }
.barre-commentaire { display: flex; gap: .5rem; align-items: center; }
.barre-commentaire .form-control { border-radius: 999px; }
.barre-commentaire .btn { border-radius: 50%; width: 42px; height: 42px; flex: 0 0 auto; padding: 0; }

/* ---------- Fil immersif style TikTok (page dédiée, sans dock) ---------- */
body.tiktok { margin: 0; background: #000; overflow: hidden; }
.tk-retour {
    position: fixed; top: calc(.6rem + env(safe-area-inset-top)); left: 12px;
    z-index: 20; width: 42px; height: 42px; border-radius: 50%;
    display: grid; place-items: center; color: #fff; font-size: 1.35rem;
    background: rgba(0,0,0,.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    text-decoration: none;
}
.tk-feed {
    height: 100dvh; overflow-y: scroll; scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.tk-feed::-webkit-scrollbar { display: none; }
.tk-post {
    position: relative; height: 100dvh; scroll-snap-align: start;
    overflow: hidden; background: #000;
}
.tk-media { position: absolute; inset: 0; }
.tk-media img, .tk-media video { width: 100%; height: 100%; object-fit: cover; }
.tk-overlay {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.2) 38%, transparent 62%);
}

/* Rail d'actions vertical à droite */
.tk-rail {
    position: absolute; right: 10px; bottom: 150px; z-index: 5;
    display: flex; flex-direction: column; align-items: center; gap: 1.1rem;
    pointer-events: auto;
}
.tk-rail form { margin: 0; }
.tk-action {
    background: none; border: 0; color: #fff; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: .72rem; font-weight: 700; text-decoration: none;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,.6));
}
.tk-action .bi { font-size: 2rem; line-height: 1; transition: transform .1s; }
.tk-action:hover { color: #fff; }
.tk-action:active .bi { transform: scale(.85); }
.tk-action.aime .bi {
    color: #FF2D55;
    animation: coeur-pop .45s cubic-bezier(.2,.8,.3,1.4);
}
.tk-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }
.tk-avatar--initiale {
    display: grid; place-items: center; font-family: var(--font-titre);
    font-weight: 700; color: #fff; background: var(--degrade-vif);
}

/* Bas : boutique + texte + article mis en valeur */
.tk-bas {
    position: absolute; left: 0; right: 72px; bottom: 0; z-index: 5;
    pointer-events: auto; color: #fff;
    padding: 1rem 1rem calc(1.1rem + env(safe-area-inset-bottom));
}
.tk-boutique { color: #fff; text-decoration: none; font-size: 1rem; }
.tk-boutique .bi { color: var(--aqua-clair); }
.tk-texte { margin: .4rem 0; font-size: .92rem; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tk-produit {
    display: flex; align-items: center; gap: .5rem; margin-top: .5rem;
    background: rgba(255,255,255,.16); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.28); border-radius: 16px; padding: .45rem;
}
.tk-produit-lien { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: #fff; flex: 1 1 auto; min-width: 0; }
.tk-produit-lien img { width: 50px; height: 50px; border-radius: 11px; object-fit: cover; flex: 0 0 auto; }
.tk-prix { font-family: var(--font-titre); font-weight: 700; color: var(--or-doux); }
.tk-panier { border-radius: 999px; font-weight: 700; flex: 0 0 auto; white-space: nowrap; }
.tk-vide { height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; color: #fff; text-align: center; padding: 1rem; }
.tk-vide .bi { font-size: 3rem; opacity: .6; }

/* Barre de stories */
.stories-bar { display: flex; gap: .8rem; overflow-x: auto; padding: .25rem 0 .5rem; }
.story-item { flex: 0 0 auto; width: 64px; text-align: center; text-decoration: none; }
.story-cercle {
    width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
    overflow: hidden; padding: 3px; margin: 0 auto;
    background: var(--degrade-vif);
}
.story-cercle img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }
.story-cercle .logo-boutique--initiale { width: 100%; height: 100%; border-radius: 50%; }
.story-nom { display: block; font-size: .68rem; color: var(--texte-doux); margin-top: 2px; }

/* Timeline verticale de la commande */
.timeline { list-style: none; padding-left: 0; margin: 0; }
.timeline li { position: relative; padding-left: 1.5rem; padding-bottom: 1rem; }
.timeline li::before {
    content: ""; position: absolute; left: 3px; top: 4px;
    width: 10px; height: 10px; border-radius: 50%; background: var(--or);
}
.timeline li::after {
    content: ""; position: absolute; left: 7px; top: 14px; bottom: 0;
    width: 2px; background: var(--trait);
}
.timeline li:last-child::after { display: none; }
