/*
 * style.css — design system « Social Club » v2 (SPEC-V2 §1) : mobile-first, noir profond,
 * vert néon (#00e676) + accents dorés, glassmorphism, animations fluides (60 fps, transform/opacity),
 * prefers-reduced-motion respecté. Rôle : styles de la SPA rendue par app.js + portail âge + onglets.
 */

/* ============ Variables ============ */
:root {
  --bg: #05060a;
  --bg-2: #0b0e14;
  --ink: #f2f6f4;
  --muted: #9fb0a8;
  --faint: #65756e;

  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.09);
  --surface-3: rgba(255, 255, 255, 0.14);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(0, 230, 118, 0.35);

  --neon: #00e676;
  --neon-2: #69ffab;
  --neon-deep: #00b254;
  --gold: #ffd54f;
  --gold-deep: #d4af37;
  --grad: linear-gradient(118deg, var(--neon), var(--gold) 88%);
  --grad-soft: linear-gradient(118deg, rgba(0, 230, 118, 0.16), rgba(212, 175, 55, 0.12));
  --neon-shadow: 0 4px 18px rgba(0, 230, 118, 0.35);

  --ok: #69ffab;
  --bad: #ff6b6b;

  --r: 18px;
  --r-sm: 13px;
  --r-lg: 24px;

  --shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 4px 18px rgba(0, 0, 0, 0.35);

  --appbar-h: 58px;
  --tabbar-h: 64px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0.16, 1);
}

/* ============ Reset ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, 'Flag Emoji', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;                     /* ambiance app ; réautorisée sur les champs */
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: var(--neon); text-decoration: none; }
input, textarea, select { font: inherit; }
h1, h2, h3 { line-height: 1.18; }
img { display: block; max-width: 100%; }
::selection { background: rgba(0, 230, 118, 0.35); }
.linkish { color: var(--neon); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }

/* ============ Fond : halos néon derriere les surfaces en verre ============ */
.glow {
  position: fixed; border-radius: 50%; filter: blur(90px);
  pointer-events: none; z-index: 0; opacity: 0.45;
}
.glow-a {
  width: 62vw; height: 62vw; top: -24vw; right: -18vw;
  background: radial-gradient(circle, rgba(0, 230, 118, 0.5), transparent 68%);
  animation: drift 17s ease-in-out infinite alternate;
}
.glow-b {
  width: 55vw; height: 55vw; bottom: -20vw; left: -16vw;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.4), transparent 68%);
  animation: drift 21s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-6vw, 4vh, 0) scale(1.15); }
}

/* ============ Portail âge 18+ ============ */
.gate {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  background: radial-gradient(120% 90% at 50% 0%, #0d1512 0%, var(--bg) 60%);
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}
html.age-pending .gate, html.age-refused .gate { display: flex; }
html.age-pending .appbar, html.age-pending .views, html.age-pending .tabbar,
html.age-pending .cart-fab, html.age-refused .appbar, html.age-refused .views, html.age-refused .tabbar { visibility: hidden; }
html.age-pending .gate-leaf, html.age-pending .glow { /* le halo reste visible : ambiance */ }
.gate-card {
  width: min(430px, 100%); text-align: center;
  padding: 34px 26px 26px; border-radius: var(--r-lg);
  background: rgba(13, 18, 15, 0.72);
  -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--line);
  box-shadow: 0 0 80px rgba(0, 230, 118, 0.12), var(--shadow);
  animation: gate-in 0.5s var(--ease-out) both;
}
@keyframes gate-in { from { opacity: 0; transform: translateY(22px) scale(0.96); } }
.gate-leaf { font-size: 2.9rem; animation: sway 4.5s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
.gate-brand {
  margin-top: 10px; font-size: 1.5rem; font-weight: 900; letter-spacing: 0.14em;
}
.gate-brand span {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gate-brand.gate-red { letter-spacing: 0.04em; }
.gate-red { color: var(--bad); }
.gate-q { font-size: 1.28rem; font-weight: 850; margin-top: 20px; }
.gate-note { color: var(--muted); font-size: 0.88rem; margin-top: 10px; line-height: 1.5; }
.gate-actions { display: grid; gap: 10px; margin-top: 24px; }
.gate-fine { margin-top: 18px; font-size: 0.72rem; color: var(--faint); }
.gate-legal { text-align: left; max-height: 86dvh; overflow-y: auto; }
.gate-legal h1 { font-size: 1.15rem; margin-bottom: 8px; text-align: center; }

/* ============ Barre d'application sticky ============ */
.appbar {
  position: sticky; top: 0; z-index: 40;
  height: calc(var(--appbar-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 12px 0;
  display: flex; align-items: center; gap: 8px;
  background: rgba(5, 6, 10, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--line);
}
.brand {
  flex: 1; display: inline-flex; align-items: center; gap: 8px;
  text-align: left; font-size: 1.18rem; font-weight: 800; letter-spacing: -0.02em; padding: 6px 4px;
  transition: transform 0.15s var(--ease-out);
}
.brand:active { transform: scale(0.96); }
.brand-leaf { font-size: 1.3rem; filter: drop-shadow(0 0 8px rgba(0, 230, 118, 0.6)); }
.brand-hot {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Identité FRIDA CALI — marque 3 lignes en haut à gauche */
.brand-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1.05; }
.brand-l1 { font-size: 0.98rem; font-weight: 900; letter-spacing: -0.02em; }
.brand-l2 { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.04em; }
.brand-l3 { font-size: 0.72rem; letter-spacing: 1px; line-height: 1; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px; font-size: 1.1rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform 0.14s var(--ease-out), background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:active { transform: scale(0.88); }
.icon-btn:hover { background: var(--surface-2); }
.cart-btn { position: relative; }
.cart-badge {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px;
  padding: 0 5px; border-radius: 10px; font-size: 0.7rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad); color: #04120a; box-shadow: var(--neon-shadow);
}
.cart-badge.pop { animation: badge-pop 0.4s var(--ease-out); }
@keyframes badge-pop { 45% { transform: scale(1.45); } }
.demo-flag {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--gold); background: rgba(212, 175, 55, 0.12); border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 4px 9px; border-radius: 999px;
}

/* ============ Vues + transitions ============ */
.views {
  position: relative; z-index: 1;
  max-width: 580px; margin: 0 auto;
  padding: 4px 16px calc(var(--tabbar-h) + 96px + env(safe-area-inset-bottom, 0px));
}
.view { animation: view-in 0.42s var(--ease-out) both; }
.view.out { animation: view-out 0.2s ease-in both; }
@keyframes view-in  { from { opacity: 0; transform: translateY(16px) scale(0.985); } }
@keyframes view-out { to   { opacity: 0; transform: translateY(-10px) scale(0.99); } }
.section-title { font-size: 1.06rem; font-weight: 800; margin: 26px 2px 12px; }

.muted { color: var(--muted); }
.tiny  { font-size: 0.78rem; }
.empty { text-align: center; padding: 34px 10px; }

/* ============ Hero (img/hero.jpg) ============ */
.hero {
  position: relative; margin: 12px 0 0; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: card-in 0.55s var(--ease-out) both;
}
.hero-media { position: relative; aspect-ratio: 2/1; background: #0a0f0c; }
/* Windows n'a pas de glyphes drapeaux : tranche Noto Color Emoji auto-hébergée (U+1F1E6-1F1FF),
   chargée seulement si l'OS ne sait pas les afficher (CSP default-src 'self' → local obligatoire). */
@font-face {
  font-family: 'Flag Emoji';
  src: url('fonts/flags.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+1F1E6-1F1FF;
}
.hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.6s ease; transform: scale(1.02);
}
.hero-media img.loaded { opacity: 1; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5, 6, 10, 0) 0%, rgba(5, 6, 10, 0.22) 62%, rgba(5, 6, 10, 0.78) 100%);
}
.hero-body { position: relative; padding: 0 18px 20px; margin-top: -46px; z-index: 2; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--neon); background: rgba(0, 230, 118, 0.1); border: 1px solid rgba(0, 230, 118, 0.35);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 12px;
  box-shadow: 0 0 18px rgba(0, 230, 118, 0.25);
}
.hero h1 { font-size: clamp(1.55rem, 7vw, 2.1rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; }
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); margin-top: 10px; font-size: 0.9rem; max-width: 38ch; }
.hero-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

/* ============ Bandeau laboratoire (img/lab.jpg) ============ */
.trust {
  display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 12px 14px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  animation: card-in 0.55s var(--ease-out) 0.08s both;
}
.trust img, .trust .ph.round {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none;
  border: 2px solid var(--gold-deep); box-shadow: 0 0 14px rgba(212, 175, 55, 0.35);
}
.trust p { font-size: 0.78rem; color: var(--muted); line-height: 1.45; }
.trust b { color: var(--ink); }

/* ============ Tuiles de secours (ph) ============ */
.ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; background: linear-gradient(140deg, #10231a, #0a110d 60%, #1a1608);
}
.thumb .ph { font-size: 1.8rem; }
img + .ph { display: none; }

/* ============ Bandeaux « 3 barres qui défilent » (sticky) ============ */
.bars {
  position: sticky; top: calc(var(--appbar-h) + env(safe-area-inset-top, 0px)); z-index: 20;
  margin: 14px -16px 4px; padding: 10px 0 2px;
  background: rgba(5, 6, 10, 0.86);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 0;
}
.bars-title {
  margin: 0 16px 6px; font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.bar {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.bar::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 15px; border-radius: 999px; font-size: 0.84rem; font-weight: 700;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  transition: transform 0.14s var(--ease-out), background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.chip:active { transform: scale(0.92); }
.chip.on {
  background: var(--grad); border-color: transparent; color: #04120a;
  box-shadow: var(--neon-shadow);
}
.chip.mini { padding: 6px 12px; font-size: 0.76rem; }
.chip.mini.on { background: var(--surface-3); color: var(--neon); border-color: var(--line-strong); box-shadow: none; }

/* ============ Grille produits (vraies photos) ============ */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 13px; margin-top: 14px; padding-bottom: 8px;
}
.pcard {
  text-align: left; border-radius: var(--r); overflow: hidden; width: 100%;
  background: var(--surface); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column;
  transition: transform 0.18s var(--ease-out), border-color 0.25s;
  animation: card-in 0.5s var(--ease-out) calc(var(--i, 0) * 55ms) both;
  -webkit-tap-highlight-color: transparent; cursor: pointer;
}
.pcard:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.pcard:active { transform: scale(0.97); }
@keyframes card-in { from { opacity: 0; transform: translateY(20px) scale(0.97); } }
.thumb { position: relative; aspect-ratio: 1/1; background: #0a110d; }
.thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.5s ease;
}
.thumb img.loaded { opacity: 1; }
.cbd-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 0.66rem; font-weight: 850; letter-spacing: 0.02em; color: #04120a;
  background: var(--grad); padding: 4px 8px; border-radius: 999px;
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.45);
}
.cbd-badge.count {
  left: auto; top: 8px; right: 8px; min-width: 22px; text-align: center;
  background: var(--gold); box-shadow: 0 0 12px rgba(255, 213, 79, 0.5);
}
.cbd-badge.count.pop { animation: badge-pop 0.4s var(--ease-out); }
.pc-body { padding: 11px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.pc-body h3 { font-size: 0.92rem; font-weight: 800; }
.pc-cat { font-size: 0.68rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); margin-top: 3px; }
.pc-body .desc {
  font-size: 0.73rem; color: var(--muted); margin-top: 6px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pc-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.p-price { font-size: 0.9rem; font-weight: 850; color: var(--neon); }
.p-price small { font-size: 0.66rem; color: var(--faint); font-weight: 700; margin-right: 2px; }
.p-add {
  padding: 7px 13px; border-radius: 11px; font-size: 0.82rem; font-weight: 850;
  background: var(--grad); color: #04120a; box-shadow: var(--neon-shadow);
  transition: transform 0.14s var(--ease-out), filter 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.p-add:hover { filter: brightness(1.08); }
.p-add:active { transform: scale(0.86); }

/* Stepper +/- (fiche produit + drawer) */
.stepper { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.st-btn {
  width: 32px; height: 32px; border-radius: 9px; font-size: 1.1rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; color: var(--neon);
  transition: transform 0.13s var(--ease-out), background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.st-btn:hover { background: var(--surface-3); }
.st-btn:active { transform: scale(0.8); }
.st-qty { min-width: 26px; text-align: center; font-size: 0.92rem; font-weight: 850; }
.st-qty.bump { animation: qty-bump 0.32s var(--ease-out); }
@keyframes qty-bump { 45% { transform: scale(1.35); color: var(--neon); } }

.p-oos {
  font-size: 0.74rem; font-weight: 700; color: var(--bad);
  background: rgba(255, 107, 107, 0.12); border: 1px solid rgba(255, 107, 107, 0.3);
  padding: 6px 12px; border-radius: 10px;
}

.legal-strip {
  margin-top: 18px; padding: 12px; text-align: center;
  font-size: 0.74rem; color: var(--faint);
  border-top: 1px dashed var(--line);
}

/* ============ Fiche produit ============ */
.prod { padding-top: 12px; }
.prod-media {
  position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4/3.4;
  border: 1px solid var(--line); background: #0a110d; box-shadow: var(--shadow);
}
.prod-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.6s ease;
}
.prod-media img.loaded { opacity: 1; }
.prod-media .ph.big { font-size: 3.4rem; }
.floating {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(5, 6, 10, 0.72); border: 1px solid var(--line-strong); color: var(--neon);
  padding: 6px 12px; border-radius: 999px; font-size: 0.72rem; font-weight: 800;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.prod-body { padding: 4px 2px; animation: card-in 0.45s var(--ease-out) 0.06s both; }
.prod-body h1 { font-size: 1.45rem; font-weight: 900; letter-spacing: -0.02em; margin-top: 14px; }
.prod-desc { color: var(--muted); font-size: 0.92rem; margin-top: 8px; line-height: 1.55; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.tile {
  text-align: center; padding: 12px 6px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line);
}
.tile .v { font-size: 1.02rem; font-weight: 900; color: var(--neon); }
.tile .l { font-size: 0.68rem; color: var(--faint); margin-top: 4px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 700; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag-chip {
  font-size: 0.76rem; font-weight: 700; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line);
}
.tag-chip.eff { color: var(--neon); background: rgba(0, 230, 118, 0.08); border-color: rgba(0, 230, 118, 0.3); }
.tag-chip.aro { color: var(--gold); background: rgba(212, 175, 55, 0.08); border-color: rgba(212, 175, 55, 0.3); }
.prod-sub { font-size: 0.82rem; font-weight: 800; color: var(--muted); margin: 18px 2px 10px; letter-spacing: 0.04em; text-transform: uppercase; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 16px;
  border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line);
  transition: transform 0.14s var(--ease-out), border-color 0.2s, background 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.pill:active { transform: scale(0.93); }
.pl-lbl { font-weight: 850; font-size: 0.9rem; }
.pl-price { font-size: 0.78rem; color: var(--muted); font-weight: 700; }
.pill.on {
  border-color: var(--neon); background: rgba(0, 230, 118, 0.12);
  box-shadow: 0 0 16px rgba(0, 230, 118, 0.28), inset 0 0 12px rgba(0, 230, 118, 0.08);
}
.pill.on .pl-price { color: var(--neon); }
.prod-buy {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 22px; padding: 16px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.live { font-size: 1.5rem; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.live small { display: block; font-size: 0.7rem; font-weight: 700; color: var(--faint); -webkit-text-fill-color: var(--faint); }
.legal-note {
  margin-top: 16px; padding: 12px 14px; border-radius: var(--r-sm);
  font-size: 0.72rem; line-height: 1.5; color: var(--faint);
  background: rgba(255, 255, 255, 0.03); border: 1px dashed var(--line);
}

/* ============ Skeleton loaders ============ */
.sk-line {
  height: 13px; border-radius: 7px; margin-top: 9px;
  background: var(--surface-2); position: relative; overflow: hidden;
}
.sk-line::after, .sk-thumb::after, .sk-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 230, 118, 0.10), transparent);
  transform: translateX(-100%); animation: shimmer 1.3s infinite;
}
.sk-thumb { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--r); aspect-ratio: 1/1; }
.sk-grow { flex: 1; }
.sk-card { display: flex; flex-direction: column; gap: 10px; padding: 0; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); animation: card-in 0.5s var(--ease-out) calc(var(--i, 0) * 70ms) both; overflow: hidden; }
.sk-card .sk-grow { padding: 0 12px 12px; }
.sk-hero { position: relative; overflow: hidden; height: 190px; border-radius: var(--r-lg); background: var(--surface-2); margin-bottom: 16px; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ============ Pastille flottante panier (au-dessus des onglets) ============ */
.cart-fab {
  position: fixed; z-index: 35; left: 50%;
  bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  min-width: 250px; padding: 15px 24px; border-radius: 999px;
  font-weight: 850; font-size: 0.92rem; color: #04120a;
  background: var(--grad); box-shadow: 0 12px 34px rgba(0, 230, 118, 0.4);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  transition: transform 0.16s var(--ease-out), box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.cart-fab:active { transform: translateX(-50%) scale(0.94); }
.cart-fab.show { animation: fab-in 0.4s var(--ease-out) both; }
@keyframes fab-in { from { opacity: 0; transform: translateX(-50%) translateY(24px) scale(0.9); } }

/* ============ Onglets bas de page ============ */
.tabbar {
  position: fixed; z-index: 45; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(7, 9, 13, 0.82);
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
  border-top: 1px solid var(--line);
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--faint); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.02em;
  transition: color 0.25s, transform 0.15s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.tab:active { transform: scale(0.92); }
.tab-ico { font-size: 1.32rem; transition: filter 0.25s, transform 0.25s var(--ease-out); }
.tab.on { color: var(--neon); }
.tab.on .tab-ico { filter: drop-shadow(0 0 8px rgba(0, 230, 118, 0.7)); transform: translateY(-2px); }
.tab.on::before {
  content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px;
  border-radius: 0 0 4px 4px; background: var(--grad); box-shadow: 0 0 12px rgba(0, 230, 118, 0.8);
}
.tab-badge {
  position: absolute; top: 7px; right: calc(50% - 26px); min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 10px; font-size: 0.66rem; font-weight: 850;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold); color: #241a00; box-shadow: 0 0 12px rgba(255, 213, 79, 0.55);
  animation: badge-pop 0.4s var(--ease-out);
}

/* ============ Drawer panier (feuille basse) ============ */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 48;
  background: rgba(3, 4, 6, 0.62);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.3s;
}
.drawer-overlay.show { opacity: 1; }
.drawer {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
  width: 100%; max-height: 80dvh; margin: 0 auto;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  display: flex; flex-direction: column;
  background: rgba(11, 14, 18, 0.94);
  -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid var(--line); border-bottom: 0;
  transform: translateY(105%);
  transition: transform 0.42s var(--ease-drawer);
}
.drawer.open { transform: translateY(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-size: 1.1rem; font-weight: 850; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 20px; overscroll-behavior: contain; }
.drawer-foot { padding: 14px 20px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }

.cart-empty { text-align: center; padding: 46px 10px; color: var(--muted); }
.cart-empty .big { font-size: 2.6rem; display: block; margin-bottom: 12px; animation: sway 3.4s ease-in-out infinite; }

.cart-line {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  animation: line-in 0.35s var(--ease-out) both;
}
@keyframes line-in { from { opacity: 0; transform: translateX(16px); } }
.cl-thumb {
  position: relative; width: 44px; height: 44px; flex: none; border-radius: 12px; overflow: hidden;
  font-size: 1.25rem; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line);
}
.cl-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s; }
.cl-thumb img.loaded { opacity: 1; }
.cl-info { flex: 1; min-width: 0; }
.cl-info h4 { font-size: 0.88rem; font-weight: 750; }
.cl-variant { font-size: 0.72rem; color: var(--gold); font-weight: 750; margin-top: 2px; }
.cl-price { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.cl-total { font-size: 0.88rem; font-weight: 850; color: var(--neon); min-width: 66px; text-align: right; }

.cart-from { font-size: 0.78rem; color: var(--faint); margin: 4px 0 10px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.total-row .lbl { font-size: 0.9rem; color: var(--muted); font-weight: 700; }
.total-row .val { font-size: 1.35rem; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.btn {
  width: 100%; padding: 15px; border-radius: var(--r-sm); font-size: 0.95rem; font-weight: 850;
  background: var(--grad); color: #04120a; box-shadow: var(--neon-shadow);
  transition: transform 0.15s var(--ease-out), filter 0.2s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent; text-align: center;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.96); }
.btn[disabled] { opacity: 0.5; filter: saturate(0.5); cursor: wait; }
.btn.ghost {
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: none;
}
.btn.ghost:active { transform: scale(0.96); }

/* ============ Checkout ============ */
.checkout h1, .track h1, .profile h1, .order-empty h1, .legal-view h1 { font-size: 1.45rem; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 4px; }
.age-reminder {
  margin-top: 16px; padding: 13px 15px; border-radius: var(--r-sm);
  background: rgba(212, 175, 55, 0.1); border: 1px solid rgba(212, 175, 55, 0.45);
  color: var(--gold); font-size: 0.83rem; line-height: 1.45;
}
.field { margin-top: 16px; }
.field label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--muted); margin-bottom: 7px; }
.field label .opt { color: var(--faint); font-weight: 600; }
.field label .req { color: var(--gold); }
.field input, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  color: var(--ink); font-size: 0.95rem; user-select: text;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--neon); background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.14);
}
.field.err input, .field.err textarea { border-color: var(--bad); animation: shake 0.4s; }
.field .hint { font-size: 0.74rem; color: var(--faint); margin-top: 6px; }
.field.err .hint { color: var(--bad); }
@keyframes shake { 25% { transform: translateX(-7px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-4px); } }

/* Livraison discrète */
.discreet {
  display: flex; align-items: center; gap: 13px; width: 100%; margin-top: 18px;
  padding: 14px 15px; border-radius: var(--r-sm); text-align: left;
  background: var(--surface); border: 1.5px solid var(--line);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.discreet .di-ico { font-size: 1.4rem; }
.discreet .di-txt { flex: 1; font-size: 0.85rem; color: var(--muted); line-height: 1.35; }
.discreet .di-txt b { color: var(--ink); }
.discreet .di-check {
  width: 26px; height: 26px; border-radius: 8px; flex: none; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--line); color: #04120a; font-size: 0.9rem;
  transition: background 0.2s, border-color 0.2s;
}
.discreet.on { border-color: var(--neon); background: rgba(0, 230, 118, 0.07); box-shadow: 0 0 14px rgba(0, 230, 118, 0.15); }
.discreet.on .di-check { background: var(--grad); border-color: transparent; }

/* Choix du paiement */
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-opt {
  padding: 16px 12px; border-radius: var(--r-sm); text-align: center;
  background: var(--surface); border: 2px solid var(--line);
  transition: transform 0.15s var(--ease-out), border-color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.pay-opt:active { transform: scale(0.94); }
.pay-opt .ico { font-size: 1.5rem; display: block; margin-bottom: 6px; }
.pay-opt .t { font-weight: 850; font-size: 0.9rem; }
.pay-opt .s { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }
.pay-opt.on { border-color: var(--neon); background: var(--grad-soft); box-shadow: 0 0 16px rgba(0, 230, 118, 0.2); }
.wallet-box {
  margin-top: 12px; padding: 14px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.04); border: 1px dashed var(--line-strong);
  font-size: 0.84rem;
}
.wallet-box .addr {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.78rem;
  word-break: break-all; color: var(--ok); margin-top: 6px; user-select: text;
}
.wallet-box.pending { color: var(--muted); font-style: italic; }
.copy-btn {
  margin-top: 10px; font-size: 0.76rem; font-weight: 800; padding: 7px 13px;
  border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line);
  transition: transform 0.13s var(--ease-out);
}
.copy-btn:active { transform: scale(0.9); }

/* Résumé de commande */
.summary {
  margin-top: 22px; padding: 18px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.summary h3 { font-size: 0.95rem; font-weight: 850; margin-bottom: 12px; }
.sum-line { display: flex; justify-content: space-between; gap: 12px; font-size: 0.86rem; padding: 5px 0; color: var(--muted); }
.sum-line .n { flex: 1; min-width: 0; }
.sum-line .n em { font-style: normal; color: var(--gold); font-size: 0.78rem; }
.sum-line .q { color: var(--faint); font-weight: 750; }
.sum-sep { border-top: 1px dashed var(--line); margin: 10px 0; }
.sum-total { display: flex; justify-content: space-between; font-size: 1.05rem; font-weight: 900; }
.sum-total .v { color: var(--neon); }

/* ============ Ma commande : suivi + chat ============ */
.track { padding-top: 10px; }
.track-hero-emoji { font-size: 3rem; display: block; margin: 6px 0 4px; animation: land 0.8s var(--ease-out) both; }
@keyframes land { from { opacity: 0; transform: scale(0.4) rotate(-14deg); } }
.code-card {
  margin: 16px auto 8px; padding: 18px 16px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  position: relative; overflow: hidden; max-width: 420px; text-align: center;
  cursor: pointer; transition: transform 0.15s var(--ease-out);
}
.code-card:active { transform: scale(0.97); }
.code-card::before {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; z-index: -1;
  background: var(--grad); opacity: 0.28; filter: blur(16px);
}
.code-card .lbl { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.code-card .code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: clamp(1.6rem, 7vw, 2.1rem); font-weight: 800; letter-spacing: 0.08em; margin-top: 8px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  user-select: text;
}
.code-card .hint { font-size: 0.72rem; color: var(--faint); margin-top: 8px; }

/* Timeline */
.timeline-wrap { text-align: left; margin-top: 22px; }
.timeline-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.timeline-title h3 { font-size: 1.02rem; font-weight: 850; }
.eta-chip {
  font-size: 0.74rem; font-weight: 850; color: #04120a; background: var(--grad);
  padding: 6px 12px; border-radius: 999px; box-shadow: var(--neon-shadow);
}
.eta-chip.cold { background: var(--surface-2); color: var(--muted); box-shadow: none; }
.timeline { position: relative; padding: 4px 0 4px 46px; }
.timeline::before {
  content: ""; position: absolute; left: 17px; top: 12px; bottom: 12px; width: 3px;
  border-radius: 2px; background: var(--surface-2);
}
.t-progress {
  position: absolute; left: 17px; top: 12px; width: 3px; border-radius: 2px;
  background: var(--grad); box-shadow: 0 0 12px rgba(0, 230, 118, 0.55);
  height: var(--h, 0%); transition: height 0.9s var(--ease-out);
}
.t-step { position: relative; padding: 13px 0; opacity: 0.45; transition: opacity 0.4s; animation: card-in 0.5s var(--ease-out) calc(var(--i, 0) * 90ms) both; }
.t-step .dot {
  position: absolute; left: -46px; top: 10px; width: 37px; height: 37px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.02rem;
  background: var(--surface); border: 1px solid var(--line);
  transition: background 0.4s, border-color 0.4s, transform 0.3s var(--ease-out), box-shadow 0.4s;
}
.t-step .lbl { font-size: 0.94rem; font-weight: 800; }
.t-step .sub { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.t-step .time { float: right; font-size: 0.74rem; color: var(--faint); font-family: ui-monospace, monospace; }
.t-step.done { opacity: 1; }
.t-step.done .dot { background: var(--grad-soft); border-color: var(--neon); }
.t-step.now { opacity: 1; }
.t-step.now .dot { background: var(--grad); border-color: transparent; color: #04120a; animation: pulse 1.7s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.55); }
  70% { box-shadow: 0 0 0 14px rgba(0, 230, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}
.t-step.just-done .dot { animation: qty-bump 0.5s var(--ease-out); }
.track-cancelled {
  margin-top: 18px; padding: 16px; border-radius: var(--r); text-align: center;
  background: rgba(255, 107, 107, 0.1); border: 1px solid rgba(255, 107, 107, 0.35);
  color: var(--bad); font-weight: 800;
}
.track-note { font-size: 0.74rem; color: var(--faint); margin-top: 14px; }
.track-recap {
  text-align: left; margin-top: 20px; padding: 16px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
}
.track-recap h3 { font-size: 0.9rem; font-weight: 850; margin-bottom: 8px; }
.track-recap .sum-line .n { color: var(--ink); }
.track-actions { margin-top: 22px; display: grid; gap: 10px; }

/* Chat client↔livreur (bulles) */
.chat-card {
  margin-top: 20px; padding: 16px; border-radius: var(--r); text-align: left;
  background: var(--surface); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.chat-card h3 { font-size: 0.95rem; font-weight: 850; margin-bottom: 10px; }
.chat-log {
  max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  padding: 6px 4px 10px; overscroll-behavior: contain;
  scroll-behavior: smooth;
}
.msg { max-width: 82%; animation: msg-in 0.35s var(--ease-out) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(0.96); } }
.msg.client { align-self: flex-end; text-align: right; }
.msg.driver { align-self: flex-start; }
.msg.system { align-self: center; max-width: 92%; text-align: center; }
.m-who { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin-bottom: 3px; }
.bubble {
  display: inline-block; padding: 10px 14px; border-radius: 16px; font-size: 0.88rem; line-height: 1.45;
  background: var(--surface-2); border: 1px solid var(--line); text-align: left;
  user-select: text;
}
.msg.client .bubble {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.24), rgba(0, 230, 118, 0.12));
  border-color: rgba(0, 230, 118, 0.4); border-bottom-right-radius: 6px;
}
.msg.driver .bubble { border-bottom-left-radius: 6px; background: rgba(212, 175, 55, 0.1); border-color: rgba(212, 175, 55, 0.3); }
.m-time { font-size: 0.62rem; color: var(--faint); margin-top: 3px; }
.m-sys {
  display: inline-block; font-size: 0.72rem; font-weight: 700; color: var(--muted);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  padding: 5px 12px; border-radius: 999px;
}
.chat-form { display: flex; gap: 8px; margin-top: 10px; }
.chat-form input {
  flex: 1; padding: 12px 15px; border-radius: 999px; font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--ink);
  user-select: text; transition: border-color 0.2s, box-shadow 0.2s;
}
.chat-form input:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.14); }
.chat-form .btn.send { width: 46px; height: 46px; padding: 0; border-radius: 50%; font-size: 1.05rem; flex: none; }

/* Ma commande — vide */
.order-empty { text-align: center; padding-top: 18px; }
.oe-media {
  position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16/8;
  margin-bottom: 18px; border: 1px solid var(--line); background: #0a110d;
}
.oe-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s; }
.oe-media img.loaded { opacity: 1; }
.oe-media .ph.big { font-size: 3rem; }
.order-empty p { max-width: 34ch; margin: 8px auto 18px; line-height: 1.5; }
.code-lookup { margin-top: 26px; }
.code-lookup h3 { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
#follow-form { display: flex; gap: 8px; }
#follow-form input {
  flex: 1; padding: 12px 15px; border-radius: var(--r-sm); text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--ink);
  font-family: ui-monospace, monospace; user-select: text; letter-spacing: 0.06em;
}
#follow-form input:focus { outline: none; border-color: var(--neon); }
#follow-form .btn { width: auto; padding: 12px 20px; }

/* ============ Profil ============ */
.profile { padding-top: 14px; }
.p-head { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 58px; height: 58px; flex: none; border-radius: 50%; font-size: 1.5rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center; color: #04120a;
  background: var(--grad); box-shadow: var(--neon-shadow);
}
.p-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.hist { display: grid; gap: 10px; }
.hist-item {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; text-align: left;
  padding: 13px 14px; border-radius: var(--r); width: 100%;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform 0.15s var(--ease-out), border-color 0.2s;
  animation: card-in 0.5s var(--ease-out) calc(var(--i, 0) * 60ms) both;
}
.hist-item:active { transform: scale(0.97); }
.hist-item:hover { border-color: var(--line-strong); }
.h-code { font-family: ui-monospace, monospace; font-weight: 800; font-size: 0.9rem; letter-spacing: 0.04em; }
.h-meta { grid-column: 1; font-size: 0.72rem; color: var(--faint); }
.h-status { font-size: 0.7rem; font-weight: 800; color: var(--gold); background: rgba(212, 175, 55, 0.12); padding: 4px 10px; border-radius: 999px; grid-row: 1 / span 2; align-self: center; }
.h-status.ok { color: var(--neon); background: rgba(0, 230, 118, 0.12); }
.h-status.bad { color: var(--bad); background: rgba(255, 107, 107, 0.12); }
.h-total { font-weight: 850; font-size: 0.86rem; color: var(--neon); grid-column: 2; }
.h-arrow { display: none; }
.profile-actions { display: grid; gap: 10px; }

/* ============ Mentions légales ============ */
.legal-view { padding-top: 12px; }
.legal { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
.legal h3 { color: var(--ink); font-size: 0.95rem; margin: 18px 2px 6px; }
.legal h3::before { content: "◆ "; color: var(--gold); font-size: 0.7rem; }
.legal p { margin-bottom: 8px; }
.legal b { color: var(--ink); }
.gate-legal .legal { font-size: 0.78rem; }

/* ============ Feuille d'action (bottom sheet) ============ */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 58; background: rgba(3, 4, 6, 0.6);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.25s;
}
.sheet-overlay.show { opacity: 1; }
.sheet {
  position: fixed; z-index: 60; left: 50%; bottom: 0;
  transform: translate(-50%, 105%);
  width: min(480px, 100vw); padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: rgba(12, 15, 19, 0.96);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border-top: 1px solid var(--line-strong); box-shadow: var(--shadow);
  transition: transform 0.38s var(--ease-drawer);
  display: grid; gap: 10px; text-align: center;
}
.sheet.open { transform: translate(-50%, 0); }
.sheet h3 { font-size: 1.05rem; font-weight: 850; }
.sheet p { font-size: 0.86rem; color: var(--muted); line-height: 1.45; }
.sheet .row { display: grid; gap: 10px; margin-top: 8px; }

/* ============ Toast (au-dessus des onglets) ============ */
.toast {
  position: fixed; z-index: 70; left: 50%;
  bottom: calc(var(--tabbar-h) + 74px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  max-width: min(420px, 92vw); padding: 12px 18px; border-radius: 14px;
  font-size: 0.86rem; font-weight: 700; text-align: center;
  background: rgba(13, 17, 14, 0.92); border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  animation: toast-in 0.35s var(--ease-out) both;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px) scale(0.94); } }
.toast.bad { border-color: rgba(255, 107, 107, 0.5); color: #ffb4b4; }

/* ============ Confettis CSS (couleurs marque) ============ */
.confetti-layer { position: fixed; inset: 0; z-index: 66; pointer-events: none; overflow: hidden; }
.confetti-piece {
  position: absolute; top: -6vh; width: 9px; height: 14px; border-radius: 3px;
  opacity: 0;
  animation: confetti-fall var(--d, 2s) ease-in var(--dl, 0s) forwards;
}
@keyframes confetti-fall {
  8%  { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(var(--x, 0px), 108vh, 0) rotate3d(1, 1, 0.3, var(--rot, 720deg));
  }
}

/* ============ Divers / accessibilité ============ */
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================ V3 — auth, panel livreur, back-office (SPEC-V3 §5)
   Mêmes codes visuels v2 : néon #00e676 / noir / or, glassmorphism, animations transform/opacity. */

/* ---- Puce de mode + modes plein écran ---- */
.mode-chip {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.03em; color: var(--neon);
  background: rgba(0, 230, 118, 0.1); border: 1px solid var(--line-strong);
  padding: 5px 11px; border-radius: 999px; box-shadow: 0 0 14px rgba(0, 230, 118, 0.2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw;
}
html.driver-mode .tabbar, html.admin-mode .tabbar { display: none; }
html.driver-mode .views, html.admin-mode .views {
  padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  max-width: 720px;
}
html.driver-mode .cart-fab { display: none !important; }
.center { text-align: center; }

/* ---- Modales animées ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 68; background: rgba(3, 4, 6, 0.66);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  opacity: 0; transition: opacity 0.26s;
}
.modal-overlay.show { opacity: 1; }
.modal {
  position: fixed; z-index: 72; left: 50%; top: 50%;
  width: min(480px, calc(100vw - 24px)); max-height: 86dvh; overflow-y: auto;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: var(--r-lg); overscroll-behavior: contain;
  background: rgba(11, 14, 18, 0.96);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--line-strong); box-shadow: 0 0 60px rgba(0, 230, 118, 0.12), var(--shadow);
  opacity: 0; transform: translate(-50%, -46%) scale(0.94);
  transition: transform 0.34s var(--ease-drawer), opacity 0.26s;
}
.modal.open { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ---- Auth (login / register) ---- */
.auth-head { display: flex; align-items: center; gap: 10px; }
.auth-tabs { flex: 1; display: flex; gap: 8px; }
.auth-tabs .pill { flex: 1; justify-content: center; padding: 11px 10px; }
.auth-tabs .pill span { font-weight: 850; font-size: 0.88rem; }
.auth-err {
  margin: 12px 0 0; padding: 11px 13px; border-radius: var(--r-sm);
  background: rgba(255, 107, 107, 0.12); border: 1px solid rgba(255, 107, 107, 0.45);
  color: #ffb4b4; font-size: 0.82rem; font-weight: 700;
}
.auth-err.shake2, .pf .auth-err.shake2 { animation: shake 0.4s; }
.auth-form { margin-top: 6px; }
.auth-demo { color: var(--gold); margin-top: 14px; opacity: 0.9; }
.auth-demo b { font-family: ui-monospace, monospace; user-select: text; }
.consent { display: flex !important; align-items: flex-start; gap: 11px; cursor: pointer; }
.consent input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin-top: 1px;
  border-radius: 8px; border: 1.5px solid var(--line-strong); background: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.14s var(--ease-out);
}
.consent input[type="checkbox"]::after { content: "✓"; font-size: 0.86rem; font-weight: 900; color: #04120a; opacity: 0; transform: scale(0.4); transition: opacity 0.16s, transform 0.18s var(--ease-out); }
.consent input[type="checkbox"]:checked { background: var(--grad); border-color: transparent; }
.consent input[type="checkbox"]:checked::after { opacity: 1; transform: scale(1); }
.consent span { font-size: 0.84rem; color: var(--muted); line-height: 1.45; font-weight: 600; }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 430px) { .pf-grid { grid-template-columns: 1fr; } }
.field select {
  width: 100%; padding: 13px 14px; border-radius: var(--r-sm); font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field select:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.14); }

/* ---- Profil : cartes auth (invité) ---- */
.auth-cards { display: grid; gap: 12px; }
.auth-card {
  position: relative; text-align: left; padding: 17px 18px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  display: grid; gap: 3px;
  transition: transform 0.16s var(--ease-out), border-color 0.25s, box-shadow 0.25s;
  animation: card-in 0.5s var(--ease-out) both;
}
.auth-card:hover { border-color: var(--line-strong); }
.auth-card:active { transform: scale(0.97); }
.auth-card b { font-size: 1rem; font-weight: 850; }
.auth-card small { color: var(--muted); font-size: 0.78rem; line-height: 1.4; }
.auth-card .ac-ico { position: absolute; right: 16px; top: 16px; font-size: 1.5rem; opacity: 0.9; }
.auth-card.gold { border-color: rgba(212, 175, 55, 0.35); }
.auth-card.gold:hover { box-shadow: 0 0 22px rgba(212, 175, 55, 0.18); }

/* ---- Checkout : bloc compte ---- */
.account-hint {
  margin-top: 12px; padding: 11px 13px; border-radius: var(--r-sm); font-size: 0.82rem;
  background: var(--surface); border: 1px dashed var(--line-strong); color: var(--muted); line-height: 1.45;
}
.account-hint.ok { border-style: solid; color: var(--neon); background: rgba(0, 230, 118, 0.08); }

/* ---- Ma commande : puce livreur assigné ---- */
.driver-chip {
  margin-top: 16px; padding: 12px 15px; border-radius: 999px; text-align: center;
  font-size: 0.86rem; color: var(--ink);
  background: var(--grad-soft); border: 1px solid var(--line-strong);
  box-shadow: 0 0 16px rgba(0, 230, 118, 0.15); animation: card-in 0.45s var(--ease-out) both;
}
.driver-chip b { color: var(--neon); }
#driver-name-inline { color: var(--neon); font-weight: 850; }

/* ---- Panel livreur (plein écran) ---- */
.drv { padding-top: 8px; }
.drv-head { display: flex; align-items: center; gap: 12px; }
.drv-head h1 { font-size: 1.35rem; font-weight: 900; letter-spacing: -0.02em; }
.drv-id { flex: 1; min-width: 0; }
.avatar.sm { width: 44px; height: 44px; font-size: 1.25rem; }
.btn.small { width: auto; padding: 10px 14px; font-size: 0.8rem; border-radius: 11px; flex: none; }
.drv-nav { display: flex; gap: 8px; margin-top: 16px; }
.drv-nav .chip { flex: 1; justify-content: center; }
.cnt { font-weight: 900; color: var(--neon); }
.chip.on .cnt { color: #04120a; }
#drv-list { display: grid; gap: 13px; margin-top: 14px; }
.drv-card {
  padding: 15px 16px; border-radius: var(--r); text-align: left;
  background: var(--surface); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft); display: grid; gap: 11px;
  animation: card-in 0.5s var(--ease-out) calc(var(--i, 0) * 60ms) both;
}
.drv-card > header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.drv-code {
  font-family: ui-monospace, monospace; font-weight: 800; font-size: 1rem; letter-spacing: 0.05em;
  color: var(--neon); user-select: text; cursor: pointer;
}
.drv-total { margin-left: auto; font-weight: 900; color: var(--gold); }
.drv-info { display: grid; gap: 5px; font-size: 0.84rem; color: var(--ink); line-height: 1.4; }
.drv-info em { color: var(--muted); font-style: normal; font-size: 0.78rem; }
.di-k {
  display: inline-block; min-width: 88px; font-size: 0.66rem; font-weight: 850;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); margin-right: 6px;
}
.drv-items { padding: 10px 12px; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.03); border: 1px dashed var(--line); }
.drv-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.drv-actions .btn { width: auto; flex: 1; min-width: 110px; padding: 13px 14px; font-size: 0.86rem; }
.drv-note { margin-top: 18px; line-height: 1.5; }
.btn.danger {
  background: rgba(255, 107, 107, 0.12); color: #ffb4b4; box-shadow: none;
  border: 1px solid rgba(255, 107, 107, 0.4);
}
.btn.danger:hover { filter: brightness(1.15); }
.btn.ghost.has-unread { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 14px rgba(212, 175, 55, 0.2); }
.btn.ghost.has-unread b { font-size: 0.78rem; }
.btn.ghost.danger { color: #ffb4b4; border-color: rgba(255, 107, 107, 0.4); }

/* Badges statut (panel + back-office + timeline admin) */
.st-badge {
  font-size: 0.68rem; font-weight: 850; letter-spacing: 0.02em; padding: 5px 11px; border-radius: 999px;
  background: rgba(212, 175, 55, 0.12); color: var(--gold); border: 1px solid rgba(212, 175, 55, 0.35); white-space: nowrap;
}
.st-badge.st-pending { background: rgba(159, 176, 168, 0.12); color: var(--muted); border-color: var(--line); }
.st-badge.st-accepted { background: rgba(212, 175, 55, 0.14); color: var(--gold); border-color: rgba(212, 175, 55, 0.4); }
.st-badge.st-on_way { background: rgba(0, 176, 255, 0.12); color: #6fd0ff; border-color: rgba(0, 176, 255, 0.4); }
.st-badge.st-delivered { background: rgba(0, 230, 118, 0.12); color: var(--neon); border-color: var(--line-strong); }
.st-badge.st-cancelled { background: rgba(255, 107, 107, 0.12); color: #ffb4b4; border-color: rgba(255, 107, 107, 0.4); }
.stat-chips { display: flex; flex-wrap: wrap; gap: 9px; }

/* Chat livreur (modale) */
.drv-chat { display: grid; gap: 12px; }
.drv-chat header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.drv-chat h3 { font-size: 1.02rem; font-weight: 850; font-family: ui-monospace, monospace; letter-spacing: 0.04em; }
.modal-chat .chat-log { max-height: 46dvh; }
#drv-chat-form { display: flex; gap: 8px; }
#drv-chat-form input {
  flex: 1; padding: 12px 15px; border-radius: 999px; font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--ink); user-select: text;
}
#drv-chat-form input:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.14); }
#drv-chat-form .btn.send { width: 46px; height: 46px; padding: 0; border-radius: 50%; font-size: 1.05rem; flex: none; }

/* ---- Back-office admin ---- */
.adm { padding-top: 10px; }
.adm-title { font-size: 1.4rem; font-weight: 900; letter-spacing: -0.02em; }
.adm-nav { position: sticky; top: calc(var(--appbar-h) + env(safe-area-inset-top, 0px)); z-index: 20;
  display: flex; gap: 8px; margin: 14px -16px 4px; padding: 10px 16px; overflow-x: auto; scrollbar-width: none;
  background: rgba(5, 6, 10, 0.86); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line); }
.adm-nav::-webkit-scrollbar { display: none; }
.adm-nav .chip { flex: none; }
#adm-body { margin-top: 12px; display: grid; gap: 12px; }
.adm-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.adm-tiles .tile { padding: 18px 10px; }
.adm-tiles .tile.big .v { font-size: 1.3rem; }
.adm-tiles .v { font-size: 1.2rem; }
.adm-tiles .v.gold-t { color: var(--gold); }
.adm-tiles .v.hot { color: var(--bad); }
.adm-bar-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.adm-bar-top .btn.add { width: auto; padding: 11px 15px; font-size: 0.82rem; border-radius: 11px; }
.cnt-chip { font-size: 0.7rem; font-weight: 850; color: var(--neon); background: rgba(0, 230, 118, 0.1); border: 1px solid var(--line-strong); padding: 3px 9px; border-radius: 999px; }
.adm-error { padding: 14px; border-radius: var(--r); background: rgba(255, 107, 107, 0.1); border: 1px solid rgba(255, 107, 107, 0.35); color: #ffb4b4; font-size: 0.85rem; }

/* Table produits / livreurs */
.ad-table { display: grid; gap: 8px; }
.ad-row {
  display: grid; grid-template-columns: 36px 1fr auto auto auto auto; gap: 6px; align-items: center;
  padding: 8px 9px; border-radius: var(--r-sm); text-align: left;
  background: var(--surface); border: 1px solid var(--line);
  animation: card-in 0.4s var(--ease-out) calc(var(--i, 0) * 35ms) both;
}
.ad-row.drv { grid-template-columns: 36px 1fr auto auto; }
.ad-thumb { position: relative; width: 36px; height: 36px; flex: none; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.ad-row .icon-btn { width: 32px; height: 32px; border-radius: 10px; font-size: 0.9rem; }
.ad-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s; }
.ad-thumb img.loaded { opacity: 1; }
.ad-emo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
img.loaded ~ .ad-emo { opacity: 0; }
.ad-name { min-width: 0; }
.ad-name b { display: block; font-size: 0.88rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-name small { display: block; font-size: 0.7rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-input {
  padding: 9px 10px; border-radius: 10px; font-size: 0.85rem; user-select: text;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.adm-input:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.14); }
.adm-num { width: 66px; text-align: right; font-family: ui-monospace, monospace; }
.ad-sw {
  width: 34px; height: 34px; border-radius: 10px; font-weight: 900; font-size: 0.9rem;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--bad);
  transition: transform 0.14s var(--ease-out), background 0.2s, color 0.2s, border-color 0.2s;
}
.ad-sw.on { background: rgba(0, 230, 118, 0.14); border-color: var(--line-strong); color: var(--neon); }
.ad-sw:active { transform: scale(0.85); }

/* Fiche produit admin (modale) */
.pf { display: grid; gap: 12px; }
.pf-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pf-head h3 { font-size: 1.05rem; font-weight: 850; }
.pf-sub { font-size: 0.78rem; font-weight: 800; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; margin-top: 8px; }
.pf textarea { min-height: 70px; resize: vertical; }
#var-rows { display: grid; gap: 8px; margin: 8px 0 10px; }
.var-row { display: grid; grid-template-columns: 1fr 110px 38px; gap: 8px; align-items: center; }
.var-row .icon-btn { width: 38px; height: 38px; color: var(--bad); }
.ap-preview { margin-top: 8px; border-radius: var(--r-sm); overflow: hidden; border: 1px dashed var(--line); min-height: 8px; }
.ap-preview:empty { display: none; }
.ap-preview img { max-height: 150px; width: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s; }
.ap-preview img.loaded { opacity: 1; }
.row-avail { margin-top: 14px; }
.card-pad { padding: 15px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.modal-form .pf { padding: 2px; }
.modal-center { text-align: center; }
.pwd-once { display: grid; gap: 12px; justify-items: center; padding: 8px 2px; }
.pwd-once .big { font-size: 2.4rem; animation: sway 3.4s ease-in-out infinite; }
.pwd-once h3 { font-size: 1.1rem; font-weight: 850; }
.pwd-once .addr {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.1rem; font-weight: 800;
  color: var(--ok); background: rgba(0, 230, 118, 0.08); border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm); padding: 14px 16px; user-select: text; word-break: break-all; width: 100%;
  letter-spacing: 0.06em;
}
.pwd-once .row { display: grid; gap: 10px; width: 100%; }

/* Login admin */
.adm-login { max-width: 420px; margin: 30px auto 0; text-align: center; animation: gate-in 0.5s var(--ease-out) both; }
.adm-shield { font-size: 3rem; display: block; margin-bottom: 8px; filter: drop-shadow(0 0 14px rgba(0, 230, 118, 0.5)); }
.adm-login h1 { font-size: 1.5rem; font-weight: 900; }
.adm-login p { margin-top: 8px; line-height: 1.5; }
.adm-login form { margin-top: 18px; text-align: left; }

/* Commandes admin */
.ad-orow { grid-template-columns: auto 1fr auto auto; }
.ad-orow .ad-o-main { font-size: 0.84rem; color: var(--muted); min-width: 0; }
.ad-orow .ad-o-main small { display: block; font-size: 0.7rem; color: var(--faint); margin-top: 2px; }
#admin-order-search { display: flex; gap: 8px; }
#admin-order-search input {
  flex: 1; padding: 12px 15px; border-radius: var(--r-sm); font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--ink); user-select: text;
}
#admin-order-search input:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.14); }
#admin-order-search .btn { width: auto; padding: 11px 16px; }
.admin-chat { max-height: 260px; }

/* ============ V4 — médias, présence livreur, notifications, ETA, designs (SPEC-V4 §1–§7) ============ */

/* ---------- vidéo sur la carte produit (badge ▶ sur le poster) ---------- */
.thumb .vid-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(5, 6, 10, 0.72); color: #fff; border: 1px solid var(--line-strong);
  font-size: 0.7rem; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}

/* ---------- carrousel médias de la fiche produit ---------- */
.prod-media.has-rail { aspect-ratio: auto; background: #0a110d; }
.prod-media .media-rail {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px; position: relative; width: 100%;
  -webkit-overflow-scrolling: touch;
}
.prod-media .media-rail::-webkit-scrollbar { display: none; }
.m-item {
  flex: 0 0 84%; margin: 0; scroll-snap-align: center; position: relative;
  border-radius: var(--r-sm); overflow: hidden; background: #000; border: 1px solid var(--line);
}
.prod-media.has-rail .m-item img { position: static; inset: auto; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; opacity: 1; }
.m-item video { display: block; width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #000; }
.m-item.vid::after {
  content: "🎬 vidéo"; position: absolute; bottom: 8px; left: 8px; z-index: 3;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.04em; color: var(--neon);
  background: rgba(5, 6, 10, 0.72); border: 1px solid var(--line-strong);
  padding: 3px 9px; border-radius: 999px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  pointer-events: none;
}
.rail-dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.rd {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 0.8rem;
  cursor: pointer; transition: transform 0.16s var(--ease-out), border-color 0.2s, box-shadow 0.2s;
}
.rd.on { border-color: var(--neon); box-shadow: var(--neon-shadow); transform: scale(1.08); }

/* ---------- panel livreur : pastille de présence ---------- */
.drv-pres { border-radius: 999px; white-space: nowrap; flex: 0 0 auto; }
.drv-pres.on {
  color: var(--ok); border-color: rgba(0, 230, 118, 0.45); background: rgba(0, 230, 118, 0.1);
  box-shadow: 0 0 16px rgba(0, 230, 118, 0.22);
}
.drv-head { flex-wrap: wrap; }

/* ---------- notifications ---------- */
.drv-nav .chip .cnt { font-weight: 900; }
.drv-nav .chip .cnt.hot { color: var(--bad); }
.notif-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 12px; }
.notif-card {
  position: relative; display: flex; gap: 10px; align-items: flex-start; width: 100%;
  text-align: left; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line); margin-bottom: 10px;
  animation: card-in 0.4s var(--ease-out) calc(var(--i, 1) * 60ms) both;
  transition: transform 0.14s var(--ease-out), border-color 0.2s;
}
.notif-card:active { transform: scale(0.98); }
.notif-card.unread { border-color: var(--line-strong); background: var(--grad-soft); }
.notif-card .nc-ico { font-size: 1.15rem; line-height: 1.2; }
.notif-card .nc-body { flex: 1; min-width: 0; }
.notif-card b { display: block; font-size: 0.87rem; font-weight: 800; line-height: 1.35; }
.notif-card small { display: block; color: var(--faint); font-size: 0.7rem; margin-top: 4px; }
.nc-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; align-self: center;
  background: var(--bad); box-shadow: 0 0 10px rgba(255, 107, 107, 0.8);
  animation: badge-pop 0.4s var(--ease-out);
}

/* ---------- ETA (modale take + carte livreur) ---------- */
.eta-ask { display: grid; gap: 8px; }
.eta-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 14px; }
.eta-pill .pl-lbl { font-size: 0.95rem; }
.eta-tag {
  font-size: 0.7rem; font-weight: 800; color: var(--gold);
  background: rgba(212, 175, 55, 0.12); border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.drv-card header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Ma commande : pastille « livreur en ligne » + ETA ---------- */
.driver-chip .drv-live { margin-left: 8px; font-size: 0.78rem; font-weight: 800; color: var(--faint); white-space: nowrap; }
.driver-chip .drv-live.on { color: var(--ok); }
.driver-chip .drv-eta { display: inline-block; margin-left: 8px; font-size: 0.78rem; font-weight: 800; color: var(--gold); white-space: nowrap; }

/* ---------- back-office : médiathèque ---------- */
.mg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; margin-top: 14px; }
.mg-tile {
  position: relative; border-radius: var(--r-sm); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-soft);
  animation: card-in 0.4s var(--ease-out) calc(var(--i, 1) * 60ms) both;
}
.mg-tile img { display: block; width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.mg-tile .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.mg-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(5, 6, 10, 0.38); color: #fff; font-size: 1.5rem;
  border: none; cursor: pointer; transition: background 0.2s;
}
.mg-play:hover { background: rgba(5, 6, 10, 0.14); }
.mg-kind {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  font-size: 0.62rem; font-weight: 800; padding: 3px 8px; border-radius: 999px;
  background: rgba(5, 6, 10, 0.72); border: 1px solid var(--line-strong); color: var(--neon);
}
.mg-label {
  display: block; padding: 7px 8px; font-size: 0.68rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.media-view { display: grid; gap: 12px; }
.media-view video.big-video { width: 100%; max-height: 56dvh; border-radius: var(--r-sm); border: 1px solid var(--line); background: #000; }
.media-view img { width: 100%; border-radius: var(--r-sm); border: 1px solid var(--line); }
.media-ph {
  display: grid; place-items: center; gap: 8px; min-height: 190px; text-align: center; padding: 16px;
  border-radius: var(--r-sm); border: 1px dashed var(--line); background-size: cover; background-position: center;
}
.media-ph span { font-size: 2rem; }

/* ---------- sélecteur médias (modale produit) ---------- */
.mp-wrap { margin-top: 4px; }
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.mp-tile {
  position: relative; padding: 0; border-radius: 12px; overflow: hidden;
  border: 2px solid var(--line); background: var(--surface); opacity: 0.82;
  transition: border-color 0.18s, opacity 0.18s, transform 0.14s;
}
.mp-tile img { display: block; width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.mp-tile .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.2rem; }
.mp-tile.sel { opacity: 1; border-color: var(--neon); box-shadow: var(--neon-shadow); }
.mp-tile:active { transform: scale(0.93); }
.mp-k {
  position: absolute; top: 4px; left: 4px; font-size: 0.6rem;
  background: rgba(5, 6, 10, 0.72); padding: 2px 6px; border-radius: 999px;
}
.mp-check {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--neon); color: #04140a;
  font-weight: 900; font-size: 0.7rem;
}
.mp-sel { display: grid; gap: 8px; margin-top: 8px; }
.mp-srow {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
}
.mp-srow img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.mp-srow .mp-n { width: 20px; text-align: center; font-weight: 900; color: var(--gold); font-size: 0.8rem; }
.mp-srow .mp-t { flex: 1; min-width: 0; font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-preview { margin-top: 12px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); background: #000; }
.mp-preview img, .mp-preview video { display: block; width: 100%; max-height: 170px; object-fit: cover; }
.mp-empty { display: block; padding: 18px 12px; text-align:center; font-size: 0.74rem; color: var(--faint); }

/* ---------- onglet Design (mini-mockups + pastilles de thème) ---------- */
.dz-group { margin-top: 18px; }
.dz-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dz-row.themes { grid-template-columns: repeat(3, 1fr); }
.dz-opt {
  display: flex; flex-direction: column; gap: 6px; align-items: stretch; text-align: left;
  padding: 9px; border-radius: var(--r-sm); border: 1.5px solid var(--line);
  background: var(--surface); cursor: pointer; color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.14s, background 0.2s;
}
.dz-opt b { font-size: 0.78rem; font-weight: 850; }
.dz-opt small { font-size: 0.64rem; color: var(--faint); }
.dz-opt.on { border-color: var(--neon); box-shadow: var(--neon-shadow); background: var(--grad-soft); }
.dz-opt:active { transform: scale(0.97); }
.mini-mock {
  display: grid; gap: 4px; height: 76px; padding: 6px;
  border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line);
}
.mini-mock i { display: block; border-radius: 4px; background: var(--surface-2); box-shadow: inset 0 3px 0 -1px var(--neon-deep); min-height: 12px; }
.mini-mock.mock-grid { grid-template-columns: 1fr 1fr; }
.mini-mock.mock-list { grid-template-columns: 26% 1fr; grid-auto-rows: 1fr; }
.mini-mock.mock-mosaic { grid-template-columns: 1fr 1fr; }
.mini-mock.mock-mosaic i:first-child { grid-column: 1 / -1; min-height: 34px; }
.theme-sw {
  display: flex; gap: 5px; align-items: center; justify-content: center;
  height: 76px; border-radius: 10px; border: 1px solid var(--line);
}
.theme-sw i { width: 22px; height: 22px; border-radius: 50%; display: block; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.sw-dark { background: #05060a; } .sw-dark i:nth-child(1) { background: #00e676; } .sw-dark i:nth-child(2) { background: #f5c542; }
.sw-midnight { background: #070b1c; } .sw-midnight i:nth-child(1) { background: #5e8bff; } .sw-midnight i:nth-child(2) { background: #b18cff; }
.sw-graphite { background: #0c0c0e; } .sw-graphite i:nth-child(1) { background: #ff5a5a; } .sw-graphite i:nth-child(2) { background: #e8b34b; }
.dz-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.dz-actions .btn { width: auto; }

/* ---------- upload médias (bibliothèque admin) ---------- */
.up-bar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:14px; }
.up-bar .btn { width:auto; }
.up-help { flex: 1 1 220px; min-width: 0; }
.up-queue { display:grid; gap:8px; margin-top:12px; }
.up-item {
  display:flex; align-items:center; gap:10px; padding:8px 10px;
  background: var(--surface-2); border:1px solid var(--line); border-radius:12px;
}
.up-thumb { position:relative; flex:0 0 auto; }
.up-thumb img { width:44px; height:44px; border-radius:9px; object-fit:cover; display:block; background:#000; }
.up-thumb i { position:absolute; right:-4px; bottom:-4px; font-style:normal; font-size:.8rem; text-shadow:0 1px 4px #000; }
.up-name { flex:1; min-width:0; font-size:.8rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.up-st { font-size:.72rem; font-weight:800; white-space:nowrap; }
.up-st.pending { color: var(--muted); }
.up-st.pending::before {
  content:''; display:inline-block; width:11px; height:11px; border-radius:50%; margin-right:6px;
  border:2px solid var(--line); border-top-color: var(--neon); vertical-align:-2px;
  animation: upspin 0.8s linear infinite;
}
.up-st.ok { color: var(--ok); }
.up-st.bad { color: var(--bad); }
.up-note {
  padding:12px 14px; border-radius: var(--r-sm); font-size:.78rem; color: var(--muted);
  background: rgba(255,255,255,.03); border:1px dashed var(--line);
}
@keyframes upspin { to { transform: rotate(360deg); } }

/* ---------- accès machine discret (login back-office) ---------- */
.adm-machine { display: inline-block; margin-top: 12px; font-size: 0.72rem; opacity: 0.55; text-decoration-style: dotted; }

/* ---------- layouts produits (classes sur <body>) ---------- */
body.layout-grid .grid { grid-template-columns: repeat(2, 1fr); }
body.layout-list .grid { grid-template-columns: 1fr; gap: 10px; }
body.layout-list .pcard { flex-direction: row; align-items: stretch; }
body.layout-list .pcard .thumb { flex: 0 0 104px; width: 104px; aspect-ratio: auto; }
body.layout-list .pcard .thumb img { height: 100%; min-height: 104px; }
body.layout-list .pcard .pc-body { padding: 9px 11px 10px; }
body.layout-list .pcard .desc { -webkit-line-clamp: 2; }
body.layout-mosaic .grid { grid-template-columns: repeat(2, 1fr); }
body.layout-mosaic .pcard:first-child { grid-column: span 2; }
body.layout-mosaic .pcard:first-child .thumb { aspect-ratio: 16 / 9; }

/* ---------- thèmes (override des variables + halos) ---------- */
body.theme-midnight {
  --bg: #06070f; --bg-2: #0b0f22;
  --ink: #eef2ff; --muted: #a3aede; --faint: #6a75a6;
  --neon: #5e8bff; --neon-2: #9db4ff; --neon-deep: #2f5fe0;
  --gold: #b18cff; --gold-deep: #8b5cf6;
  --ok: #8be0ff;
  --line: rgba(160, 180, 255, 0.14); --line-strong: rgba(94, 139, 255, 0.4);
  --grad: linear-gradient(118deg, #5e8bff, #b18cff 88%);
  --grad-soft: linear-gradient(118deg, rgba(94, 139, 255, 0.16), rgba(177, 140, 255, 0.12));
  --neon-shadow: 0 4px 18px rgba(94, 139, 255, 0.35);
}
body.theme-midnight .glow { filter: hue-rotate(85deg) saturate(1.05); }
body.theme-graphite {
  --bg: #0c0c0e; --bg-2: #131318;
  --muted: #ada6b2; --faint: #7c7684;
  --neon: #ff5a5a; --neon-2: #ff9a8a; --neon-deep: #d63a3a;
  --gold: #e8b34b; --gold-deep: #c99a3b;
  --ok: #7ce8a8;
  --line: rgba(255, 255, 255, 0.10); --line-strong: rgba(255, 90, 90, 0.38);
  --grad: linear-gradient(118deg, #ff5a5a, #e8b34b 88%);
  --grad-soft: linear-gradient(118deg, rgba(255, 90, 90, 0.14), rgba(232, 179, 75, 0.12));
  --neon-shadow: 0 4px 18px rgba(255, 90, 90, 0.35);
}
body.theme-graphite .glow { filter: hue-rotate(-95deg) saturate(1.1); }

/* ============================================================ V5 — panel livreur : sous-onglets, Discussions, Historique
   Mêmes codes visuels : néon / noir / or, glassmorphism, animations transform/opacity, variables des thèmes. */

/* ---- barre de sous-onglets collante (Board · Discussions · Historique) ---- */
.drv-tabs {
  position: sticky; top: calc(var(--appbar-h) + env(safe-area-inset-top, 0px)); z-index: 20;
  display: flex; gap: 8px; margin: 14px -16px 2px; padding: 10px 16px; overflow-x: auto; scrollbar-width: none;
  background: rgba(5, 6, 10, 0.86); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.drv-tabs::-webkit-scrollbar { display: none; }
.drv-tabs .chip { flex: 1; justify-content: center; position: relative; white-space: nowrap; }
.drv-tabs .chip.on::after {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: -11px; height: 3px; border-radius: 3px;
  background: var(--grad); box-shadow: var(--neon-shadow); animation: badge-pop 0.35s var(--ease-out);
}
.drv-tabs + .drv-nav { margin-top: 10px; }

/* ---- onglet « 💬 Discussions » (liste façon messagerie) ---- */
.dm-head { display: flex; align-items: center; gap: 10px; margin: 2px 0 10px; }
.dm-list {
  display: grid; gap: 0; border-radius: var(--r); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow-soft);
}
.dm-row {
  display: flex; gap: 12px; align-items: center; text-align: left; width: 100%;
  padding: 12px 14px; border-bottom: 1px solid var(--line); background: transparent;
  transition: transform 0.14s var(--ease-out), background 0.2s;
  animation: card-in 0.45s var(--ease-out) calc(var(--i, 1) * 55ms) both;
}
.dm-row:last-child { border-bottom: 0; }
.dm-row:active { transform: scale(0.985); }
.dm-row.unread { background: var(--grad-soft); }
.dm-ava { width: 48px; height: 48px; flex: none; font-size: 0.95rem; letter-spacing: 0.02em; }
.dm-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.dm-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dm-top b { font-size: 0.92rem; font-weight: 850; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dm-top small { color: var(--faint); font-size: 0.7rem; flex: none; }
.dm-preview {
  display: block; color: var(--muted); font-size: 0.82rem; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dm-row.unread .dm-preview { color: var(--ink); font-weight: 650; }
.dm-sub { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dm-sub em { font-style: normal; color: var(--faint); font-size: 0.68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-code {
  font-family: ui-monospace, monospace; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.03em;
  color: var(--neon); opacity: 0.85; user-select: text; cursor: pointer; flex: none;
}
.dm-badge {
  flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center;
  background: var(--bad); color: #fff; font-size: 0.7rem; font-weight: 900;
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.55); animation: badge-pop 0.4s var(--ease-out);
}
.dm-count {
  flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center;
  background: rgba(212, 175, 55, 0.14); border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold); font-size: 0.7rem; font-weight: 900;
}

/* ---- onglet « 🗂 Historique » ---- */
.hist-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 2px 0 14px; }
.hss {
  text-align: center; padding: 12px 8px; border-radius: var(--r-sm);
  background: var(--grad-soft); border: 1px solid var(--line-strong);
  animation: card-in 0.45s var(--ease-out) both;
}
.hss b { display: block; font-size: 1.05rem; font-weight: 900; color: var(--neon); letter-spacing: -0.01em; }
.hss small { display: block; margin-top: 3px; font-size: 0.66rem; color: var(--muted); line-height: 1.3; }
.hs-list { display: grid; gap: 10px; }
.hs-row {
  display: flex; gap: 12px; align-items: center; text-align: left; width: 100%;
  padding: 13px 14px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow-soft);
  transition: transform 0.14s var(--ease-out), border-color 0.2s;
  animation: card-in 0.5s var(--ease-out) calc(var(--i, 1) * 60ms) both;
}
.hs-row:active { transform: scale(0.97); border-color: var(--line-strong); }
.hs-ico { font-size: 1.3rem; flex: none; }
.hs-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.hs-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.hs-top b { font-size: 0.9rem; font-weight: 850; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hs-body small { color: var(--faint); font-size: 0.7rem; }
.hs-last { color: var(--muted) !important; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-total { flex: none; font-weight: 900; color: var(--gold); font-size: 0.92rem; }
.hs-total.off { color: var(--faint); text-decoration: line-through; }

/* ---- résumé de commande terminée dans la modale chat ---- */
.chat-resume { display: grid; gap: 8px; padding: 12px 13px; border-radius: var(--r-sm); background: var(--grad-soft); border: 1px solid var(--line-strong); }
.chat-resume .cr-top { display: flex; align-items: center; }
.chat-resume .cr-note { color: var(--faint); }

/* ============ V6 — file « En attente », chat admin répondable, checklist livreur ============ */

/* ---------- onglet ⏳ En attente ---------- */
.adm-nav .chip #adm-nav-pend { margin-left: 6px; }
.ap-list { display: grid; gap: 12px; }
.ap-card {
  position: relative; padding: 15px 16px; border-radius: var(--r); text-align: left;
  background: var(--surface); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft); display: grid; gap: 11px;
  animation: card-in 0.5s var(--ease-out) calc(var(--i, 0) * 60ms) both;
}
.ap-card.pop-open { border-color: var(--line-strong); z-index: 30; }
.ap-card > header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ap-wait {
  font-size: 0.7rem; font-weight: 800; color: var(--gold);
  background: rgba(255, 213, 79, 0.1); border: 1px solid rgba(255, 213, 79, 0.3);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.ap-drv { font-size: 0.72rem; font-weight: 800; color: var(--neon); white-space: nowrap; }
.ap-detail { flex: none; }
.ap-ok { background: linear-gradient(135deg, rgba(0, 230, 118, 0.9), rgba(0, 190, 100, 0.85)); color: #04120a; }

/* popover « Donner à… » (ancré dans la carte) */
.apop {
  position: absolute; right: 12px; bottom: 12px; z-index: 40; width: min(320px, calc(100% - 24px));
  padding: 12px 13px; border-radius: var(--r-sm);
  background: #0b0f0c; border: 1px solid var(--line-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 18px rgba(0, 230, 118, 0.15);
  animation: gate-in 0.25s var(--ease-out) both;
}
.apop[hidden] { display: none; }
.apop-t {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 0.78rem; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink);
  margin-bottom: 8px;
}
.apop-x { flex: none; font-size: 0.8rem; color: var(--muted); }
.apop-drv {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  padding: 10px 11px; margin-bottom: 7px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--ink);
  transition: border-color 0.2s, transform 0.15s;
}
.apop-drv:hover, .apop-drv:active { border-color: var(--line-strong); transform: translateY(-1px); }
.apop-drv b { flex: 1; min-width: 0; font-size: 0.9rem; }
.apop-drv small { color: var(--faint); font-size: 0.72rem; white-space: nowrap; }
.apop-dot { font-size: 0.8rem; filter: drop-shadow(0 0 6px rgba(0, 230, 118, 0.6)); }
.apop-etas { margin: 4px 0 10px; }
.apop-etas .eta-pill { padding: 8px 14px; }
.apop-go { width: 100%; padding: 12px; font-size: 0.88rem; }

/* ---------- chat admin ---------- */
.msg.admin { align-self: flex-end; text-align: right; }
.msg.admin .bubble {
  background: linear-gradient(135deg, rgba(255, 213, 79, 0.2), rgba(255, 213, 79, 0.08));
  border-color: rgba(255, 213, 79, 0.4); border-bottom-right-radius: 6px;
}
.msg.admin .m-who { color: var(--gold); }
.chat-closed { margin-top: 10px; }

/* ---------- checklist livreur ---------- */
.drv-chk {
  display: grid; gap: 7px; padding: 11px 13px; border-radius: var(--r-sm);
  background: rgba(0, 230, 118, 0.04); border: 1px dashed var(--line-strong);
}
.drv-chk-t {
  font-size: 0.68rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint);
  display: flex; align-items: center; justify-content: space-between;
}
.chk-score { color: var(--gold); font-size: 0.74rem; }
.drv-chk .chk {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: 0.86rem; color: var(--ink); user-select: none;
}
.drv-chk .chk input {
  width: 19px; height: 19px; flex: none; cursor: pointer;
  accent-color: var(--neon);
}
.drv-chk .chk.done span { color: var(--neon); text-decoration: line-through rgba(0, 230, 118, 0.5); }
.chk-hint { font-size: 0.72rem; color: var(--muted); }
.chk-hint.ready { color: var(--neon); font-weight: 800; }

/* ============================================================ V7 — onglet admin « 🎛 Filtres » + puces client */
.adm-nav .chip .adm-dirty { margin-left: 6px; color: var(--gold); font-weight: 900; }
.adm-nav .chip .adm-dirty[hidden] { display: none; }

.fl-err {
  margin-bottom: 2px; padding: 12px 14px; border-radius: var(--r); font-size: 0.82rem;
  background: rgba(255, 107, 107, 0.1); border: 1px solid rgba(255, 107, 107, 0.35); color: #ffb4b4;
}
.fl-err.shake2 { animation: shake 0.4s; }
.fl-err[hidden] { display: none; }
.fl-rows { display: grid; gap: 8px; margin: 12px 0 10px; }
.fl-row {
  display: grid; grid-template-columns: 20px 58px minmax(0, 1fr) 32px 32px 32px; gap: 6px; align-items: center;
  padding: 7px 8px; border-radius: var(--r-sm); text-align: left;
  background: var(--surface); border: 1px solid var(--line);
  animation: card-in 0.4s var(--ease-out) calc(var(--i, 0) * 35ms) both;
}
.fl-row:focus-within { border-color: var(--line-strong); background: var(--surface-2); }
.fl-n { font-size: 0.72rem; color: var(--faint); font-family: ui-monospace, monospace; text-align: center; }
.fl-row .icon-btn { width: 32px; height: 32px; border-radius: 10px; font-size: 0.88rem; }
.fl-row .icon-btn[disabled] { opacity: 0.3; pointer-events: none; }
.fl-row .fl-del { color: var(--bad); }
.fl-row .fl-emoji { font-size: 1.05rem; text-align: center; padding: 8px 4px; }
.fl-add {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 8px;
  border-radius: var(--r-sm); border: 1px dashed var(--line); background: rgba(255, 255, 255, 0.03);
}
.fl-add .fl-emoji { font-size: 1.05rem; text-align: center; padding: 8px 4px; }
.fl-add .chip[disabled] { opacity: 0.45; pointer-events: none; }
.fl-status { font-size: 0.76rem; font-weight: 700; margin: 10px 0 0; color: var(--ok); }
.fl-status.dirty { color: var(--gold); }
.fl-none { padding: 4px 2px 6px; }
#fl-save[disabled] { opacity: 0.55; }

/* puces d'effet administrées sur l'accueil client (emoji + libellé, ordre admin) */
.bar .chip.mini.effx { display: inline-flex; align-items: center; gap: 6px; }
.effx-e { font-size: 0.92rem; line-height: 1; }
.effx-l { line-height: 1.1; }
.eff-empty { padding-bottom: 28px; }
.eff-empty .chip { margin-top: 12px; }
@media (max-width: 390px) {
  .fl-row { grid-template-columns: 18px 50px minmax(0, 1fr) 30px 30px 30px; }
  .fl-add { grid-template-columns: 50px minmax(0, 1fr) auto; }
}


/* ============================================================ V8 — onglet admin « 🏷 Catégories » · 🗑 suppression commandes · œil mdp */

/* ---------- 🏷 catégories ---------- */
.cat-row {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) auto 32px 32px; gap: 6px; align-items: center;
  padding: 7px 8px; border-radius: var(--r-sm); text-align: left;
  background: var(--surface); border: 1px solid var(--line);
  animation: card-in 0.4s var(--ease-out) calc(var(--i, 0) * 35ms) both;
}
.cat-row:focus-within { border-color: var(--line-strong); background: var(--surface-2); }
.cat-row .cat-emoji { font-size: 1.05rem; text-align: center; padding: 8px 4px; }
.cat-row .icon-btn { width: 32px; height: 32px; border-radius: 10px; font-size: 0.88rem; }
.cat-row .cat-del { color: var(--bad); }
.cat-meta { font-size: 0.72rem; color: var(--faint); white-space: nowrap; }
.cat-meta b { color: var(--muted); }
.cat-add {
  display: grid; grid-template-columns: 132px 58px minmax(0, 1fr) auto; gap: 6px; align-items: center;
  margin-top: 10px; padding: 8px; border-radius: var(--r-sm);
  border: 1px dashed var(--line); background: rgba(255, 255, 255, 0.03);
}
.cat-add .cat-emoji { font-size: 1.05rem; text-align: center; padding: 8px 4px; }
.cat-add select.adm-input { user-select: text; }
.cat-add .chip[disabled] { opacity: 0.45; pointer-events: none; }

/* ---------- 🗑 bouton supprimer (cartes pending · lignes historique · détail) ---------- */
.ap-card > header .ap-del { margin-left: auto; width: 28px; height: 28px; border-radius: 9px; font-size: 0.78rem; color: var(--faint); flex: none; }
.ap-del:hover, .ap-del:active { color: var(--bad); }
.ad-orow { grid-template-columns: auto 1fr auto auto 28px; }
.ad-del { justify-self: end; font-size: 0.85rem; color: var(--faint); padding: 3px 5px; cursor: pointer; border-radius: 8px; }
.ad-del:hover, .ad-del:active { color: var(--bad); background: rgba(255, 107, 107, 0.08); }
.od-btns { display: flex; align-items: center; gap: 6px; flex: none; }
.od-btns .od-del { color: var(--faint); }
.od-btns .od-del:hover { color: var(--bad); }

/* ---------- 👁 œil afficher/masquer — tous les champs mot de passe ---------- */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 44px !important; }
.pw-eye {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 9px; font-size: 0.95rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--muted); cursor: pointer;
  transition: color 0.2s, background 0.2s, transform 0.14s;
}
.pw-eye:hover { color: var(--ink); background: var(--surface-2); }
.pw-eye:active { transform: translateY(-50%) scale(0.86); }
.pw-eye.on { color: var(--neon); }

@media (max-width: 390px) {
  .cat-row { grid-template-columns: 50px minmax(0, 1fr) auto 30px 30px; }
  .cat-add { grid-template-columns: 112px 50px minmax(0, 1fr) auto; }
}

/* V13 — section ⭐ Recommandés, bouton étoile, bouton 🔁 recommander */
.feat-wrap{margin:6px 0 2px}
.feat-title{font-size:15px;letter-spacing:.4px;margin:0 0 8px;padding-left:14px;color:var(--gold,#f5c542)}
.feat-rail{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(150px,170px);gap:12px;overflow-x:auto;padding:2px 14px 12px;scroll-snap-type:x mandatory}
.feat-rail>*{scroll-snap-align:start}
.ad-sw.feat-on,.icon-btn.feat.on{filter:drop-shadow(0 0 6px rgba(245,197,66,.7))}
.h-reorder{font-size:15px;padding:4px 8px;border-radius:10px;background:rgba(255,255,255,.06)}
.h-reorder:active{transform:scale(.9)}

/* ============================================================ V14 — Design renforcé : 10 thèmes × 10 dispositions */

/* ---- 9 thèmes supplémentaires (même contrat de variables que neon/midnight/graphite) ---- */
body.theme-noir-or {
  --bg: #0a0906; --bg-2: #131008;
  --ink: #f6f1e3; --muted: #c9bfa4; --faint: #8a7f63;
  --neon: #e6c15c; --neon-2: #f4dd92; --neon-deep: #b8912e;
  --gold: #fff3d6; --gold-deep: #d9bc73;
  --ok: #a8d5a2;
  --line: rgba(230, 193, 92, 0.16); --line-strong: rgba(230, 193, 92, 0.45);
  --grad: linear-gradient(118deg, #e6c15c, #fff3d6 88%);
  --grad-soft: linear-gradient(118deg, rgba(230, 193, 92, 0.15), rgba(255, 243, 214, 0.08));
  --neon-shadow: 0 4px 18px rgba(230, 193, 92, 0.35);
}
body.theme-noir-or .glow { filter: hue-rotate(-18deg) saturate(0.9); }
body.theme-emeraude {
  --bg: #02120c; --bg-2: #062116;
  --neon: #2fd677; --neon-2: #7cf0ae; --neon-deep: #17a356;
  --gold: #d9f99d; --gold-deep: #a3e635;
  --muted: #9fd6b8; --faint: #5f9679;
  --line: rgba(47, 214, 119, 0.14); --line-strong: rgba(47, 214, 119, 0.4);
  --grad: linear-gradient(118deg, #2fd677, #d9f99d 88%);
  --grad-soft: linear-gradient(118deg, rgba(47, 214, 119, 0.14), rgba(217, 249, 157, 0.10));
  --neon-shadow: 0 4px 18px rgba(47, 214, 119, 0.38);
}
body.theme-emeraude .glow { filter: hue-rotate(15deg) saturate(1.15); }
body.theme-arctique {
  --bg: #050b12; --bg-2: #0a1622;
  --ink: #eaf6ff; --muted: #9cc3da; --faint: #5d86a1;
  --neon: #46c8ff; --neon-2: #9be8ff; --neon-deep: #1787c9;
  --gold: #a7f3d0; --gold-deep: #34d399;
  --ok: #7dffd0;
  --line: rgba(70, 200, 255, 0.14); --line-strong: rgba(70, 200, 255, 0.42);
  --grad: linear-gradient(118deg, #46c8ff, #a7f3d0 88%);
  --grad-soft: linear-gradient(118deg, rgba(70, 200, 255, 0.15), rgba(167, 243, 208, 0.10));
  --neon-shadow: 0 4px 18px rgba(70, 200, 255, 0.35);
}
body.theme-arctique .glow { filter: hue-rotate(120deg) saturate(1.05); }
body.theme-rose {
  --bg: #12040d; --bg-2: #1e0817;
  --ink: #ffeef7; --muted: #e3aecb; --faint: #a3708c;
  --neon: #ff5fa2; --neon-2: #ff9dc9; --neon-deep: #d1247a;
  --gold: #ffd6e8; --gold-deep: #ff8ec4;
  --ok: #9df0c0;
  --line: rgba(255, 95, 162, 0.15); --line-strong: rgba(255, 95, 162, 0.42);
  --grad: linear-gradient(118deg, #ff5fa2, #ffd6e8 88%);
  --grad-soft: linear-gradient(118deg, rgba(255, 95, 162, 0.14), rgba(255, 214, 232, 0.09));
  --neon-shadow: 0 4px 18px rgba(255, 95, 162, 0.35);
}
body.theme-rose .glow { filter: hue-rotate(-55deg) saturate(1.2); }
body.theme-royal {
  --bg: #0b0714; --bg-2: #150c26;
  --ink: #f3edff; --muted: #bfaee4; --faint: #7d6aa8;
  --neon: #a78bfa; --neon-2: #d6c4ff; --neon-deep: #7c4fe0;
  --gold: #fbbf24; --gold-deep: #d97706;
  --ok: #86efac;
  --line: rgba(167, 139, 250, 0.15); --line-strong: rgba(167, 139, 250, 0.42);
  --grad: linear-gradient(118deg, #a78bfa, #fbbf24 88%);
  --grad-soft: linear-gradient(118deg, rgba(167, 139, 250, 0.15), rgba(251, 191, 36, 0.10));
  --neon-shadow: 0 4px 18px rgba(167, 139, 250, 0.36);
}
body.theme-royal .glow { filter: hue-rotate(65deg) saturate(1.1); }
body.theme-sunset {
  --bg: #120802; --bg-2: #1e0f04;
  --ink: #fff3e6; --muted: #e6b98f; --faint: #a9764b;
  --neon: #ff8a3d; --neon-2: #ffb56b; --neon-deep: #d9601a;
  --gold: #ffd166; --gold-deep: #e0a92f;
  --ok: #9ae6b4;
  --line: rgba(255, 138, 61, 0.15); --line-strong: rgba(255, 138, 61, 0.42);
  --grad: linear-gradient(118deg, #ff8a3d, #ffd166 88%);
  --grad-soft: linear-gradient(118deg, rgba(255, 138, 61, 0.15), rgba(255, 209, 102, 0.10));
  --neon-shadow: 0 4px 18px rgba(255, 138, 61, 0.35);
}
body.theme-sunset .glow { filter: hue-rotate(-25deg) saturate(1.25); }
body.theme-cyberpunk {
  --bg: #06010d; --bg-2: #0e0318;
  --ink: #f0e9ff; --muted: #b794e8; --faint: #74509e;
  --neon: #b026ff; --neon-2: #e879f9; --neon-deep: #7a0fc0;
  --gold: #00fff0; --gold-deep: #0ae0cf;
  --ok: #00ff9d;
  --line: rgba(176, 38, 255, 0.18); --line-strong: rgba(176, 38, 255, 0.5);
  --grad: linear-gradient(118deg, #b026ff, #00fff0 88%);
  --grad-soft: linear-gradient(118deg, rgba(176, 38, 255, 0.16), rgba(0, 255, 240, 0.10));
  --neon-shadow: 0 4px 20px rgba(176, 38, 255, 0.45);
}
body.theme-cyberpunk .glow { filter: hue-rotate(95deg) saturate(1.35); }
body.theme-mint {
  --bg: #04100e; --bg-2: #08201c;
  --ink: #e7fffa; --muted: #9fd8ce; --faint: #5fa598;
  --neon: #34d399; --neon-2: #8af0d0; --neon-deep: #0fa06e;
  --gold: #fef3c7; --gold-deep: #f6d77e;
  --ok: #6ee7b7;
  --line: rgba(52, 211, 153, 0.14); --line-strong: rgba(52, 211, 153, 0.4);
  --grad: linear-gradient(118deg, #34d399, #fef3c7 88%);
  --grad-soft: linear-gradient(118deg, rgba(52, 211, 153, 0.14), rgba(254, 243, 199, 0.09));
  --neon-shadow: 0 4px 18px rgba(52, 211, 153, 0.35);
}
body.theme-mint .glow { filter: hue-rotate(35deg) saturate(1.05); }

/* swatches des nouveaux thèmes dans le panneau */
.sw-noir-or { background: #0a0906; } .sw-noir-or i:nth-child(1) { background: #e6c15c; } .sw-noir-or i:nth-child(2) { background: #fff3d6; }
.sw-emeraude { background: #02120c; } .sw-emeraude i:nth-child(1) { background: #2fd677; } .sw-emeraude i:nth-child(2) { background: #d9f99d; }
.sw-arctique { background: #050b12; } .sw-arctique i:nth-child(1) { background: #46c8ff; } .sw-arctique i:nth-child(2) { background: #a7f3d0; }
.sw-rose { background: #12040d; } .sw-rose i:nth-child(1) { background: #ff5fa2; } .sw-rose i:nth-child(2) { background: #ffd6e8; }
.sw-royal { background: #0b0714; } .sw-royal i:nth-child(1) { background: #a78bfa; } .sw-royal i:nth-child(2) { background: #fbbf24; }
.sw-sunset { background: #120802; } .sw-sunset i:nth-child(1) { background: #ff8a3d; } .sw-sunset i:nth-child(2) { background: #ffd166; }
.sw-cyberpunk { background: #06010d; } .sw-cyberpunk i:nth-child(1) { background: #b026ff; } .sw-cyberpunk i:nth-child(2) { background: #00fff0; }
.sw-mint { background: #04100e; } .sw-mint i:nth-child(1) { background: #34d399; } .sw-mint i:nth-child(2) { background: #fef3c7; }
/* mini-mocks des nouvelles cartes */
.mini-mock.mock-gallery { grid-template-columns: 1fr; }
.mini-mock.mock-gallery i { min-height: 15px; }
.mini-mock.mock-dense { grid-template-columns: repeat(3, 1fr); }
.mini-mock.mock-dense i { min-height: 22px; }
.mini-mock.mock-full { grid-template-columns: 1fr; }
.mini-mock.mock-full i { min-height: 20px; }
.mini-mock.mock-spot { grid-template-columns: 1fr; }
.mini-mock.mock-spot i:first-child { min-height: 24px; box-shadow: inset 0 3px 0 -1px var(--gold); }
.mini-mock.mock-mag { grid-template-columns: 1fr 1fr; }
.mini-mock.mock-mag i:first-child { grid-column: 1 / -1; min-height: 20px; }

/* ---- dispositions supplémentaires (5 nouvelles, sur les 3 existantes) ---- */
/* galerie : une colonne, images XL cinématiques */
body.layout-gallery .grid { grid-template-columns: 1fr; gap: 22px; }
body.layout-gallery .pcard .thumb { aspect-ratio: 21 / 9; border-radius: 18px; }
body.layout-gallery .pcard { border-radius: 20px; }
/* dense : 3 colonnes, cartes compactes */
body.layout-dense .grid { grid-template-columns: repeat(3, 1fr); gap: 9px; }
body.layout-dense .pcard { padding: 8px; border-radius: 13px; }
body.layout-dense .pcard .name { font-size: 12.5px; }
body.layout-dense .pcard .desc { display: none; }
body.layout-dense .pcard .price { font-size: 13px; }
/* plein cadre : 1 colonne, cartes immenses façon story */
body.layout-full .grid { grid-template-columns: 1fr; gap: 16px; }
body.layout-full .pcard .thumb { aspect-ratio: 4 / 5; border-radius: 16px; }
/* spot : une carte héro mise en avant (la 1re), liste compacte ensuite */
body.layout-spot .grid { grid-template-columns: 1fr; gap: 10px; }
body.layout-spot .pcard:first-child { border: 1px solid var(--line-strong); box-shadow: var(--neon-shadow); }
body.layout-spot .pcard:first-child .thumb { aspect-ratio: 16 / 10; }
body.layout-spot .pcard:not(:first-child) { flex-direction: row; }
body.layout-spot .pcard:not(:first-child) .thumb { flex: 0 0 86px; width: 86px; aspect-ratio: auto; }
/* magazine : alternance grandes/petites cartes */
body.layout-mag .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
body.layout-mag .pcard:nth-child(4n + 1) { grid-column: span 2; }
body.layout-mag .pcard:nth-child(4n + 1) .thumb { aspect-ratio: 16 / 8; }

/* ---- rail défilement fluide du panneau design (carousel) ---- */
.dz-strip { display: flex; gap: 10px; overflow-x: auto; padding: 8px 2px 12px; scroll-snap-type: x mandatory; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.dz-strip::-webkit-scrollbar { height: 5px; }
.dz-strip::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.dz-strip .dz-opt { scroll-snap-align: start; flex: 0 0 132px; margin: 0; }
.dz-hint { font-size: 11px; opacity: 0.7; }

/* variantes hero + barre de catégories (recette V14) */
body.hero-clean .hero-media { display: none; }
body.hero-clean .hero { padding-top: 6px; }
body.bar-pills .bars .bar { border-radius: 999px; }
body.bar-pills .bars .chip { border-radius: 999px; }

/* ============================================================ V15 — promo / stock / confirmer-noter / satisfaction */
.promo-field { display: flex; gap: 8px; margin: 10px 0 2px; }
.promo-field input { flex: 1; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2, rgba(255,255,255,0.04)); color: var(--ink); padding: 10px 12px; font: inherit; }
.promo-field .btn.mini { width: auto; padding: 8px 12px; font-size: 13px; }
.promo-line .v { color: var(--ok, #7ce8a8); }
.stock-chip { position: absolute; left: 8px; bottom: 8px; font-size: 11px; padding: 3px 8px; border-radius: 999px; backdrop-filter: blur(6px); }
.stock-chip.low { background: rgba(250, 204, 21, 0.18); color: #fde68a; border: 1px solid rgba(250, 204, 21, 0.45); }
.stock-chip.out { background: rgba(239, 68, 68, 0.2); color: #fecaca; border: 1px solid rgba(239, 68, 68, 0.5); }
.p-add.out { opacity: 0.45; pointer-events: none; }
.confirm-zone { margin-top: 14px; }
.confirm-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--grad-soft); border: 1px solid var(--line-strong); animation: fade-up 0.4s ease both; }
.confirm-card .cc-emoji { font-size: 26px; }
.confirm-card b { font-size: 14px; } .confirm-card small { opacity: 0.8; }
.confirm-card .btn { margin-left: auto; width: auto; padding: 9px 14px; font-size: 13px; }
.confirm-card.ok { display: block; }
.confirm-card.ok .cc-rate { margin-bottom: 8px; }
.rate-row { display: flex; gap: 10px; justify-content: center; }
.rate-btn { font-size: 26px; padding: 8px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,0.05); cursor: pointer; transition: transform 0.15s ease, background 0.2s; }
.rate-btn:hover { transform: translateY(-3px) scale(1.06); background: rgba(255,255,255,0.1); }
.rate-note-modal textarea { width: 100%; min-height: 74px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2, rgba(255,255,255,0.04)); color: var(--ink); padding: 10px; font: inherit; margin: 8px 0 12px; }
.sat-card { padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2, rgba(255,255,255,0.03)); margin-bottom: 12px; }
.sat-card h4 { margin: 0 0 8px; font-size: 14px; } .sat-card h4 small { opacity: 0.7; font-weight: 400; }
.sat-bar { display: flex; gap: 4px; border-radius: 10px; overflow: hidden; font-size: 11px; }
.sat-seg { padding: 6px 4px; text-align: center; min-width: 34px; }
.sat-seg.good { background: rgba(52, 211, 153, 0.35); } .sat-seg.mid { background: rgba(250, 204, 21, 0.3); } .sat-seg.bad { background: rgba(239, 68, 68, 0.35); }

/* ============================================================ V16 — bannière promo + notes produit */
.promo-bar { display: flex; align-items: center; gap: 8px; margin: 0 -16px 10px; padding: 11px 16px; cursor: pointer; background: var(--grad-soft); border-block: 1px solid var(--line-strong); animation: fade-up 0.45s ease both; }
.promo-bar b { color: var(--neon); } .promo-bar code { background: rgba(255,255,255,0.08); padding: 2px 8px; border-radius: 8px; font-weight: 700; letter-spacing: 0.5px; }
.promo-bar small { margin-left: auto; opacity: 0.65; font-size: 11px; }
.rate-chip { position: absolute; right: 8px; bottom: 8px; font-size: 11px; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,0.45); backdrop-filter: blur(6px); border: 1px solid var(--line); }

/* ============================================================ V18.1 — upload dans picker + croix tuiles média */
.mp-uprow { margin: 0 0 8px; }
.mp-uprow .btn.mini { width: auto; padding: 7px 12px; font-size: 12.5px; }
.mg-tile { position: relative; }
.mg-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.2); background: rgba(10,14,24,0.55); color: #fff; font-size: 12px; cursor: pointer; backdrop-filter: blur(5px); opacity: 0.85; }
.mg-x:hover { background: rgba(220,60,80,0.65); opacity: 1; }

/* ============================================================ V19 — fiche produit plus grande + upload dans le picker */
.mp-upbar { display: flex; gap: 8px; margin-bottom: 8px; }
.mp-upbar .btn.mini { flex: 1; width: auto; padding: 9px 10px; font-size: 13px; margin: 0; }
.prod-desc { font-size: 1rem; line-height: 1.65; color: var(--ink, #e8eef6); opacity: 0.92; }
.prod-media .m-item img, .prod-media .m-item video { aspect-ratio: 3/2.2; }
.rail-hint { text-align: center; font-size: 11.5px; opacity: 0.55; margin: 4px 0 0; }

/* ============================================================ V19.1 — bouton actualiser l'accueil */
.reload-fab { position: fixed; right: 14px; bottom: 92px; z-index: 30; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(10,14,22,0.72); color: #fff; font-size: 19px; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: var(--shadow-soft); transition: transform 0.15s ease; }
.reload-fab:active { transform: scale(0.9); }
.reload-fab.spin { animation: thspin 0.7s linear infinite; }
@keyframes thspin { to { transform: rotate(360deg); } }

/* ============================================================ V19.2 — vraies vignettes vidéo + badge lien mort */
.mp-vthumb, .mg-vthumb { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; background: #000; }
.mp-tile.dead img, .mp-tile.dead video, .mg-tile.dead img, .mg-tile.dead video { filter: grayscale(1) brightness(0.5); opacity: 0.35; }
.mp-dead, .mg-dead { display: none; }
.mp-tile.dead .mp-dead, .mg-tile.dead .mg-dead { display: block; position: absolute; inset: auto 4px 4px 4px; font-size: 10px; color: #ffb4b4; background: rgba(120,20,30,0.72); padding: 3px 6px; border-radius: 7px; text-align: center; z-index: 2; }
.mg-tile { position: relative; }

/* ============================================================ V19.10 — 🔄 dans la barre du haut */
#btn-reload { margin-left: auto; }
#btn-reload.spin { animation: thspin 0.7s linear infinite; }
.appbar { gap: 8px; }

/* ============ V21 — Lecteur musique d'ambiance ============ */
#music-fab {
  position: fixed; left: 12px; z-index: 36;
  bottom: calc(var(--tabbar-h) + 84px + env(safe-area-inset-bottom, 0px));
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(10, 14, 22, 0.78); color: #fff;
  font-size: 19px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft); transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
#music-fab:active { transform: scale(0.9); }
#music-fab.playing { border-color: var(--neon); animation: mus-pulse 1.8s ease-in-out infinite; }
@keyframes mus-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.35); } 50% { box-shadow: 0 0 0 9px rgba(0, 230, 118, 0); } }
#music-panel {
  position: fixed; left: 12px; right: 12px; max-width: 330px; z-index: 55;
  bottom: calc(var(--tabbar-h) + 136px + env(safe-area-inset-bottom, 0px));
  max-height: calc(100vh - var(--appbar-h) - 170px); overflow-y: auto;
  background: rgba(9, 11, 18, 0.98); border: 1px solid var(--line-strong); border-radius: 18px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6); padding: 12px; animation: fade-up 0.25s ease both;
}
.mp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mp-head .icon-btn { width: 34px; height: 34px; font-size: 0.9rem; }
.mp-now { display: flex; align-items: center; gap: 8px; }
.mp-now .icon-btn { width: 38px; height: 38px; font-size: 0.95rem; }
.mp-play { background: var(--grad) !important; color: #04120a; border: none; font-weight: 800; }
.mp-title { margin-left: 6px; display: flex; flex-direction: column; line-height: 1.25; }
.mp-title small { color: var(--muted); font-size: 0.68rem; }
.mp-vol { display: flex; align-items: center; gap: 8px; margin: 12px 2px 4px; }
.mp-vol input[type=range] { flex: 1; accent-color: var(--neon); height: 26px; }
.mp-list { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; max-height: 185px; overflow-y: auto; }
.mp-row { display: flex; justify-content: space-between; gap: 8px; text-align: left; padding: 8px 10px;
  border-radius: 10px; border: 1px solid transparent; background: none; color: var(--ink); font: inherit;
  font-size: 0.85rem; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mp-row:hover { background: var(--surface-2); }
.mp-row.on { border-color: var(--line-strong); background: var(--grad-soft); }
.mp-row small { color: var(--muted); }
.mp-credit { margin-top: 8px; font-size: 0.66rem; color: var(--faint); text-align: center; }
.mp-credit a { color: inherit; }
.mp-sub { margin: 10px 2px 2px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.mp-list.pla2 { max-height: 130px; }
.mp-row small.live { font-size: 0.62rem; color: var(--neon); font-weight: 700; }
/* V26.2 — sélection média morte : visible et retirable au lieu d'être cachée */
.mp-srow.deadsel { opacity: 0.75; border: 1px dashed var(--gold); border-radius: 10px; padding: 6px 8px; }
.mp-srow.deadsel .mp-t { color: var(--gold); font-size: 0.78rem; }

/* V25.1 — mini-lecteur radio FRIDA (basculé par-dessus le FAB musique) */
#yt-host {
  position: fixed; right: 12px; z-index: 36;
  bottom: calc(var(--tabbar-h) + 84px + env(safe-area-inset-bottom, 0px));
  width: 168px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--neon); background: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}
#yt-host[hidden] { display: none; }
#yt-host iframe { width: 100% !important; height: 100% !important; border: 0; display: block; }

/* égaliseur animé du FAB = « la musique tourne » */
#music-fab .eq { display: flex; align-items: flex-end; gap: 2px; height: 18px; }
#music-fab .eq i { width: 3px; background: var(--neon); border-radius: 2px; animation: eqbar 0.9s ease-in-out infinite; }
#music-fab .eq i:nth-child(1) { height: 40%; animation-delay: 0s; }
#music-fab .eq i:nth-child(2) { height: 90%; animation-delay: 0.15s; }
#music-fab .eq i:nth-child(3) { height: 60%; animation-delay: 0.3s; }
#music-fab .eq i:nth-child(4) { height: 100%; animation-delay: 0.45s; }
@keyframes eqbar { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }

/* ============ V22 — Ambiances saisonnières ============ */
body.theme-noel {
  --bg: #04140b; --bg-2: #072412;
  --neon: #3ddc84; --neon-2: #86efac; --neon-deep: #16a34a;
  --gold: #ff4d5e; --gold-deep: #c81e33;
  --ink: #eefbf1; --muted: #a7d3b4; --faint: #5f8f6e;
  --line: rgba(61, 220, 132, 0.15); --line-strong: rgba(61, 220, 132, 0.42);
  --grad: linear-gradient(118deg, #3ddc84, #ff4d5e 92%);
  --grad-soft: linear-gradient(118deg, rgba(61, 220, 132, 0.14), rgba(255, 77, 94, 0.10));
  --neon-shadow: 0 4px 18px rgba(61, 220, 132, 0.35);
}
body.theme-halloween {
  --bg: #0b0603; --bg-2: #170c05;
  --neon: #ff7a18; --neon-2: #ffb26b; --neon-deep: #c2520a;
  --gold: #9dff3d; --gold-deep: #6db81a;
  --ink: #fff3e6; --muted: #d8a878; --faint: #8f6a48;
  --line: rgba(255, 122, 24, 0.16); --line-strong: rgba(255, 122, 24, 0.45);
  --grad: linear-gradient(118deg, #ff7a18, #9dff3d 92%);
  --grad-soft: linear-gradient(118deg, rgba(255, 122, 24, 0.14), rgba(157, 255, 61, 0.08));
  --neon-shadow: 0 4px 18px rgba(255, 122, 24, 0.4);
}
body.theme-valentin {
  --bg: #14040d; --bg-2: #220816;
  --neon: #ff5fa2; --neon-2: #ff9dca; --neon-deep: #d63384;
  --gold: #ffd6e8; --gold-deep: #f9a8c9;
  --ink: #fff0f6; --muted: #d99ab8; --faint: #94617b;
  --line: rgba(255, 95, 162, 0.16); --line-strong: rgba(255, 95, 162, 0.45);
  --grad: linear-gradient(118deg, #ff5fa2, #ffd6e8 92%);
  --grad-soft: linear-gradient(118deg, rgba(255, 95, 162, 0.14), rgba(255, 214, 232, 0.08));
  --neon-shadow: 0 4px 18px rgba(255, 95, 162, 0.4);
}
body.theme-nouvelan {
  --bg: #05060a; --bg-2: #0c0e16;
  --neon: #ffd700; --neon-2: #ffe97a; --neon-deep: #b89500;
  --gold: #f5f5ff; --gold-deep: #cfd0e8;
  --ink: #fbfbff; --muted: #b9bbd6; --faint: #7a7c99;
  --line: rgba(255, 215, 0, 0.16); --line-strong: rgba(255, 215, 0, 0.45);
  --grad: linear-gradient(118deg, #ffd700, #f5f5ff 92%);
  --grad-soft: linear-gradient(118deg, rgba(255, 215, 0, 0.13), rgba(245, 245, 255, 0.07));
  --neon-shadow: 0 4px 18px rgba(255, 215, 0, 0.35);
}
body.theme-ete {
  --bg: #041016; --bg-2: #082028;
  --neon: #ffb703; --neon-2: #ffd166; --neon-deep: #cc8b00;
  --gold: #48cae4; --gold-deep: #00a8cc;
  --ink: #eefaff; --muted: #9cc9d8; --faint: #5f8f9e;
  --line: rgba(255, 183, 3, 0.16); --line-strong: rgba(72, 202, 228, 0.45);
  --grad: linear-gradient(118deg, #ffb703, #48cae4 92%);
  --grad-soft: linear-gradient(118deg, rgba(255, 183, 3, 0.13), rgba(72, 202, 228, 0.09));
  --neon-shadow: 0 4px 18px rgba(255, 183, 3, 0.35);
}
/* couche de particules saisonnières */
#fx { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.fx-i { position: absolute; top: -7vh; display: inline-block; will-change: transform; user-select: none; }
.fx-fall { animation: fx-fall linear forwards; }
@keyframes fx-fall { to { transform: translateY(115vh) rotate(28deg); } }
.fx-float { top: auto; bottom: -7vh; animation: fx-float linear forwards; }
@keyframes fx-float { to { transform: translateY(-115vh) rotate(-18deg); } }
/* boutons ambiance */
.dz-opt.amb { min-width: 92px; }
.amb-emo { font-size: 1.7rem; display: block; margin-bottom: 4px; }
