/* Vitrine avec panier (storefront.js) et outils commerçant (merchant.js) */
html[lang] body .sf{background:var(--vl-bg);color:var(--vl-text);min-height:100vh;padding-bottom:96px}
html[lang] body .sf .ico{width:1em;height:1em}
.sf-header{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:12px;padding:12px clamp(16px,4vw,40px);background:color-mix(in srgb,var(--vl-bg) 86%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-bottom:1px solid var(--vl-line)}
.sf-header .brand{margin-right:auto}
.sf-status{font-size:13px;font-weight:600;padding:6px 12px;border-radius:999px;background:var(--vl-surface-2);color:var(--vl-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46vw}
.sf-status.open{background:rgba(123,224,176,.22);color:var(--vl-accent-text)}
.sf-status.closed{background:rgba(220,90,70,.14);color:#b8432f}
html[data-theme=dark] .sf-status.closed{color:#ff9b87}
.sf-cart-btn{position:relative;display:inline-grid;place-items:center;width:44px;height:44px;border-radius:14px;border:1px solid var(--vl-line);background:var(--vl-surface);color:var(--vl-text);cursor:pointer}
html[lang] body .sf .sf-cart-btn .ico{width:20px;height:20px}
.sf-cart-btn span{position:absolute;top:-6px;right:-6px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:var(--vl-ink);color:var(--vl-volt);font-size:11px;font-weight:700;display:none;place-items:center}
.sf-cart-btn.has-items span{display:grid}
html[lang] body .sf .sf-hero{padding:clamp(28px,6vw,64px) clamp(16px,4vw,40px) 12px;max-width:1100px;margin:0 auto}
html[lang] body .sf .sf-hero h1{font-size:clamp(34px,7vw,64px);letter-spacing:-.04em;margin:8px 0}
.sf-closed-note,.sf-loyalty{display:flex;gap:8px;align-items:center;padding:10px 14px;border-radius:14px;background:var(--vl-surface);border:1px solid var(--vl-line);font-size:14px;margin-top:10px}
.sf-catalog{max-width:1100px;margin:0 auto;padding:12px clamp(16px,4vw,40px)}
.sf-tools{display:flex;flex-direction:column;gap:12px;margin-bottom:18px}
.sf-search{display:flex;align-items:center;gap:10px;padding:0 14px;height:48px;border-radius:16px;background:var(--vl-surface);border:1px solid var(--vl-line);color:var(--vl-muted)}
.sf-search input{flex:1;border:0;background:none;font:inherit;font-size:16px;color:var(--vl-text);outline:none;min-width:0}
.sf-search:focus-within{border-color:var(--vl-accent-text)}
.sf-chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.sf-chips button{flex:none;min-height:38px;padding:0 16px;border-radius:999px;border:1px solid var(--vl-line);background:var(--vl-surface);color:var(--vl-text);font:inherit;font-size:14px;cursor:pointer;transition:background .2s,color .2s}
.sf-chips button.active{background:var(--vl-ink);color:var(--vl-volt);border-color:transparent}
.sf-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,210px),1fr));gap:14px}
@media (max-width:520px){.sf-grid{grid-template-columns:1fr 1fr;gap:10px}}
.sf-card{display:flex;flex-direction:column;border-radius:var(--vl-r-lg);background:var(--vl-surface);border:1px solid var(--vl-line);overflow:hidden;box-shadow:var(--vl-shadow);transition:transform .25s cubic-bezier(.2,.8,.2,1)}
.sf-card:hover{transform:translateY(-3px)}
.sf-card-open{display:block;border:0;padding:0;background:none;cursor:pointer;width:100%}
.sf-card .product-art{aspect-ratio:1/1;display:grid;place-items:center;overflow:hidden}
.sf-card .product-art img{width:100%;height:100%;object-fit:cover}
.sf-card-body{padding:12px 14px 14px;display:flex;flex-direction:column;gap:4px;flex:1}
.sf-card-body small{color:var(--vl-muted);font-size:12px}
.sf-card-body h3{font-size:15px;line-height:1.3;margin:0}
.sf-card-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:8px}
.sf-card-foot strong{font-size:15px}
.sf-add{flex:none;min-width:40px;height:40px;border-radius:12px;border:0;background:var(--vl-ink);color:var(--vl-volt);display:grid;place-items:center;cursor:pointer;font:inherit;font-size:12px;padding:0 8px}
html[lang] body .sf .sf-add .ico{width:18px;height:18px}
.sf-add:disabled{background:var(--vl-surface-2);color:var(--vl-muted);cursor:not-allowed}
html[data-theme=dark] .sf-add:not(:disabled),html[data-theme=dark] .sf-chips button.active{background:var(--vl-volt);color:var(--vl-on-volt)}
.sf-bar{position:fixed;left:50%;bottom:calc(14px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:30;display:flex;align-items:center;gap:14px;justify-content:space-between;width:min(560px,calc(100% - 24px));padding:10px 10px 10px 18px;border-radius:20px;background:var(--vl-ink);color:#fff;box-shadow:0 20px 40px -18px rgba(0,0,0,.5);animation:sfUp .35s cubic-bezier(.2,.8,.2,1)}
.sf-bar[hidden]{display:none}
.sf-bar .btn{white-space:nowrap}
@keyframes sfUp{from{transform:translate(-50%,24px);opacity:0}}
/* Fiche produit et panier */
html[lang] body .sf dialog.sf-sheet,html[lang] body .sf dialog.sf-drawer{border:0;padding:0;background:var(--vl-surface);color:var(--vl-text);width:min(520px,100%);max-height:min(92dvh,900px);border-radius:28px;box-shadow:0 30px 80px -30px rgba(0,0,0,.6)}
html[lang] body .sf dialog.sf-drawer{margin-right:max(0px,calc((100vw - 1100px)/2));height:100dvh;max-height:100dvh;border-radius:28px 0 0 28px;width:min(440px,100%)}
html[lang] body .sf dialog::backdrop{background:rgba(5,13,9,.5);backdrop-filter:blur(4px)}
@media (max-width:640px){html[lang] body .sf dialog.sf-sheet,html[lang] body .sf dialog.sf-drawer{margin:auto 0 0;width:100%;max-width:100%;border-radius:26px 26px 0 0;max-height:92dvh;height:auto}}
.sf-sheet-body,.sf-checkout{display:flex;flex-direction:column;gap:14px;padding:20px;position:relative}
.sf-drawer>div,.sf-drawer>form{padding:20px}
.sf-x{position:absolute;top:14px;right:14px;z-index:2}
.sf-sheet-art{aspect-ratio:4/3;border-radius:20px;overflow:hidden;display:grid;place-items:center}
.sf-sheet-art img{width:100%;height:100%;object-fit:cover}
.sf-sheet-body h2{margin:0;font-size:24px;letter-spacing:-.02em}
.sf-cat{color:var(--vl-muted)}
.sf-desc{color:var(--vl-muted);margin:0;line-height:1.5}
.sf-group{border:0;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}
.sf-group legend{font-weight:600;margin-bottom:8px;display:flex;gap:8px;align-items:baseline}
.sf-group legend em{font-style:normal;font-size:12px;color:var(--vl-muted);font-weight:500}
.sf-pills{display:flex;flex-wrap:wrap;gap:8px}
.sf-pill{position:relative;cursor:pointer}
.sf-pill input{position:absolute;opacity:0;pointer-events:none}
.sf-pill span{display:inline-flex;align-items:center;gap:6px;min-height:42px;padding:0 14px;border-radius:12px;border:1.5px solid var(--vl-line);background:var(--vl-surface-2);font-size:14px;transition:border-color .2s,background .2s}
.sf-pill input:checked+span{border-color:var(--vl-accent-text);background:rgba(123,224,176,.18);font-weight:600}
.sf-pill input:focus-visible+span{outline:2px solid var(--vl-accent-text);outline-offset:2px}
.sf-pill.off span{opacity:.45;text-decoration:line-through;cursor:not-allowed}
.sf-option{display:flex;align-items:center;gap:12px;min-height:46px;padding:0 14px;border-radius:12px;border:1px solid var(--vl-line);cursor:pointer}
.sf-option input{width:20px;height:20px;accent-color:#1f6b47}
.sf-option span{flex:1}
.sf-option b{font-size:14px;color:var(--vl-muted);font-weight:600}
.sf-option:has(input:checked){border-color:var(--vl-accent-text);background:rgba(123,224,176,.12)}
.sf-qty-row{display:flex;align-items:center;justify-content:space-between}
.sf-qty{display:inline-flex;align-items:center;border:1px solid var(--vl-line);border-radius:14px;overflow:hidden}
.sf-qty button{width:44px;height:44px;border:0;background:var(--vl-surface-2);color:var(--vl-text);font-size:20px;cursor:pointer}
.sf-qty output{min-width:40px;text-align:center;font-weight:700}
.sf-qty.sm button{width:36px;height:36px;font-size:17px}
.sf-qty.sm output{min-width:30px}
.sf-related span{display:block;font-size:13px;font-weight:600;color:var(--vl-muted);margin-bottom:8px}
.sf-related div{display:flex;gap:8px;overflow-x:auto}
.sf-related button{flex:none;min-height:38px;padding:0 12px;border-radius:999px;border:1px dashed var(--vl-line);background:none;color:var(--vl-text);font:inherit;font-size:13px;cursor:pointer}
.sf-add-btn,.sf-wide{width:100%;justify-content:center;min-height:50px}
.sf-drawer-head{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.sf-drawer-head h2{margin:0;font-size:22px;flex:1}
.sf-back{width:40px;height:40px;border-radius:12px;border:1px solid var(--vl-line);background:none;color:var(--vl-text);display:grid;place-items:center;cursor:pointer}
.flip-x{transform:scaleX(-1)}
.sf-lines{list-style:none;padding:0;margin:0 0 14px;display:flex;flex-direction:column;gap:10px}
.sf-lines li{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:12px;border-radius:16px;background:var(--vl-surface-2)}
.sf-lines li>div:first-child{display:flex;flex-direction:column;gap:2px;min-width:0}
.sf-lines small{color:var(--vl-muted)}
.sf-sum,.sf-totals>div{display:flex;justify-content:space-between;gap:10px;padding:6px 0}
.sf-sum{font-size:17px;margin-bottom:12px}
.sf-totals{border-top:1px solid var(--vl-line);padding-top:8px}
.sf-totals .disc{color:var(--vl-accent-text)}
.sf-totals .grand{font-size:18px;border-top:1px dashed var(--vl-line);margin-top:4px;padding-top:10px}
.sf-checkout label{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:14px}
.sf-checkout :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font:inherit;font-size:16px;font-weight:400;min-height:46px;padding:10px 12px;border-radius:12px;border:1px solid var(--vl-line);background:var(--vl-surface-2);color:var(--vl-text)}
.sf-checkout label.sf-check{flex-direction:row;align-items:flex-start;gap:10px;font-weight:400;font-size:13px;color:var(--vl-muted)}
.sf-check input{width:20px;height:20px;flex:none;accent-color:#1f6b47;margin-top:1px}
.sf-zone[hidden]{display:none!important}
.sf-empty,.sf-done{display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;padding:40px 20px!important}
html[lang] body .sf .ico-lg{width:48px;height:48px;color:var(--vl-muted)}
.sf-done-icon{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;background:var(--vl-grad);color:#0b1a12}
html[lang] body .sf .sf-done-icon .ico{width:30px;height:30px;stroke-width:2.6}
.sf-done h2{margin:0}
.sf-recap{white-space:pre-wrap;text-align:left;width:100%;margin:0;padding:12px 14px;border-radius:14px;background:var(--vl-surface-2);font:inherit;font-size:14px}
.sf-pay{width:100%;text-align:left;padding:14px;border-radius:16px;border:1px solid var(--vl-line);display:flex;flex-direction:column;gap:8px}
.sf-pay p{margin:0;white-space:pre-wrap}
.sf-proof-status[data-kind=ok]{color:var(--vl-accent-text)}
.sf-proof-status[data-kind=error]{color:#b8432f}
.sf-toast{position:fixed;left:50%;top:18px;transform:translate(-50%,-20px);opacity:0;z-index:60;padding:10px 16px;border-radius:14px;background:var(--vl-ink,#0b1a12);color:#fff;font-size:14px;transition:.3s;pointer-events:none}
.sf-toast.show{opacity:1;transform:translate(-50%,0)}
@media (prefers-reduced-motion:reduce){.sf-card,.sf-bar,.sf-toast{transition:none;animation:none}}

/* ---------- Outils commerçant (merchant.js) ---------- */
.mx-badges{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.mx-badge{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:600;padding:2px 8px;border-radius:999px;background:var(--vl-surface-2);color:var(--vl-muted);white-space:nowrap}
.mx-badge .ico{width:11px;height:11px}
.mx-badge.src-bot,.mx-badge.src-vitrine{background:rgba(123,224,176,.2);color:var(--vl-accent-text)}
.mx-badge.proof{background:rgba(255,196,0,.2);color:#8a6200}
html[data-theme=dark] .mx-badge.proof{color:#ffd66b}
.mx-badge.paid{background:rgba(123,224,176,.28);color:var(--vl-accent-text)}
.mx-btn{border:1px solid var(--vl-line);background:var(--vl-surface);color:var(--vl-text);border-radius:10px;min-height:34px;padding:0 10px;font:inherit;font-size:12px;cursor:pointer}
.mx-btn.primary{background:var(--vl-ink);color:var(--vl-volt);border-color:transparent}
.mx-panel{margin-top:18px}
.mx-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:14px}
.mx-days{display:flex;flex-direction:column;gap:8px}
.mx-day{display:grid;grid-template-columns:110px 1fr 1fr;gap:8px;align-items:center}
.mx-day label{display:flex;align-items:center;gap:8px;font-weight:600;font-size:14px}
.mx-day input[type=time]{min-height:40px;border-radius:10px;border:1px solid var(--vl-line);background:var(--vl-surface-2);color:var(--vl-text);padding:0 8px;font:inherit}
.mx-day input[type=time]:disabled{opacity:.4}
.mx-form{display:flex;flex-direction:column;gap:12px}
.mx-form>label,.mx-field{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:14px}
.mx-form :is(input:not([type=checkbox]),textarea,select){font:inherit;font-weight:400;font-size:16px;min-height:44px;padding:8px 12px;border-radius:12px;border:1px solid var(--vl-line);background:var(--vl-surface-2);color:var(--vl-text)}
.mx-switch{flex-direction:row!important;align-items:center;gap:10px!important;font-weight:500!important}
.mx-switch input{width:20px;height:20px;accent-color:#1f6b47}
.mx-form small{font-weight:400;color:var(--vl-muted)}
.mx-row{display:flex;gap:10px;flex-wrap:wrap}
.mx-row>*{flex:1;min-width:120px}
.mx-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.mx-qr{display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.mx-qr-box{width:168px;height:168px;border-radius:18px;background:#fff;display:grid;place-items:center;padding:10px;border:1px solid var(--vl-line)}
.mx-qr-box svg,.mx-qr-box img{width:100%;height:100%}
.mx-code{display:block;width:100%;font:12px/1.5 ui-monospace,monospace;padding:10px;border-radius:12px;background:var(--vl-surface-2);border:1px solid var(--vl-line);color:var(--vl-text);resize:vertical;min-height:70px}
.mx-segs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.mx-segs button{min-height:38px;padding:0 14px;border-radius:999px;border:1px solid var(--vl-line);background:var(--vl-surface);color:var(--vl-text);font:inherit;font-size:13px;cursor:pointer}
.mx-segs button.active{background:var(--vl-ink);color:var(--vl-volt);border-color:transparent}
.mx-segs button b{margin-left:6px}
.mx-cust{display:flex;flex-direction:column;gap:8px}
.mx-cust-row{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;padding:12px;border-radius:14px;background:var(--vl-surface-2)}
.mx-cust-row small{display:block;color:var(--vl-muted);margin-top:2px}
.mx-cust-row .mx-row{flex-wrap:nowrap;gap:6px}
.mx-pts{font-weight:700;color:var(--vl-accent-text);white-space:nowrap}
.mx-opt-variant{display:grid;grid-template-columns:1fr 120px 44px;gap:8px;margin-bottom:8px}
.mx-opt-variant input{min-height:42px;border-radius:10px;border:1px solid var(--vl-line);background:var(--vl-surface-2);color:var(--vl-text);padding:0 10px;font:inherit;font-size:16px}
.mx-channels{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px}
.mx-channel{padding:14px;border-radius:16px;background:var(--vl-surface-2)}
.mx-channel b{display:block;font-size:22px;letter-spacing:-.02em}
.mx-channel small{color:var(--vl-muted)}
.mx-bar{height:8px;border-radius:999px;background:var(--vl-line);overflow:hidden;margin-top:8px}
.mx-bar i{display:block;height:100%;background:var(--vl-grad)}
.mx-proof-img{max-width:100%;max-height:60vh;border-radius:14px;display:block;margin:0 auto}

/* Correctifs de spécificité (les libellés de formulaire de base sont en colonne) */
html[lang] body .sf label.sf-option{display:flex;flex-direction:row;align-items:center;gap:12px;min-height:48px;padding:0 14px;font-size:15px;font-weight:500}
html[lang] body .sf label.sf-option input{width:20px;height:20px;min-height:0;margin:0;padding:0;flex:none}
html[lang] body .sf label.sf-pill{display:inline-block;margin:0}
html[lang] body .sf .sf-pay label.btn,html[lang] body .sf .sf-done a.btn,html[lang] body .track-shell .sf-pay label.btn{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;text-decoration:none;text-align:center;width:100%;min-height:48px}
html[lang] body .sf .sf-done a.btn{text-decoration:none}
.sf-card-foot strong{font-size:14px;line-height:1.25}
@media (max-width:380px){.sf-card-foot{flex-direction:column;align-items:flex-start}}
html[lang] body .sf .sf-x,html[lang] body .sf .close-dialog{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--vl-surface-2);color:var(--vl-text);border:0;cursor:pointer}
html[lang] body .sf .close-dialog .ico{width:18px;height:18px}
.track-pay{margin:14px 0}

/* Réglages compacts et responsives */
html[lang] body .mx-day{grid-template-columns:86px 1fr 1fr;gap:6px}
html[lang] body .mx-day label{flex-direction:row;font-size:14px;margin:0}
html[lang] body .mx-day input[type=checkbox]{width:18px;height:18px;min-height:0;margin:0;accent-color:#1f6b47}
html[lang] body .mx-day input[type=time]{min-height:40px;height:40px;padding:0 4px;font-size:13.5px;width:100%;min-width:0}
html[lang] body label.mx-switch{display:flex;flex-direction:row;align-items:flex-start;gap:10px;font-weight:500;font-size:14px;line-height:1.4;margin:6px 0 0}
html[lang] body label.mx-switch input{width:20px;height:20px;min-height:0;flex:none;margin:0;accent-color:#1f6b47}
.mx-panel .panel-head{flex-wrap:wrap;gap:12px}
.mx-segs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.mx-segs button{flex:none}
.mx-qr-box small{text-align:center;font-size:12px}

/* ---------- Boutiques et équipe (team.js) ---------- */
html[lang] body .sidebar .store-switch[role=button]{cursor:pointer}
html[lang] body .sidebar .store-switch[role=button]:focus-visible{outline:2px solid var(--vl-volt);outline-offset:2px}
#teamDialog{width:min(560px,calc(100% - 24px))}
.team-body section{display:flex;flex-direction:column;gap:10px;padding-top:6px}
.team-h{font-size:15px;margin:6px 0 0;letter-spacing:-.01em}
.team-list{display:flex;flex-direction:column;gap:8px}
.team-store,.team-member{display:grid;grid-template-columns:40px 1fr auto auto;gap:10px;align-items:center;width:100%;text-align:left;padding:10px 12px;border-radius:14px;border:1px solid var(--vl-line);background:var(--vl-surface-2);color:var(--vl-text);font:inherit}
.team-store{cursor:pointer;grid-template-columns:40px 1fr auto}
.team-store.active{border-color:var(--vl-accent-text);background:rgba(123,224,176,.14)}
.team-store .ico,.team-member>.store-avatar .ico{width:16px;height:16px}
.team-store small,.team-member small{display:block;color:var(--vl-muted);font-size:12px;margin-top:2px;overflow-wrap:anywhere}
.team-body .store-avatar{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--vl-ink);color:var(--vl-volt);font-weight:700}
.team-member.pending{border-style:dashed}
.team-new summary{cursor:pointer;display:inline-flex;align-items:center;gap:8px;font-weight:600;padding:8px 0;color:var(--vl-accent-text)}
.team-new summary .ico{width:16px;height:16px}
.team-new form{margin-top:8px}
.team-invite{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}
.team-invite .mx-field{flex:1;min-width:200px}
@media (max-width:480px){.team-member{grid-template-columns:40px 1fr;}.team-member .mx-btn{grid-column:2}}
/* Vendeur : pas d'accès à l'abonnement, aux paiements ni aux réglages */
body.wazi-staff :is(#merchantPaymentBtn,#storeSettingsBtn,#whatsappSettingsBtn,#botSettingsBtn,#mxSettings,#subscriptionNotice,[data-page="pricing"],[data-goto="pricing"],.payment-connect-panel){display:none!important}
html[lang] body dialog#teamDialog{padding:0;overflow:hidden}
html[lang] body #teamDialog .team-body{padding:22px 24px 26px;max-height:min(86dvh,860px);overflow:auto;gap:14px}
html[lang] body #teamDialog form{padding:0;margin:0;background:none;box-shadow:none;border:0;max-height:none;overflow:visible}
html[lang] body #teamDialog .dialog-head{margin-bottom:4px}

/* Sélecteur de langue FR / EN (i18n.js) */
.lang-toggle{display:inline-grid;place-items:center;min-width:44px;height:40px;padding:0 10px;border-radius:12px;border:1px solid var(--vl-line,rgba(20,40,28,.14));background:var(--vl-surface,#fff);color:var(--vl-text,#14211a);font:700 13px/1 'DM Sans',system-ui,sans-serif;letter-spacing:.04em;cursor:pointer;flex:none}
.lang-toggle:hover{border-color:var(--vl-accent-text,#1f6b47)}
.lang-toggle:focus-visible{outline:2px solid var(--vl-accent-text,#1f6b47);outline-offset:2px}
html[data-theme=dark] .lang-toggle{background:rgba(255,255,255,.06);color:#eef5f0;border-color:rgba(255,255,255,.14)}
.lp-nav .lang-toggle,.lp-header .lang-toggle{background:transparent}
.track-shell .public-header .lang-toggle,.public-shell .public-header .lang-toggle{margin-left:auto}
