/* ==========================================================================
   COMPTOIR 7 — portail revendeur (application de téléphone, FR / AR)
   S'appuie sur comptoir.css (jetons, boutons, pastilles, cartons, toasts).
   ========================================================================== */

html, body { height: 100%; }
body.pr { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; background: var(--carton); }
.pr .demo-bar { flex: none; }

.stage {
  flex: 1 1 auto; min-height: 0; position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
  align-items: center; padding: 22px 24px;
  background:
    radial-gradient(900px 520px at 50% 118%, rgba(199, 154, 91, .45), transparent 62%),
    radial-gradient(640px 420px at 8% -10%, rgba(31, 58, 95, .14), transparent 60%),
    var(--carton);
}

/* ---------- Le téléphone -------------------------------------------------------------- */
.app {
  grid-column: 2; grid-row: 1; position: relative; isolation: isolate;
  display: flex; flex-direction: column; width: 100%; height: min(100%, 880px);
  background: var(--paper); border: 10px solid #0f1a28; border-radius: 54px; overflow: hidden; overflow: clip;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 0 0 5px rgba(255, 253, 249, .55), 0 50px 90px -40px rgba(18, 20, 23, .6), 0 22px 40px -24px rgba(18, 20, 23, .4);
}
.app[dir="rtl"] { font-family: var(--ar); }

.sb { flex: none; position: relative; display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 30px 0 34px; background: var(--depot); color: #fff; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; direction: ltr; }
.sb__island { position: absolute; left: 50%; top: 9px; width: 104px; height: 29px; margin-left: -52px; border-radius: 999px; background: #0f1a28; }
.sb__icons { display: flex; align-items: center; gap: 6px; }
.sb__icons svg { height: 12px; width: auto; fill: currentColor; }

/* En-tête bleu dépôt */
.ah { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px 10px; background: var(--depot); color: #fff; }
.ah__brand { display: inline-flex; min-width: 0; text-decoration: none; color: #fff; }
.ah__brand .logo-mark { width: 32px; height: 32px; }
.ah__brand .logo__word { font-size: 23px; }
.ah__right { display: flex; align-items: center; gap: 8px; }
.lang-btn { min-width: 52px; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); color: #fff; font-family: var(--ar); font-size: 15px; font-weight: 600; transition: background-color .2s; }
.app[dir="rtl"] .lang-btn { font-family: var(--ui); font-size: 13.5px; letter-spacing: .04em; }
.lang-btn:hover { background: rgba(255, 255, 255, .18); }
.ah__me { width: 40px; height: 40px; border-radius: 12px; background: var(--kraft); color: var(--ink); }

.badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--signal); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px var(--white); font-family: var(--ui); }
.badge--dot { min-width: 11px; width: 11px; height: 11px; padding: 0; }
.badge.is-pop { animation: pop .5s var(--ease); }
@keyframes pop { 0% { transform: scale(.4); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

.app__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; outline: none; position: relative; }
.view { padding: 0 16px 28px; }

/* Barre d'onglets */
.tabbar { flex: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px)); background: rgba(255, 253, 249, .97); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 56px; border-radius: 14px; color: var(--ink-3); font-size: 11.5px; font-weight: 650; text-decoration: none; transition: color .2s; }
.tabbar a > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar__ico { position: relative; display: grid; place-items: center; width: 54px; height: 30px; border-radius: 999px; transition: background-color .25s; }
.tabbar__ico .i { width: 22px; height: 22px; }
.tabbar__ico .badge { position: absolute; top: -4px; right: 4px; }
.app[dir="rtl"] .tabbar__ico .badge { right: auto; left: 4px; }
.tabbar a:hover { color: var(--ink); }
.tabbar a[aria-current="page"] { color: var(--depot); }
.tabbar a[aria-current="page"] .tabbar__ico { background: #dde5ef; }
.tabbar a[aria-current="page"] .i { stroke-width: 2.1; }
.app[dir="rtl"] .tabbar a { font-size: 12px; }

/* ---------- Éléments communs ------------------------------------------------------------ */
.sec { margin-top: 22px; }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sec__head h2 { font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.app[dir="rtl"] .sec__head h2 { font-weight: 700; }
.link { display: inline-flex; align-items: center; min-height: 40px; padding: 0; border: 0; background: none; color: var(--depot); font-size: 13.5px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; white-space: nowrap; }
.muted { color: var(--ink-3); font-size: 13px; }
.vh { padding: 18px 0 4px; }
.vh h1 { font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 32px; line-height: .95; text-transform: uppercase; letter-spacing: -.005em; }
.app[dir="rtl"] .vh h1 { font-family: var(--ar); font-weight: 700; font-size: 26px; text-transform: none; line-height: 1.25; }
.vh p { margin-top: 6px; font-size: 13.5px; color: var(--ink-3); }
.amount { font-family: var(--display); font-stretch: 72%; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.mono-s { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); letter-spacing: .02em; direction: ltr; unicode-bidi: isolate; }

/* Thumb produit (carton de couleur) */
.thumb { position: relative; display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 12px; background: var(--carton); overflow: hidden; }
.thumb svg { width: 46px; height: auto; }
.thumb__promo { position: absolute; left: 0; top: 0; padding: 2px 5px; border-radius: 0 0 8px 0; background: var(--signal); color: #fff; font-size: 10px; font-weight: 800; font-family: var(--ui); }

/* ---------- Accueil ------------------------------------------------------------------------ */
.band { margin: 0 -16px; padding: 10px 16px 70px; background: var(--depot); color: #fff; position: relative; overflow: hidden; }
.band::after { content: ""; position: absolute; right: -40px; bottom: -70px; width: 220px; height: 220px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, .04); }
.band__hello { font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 30px; line-height: 1; text-transform: uppercase; }
.app[dir="rtl"] .band__hello { font-family: var(--ar-display); font-stretch: 100%; text-transform: none; font-size: 30px; font-weight: 700; line-height: 1.3; }
.band__who { margin-top: 6px; font-size: 13.5px; color: rgba(255, 255, 255, .72); }
.band__who b { color: #fff; font-weight: 650; }

.enc { position: relative; z-index: 1; margin-top: -56px; padding: 16px 16px 14px; border-radius: 18px; background: var(--white); border: 1px solid var(--line); box-shadow: 0 18px 40px -22px rgba(18, 20, 23, .45); }
.enc__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.enc__lbl { font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.app[dir="rtl"] .enc__lbl { text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.enc__amt { display: block; margin-top: 2px; font-size: 40px; line-height: 1; }
.enc__of { margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.enc__ratio { flex: none; padding: 5px 9px; border-radius: 8px; background: var(--warn-soft); color: #8a5c00; font-family: var(--mono); font-size: 13px; font-weight: 600; direction: ltr; }
.enc__ratio.is-ok { background: var(--ok-soft); color: #1f7443; }
.enc__ratio.is-over { background: var(--red-soft); color: #9e2a1d; }
.gauge { position: relative; height: 14px; margin: 16px 0 26px; border-radius: 999px; background: var(--carton); overflow: visible; direction: ltr; }
.gauge__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, var(--ok), var(--warn) 80%, var(--signal)); transition: width .8s var(--ease); }
.gauge__pend { position: absolute; top: 0; bottom: 0; border-radius: 0 999px 999px 0; background: repeating-linear-gradient(-45deg, rgba(255, 106, 19, .55) 0 5px, rgba(255, 106, 19, .25) 5px 10px); transition: width .8s var(--ease), left .8s var(--ease); }
.gauge__cap { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); }
.gauge__cap::after { content: attr(data-l); position: absolute; top: 21px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.app[dir="rtl"] .gauge__cap::after { font-family: var(--ar); font-size: 10.5px; letter-spacing: 0; text-transform: none; }
.enc__hint { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; }
.enc__hint b { color: var(--ink); }
.enc__hint .i { width: 18px; height: 18px; color: var(--warn); margin-inline-end: 6px; vertical-align: -4px; display: inline-block; }
.enc__hint .link { min-height: 36px; }
.enc--over .enc__hint { color: #9e2a1d; }

.reorder { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 96px; margin-top: 14px; padding: 12px 16px 12px 10px; border: 0; border-radius: 18px; background: var(--signal); color: #fff; text-align: start; box-shadow: 0 16px 30px -16px rgba(232, 90, 6, .9), inset 0 -3px 0 rgba(0, 0, 0, .12); transition: transform .2s var(--ease), background-color .2s; overflow: hidden; }
.reorder:hover { background: var(--signal-2); }
.reorder:active { transform: scale(.985); }
.reorder__art { flex: none; display: grid; place-items: center; width: 82px; height: 74px; border-radius: 13px; background: rgba(255, 255, 255, .16); }
.reorder__art svg { width: 74px; height: auto; }
.reorder__txt { min-width: 0; flex: 1; }
.reorder__txt b { display: block; font-size: 16.5px; line-height: 1.2; font-weight: 750; }
.reorder__txt span { display: block; margin-top: 4px; font-size: 13px; color: rgba(255, 255, 255, .86); font-variant-numeric: tabular-nums; }
.reorder__rel { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.3; color: rgba(255, 255, 255, .78); }
.reorder__go { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.app[dir="rtl"] .reorder__go .i, .app[dir="rtl"] .arr { transform: scaleX(-1); }
.reorder::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .22) 45%, transparent 60%); transform: translateX(-100%); animation: sheen 3.6s 1.2s var(--ease) infinite; pointer-events: none; }
@keyframes sheen { 0%, 60% { transform: translateX(-100%); } 85%, 100% { transform: translateX(100%); } }

.next { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: var(--white); border: 1px solid var(--line); }
.next__ico { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 13px; background: #dde5ef; color: var(--depot); }
.next__ico .i { width: 24px; height: 24px; }
.next__txt { min-width: 0; }
.next__txt small { display: block; font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.app[dir="rtl"] .next__txt small { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.next__txt b { display: block; font-size: 17px; line-height: 1.25; }
.next__txt span { display: block; font-size: 13px; color: var(--ink-3); }

.promo { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px 14px 14px 16px; border-radius: 16px; background: linear-gradient(120deg, #f4e5cc, var(--carton)); border: 1px solid var(--carton-2); overflow: hidden; text-decoration: none; color: inherit; }
.promo__pct { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; background: var(--ink); color: var(--signal); font-size: 25px; transform: rotate(-4deg); }
.promo__txt { min-width: 0; flex: 1; }
.promo__txt small { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--kraft-2); }
.app[dir="rtl"] .promo__txt small { font-family: var(--ar); letter-spacing: 0; font-size: 12px; }
.promo__txt b { display: block; margin-top: 2px; font-size: 15px; line-height: 1.25; }
.promo__txt span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-2); }
.promo__txt s { color: var(--ink-3); }
.promo__txt span b { display: inline; margin: 0; font-size: inherit; }
.promo .btn { flex: none; }

.usual { display: flex; gap: 10px; margin: 0 -16px; padding: 2px 16px 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.usual::-webkit-scrollbar { display: none; }
.uc { flex: 0 0 142px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); }
.uc .thumb { width: 100%; height: 64px; }
.uc .thumb svg { width: 56px; }
.uc b { font-size: 13px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.uc__row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.uc__row .amount { font-size: 15px; }

.relq { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: #eef2f7; color: var(--depot); font-size: 13px; line-height: 1.4; }
.relq .i { width: 20px; height: 20px; margin-top: 1px; }

/* ---------- Suivi de commande ------------------------------------------------------------- */
.ord { margin-top: 12px; border-radius: 18px; background: var(--white); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); }
.ord__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 0; }
.ord__no { font-weight: 750; font-size: 14.5px; }
.ord__meta { font-size: 12.5px; color: var(--ink-3); }
.ord__total { font-size: 19px; }
.ostatus { position: relative; margin: 12px 14px 0; padding: 12px 12px 12px 14px; border-radius: 12px; background: #eef2f7; }
.ostatus b { display: block; font-size: 15.5px; line-height: 1.3; }
.ostatus p { margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.ostatus .btn { margin-top: 10px; }
.ostatus--validate { background: #fff4ea; padding-top: 18px; }
.ostatus--validate::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 12px 12px 0 0; background: repeating-linear-gradient(-45deg, var(--warn) 0 7px, var(--ink) 7px 14px); }
.ostatus--validate b { color: #b6460a; }
.ostatus--ok { background: var(--ok-soft); }
.ostatus--ok b { color: #1f7443; }
.ostatus--pay { background: var(--warn-soft); }
.ostatus--pay b { color: #7a4f00; }
.ostatus--refused { background: var(--red-soft); }
.ostatus--refused b { color: #9e2a1d; }
.ostatus--done { background: var(--carton); }
.ostatus.is-new-flash { animation: flash-ok 2.6s var(--ease); }
@keyframes flash-ok { 0%, 25% { box-shadow: 0 0 0 4px rgba(255, 106, 19, .45); transform: scale(1.015); } }
.waiting { display: inline-flex; gap: 4px; margin-inline-start: 6px; vertical-align: 2px; }
.waiting i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: wait 1.2s infinite ease-in-out; }
.waiting i:nth-child(2) { animation-delay: .15s; } .waiting i:nth-child(3) { animation-delay: .3s; }
@keyframes wait { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }

.trk { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 14px 8px 14px; }
.trk__s { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; font-size: 11px; font-weight: 650; color: var(--ink-3); line-height: 1.2; }
.trk__s::before { content: ""; position: absolute; top: 10px; right: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.app[dir="rtl"] .trk__s::before { right: auto; left: 50%; }
.trk__s:first-child::before { display: none; }
.trk__d { position: relative; z-index: 1; display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: var(--white); border: 2.5px solid var(--line-2); color: #fff; }
.trk__d .i { width: 13px; height: 13px; stroke-width: 3; }
.trk__l { display: block; max-width: 100%; overflow-wrap: anywhere; padding: 0 2px; }
@media (max-width: 370px) { .trk { padding-left: 0; padding-right: 0; } .trk__s { font-size: 10.5px; letter-spacing: -.01em; } .trk__l { padding: 0; overflow-wrap: normal; } }
.trk__s.is-done { color: var(--ink-2); }
.trk__s.is-done::before, .trk__s.is-cur::before { background: var(--depot); }
.trk__s.is-done .trk__d { background: var(--depot); border-color: var(--depot); }
.trk__s.is-cur { color: var(--ink); }
.trk__s.is-cur .trk__d { border-color: var(--signal); background: var(--signal); box-shadow: 0 0 0 5px rgba(255, 106, 19, .2); animation: beat 1.6s ease-in-out infinite; }
.trk__s.is-skip { color: var(--ink-3); }
.trk__s.is-skip .trk__d { background: var(--carton); border-color: var(--carton-2); color: var(--ink-3); }
.trk__s.is-skip::before { background: var(--depot); }
.trk__s.is-fail .trk__d { background: var(--red); border-color: var(--red); }
.trk__s.is-ok .trk__d { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 5px rgba(46, 158, 91, .18); animation: none; }
@keyframes beat { 0%, 100% { box-shadow: 0 0 0 4px rgba(255, 106, 19, .22); } 50% { box-shadow: 0 0 0 9px rgba(255, 106, 19, .06); } }
.ord__lines { padding: 0 14px 12px; }
.ord__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px dashed var(--line-2); font-size: 13px; color: var(--ink-3); }

/* ---------- Catalogue -------------------------------------------------------------------- */
.cartbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; margin: 0 -16px; padding: 8px 12px 8px 10px; background: rgba(246, 243, 238, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); min-height: 72px; }
.cartbar__pal { flex: none; display: flex; align-items: flex-end; gap: 0; height: 58px; direction: ltr; }
.cartbar__pal svg { height: 58px; width: auto; }
.cartbar__pal .more { align-self: center; margin-left: 4px; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.cartbar__txt { min-width: 0; flex: 1; }
.cartbar__txt b { display: block; font-size: 16px; }
.cartbar__txt span { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cartbar.is-empty .cartbar__pal { opacity: .55; }
.cartbar .btn { flex: none; }

.search { position: relative; margin-top: 12px; }
.search .i { position: absolute; top: 50%; left: 14px; margin-top: -10px; color: var(--ink-3); pointer-events: none; }
.app[dir="rtl"] .search .i { left: auto; right: 14px; }
.search input { width: 100%; height: 48px; padding: 0 14px 0 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--white); font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s; }
.app[dir="rtl"] .search input { padding: 0 44px 0 14px; }
.search input:focus { border-color: var(--depot); box-shadow: 0 0 0 3px rgba(31, 58, 95, .12); }
.chips { display: flex; gap: 8px; margin: 10px -16px 0; padding: 2px 16px 4px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); font-size: 13.5px; font-weight: 650; white-space: nowrap; transition: background-color .2s, color .2s, border-color .2s; }
.chip i { width: 9px; height: 9px; border-radius: 3px; background: var(--c, var(--kraft)); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip--promo { color: #b6460a; border-color: rgba(255, 106, 19, .45); }
.chip--promo[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: #fff; }

.famhead { display: flex; align-items: center; gap: 8px; margin: 22px 0 6px; font-family: var(--display); font-stretch: 72%; font-weight: 800; font-size: 17px; text-transform: uppercase; letter-spacing: .01em; }
.app[dir="rtl"] .famhead { font-family: var(--ar); font-weight: 700; text-transform: none; font-size: 16px; }
.famhead i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.famhead span { margin-inline-start: auto; font-family: var(--mono); font-stretch: 100%; font-size: 11px; font-weight: 400; color: var(--ink-3); }

.prod { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.prod__info { min-width: 0; }
.prod__name { font-size: 14.5px; font-weight: 650; line-height: 1.25; }
.prod__pack { margin-top: 1px; font-size: 12.5px; color: var(--ink-3); }
.prod__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; margin-top: 4px; }
.prod__price .amount { font-size: 17px; }
.prod__price s { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.prod__price small { font-size: 12px; color: var(--ink-3); }
.prod__pal { margin-top: 2px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.prod__pal.is-on { color: var(--ok); font-weight: 650; }
.prod__stock { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; padding: 2px 8px; border-radius: 6px; background: var(--warn-soft); color: #8a5c00; font-size: 11.5px; font-weight: 700; }
.prod__stock.is-out { background: var(--red-soft); color: #9e2a1d; }
.prod.is-flash { animation: flash 2.4s var(--ease); border-radius: 12px; }
.prod__promo { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px; background: var(--signal); color: #fff; font-size: 11px; font-weight: 800; font-family: var(--ui); }

/* Pas-à-pas des quantités */
.step { display: inline-flex; align-items: center; border-radius: 12px; background: var(--white); border: 1px solid var(--line-2); direction: ltr; }
.step button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--ink); border-radius: 12px; transition: background-color .15s; }
.step button:hover { background: var(--carton); }
.step button .i { width: 18px; height: 18px; stroke-width: 2.2; }
.step output { min-width: 30px; text-align: center; font-family: var(--display); font-stretch: 72%; font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums; }
.step.is-zero { border-color: transparent; background: transparent; }
.step.is-zero output, .step.is-zero [data-q="-1"] { display: none; }
.step.is-zero [data-q="1"] { background: var(--ink); color: #fff; }
.step.is-zero [data-q="1"]:hover { background: var(--depot); }
.step.has-q { border-color: var(--depot); box-shadow: 0 0 0 1px var(--depot); }

/* ---------- Panier ------------------------------------------------------------------------- */
.dock { position: relative; margin: 14px 0 0; padding: 16px 10px 12px; border-radius: 18px; background: linear-gradient(180deg, #ece3d3, #e2d3b9); overflow: hidden; }
.dock::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: repeating-linear-gradient(-45deg, var(--warn) 0 7px, var(--ink) 7px 14px); opacity: .9; }
.dock__pals { display: flex; justify-content: center; align-items: flex-end; gap: 2px; min-height: 120px; direction: ltr; }
.dock__pals svg { width: 31%; max-width: 128px; height: auto; }
.dock__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 8px; padding: 0 6px 6px; }
.dock__meta b { font-size: 15px; }
.dock__meta span { font-family: var(--mono); font-size: 12px; color: var(--ink-2); direction: ltr; unicode-bidi: isolate; }
.dock__quai { position: absolute; top: 10px; left: 14px; font-size: 13px; color: rgba(18, 20, 23, .32); letter-spacing: .06em; }
.app[dir="rtl"] .dock__quai { left: auto; right: 14px; }

.line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.line__name { font-size: 14px; font-weight: 650; line-height: 1.25; }
.line__sub { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.line__sub .tag { height: 20px; font-size: 11px; margin-inline-start: 4px; }
.line__right { display: flex; align-items: center; gap: 10px; }
.line__tot { display: block; margin-top: 3px; font-size: 16px; }

.totrow { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 0 4px; }
.totrow b { font-size: 15px; }
.totrow .amount { font-size: 28px; }

.encbox { margin-top: 14px; padding: 14px; border-radius: 16px; background: var(--white); border: 1px solid var(--line); }
.encbox dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; margin: 0; font-size: 13.5px; }
.encbox dt { color: var(--ink-3); }
.encbox dd { margin: 0; text-align: end; font-weight: 650; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.encbox dd.is-plus { color: #b6460a; }
.encbox .rule { grid-column: 1 / -1; height: 1px; margin: 2px 0; background: var(--line); }
.encbox .sum { color: var(--ink) !important; font-weight: 750; }
.encbox .gauge { margin-top: 22px; }

.notice { position: relative; display: flex; gap: 10px; margin-top: 12px; padding: 16px 14px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; }
.notice .i { width: 22px; height: 22px; margin-top: 1px; }
.notice--over { background: #fff1e6; color: #8f3a07; border: 1px solid rgba(255, 106, 19, .35); overflow: hidden; }
.notice--over::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: repeating-linear-gradient(-45deg, var(--warn) 0 7px, var(--ink) 7px 14px); }
.notice--over b { color: #b6460a; }
.notice--ok { background: var(--ok-soft); color: #1f5f39; }
.notice.is-in { animation: notice-in .6s var(--spring); }
@keyframes notice-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }

.dlv { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #eef2f7; }
.dlv .i { width: 22px; height: 22px; color: var(--depot); }
.dlv b { display: block; font-size: 14.5px; }
.dlv span { display: block; font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }

.field { display: grid; gap: 6px; margin-top: 14px; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field textarea { min-height: 64px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--white); font-size: 16px; font-weight: 400; resize: vertical; outline: none; }
.field textarea:focus { border-color: var(--depot); }

.sendbar { position: sticky; bottom: 0; z-index: 4; margin: 16px -16px -28px; padding: 12px 16px 16px; background: linear-gradient(180deg, rgba(246, 243, 238, 0), var(--paper) 30%); }
.sendbar .btn { width: 100%; min-height: 58px; font-size: 16.5px; border-radius: 14px; }
.sendbar .btn .amount { font-size: 18px; opacity: .92; }

.ord__part { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 8px 0 2px; font-size: 13px; color: var(--ink-2); }
.empty { display: grid; justify-items: center; gap: 8px; padding: 30px 12px 10px; text-align: center; }
.empty svg.pallet { width: 150px; }
.empty b { font-size: 17px; }
.empty p { max-width: 30ch; font-size: 13.5px; color: var(--ink-3); }
.empty .btn { margin-top: 8px; max-width: 100%; white-space: normal; text-align: center; line-height: 1.25; padding-top: 10px; padding-bottom: 10px; }

/* ---------- Commandes et factures ------------------------------------------------------------ */
.hrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: start; min-height: 64px; }
.hrow__ico { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--carton); color: var(--kraft-2); }
.hrow__ico .i { width: 21px; height: 21px; }
.hrow__ico.is-ok { background: var(--ok-soft); color: var(--ok); }
.hrow__ico.is-warn { background: var(--warn-soft); color: #8a5c00; }
.hrow__ico.is-red { background: var(--red-soft); color: var(--red); }
.hrow__ico.is-new { background: var(--signal-soft); color: var(--signal-2); }
.hrow__main { min-width: 0; flex: 1; }
.hrow__main b { display: block; font-size: 14.5px; line-height: 1.25; }
.hrow__main span { display: block; margin-top: 1px; font-size: 12.5px; color: var(--ink-3); }
.hrow__main .tag { display: inline-flex; margin-top: 5px; height: 21px; font-size: 11px; }
.hrow__side { flex: none; text-align: end; }
.hrow__side .amount { display: block; font-size: 16px; }
.hrow__side small { display: block; font-size: 11.5px; color: var(--ink-3); }
.hrow > .i { width: 16px; height: 16px; color: var(--ink-3); }

.restcard { margin-top: 14px; padding: 18px 16px; border-radius: 18px; background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.restcard::after { content: "7"; position: absolute; right: -6px; bottom: -48px; font-family: var(--display); font-stretch: 62%; font-weight: 800; font-size: 190px; line-height: 1; color: rgba(255, 255, 255, .05); }
.app[dir="rtl"] .restcard::after { right: auto; left: -6px; }
.restcard small { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.app[dir="rtl"] .restcard small { text-transform: none; letter-spacing: 0; }
.restcard .amount { display: block; margin-top: 4px; font-size: 42px; line-height: 1; color: #fff; }
.restcard p { margin-top: 8px; max-width: 34ch; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .74); position: relative; z-index: 1; }
.restcard .gauge { background: rgba(255, 255, 255, .14); margin-top: 26px; }
.restcard .gauge__cap { background: #fff; }
.restcard .gauge__cap::after { color: rgba(255, 255, 255, .6); }

.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-top: 16px; padding: 4px; border-radius: 12px; background: var(--carton); }
.seg button { min-height: 44px; border: 0; border-radius: 9px; background: none; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: 0 2px 8px -4px rgba(18, 20, 23, .35); }

/* ---------- Bannières « push » --------------------------------------------------------------- */
.pushes { position: absolute; top: 8px; left: 10px; right: 10px; z-index: 80; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.push {
  padding: 11px 13px 13px; border-radius: 22px; background: rgba(255, 253, 249, .93); border: 1px solid rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: 0 18px 40px -14px rgba(18, 20, 23, .55), 0 2px 6px rgba(18, 20, 23, .08);
  cursor: pointer; pointer-events: auto; user-select: none; -webkit-user-select: none;
  animation: push-in .64s cubic-bezier(.2, 1.3, .4, 1); transition: transform .35s var(--ease), opacity .35s;
}
.push.is-out { transform: translateY(-130%) !important; opacity: 0; }
@keyframes push-in { 0% { transform: translateY(-140%); opacity: 0; } 55% { transform: translateY(8px); opacity: 1; } 78% { transform: translateY(-3px); } 100% { transform: translateY(0); } }
.push__head { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.push__head .logo-mark { width: 18px; height: 18px; color: var(--depot); }
.push__app { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-family: var(--display); font-stretch: 70%; font-size: 13px; }
.push__time { margin-inline-start: auto; }
.push__body { display: flex; align-items: center; gap: 11px; margin-top: 8px; }
.push__ico { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 13px; background: var(--c-soft, var(--carton)); color: var(--c, var(--ink)); }
.push__ico .i { width: 22px; height: 22px; stroke-width: 2; }
.push__txt { min-width: 0; }
.push__txt b { display: block; font-size: 15.5px; line-height: 1.25; }
.push__txt span { display: -webkit-box; margin-top: 2px; overflow: hidden; font-size: 13px; line-height: 1.38; color: var(--ink-2); -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.push--ok { --c: var(--ok); --c-soft: var(--ok-soft); border: 1.5px solid var(--ok); }
.push--warn { --c: #9a6700; --c-soft: var(--warn-soft); border: 1.5px solid var(--warn); }
.push--red { --c: var(--red); --c-soft: var(--red-soft); border: 1.5px solid var(--red); }
.push--info { --c: var(--depot); --c-soft: #dde5ef; }
.push--signal { --c: var(--signal-2); --c-soft: var(--signal-soft); }
.push--ok .push__ico, .push--warn .push__ico, .push--red .push__ico { background: var(--c); color: #fff; animation: thump .7s ease .55s 2; }
@keyframes thump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.12); } }

/* Toasts dans le téléphone, au-dessus des onglets */
.app .toast-stack { position: absolute; left: 16px; right: 16px; bottom: 90px; z-index: 75; align-items: center; max-width: none; }
.app[data-view="panier"] .toast-stack { bottom: 172px; }
.app .toast { max-width: 100%; pointer-events: none; }
.app .toast--link { pointer-events: auto; }

/* ---------- Feuille (reçu, détail de commande) ------------------------------------------------- */
.sheet { position: absolute; inset: 0; z-index: 70; display: flex; flex-direction: column; justify-content: flex-end; visibility: hidden; overflow: hidden; }
.sheet.is-open { visibility: visible; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(15, 26, 40, .5); opacity: 0; transition: opacity .3s; }
.sheet__panel { position: relative; max-height: 90%; overflow-y: auto; padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 26px 26px 0 0; background: var(--white); box-shadow: 0 -20px 40px -20px rgba(0, 0, 0, .4); outline: none; transform: translateY(100%); transition: transform .38s var(--ease); overscroll-behavior: contain; }
.sheet.is-open .sheet__backdrop { opacity: 1; }
.sheet.is-open .sheet__panel { transform: none; }
.sheet__grip { display: block; width: 40px; height: 5px; margin: 0 auto 12px; border-radius: 99px; background: var(--line-2); }
.sheet__content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.sheet__title { font-size: 20px; font-weight: 750; }
.rcpt { padding: 16px; border-radius: 14px; background: #fbf8f2; border: 1px dashed var(--line-2); font-size: 13.5px; }
.rcpt__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px dashed var(--line-2); }
.rcpt__top .logo-mark { width: 30px; height: 30px; color: var(--depot); }
.rcpt dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; }
.rcpt dt { color: var(--ink-3); }
.rcpt dd { margin: 0; text-align: end; font-weight: 650; overflow-wrap: anywhere; }
.rcpt__amt { display: block; margin: 12px 0 6px; text-align: center; font-size: 40px; }
.rcpt__note { margin-top: 12px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.rcpt__stamp { display: block; width: max-content; margin: 10px auto 0; padding: 4px 12px; border: 2px solid var(--ok); border-radius: 8px; color: var(--ok); font-size: 18px; transform: rotate(-5deg); }
.dline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.dline small { grid-column: 1 / -1; color: var(--ink-3); font-size: 12px; }
.dline .tag { height: 20px; font-size: 11px; }

/* ---------- Côté gauche sur grand écran ------------------------------------------------------- */
.pitch { display: none; }
.pitch__title { margin-top: 18px; font-family: var(--display); font-stretch: 68%; font-weight: 800; font-size: 46px; line-height: .92; text-transform: uppercase; letter-spacing: -.005em; }
.pitch__title em { display: block; font-style: normal; color: var(--signal-2); }
.pitch__lede { margin-top: 16px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.pitch__list { display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.pitch__list li { position: relative; padding-left: 22px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.pitch__list li::before { content: ""; position: absolute; left: 0; top: .45em; width: 10px; height: 10px; border-radius: 2px; background: var(--kraft); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.pitch__list b { color: var(--ink); }
.pitch__links { display: grid; gap: 6px; margin-top: 22px; }
.pitch__links a { font-weight: 700; color: var(--depot); text-underline-offset: 3px; }

@media (min-width: 1100px) {
  .stage { column-gap: 64px; }
  .pitch { display: block; grid-column: 1; grid-row: 1; justify-self: end; align-self: center; width: 100%; max-width: 360px; max-height: 100%; overflow-y: auto; scrollbar-width: none; }
}
@media (min-width: 1100px) and (max-height: 760px) {
  .pitch__lede { display: none; }
  .pitch__title { font-size: 38px; }
}
@media (min-width: 561px) and (max-height: 720px) {
  .stage { padding-top: 12px; padding-bottom: 12px; }
  .sb { height: 34px; }
  .sb__island { top: 5px; height: 24px; }
}

/* ---------- Téléphone réel (ou cadre étroit) : plein écran ---------------------------------- */
@media (max-width: 560px) {
  .stage { display: block; padding: 0; background: var(--paper); }
  .app { height: 100%; border: 0; border-radius: 0; box-shadow: none; }
  .sb { display: none; }
  .ah { padding-top: max(10px, env(safe-area-inset-top)); }
}
@media (min-width: 561px) { .pushes { top: 48px; } }
@media (max-width: 370px) {
  .view { padding-left: 12px; padding-right: 12px; }
  .band, .usual, .chips, .cartbar { margin-left: -12px; margin-right: -12px; }
  .enc__amt { font-size: 34px; }
  .reorder__art { width: 66px; }
  .reorder__art svg { width: 60px; }
}

/* Dans un cadre (page « en direct ») : pas de bandeau, l'application occupe tout */
.is-embed .demo-bar, .is-embed .pitch, .is-embed .deco { display: none !important; }
.is-embed .stage { display: block; padding: 0; background: var(--paper); }
.is-embed .app { height: 100%; border: 0; border-radius: 0; box-shadow: none; }
.is-embed .sb { display: none; }
.is-embed .pushes { top: 8px; }
.ordlink { cursor: pointer; }
.ordlink .ord { transition: transform .2s var(--ease); }
.ordlink:active .ord { transform: scale(.99); }

/* Arabe : montants dans le sens de lecture, jauges de droite à gauche */
.app[dir="rtl"] .amount, .app[dir="rtl"] .encbox dd, .app[dir="rtl"] .prod__price s { direction: rtl; }
.app[dir="rtl"] .gauge { transform: scaleX(-1); }
.app[dir="rtl"] .gauge__cap::after { transform: translateX(-50%) scaleX(-1); }
@media (max-width: 380px) { .tabbar a { font-size: 10.5px; } .tabbar__ico { width: 46px; } }

/* Grand écran : la palette du quai 7, à droite du téléphone */
.deco { display: none; }
@media (min-width: 1100px) {
  .deco { display: flex; flex-direction: column; align-items: flex-start; grid-column: 3; grid-row: 1; align-self: center; justify-self: start; width: 100%; max-width: 360px; }
  .deco__quai { font-size: 64px; color: rgba(31, 58, 95, .22); line-height: .9; }
  .deco__quai b { color: rgba(255, 106, 19, .55); }
  .deco__pal { display: flex; align-items: flex-end; gap: 4px; width: 100%; min-height: 220px; margin-top: 18px; }
  .deco__pal svg { width: 50%; height: auto; }
  .deco__pal .more { font-family: var(--mono); font-size: 13px; color: var(--ink-3); align-self: center; }
  .deco__cap { margin-top: 12px; color: var(--ink-2); }
}
