/* ==========================================================================
   App de commande BEMY (Atout Beauté, Ma Beauté). Styles repris de l'app
   d'Andy & Co, à l'identique ; seules les couleurs changent : celles de la
   marque du client, données par config.js (variables posées sur <html> par
   DB.appliquerMarque). Les valeurs ci-dessous sont celles d'Atout Beauté.
   « red » garde son nom d'origine mais porte la couleur d'accent de la marque.
   ========================================================================== */

:root {
  --bg: #FBF8F4; /* blanc crème très léger */
  --soft: #F7F1EA; /* petits fonds (compteurs, vignettes) */
  --white: #FFFFFF;
  --ink: #411809;  /* brun du logo Atout Beauté */
  --ink-2: #5E3D2B;
  --muted: #7A6559;
  --line: #EEE6DD;
  --line-soft: #F6F1EB;
  --field: #DCCFC2;
  --red: #8A5A2B;  /* accent de la marque (caramel) */
  --red-dark: #6E4520;
  --red-soft: #F6ECE0;
  --red-tint: #F2DFC8;
  --danger: #A8322A; /* retirer, vider, erreurs */
  --danger-soft: #F8E7E4;
  --lav: #411809;
  --lav-soft: #F7F1EA;
  --lav-ink: #411809;
  --lav-mid: #5E3D2B;
  --head: #411809;  /* en-tête de l'accueil */
  --joy: linear-gradient(115deg, #5A3015 0%, #8F6C46 40%, #C49867 72%, #EDBC80 100%); /* dégradé or des titres du catalogue */
  --joy-shadow: rgba(90, 48, 21, 0.30);
  --page: #EFE9E2;
  --sceau: url('icons/sceau-atout-beaute.svg');
  --green: #2D7A3E;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: Figtree, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --app-w: 480px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-h: calc(64px + max(var(--safe-b), 14px));
  --rail: 0px; /* barre de navigation latérale (grand écran) */
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.no-scroll { overflow: hidden; }

#app {
  max-width: var(--app-w);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
}
@media (min-width: 520px) {
  #app { box-shadow: 0 0 0 1px var(--line), 0 20px 60px rgba(31, 26, 36, 0.08); }
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.35; }
img { display: block; max-width: 100%; }
h1, h2, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dt, dd { margin: 0; }

:focus-visible { outline: 3px solid var(--lav); outline-offset: 2px; border-radius: 6px; }

/* ---------- Mise en page ---------- */

.screen { padding-bottom: calc(var(--nav-h) + 36px); }
.screen.has-cartbar { padding-bottom: calc(var(--nav-h) + 110px); }
.screen.has-buybar { padding-bottom: calc(110px + var(--safe-b)); }
.screen.has-validate { padding-bottom: calc(var(--nav-h) + 100px); }
.screen.has-confirm { padding-bottom: calc(130px + var(--safe-b)); }

.pad-16 { padding: 16px; }
.pad-20 { padding: 20px; }
.pad-home { padding: 12px 20px 0; }
.pad-list { padding: 8px 16px 0; }
.pad-cart { padding: 12px 16px 0; }

.col { display: flex; flex-direction: column; }
.row { display: flex; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.row-between.baseline { align-items: baseline; }
.row-baseline { display: flex; align-items: baseline; gap: 6px; }
.center { align-items: center; justify-content: center; }
.center-y { align-items: center; }
.start { align-items: flex-start; }
.text-center { text-align: center; }
.grow { flex-grow: 1; }
.shrink0 { flex-shrink: 0; }
.minw0 { min-width: 0; }
.rel { position: relative; }
.mt-4 { margin-top: 4px; }
.mt-auto { margin-top: auto; }
.px-20 { padding-left: 20px; padding-right: 20px; }

.gap-1 { gap: 1px; } .gap-2 { gap: 2px; } .gap-4 { gap: 4px; } .gap-6 { gap: 6px; }
.gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-14 { gap: 14px; } .gap-18 { gap: 18px; }

[class*="stack-"] { display: flex; flex-direction: column; }
.stack-6 { gap: 6px; } .stack-8 { gap: 8px; } .stack-10 { gap: 10px; } .stack-12 { gap: 12px; }
.stack-14 { gap: 14px; } .stack-16 { gap: 16px; } .stack-18 { gap: 18px; } .stack-20 { gap: 20px; }
.stack-22 { gap: 22px; } .stack-26 { gap: 26px; }

/* ---------- Typographie ---------- */

.serif { font-family: var(--serif); font-weight: 400; }
.h-24 { font-size: 24px; line-height: 28px; }
.h-26 { font-size: 26px; line-height: 30px; }
.h-30 { font-size: 30px; line-height: 34px; }
.h-32 { font-size: 32px; line-height: 36px; }
.h-34 { font-size: 34px; line-height: 38px; }

.t-xs { font-size: 11px; color: var(--muted); }
.t-sub { font-size: 12px; color: var(--muted); }
.t-sub-13 { font-size: 13px; color: var(--muted); }
.t-muted-14 { font-size: 14px; color: var(--muted); }
.t-muted-15 { font-size: 15px; color: var(--muted); }
.t-light { font-weight: 500; color: var(--muted); }
.t-name { font-size: 14px; font-weight: 700; line-height: 18px; }
.t-name-600 { font-size: 14px; font-weight: 600; line-height: 18px; }
.t-name-13 { font-size: 13px; font-weight: 700; line-height: 16px; }
.t-price { font-size: 16px; font-weight: 800; }
.t-price-sm { font-size: 14px; color: var(--ink); }
.t-price-14 { font-size: 14px; font-weight: 800; }
.t-price-15 { font-size: 15px; font-weight: 800; }
.t-ht { font-size: 11px; font-weight: 500; color: var(--muted); }
.t-strong { font-size: 15px; font-weight: 700; }
.t-strong-14 { font-size: 14px; font-weight: 800; line-height: 17px; }
.t-strong-15 { font-size: 15px; font-weight: 800; }
.t-strong-16 { font-size: 16px; font-weight: 800; }
.t-strong-17 { font-size: 17px; font-weight: 800; }
.t-strong-18 { font-size: 18px; font-weight: 800; line-height: 22px; }
.t-body { font-size: 15px; line-height: 22px; color: var(--ink-2); }
.t-body strong { font-weight: 700; color: var(--ink); }
.t-body-14 { font-size: 14px; color: var(--ink-2); }
.t-addr { font-size: 13px; line-height: 18px; color: var(--ink-2); }
.fw-800 { font-weight: 800 !important; }
.overline { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); }
.link-red { font-size: 14px; font-weight: 700; color: var(--red-dark); padding: 10px 0; }
.link-btn { height: 44px; padding: 0 4px; border: 0; background: transparent; font-size: 14px; font-weight: 700; color: var(--red-dark); }
.inline-link { border: 0; background: none; padding: 0; font-size: inherit; color: var(--ink); text-decoration: underline; }

/* ---------- Boutons ---------- */

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 14px; font-size: 16px; font-weight: 800; text-align: center;
}
.btn-54 { min-height: 54px; }
.btn-58 { min-height: 58px; border-radius: 16px; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:active { background: var(--red-dark); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-outline { background: var(--white); border: 1px solid var(--field); color: var(--ink); font-weight: 700; }
.btn.col { flex-direction: column; gap: 0; line-height: 18px; }
.t-btn { font-size: 15px; font-weight: 800; }
.t-btn-sub { font-size: 12px; font-weight: 600; color: var(--red-tint); }

.round-btn {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 999px; border: 0;
  background: var(--ink); color: var(--white);
  display: flex; align-items: center; justify-content: center;
}
.round-btn:active { transform: scale(0.94); }
.round-btn.on-tile { position: absolute; right: 8px; bottom: 8px; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent;
  display: flex; align-items: center; justify-content: center; color: var(--ink);
}
.icon-btn.on-light { background: var(--soft); }

.btn-dark-sm {
  min-height: 44px; padding: 0 12px; border-radius: 10px; background: var(--ink); color: var(--white);
  display: flex; align-items: center; font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.btn-outline-sm {
  min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--ink); background: var(--white);
  display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; flex-shrink: 0;
}

/* ---------- Champs ---------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; }
.field input, .field textarea {
  width: 100%; padding: 0 16px; border: 1px solid var(--field); border-radius: 14px;
  background: var(--white); font-size: 16px; color: var(--ink);
}
.field input { height: 50px; }
.field textarea { padding: 12px 14px; resize: vertical; min-height: 88px; }
.field input:focus, .field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--lav-soft); }

.search-box {
  display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px; color: var(--muted);
}
.search-box:focus-within { border-color: var(--ink); }
.search-box input {
  flex-grow: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--ink);
}
.search-box input::-webkit-search-cancel-button { cursor: pointer; }

.form-error {
  padding: 10px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-size: 14px; font-weight: 700;
}

/* ---------- Connexion ---------- */

.login { position: relative; min-height: 100vh; min-height: 100dvh; background: #411809; overflow: hidden; display: flex; flex-direction: column; }
.login-hero { position: absolute; inset: 0 0 auto 0; width: 100%; height: 360px; object-fit: cover; object-position: 50% 55%; }
.login-shade { position: absolute; inset: 0 0 auto 0; height: 200px; background: linear-gradient(180deg, rgba(20, 16, 28, 0.45), rgba(20, 16, 28, 0)); }
.login-logo { position: relative; z-index: 1; display: flex; justify-content: center; padding-top: 48px; height: 264px; }
.login-logo img { width: 164px; height: 56px; border-radius: 6px; box-shadow: 0 8px 24px rgba(20, 16, 28, 0.25); }
.login-sheet {
  position: relative; z-index: 1; flex-grow: 1;
  background: var(--bg); border-radius: 28px 28px 0 0;
  padding: 26px 24px calc(22px + var(--safe-b));
  display: flex; flex-direction: column; gap: 14px;
}
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px;
  padding: 0; border: 0; background: transparent; text-align: left;
}
.switch {
  width: 48px; height: 28px; flex-shrink: 0; border-radius: 999px; padding: 3px;
  display: flex; background: var(--field); justify-content: flex-start; transition: background 0.15s;
}
.switch.is-on { background: var(--green); justify-content: flex-end; }
.switch span { width: 22px; height: 22px; border-radius: 999px; background: var(--white); }
.help-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--white); border: 1px solid var(--line); font-size: 13px; line-height: 18px; color: var(--ink-2);
}
.help-card svg { flex-shrink: 0; color: var(--ink); }
.login-foot { margin-top: auto; text-align: center; font-size: 12px; color: var(--muted); }
/* Langue de l'écran de connexion : FR · EN */
.lang-switch { display: inline-flex; margin: -12px -10px -12px 0; }
.lang-btn {
  min-width: 44px; min-height: 44px; padding: 0 8px; border: 0; background: transparent;
  font: inherit; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); cursor: pointer;
}
.lang-btn.is-on { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* ---------- En-têtes ---------- */

.home-head { display: flex; align-items: center; justify-content: space-between; height: 48px; }
.logo-sm { height: 34px; width: 99px; border-radius: 4px; }
.avatar {
  width: 44px; height: 44px; border-radius: 999px; background: var(--ink); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.topbar { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; min-height: 56px; }
.topbar-title { display: flex; flex-direction: column; align-items: center; text-align: center; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; }
.cart-head { display: flex; align-items: flex-end; justify-content: space-between; padding: 4px 4px 0; }

/* ---------- Accueil ---------- */

.hscroll {
  display: flex; gap: 12px; margin: 0 -20px; padding: 0 20px 4px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.hcard { flex-shrink: 0; width: 156px; display: flex; flex-direction: column; gap: 8px; scroll-snap-align: start; }
.hcard-tile, .pcard-tile {
  position: relative; display: block; aspect-ratio: 1 / 1; background: var(--white);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.hcard-tile.is-in, .pcard-tile.is-in { border: 2px solid var(--ink); }
.hcard-tile img, .pcard-tile img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.chip-qty {
  position: absolute; top: 8px; left: 8px; padding: 4px 8px; border-radius: 999px;
  background: var(--ink); color: var(--white); font-size: 11px; font-weight: 800;
}

.panel {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 6px;
  background: var(--white); border: 1px solid var(--line); border-radius: 20px;
}
.panel.stack-12 { gap: 12px; padding-bottom: 16px; }
.best-list { margin-top: 4px; display: flex; flex-direction: column; }
.best-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.best-item:last-child { border-bottom: 0; }
.best-rank { width: 18px; flex-shrink: 0; font-size: 20px; color: var(--red-dark); text-align: center; }
.best-link { flex-grow: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.best-link img { width: 56px; height: 56px; flex-shrink: 0; border-radius: 12px; background: var(--bg); object-fit: contain; padding: 4px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mini-tile { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mini-tile img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.badge-stock { position: absolute; top: 6px; left: 6px; padding: 3px 7px; border-radius: 999px; background: #E7EFE4; color: #1E4D28; font-size: 10px; font-weight: 800; }

.sel-card {
  position: relative; height: 176px; border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; padding: 14px;
}
.sel-card > span { position: relative; z-index: 1; }
.sel-card img { position: absolute; right: 12px; bottom: 12px; width: 108px; height: 108px; object-fit: contain; padding: 6px; border-radius: 14px; background: var(--white); box-shadow: 0 4px 14px rgba(31, 26, 36, 0.08); }

.event-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--ink); color: var(--white); border-radius: 18px; }
.event-ico { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.12); display: flex; align-items: center; justify-content: center; }
.event-sub { font-size: 13px; color: #D9D3DD; }

/* ---------- Catalogue ---------- */

.promo {
  display: flex; align-items: center; gap: 14px; min-height: 104px; padding: 0 16px 0 18px;
  border-radius: 20px; background: var(--red); color: var(--white); overflow: hidden;
}
.promo-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red-tint); }
.promo-title { font-size: 26px; line-height: 28px; }
.promo-imgs { display: flex; }
.promo-imgs img { width: 64px; height: 64px; border-radius: 14px; background: var(--white); object-fit: contain; padding: 4px; }
.promo-imgs .rot-l { transform: rotate(-6deg); }
.promo-imgs .rot-r { transform: rotate(5deg); margin-left: -14px; }

.type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 12px; }
.type-tile { display: flex; flex-direction: column; gap: 8px; }
.type-tile .col { padding: 0 2px; }
.type-img { aspect-ratio: 1 / 1; border-radius: 22px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--white); border: 1px solid var(--line); }
/* Photo sur fond blanc, sans fusion de couleur : les couleurs du produit restent exactes */
.type-img img { width: 86%; height: 86%; object-fit: contain; }

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); padding: 0 4px; overflow-x: auto; }
.tab {
  height: 44px; border: 0; background: transparent; padding: 0; white-space: nowrap;
  border-bottom: 2.5px solid transparent; font-size: 15px; font-weight: 600; color: var(--muted);
}
.tab.is-active { border-bottom-color: var(--ink); font-weight: 800; color: var(--ink); }

.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
.pcard { display: flex; flex-direction: column; gap: 8px; }
.pcard-name { display: flex; flex-direction: column; gap: 2px; }
.pcard-buy { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.badge-new {
  position: absolute; top: 8px; left: 8px; background: var(--red); color: var(--white);
  font-size: 10px; font-weight: 800; letter-spacing: 0.06em; padding: 4px 8px; border-radius: 999px;
}
.stepper-dark {
  display: flex; align-items: center; justify-content: space-between; height: 44px;
  border-radius: 999px; background: var(--ink); color: var(--white);
}
.stepper-dark button { width: 44px; height: 44px; border: 0; background: transparent; color: var(--white); display: flex; align-items: center; justify-content: center; }
.stepper-dark span { font-size: 14px; font-weight: 800; }

.empty-inline { padding: 24px 16px; text-align: center; color: var(--muted); font-size: 14px; background: var(--white); border: 1px dashed var(--field); border-radius: 16px; }

.cartbar {
  position: fixed; z-index: 20; left: calc(50% + var(--rail) / 2); transform: translateX(-50%);
  bottom: calc(var(--nav-h) + 12px); width: calc(min(100%, var(--app-w)) - var(--rail) - 32px); min-height: 60px;
  border-radius: 18px; background: var(--red); color: var(--white);
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px;
  box-shadow: 0 10px 28px var(--joy-shadow);
}
.cartbar-meta { font-size: 12px; font-weight: 600; color: var(--red-tint); }
.cartbar-total { font-size: 17px; font-weight: 800; }
.cartbar-cta { height: 44px; padding: 0 16px; border-radius: 12px; background: var(--white); color: var(--red-dark); display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; }

/* ---------- Fiche produit ---------- */

.gallery { position: relative; background: var(--white); border-bottom: 1px solid var(--line); }
.gallery-main { height: 400px; display: flex; align-items: center; justify-content: center; padding: 32px 24px 16px; }
.gallery-main img { width: 100%; height: 100%; max-width: 336px; object-fit: contain; }
.gallery-top { position: absolute; top: 12px; left: 16px; right: 16px; display: flex; justify-content: space-between; }
.dot-badge {
  position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 999px;
  background: var(--red); color: var(--white); font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--white);
}
.thumbs { display: flex; gap: 10px; padding: 0 20px 16px; }
.thumb { width: 60px; height: 60px; padding: 4px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); }
.thumb.is-active { border: 2px solid var(--ink); }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.price-xl { font-size: 32px; font-weight: 800; }
.spec { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.spec dt { font-size: 14px; color: var(--muted); }
.spec dd { font-size: 15px; font-weight: 800; }
.in-cart { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px; background: #E7EFE4; color: #1E4D28; font-size: 14px; font-weight: 700; }

.buybar {
  position: fixed; z-index: 20; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, var(--app-w));
  background: var(--white); border-top: 1px solid var(--line);
  padding: 12px 16px calc(16px + var(--safe-b));
  display: flex; gap: 10px; align-items: center;
}
.stepper-light { display: flex; align-items: center; height: 54px; border-radius: 14px; border: 1px solid var(--field); background: var(--soft); }
.stepper-light button { width: 44px; height: 52px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.stepper-light .col { min-width: 62px; line-height: 16px; font-size: 15px; }

/* ---------- Panier ---------- */

.card-list { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.card-list > li { border-bottom: 1px solid var(--line-soft); }
.card-list > li:last-child { border-bottom: 0; }
.cart-line { display: flex; gap: 12px; padding: 14px 14px 14px 12px; }
.thumb-76 { width: 76px; height: 76px; object-fit: contain; border-radius: 12px; background: var(--bg); padding: 4px; }
.stepper-line { display: flex; align-items: center; height: 44px; border-radius: 12px; border: 1px solid var(--field); background: var(--soft); }
.stepper-line button { width: 40px; height: 42px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.stepper-line span { min-width: 44px; text-align: center; font-size: 14px; font-weight: 800; }

.totals { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; }
.totals dt { font-size: 14px; color: var(--muted); }
.totals dd { font-size: 14px; font-weight: 700; text-align: right; }
.totals .totals-final { padding-top: 12px; border-top: 1px solid var(--line-soft); }
.totals .totals-final dt { font-size: 16px; font-weight: 800; color: var(--ink); }
.totals .totals-final dd { font-size: 18px; font-weight: 800; }
.totals.in-recap { padding: 14px 0 0; border: 0; border-top: 1px solid var(--line-soft); border-radius: 0; gap: 10px; }

.validate-bar {
  position: fixed; z-index: 20; left: calc(50% + var(--rail) / 2); transform: translateX(-50%); width: calc(min(100%, var(--app-w)) - var(--rail));
  bottom: var(--nav-h); padding: 12px 16px; background: var(--bg); border-top: 1px solid var(--line);
}
.validate-bar .btn { justify-content: space-between; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .t-strong-16 { color: var(--ink); }
.empty .btn { align-self: stretch; margin-top: 8px; }

/* ---------- Validation ---------- */

.radio-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 16px;
  background: var(--white); text-align: left; border: 1px solid var(--line);
}
.radio-card.is-active { border: 2px solid var(--ink); padding: 13px 15px; }
.radio-ring { width: 22px; height: 22px; margin-top: 1px; border-radius: 999px; flex-shrink: 0; background: var(--white); border: 2px solid #B8AFA3; }
.radio-card.is-active .radio-ring { border: 7px solid var(--red); }
.choice {
  flex: 1; min-height: 48px; border-radius: 12px; border: 1px solid var(--field); background: var(--white);
  font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 10px;
}
.choice.is-active { border: 2px solid var(--ink); font-weight: 800; }
.info-card { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.pay-ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: #E7EFE4; color: #2D5A24; display: flex; align-items: center; justify-content: center; }
.recap { display: flex; flex-direction: column; gap: 14px; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.avatars { display: flex; }
.avatars img, .avatars .more { width: 44px; height: 44px; border-radius: 999px; background: var(--bg); border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--line); object-fit: contain; padding: 3px; }
.avatars .more { background: var(--line-soft); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.ml-12 { margin-left: -12px; }
.confirm-bar {
  position: fixed; z-index: 20; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, var(--app-w));
  padding: 12px 16px calc(16px + var(--safe-b)); background: var(--white); border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.confirm-bar .t-xs { text-align: center; font-size: 12px; }

/* ---------- Confirmation ---------- */

.confirm-screen {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; gap: 28px;
  padding: 72px 24px calc(34px + var(--safe-b));
}
.big-check {
  width: 88px; height: 88px; border-radius: 999px; background: var(--red); color: var(--white);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 10px var(--red-soft);
}
.sales-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--lav-soft); }
.sales-avatar { width: 44px; height: 44px; border-radius: 999px; background: var(--lav); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex-shrink: 0; }
.sales-name { font-size: 14px; font-weight: 800; color: var(--lav-ink); }
.sales-sub { font-size: 13px; color: var(--lav-mid); }
.sales-call { width: 44px; height: 44px; border-radius: 999px; background: var(--white); color: var(--lav-ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ---------- Compte ---------- */

.shop-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--ink); color: var(--white); border-radius: 18px; }
.shop-mono { width: 52px; height: 52px; border-radius: 14px; background: var(--red); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.shop-sub { font-size: 13px; color: #D9D3DD; }
.coll-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.coll-dot { width: 36px; height: 48px; border-radius: 6px; flex-shrink: 0; }
.coll-chip { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; font-size: 13px; font-weight: 800; line-height: 16px; }
.coll-chip img { width: 36px; height: 48px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }

.order-card { padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; }
.status { height: 24px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; white-space: nowrap; }
.st-new { background: var(--lav-soft); color: var(--lav-mid); }
.st-prep { background: #FDF0D5; color: #7A4B00; }
.st-ship { background: #E4EEF5; color: #164A70; }
.st-done { background: #E7EFE4; color: #2D5A24; }
.tracker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tracker li { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--muted); }
.tracker li span { height: 5px; border-radius: 999px; background: var(--line); }
.tracker li.is-done { font-weight: 700; color: var(--ink); }
.tracker li.is-done span { background: var(--ink); }

.menu-item {
  width: 100%; display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 10px 16px;
  border: 0; background: transparent; text-align: left; color: var(--ink);
}
.menu-item > svg:last-child { color: var(--muted); flex-shrink: 0; }
.menu-item.is-danger { color: var(--danger); }

/* ---------- Barre de navigation ---------- */

.tabbar {
  position: fixed; z-index: 30; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, var(--app-w));
  height: var(--nav-h); background: var(--white); border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; align-items: flex-start; padding: 6px 12px 0;
}
.nav-item {
  position: relative; width: 76px; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--muted); font-size: 11px; font-weight: 600;
}
.nav-item.is-active { color: var(--red); font-weight: 800; }
.nav-badge {
  position: absolute; top: 2px; right: 14px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--red); color: var(--white); font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--white);
}

/* ---------- Feuilles, messages ---------- */

.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(31, 26, 36, 0.55); }
.sheet {
  position: fixed; z-index: 41; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, var(--app-w));
  max-height: 85vh; overflow-y: auto;
  background: var(--bg); border-radius: 28px 28px 0 0; padding: 12px 20px calc(24px + var(--safe-b));
  display: flex; flex-direction: column; gap: 18px; animation: sheet-in 0.2s ease-out;
}
.grabber { align-self: center; width: 40px; height: 5px; border-radius: 999px; background: var(--field); }
.sheet-img { width: 72px; height: 72px; object-fit: contain; border-radius: 14px; background: var(--white); border: 1px solid var(--line); padding: 4px; flex-shrink: 0; }
.sheet .info-card { align-items: flex-start; }
/* Notifications : cloche de l'accueil, liste, réglages */
.home-bell { position: relative; width: 44px; height: 44px; margin-left: auto; margin-right: 8px; border: 0; border-radius: 999px; background: var(--white); color: var(--ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.home-bell-dot { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--red); color: var(--white); border: 2px solid var(--ink); font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); text-align: left; color: var(--ink); }
.notif-item.is-unread { border-color: var(--ink); }
.notif-item > svg:last-child { align-self: center; color: var(--muted); flex-shrink: 0; }
.notif-type { width: 36px; height: 36px; flex-shrink: 0; border-radius: 999px; background: var(--soft); display: flex; align-items: center; justify-content: center; }
.push-state { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 16px; background: var(--soft); font-size: 14px; line-height: 19px; }
.push-state svg { flex-shrink: 0; margin-top: 1px; }
.push-state.is-on { background: #E7EFE4; color: #1E4D28; font-weight: 700; }

/* Avant de confirmer : best-sellers proposés dans une feuille à mi-hauteur */
.sheet.is-half { max-height: 50vh; max-height: 50dvh; gap: 12px; padding-bottom: calc(16px + var(--safe-b)); }
.upsell-row { display: flex; align-items: stretch; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; margin: 0 -20px; padding: 0 20px 4px; scrollbar-width: none; flex-shrink: 1; min-height: 0; }
.upsell-row::-webkit-scrollbar { display: none; }
.upsell-card { flex: 0 0 124px; display: flex; flex-direction: column; gap: 4px; scroll-snap-align: start; }
.upsell-img { display: block; width: 124px; height: 92px; background: var(--white); margin-bottom: 4px; }
.upsell-img img { width: 100%; height: 100%; object-fit: contain; }
.upsell-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px; }
.upsell-card .t-xs { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upsell-plus, .upsell-step { margin-top: auto; height: 40px; flex-shrink: 0; }
.upsell-plus { width: 100%; border: 0; border-radius: 999px; background: var(--ink); color: var(--white); display: flex; align-items: center; justify-content: center; }
.upsell-plus:active { transform: scale(0.96); }
.upsell-step button { width: 40px; height: 40px; }
.upsell-go { flex-shrink: 0; }
.login-foot .inline-link { color: inherit; }
.privacy .privacy-title, .privacy .maj { display: none; }
.privacy h3 { margin: 8px 0 -4px; font-size: 15px; font-weight: 800; color: var(--ink); }
.privacy ul { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-left: 18px; list-style: disc; }
.privacy a { text-decoration: underline; }

/* Bon de commande affiché dans l'app (le même document que le PDF, mis à l'échelle du téléphone) */
.bon-view { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 16px 14px; overflow-x: auto; font-size: 12px; line-height: 1.4; color: var(--ink); }
.bon-view .bon-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.bon-view .bon-ent { display: flex; flex-direction: column; gap: 4px; }
.bon-view .bon-ent img { width: 96px; height: auto; }
.bon-view .bon-ent p { margin: 0; font-size: 10px; color: var(--ink-2); }
.bon-view .bon-title { text-align: right; }
.bon-view .bon-title h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 20px; line-height: 24px; }
.bon-view .bon-title p { margin: 2px 0 0; font-size: 11px; }
.bon-view .bon-refus { margin: 10px 0 0; padding: 6px 10px; border: 2px solid var(--danger); color: var(--danger); font-weight: 800; font-size: 11px; }
.bon-view .bon-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0; }
.bon-view .bon-cols h2 { margin: 0 0 3px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.bon-view .bon-cols p { margin: 0; overflow-wrap: anywhere; }
.bon-view .bon-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.bon-view .bon-table th { text-align: left; font-size: 9.5px; font-weight: 700; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--ink); padding: 5px 3px; }
.bon-view .bon-table td { border-bottom: 1px solid var(--line); padding: 5px 3px; vertical-align: top; }
.bon-view .r { text-align: right; white-space: nowrap; }
.bon-view .bon-totals { margin: 10px 0 0 auto; border-collapse: collapse; min-width: 62%; }
.bon-view .bon-totals td { padding: 3px; }
.bon-view .bon-totals tr.b td { font-weight: 800; font-size: 13px; border-top: 1px solid var(--ink); }
.bon-view .bon-note { margin: 12px 0 0; font-size: 11px; color: var(--ink-2); }
@keyframes sheet-in { from { transform: translate(-50%, 24px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

.toast {
  position: fixed; z-index: 50; left: 50%; bottom: calc(var(--nav-h) + 84px);
  transform: translate(-50%, 12px); max-width: calc(min(100%, var(--app-w)) - 32px);
  padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--white);
  font-size: 14px; font-weight: 700; text-align: center;
  box-shadow: 0 10px 28px rgba(31, 26, 36, 0.25);
  opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.18s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Pop d'une notification nouvelle : bandeau en haut de l'écran, comme celui du téléphone */
.notif-pop {
  position: fixed; z-index: 60; left: 50%; top: calc(var(--safe-t, 0px) + 10px);
  width: calc(min(100%, var(--app-w)) - 20px); max-width: 440px;
  display: flex; align-items: flex-start; gap: 4px; padding: 4px;
  border-radius: 20px; background: rgba(255, 255, 255, 0.96); color: var(--ink);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: 0 0 0 1px rgba(31, 26, 36, 0.06), 0 12px 32px rgba(31, 26, 36, 0.18);
  transform: translate(-50%, calc(-100% - var(--safe-t, 0px) - 24px)); opacity: 0; pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.15), opacity 0.2s;
}
.notif-pop.is-visible { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.notif-pop-main { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 12px; padding: 10px 4px 10px 10px; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.notif-pop-ico { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; background: var(--lav-soft); color: var(--lav); display: flex; align-items: center; justify-content: center; }
.notif-pop-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.notif-pop-head strong { flex: 1; min-width: 0; font-size: 15px; line-height: 20px; }
.notif-pop-head .t-xs { flex-shrink: 0; }
.notif-pop-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 19px; color: var(--ink-2, var(--ink)); }
.notif-pop-x { width: 36px; height: 36px; flex-shrink: 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .notif-pop { transition: opacity 0.2s; } }

/* ---------- V2 : messages, règles de vente, suivi ---------- */

.notif { display: flex; align-items: flex-start; gap: 12px; padding: 14px 8px 14px 14px; border-radius: 16px; background: var(--lav-soft); color: var(--lav-ink); }
.notif-ico { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: var(--white); color: var(--lav); display: flex; align-items: center; justify-content: center; }
.notif .t-body-14 { color: var(--lav-ink); font-weight: 600; line-height: 19px; }
.notif-x { width: 44px; height: 44px; margin: -8px 0; flex-shrink: 0; border: 0; border-radius: 999px; background: transparent; color: var(--lav-mid); display: flex; align-items: center; justify-content: center; }
.mt-neg { margin-top: -6px; }

.warn { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #FDF0D5; color: #5C3A00; font-size: 14px; line-height: 19px; }
.warn svg { flex-shrink: 0; margin-top: 1px; }
.totals .totals-hint { margin-top: -6px; }
.totals .totals-hint dt { font-size: 12px; font-weight: 700; color: var(--green); }

.st-refused { background: var(--danger-soft); color: var(--danger); }
.order-note { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: 13px; line-height: 18px; color: var(--ink-2); }
.order-note svg { flex-shrink: 0; color: var(--muted); }
.order-note.is-refused { background: var(--danger-soft); color: var(--danger); }
.order-note.is-refused svg { color: var(--danger); }

.cgv { display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.bon-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }

.loading { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; }
.loading .btn { align-self: stretch; }
.apercu-bar { position: sticky; top: 0; z-index: 35; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; background: var(--lav); color: var(--white); font-size: 13px; }
/* Compte commercial : client pour qui il commande, rappelé en haut de chaque écran */
.rep-bar { top: var(--safe-t, 0px); justify-content: flex-start; padding: 6px 8px 6px 14px; font-size: 14px; }
.rep-bar > svg { flex-shrink: 0; }
.rep-bar-change { flex-shrink: 0; min-height: 36px; display: inline-flex; align-items: center; padding: 0 14px; margin-left: auto; border-radius: 999px; background: rgba(255, 255, 255, 0.18); color: var(--white); font-weight: 700; font-size: 13px; text-decoration: none; }
.rep-bar-change:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.clamp-1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-pick.is-current { background: var(--lav-soft); }
.client-pick.is-current > svg:last-child { color: var(--lav); }

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

/* ==========================================================================
   iPad et ordinateur. Rien ici ne s'applique sous 768 px de large :
   l'affichage téléphone reste celui du dessus.
   ========================================================================== */

@media (min-width: 768px) {
  :root { --app-w: 1240px; --gutter: 32px; }

  .pad-home { padding: 28px var(--gutter) 0; max-width: 1104px; margin: 0 auto; }
  .pad-16 { padding: 28px var(--gutter); }
  .pad-list { padding: 20px var(--gutter) 0; }
  .pad-cart { padding: 28px var(--gutter) 0; max-width: 760px; margin: 0 auto; }
  .has-confirm .pad-list { max-width: 760px; margin: 0 auto; }
  .empty { padding: 72px 20px; max-width: 520px; margin: 0 auto; }
  .empty .btn { align-self: center; padding: 0 32px; }

  /* Accueil */
  .hscroll { margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scroll-padding-inline: var(--gutter); }
  .hcard { width: 188px; }
  .grid-2 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
  .grid-3 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
  .sel-card { height: 200px; padding: 18px; }
  .sel-card img { width: 128px; height: 128px; }

  /* Catalogue */
  .type-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px 18px; }
  .pgrid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 26px 18px; }
  .promo { min-height: 120px; padding: 0 28px; }
  .promo-imgs img { width: 76px; height: 76px; }
  .cartbar { width: min(560px, calc(min(100%, var(--app-w)) - var(--rail) - 64px)); }

  /* Fiche produit : photos à gauche, achat à droite */
  .product-main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; align-items: start; max-width: 1120px; margin: 0 auto; padding: 24px var(--gutter) 48px; }
  .product-main .gallery { position: sticky; top: 24px; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
  .product-main .gallery-main { height: min(520px, 62vh); padding: 56px 32px 20px; }
  .product-main .gallery-main img { max-width: 100%; }
  .product-main .pad-20 { padding: 8px 0 0; }
  .product-main .buybar {
    position: static; transform: none; width: auto; padding: 18px; margin-top: 4px;
    border: 1px solid var(--line); border-radius: 18px;
  }

  /* Panier, validation, compte : colonne centrée, barres du bas alignées dessus */
  .validate-bar .btn { max-width: 696px; margin: 0 auto; }
  .confirm-bar { align-items: center; }
  .confirm-bar > * { width: 100%; max-width: 696px; }
  .coll-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .confirm-screen { max-width: 600px; margin: 0 auto; padding-top: 96px; }

  /* Connexion : carte centrée sur la photo */
  .login { align-items: center; justify-content: center; padding: 48px 24px; }
  .login-hero { height: 100%; object-position: 50% 50%; }
  .login-shade { height: 100%; background: linear-gradient(180deg, rgba(20, 16, 28, 0.5), rgba(20, 16, 28, 0.2)); }
  .login-logo { height: auto; padding: 0 0 28px; }
  .login-sheet { flex-grow: 0; width: 100%; max-width: 460px; border-radius: 28px; padding: 32px 32px 24px; box-shadow: 0 30px 80px rgba(20, 16, 28, 0.3); }
  .login-foot { margin-top: 4px; }

  /* Barre du bas resserrée au centre */
  .tabbar { justify-content: center; gap: 56px; }

  /* Feuilles du bas -> fenêtres centrées */
  .sheet {
    top: 50%; bottom: auto; width: min(560px, calc(100% - 48px)); max-height: min(85vh, 760px);
    border-radius: 24px; padding: 24px 28px 28px; transform: translate(-50%, -50%); animation-name: dialog-in;
  }
  .grabber { display: none; }
  .sheet.is-half { top: auto; bottom: 0; width: min(100%, var(--app-w)); max-height: 50vh; border-radius: 28px 28px 0 0; padding: 12px 20px calc(16px + var(--safe-b)); transform: translateX(-50%); animation-name: sheet-in; }
  .toast { bottom: calc(var(--nav-h) + 96px); }
}

@keyframes dialog-in { from { transform: translate(-50%, calc(-50% + 16px)); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }

/* Grand écran (iPad à l'horizontale, ordinateur) : navigation sur le côté */
@media (min-width: 1024px) {
  #app.has-nav { --rail: 112px; --nav-h: 0px; display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); align-items: start; }
  #app.has-nav > .apercu-bar, #app.has-nav > main { grid-column: 2; }
  #app.has-nav > .tabbar {
    grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 0; left: auto; transform: none;
    width: auto; height: 100vh; height: 100dvh; flex-direction: column; justify-content: flex-start; align-items: center;
    gap: 6px; padding: 28px 0; border-top: 0; border-right: 1px solid var(--line);
  }
  #app.has-nav .nav-item { width: 88px; height: 70px; border-radius: 16px; font-size: 12px; }
  #app.has-nav .nav-item.is-active { background: var(--red-soft); }
  #app.has-nav .nav-badge { top: 6px; right: 16px; }
  .grid-3 { gap: 16px; }
  .pcard-name .t-name { font-size: 15px; line-height: 19px; }
}

/* Souris ou trackpad : retour visuel au survol (sans effet sur téléphone) */
@media (hover: hover) and (min-width: 768px) {
  .pcard-tile:hover, .hcard-tile:hover, .mini-tile:hover { border-color: var(--field); box-shadow: 0 6px 18px rgba(31, 26, 36, 0.07); }
  .type-tile:hover .type-img { border-color: var(--field); box-shadow: 0 6px 18px rgba(31, 26, 36, 0.07); }
  .nav-item:hover { color: var(--ink); }
  .nav-item.is-active:hover { color: var(--red); }
  .menu-item:hover, .best-item:hover { background: var(--line-soft); }
  .btn-red:hover { background: var(--red-dark); }
}

/* Badge « Powered by Netlify » : désactivé dans les réglages du site, masqué aussi au cas où il reviendrait */
#nl-badge-frame { display: none !important; }

/* App iPhone (App Store) : la page commence sous l'heure et la batterie, sur fond blanc,
   comme l'app ajoutée à l'écran d'accueil depuis Safari */
html.is-native { --safe-t: env(safe-area-inset-top, 0px); }
html.is-native body { padding-top: var(--safe-t); }
html.is-native body::before { content: ''; position: fixed; z-index: 39; top: 0; left: 0; right: 0; height: var(--safe-t); background: #FFFFFF; }
html.is-native #app, html.is-native .login, html.is-native .loading, html.is-native .confirm-screen { min-height: calc(100dvh - var(--safe-t)); }

/* ---------- Stock Odoo : état seulement (« Stock limité », « En rupture ») ---------- */

.tag-stock { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; line-height: 1.1; }
.tag-stock.is-out { background: #4A4450; color: var(--white); }
.tag-stock.is-low { background: #FDF0D5; color: #5C3A00; }
.pcard-tile .tag-stock, .hcard-tile .tag-stock { position: absolute; left: 8px; bottom: 8px; }
.pcard-tile.is-out img, .hcard-tile.is-out img, .cart-line.is-out .thumb-76 { opacity: 0.45; filter: grayscale(1); }
.cart-line .tag-stock { align-self: flex-start; }
.round-btn.is-off { background: var(--line); color: #8E8592; }
.stepper-dark button:disabled, .stepper-line button:disabled { opacity: 0.35; }
.stock-note { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 700; line-height: 19px; }
.stock-note svg { flex-shrink: 0; margin-top: 1px; }
.stock-note.is-out { background: #EEEAEF; color: #3B3540; }
.stock-note.is-low { background: #FDF0D5; color: #5C3A00; }
.btn-off { background: var(--line); color: #675F6B; }
.stock-remove { align-self: flex-start; min-height: 44px; padding: 0 14px; font-size: 14px; }
