/* Thème « Côte d'Ivoire » : orange, blanc, vert du drapeau, or et motifs kenté. */
:root {
  --orange: #f77f00;
  --orange-deep: #d96a00;
  --green: #009e60;
  --green-deep: #007a4a;
  --gold: #e8b13a;
  --red: #e5484d;
  /* Thème clair « ivoire wax » : fond crème, papier peint d'éléphants alignés en diagonales, avec losanges et points. */
  --bg: #f7f6f0;
  --surface: #ffffff;
  --surface-2: #edf1ea;
  --text: #14211a;
  --muted: #5f7268;
  --border: rgba(20, 33, 26, 0.09);
  --shadow: 0 6px 18px rgba(20, 60, 40, 0.08);
  --wallpaper:
    radial-gradient(120% 70% at 100% 0%, rgba(247, 127, 0, 0.07), transparent 60%),
    radial-gradient(120% 80% at 0% 100%, rgba(0, 158, 96, 0.08), transparent 60%),
    url('bg-light.png?v=diag');
  --wallpaper-tile: 300px; /* éléphants alignés en diagonales, 10 par motif */
  --radius: 18px;
  --nav-h: 72px;
  /* Fond « carte wallet » : base vert nuit, lueur orange en haut à gauche, verte en bas à droite. */
  --gradient:
    radial-gradient(90% 130% at 0% 0%, rgba(247, 127, 0, 0.45), transparent 62%),
    radial-gradient(85% 120% at 100% 100%, rgba(0, 158, 96, 0.5), transparent 62%),
    linear-gradient(160deg, #11261c, #07110c);
  --glow-border: 1px solid rgba(255, 255, 255, 0.09);
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  /* Zones protégées : encoche, barre système et, en plein écran, boutons de Telegram (voir common.js). */
  --app-top: var(--tg-top, 0px);
  --app-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-bottom, 0px));
  --app-left: max(env(safe-area-inset-left, 0px), var(--tg-left, 0px));
  --app-right: max(env(safe-area-inset-right, 0px), var(--tg-right, 0px));
  color-scheme: light;
}

:root[data-theme='dark'] {
  --orange: #ff8f1f;
  --orange-deep: #f77f00;
  --green: #19b477;
  --green-deep: #0f9a62;
  --gold: #f0c251;
  /* Thème sombre « terre de nuit » : brun très profond, éléphants vert vif alignés en diagonales. */
  --bg: #140e0a;
  --surface: #1f1712;
  --surface-2: #2c2119;
  --text: #f8eedf;
  --muted: #b09a83;
  --border: rgba(255, 236, 214, 0.08);
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  --wallpaper:
    radial-gradient(110% 60% at 50% -10%, rgba(247, 127, 0, 0.12), transparent 65%),
    radial-gradient(90% 60% at 100% 100%, rgba(25, 180, 119, 0.08), transparent 60%),
    url('bg-dark.png?v=diag');
  --wallpaper-tile: 300px; /* même disposition en diagonales que le thème clair */
  color-scheme: dark;
}

/* Papier peint : couche fixe derrière tout le contenu (fonctionne aussi sur iOS, contrairement à background-attachment: fixed). */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--wallpaper);
  background-size: auto, auto, var(--wallpaper-tile) var(--wallpaper-tile);
  background-repeat: no-repeat, no-repeat, repeat;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + 16px + var(--app-bottom));
}
button { font: inherit; color: inherit; }
.hidden { display: none !important; }
.mono { font-family: var(--font-mono); font-weight: 600; letter-spacing: -0.02em; }
.ico { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Logo : tête d'éléphant ---------- */
.brand-mark {
  --size: 48px;
  flex-shrink: 0;
  width: var(--size);
  height: var(--size);
  border-radius: 30%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
}
.brand-mark img { width: 84%; height: 84%; object-fit: contain; display: block; }
.brand-mark .logo-dark { display: none; }
:root[data-theme='dark'] .brand-mark .logo-light, .brand-mark.on-dark .logo-light { display: none; }
:root[data-theme='dark'] .brand-mark .logo-dark, .brand-mark.on-dark .logo-dark { display: block; }
.brand-mark.on-dark { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); }
.brand-mark.sm { --size: 40px; }
.brand-mark.lg { --size: 70px; }

/* ---------- Barre du haut ---------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: var(--app-top) var(--app-right) 0 var(--app-left);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.appbar-inner { display: flex; align-items: center; gap: 10px; padding: 10px 16px; max-width: 760px; margin: 0 auto; }
.brand-btn { border: 0; background: none; padding: 0; cursor: pointer; display: flex; }
.search-pill, .balance-pill {
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.search-pill { flex: 1; min-width: 0; padding: 0 14px; color: var(--muted); font-size: 14px; }
.search-pill .ico { width: 18px; height: 18px; color: var(--orange); }
.balance-pill { padding: 0 12px 0 5px; flex-shrink: 0; font-size: 13px; color: var(--green); }
.pill-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--orange) 15%, transparent);
  color: var(--orange);
}
.pill-icon .ico { width: 17px; height: 17px; }

/* ---------- Mise en page ---------- */
main { padding: 0; }
.page { padding: 16px; max-width: 760px; margin: 0 auto; }
.page-title { margin: 6px 0 4px; font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.01em; }
.page-subtitle { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.page-title + :not(.page-subtitle) { margin-top: 14px; }
.section-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  margin: 18px 0 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.section-title small { font-family: var(--font-body); color: var(--muted); font-weight: 500; font-size: 13px; white-space: nowrap; }
.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-label .ico { width: 16px; height: 16px; }
.section-label .link { margin-left: auto; letter-spacing: 0; text-transform: none; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.link { border: 0; background: none; color: var(--orange); font-size: 13px; font-weight: 700; cursor: pointer; padding: 0 0 0 6px; }

/* ---------- Animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes enterRight { from { opacity: 0; transform: translateX(26px); } }
@keyframes enterLeft { from { opacity: 0; transform: translateX(-26px); } }
@keyframes pop { 40% { transform: scale(1.22); } }
@keyframes shimmer { to { background-position: -200% 0; } }
.enter-right { animation: enterRight 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
.enter-left { animation: enterLeft 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
.card, .row, .tile, .order-card, .method { animation: rise 0.38s both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Accueil ---------- */
.hero-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 18px;
  border-radius: 22px;
  color: #fff;
  background:
    var(--gradient);
  border: var(--glow-border);
  color: #f4fbf6;
  box-shadow: var(--shadow);
}
.hero-text { flex: 1; min-width: 0; }
.eyebrow { font-size: 13px; font-weight: 700; opacity: 0.92; }
.hero-card h1 { margin: 4px 0 6px; font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.15; }
.hero-card p { margin: 0; font-size: 13px; opacity: 0.9; }
.hero-card .brand-mark { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); }

/* ---------- Catégories ---------- */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 16px -16px 0;
  padding: 2px 16px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.chip:active { transform: scale(0.96); }
.chip.active { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------- Recherche ---------- */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 14px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.search:focus-within { border-color: var(--orange); }
.search > .ico { width: 18px; height: 18px; color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 15px; color: var(--text); }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search .clear { border: 0; background: none; color: var(--muted); padding: 6px; cursor: pointer; display: flex; }
.search .clear .ico { width: 18px; height: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.tile:active { transform: scale(0.98); }
.tile-emoji { font-size: 26px; margin-bottom: 4px; }
.tile small { color: var(--muted); }

/* ---------- Grille d'articles ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; }
.card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.12s;
}
.card:active { transform: scale(0.98); }
.thumb { position: relative; width: 100%; aspect-ratio: 1; background: var(--surface-2); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); opacity: 0.45; }
.thumb .placeholder .ico { width: 34%; height: 34%; stroke-width: 1.4; }
.card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .cat { font-size: 12px; color: var(--muted); font-weight: 500; }
.card h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.25; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; }

.price { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 6px; }
.price b { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--orange); white-space: nowrap; }
.price s { color: var(--muted); font-size: 13px; white-space: nowrap; }

.add {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: var(--orange);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
}
.add .ico { width: 18px; height: 18px; stroke-width: 2.6; }
.add:active { transform: scale(0.88); }
.add.in { background: var(--green); animation: pop 0.3s; }
.owned { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--green); white-space: nowrap; }
.owned .ico { width: 14px; height: 14px; stroke-width: 3; }

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.badge.promo { background: var(--red); }
.badge.hot { background: var(--orange); }
.badge.limited { background: #0c1a13; color: var(--gold); }

/* ---------- Best sellers (bandeau défilant) ---------- */
.rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 -16px;
  padding: 2px 16px 6px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail .card { flex: 0 0 156px; scroll-snap-align: start; }

/* ---------- Favoris, partage, tri ---------- */
.fav {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.15s, background 0.2s, color 0.2s;
}
.fav .ico { width: 18px; height: 18px; }
.fav:active { transform: scale(0.85); }
.fav.on { background: #fff; color: var(--red); animation: pop 0.35s; }
.fav.on .ico { fill: currentColor; }
.hero-actions { position: absolute; right: 12px; bottom: 12px; z-index: 2; display: flex; gap: 8px; }
.hero-actions .fav { position: static; width: 42px; height: 42px; }
.hero-actions .fav .ico { width: 20px; height: 20px; }

.section-title:has(.sort) { align-items: center; }
.title-main { display: inline-flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
.section-title .count-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.sort {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
}
.sort .ico { width: 14px; height: 14px; color: var(--orange); flex-shrink: 0; }
.sort select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
  outline: none;
}
.soldout { font-size: 12px; font-weight: 700; color: var(--red); white-space: nowrap; }

/* Vignette qui s'envole vers le panier */
.fly-dot {
  position: fixed;
  z-index: 80;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  pointer-events: none;
  background: var(--orange) center / cover no-repeat;
  border: 2px solid #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

/* Chargement de l'accueil */
.card-skeleton {
  aspect-ratio: 0.74;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%) 0 0 / 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

/* ---------- Recharge en crypto ---------- */
.coin {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  background: #8a8f98;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}
.coin.ltc { background: linear-gradient(145deg, #4b77be, #2c4f8c); }
.coin.sol { background: linear-gradient(145deg, #9945ff, #14c48a); }
.coin.usdt { background: linear-gradient(145deg, #2fb38f, #1a8a6c); }
.coin.paypal { background: linear-gradient(145deg, #179bd7, #253b80); font-style: italic; font-weight: 800; }
.chev { color: var(--muted); display: grid; place-items: center; }
.chev .ico { width: 18px; height: 18px; }
.tag.danger { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
b.muted { color: var(--muted); }
.hint.center { text-align: center; }

.deposit-page { z-index: 55; padding-bottom: calc(40px + var(--app-bottom)); }
.deposit-content { display: flex; flex-direction: column; gap: 14px; padding-top: 22px; }
.deposit-head { display: flex; align-items: center; gap: 14px; }
.deposit-head .coin { width: 56px; height: 56px; font-size: 28px; }
.deposit-head h2 { margin: 0 0 6px; font-size: 21px; }
.deposit-head .cat-pill { margin: 0; }
.qr-card {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 14px;
  border-radius: 24px;
  background: #fff; /* fond blanc obligatoire pour que le QR reste lisible en thème sombre */
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  animation: rise 0.4s both;
}
.qr-card img { display: block; width: 220px; height: 220px; }
.qr-card small { color: #4f6158; font-size: 12px; font-weight: 600; max-width: 220px; text-align: center; }
.address-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.address-card small { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.address-card code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 14px;
  line-height: 1.45;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}
.info-box.warn .ico { color: var(--orange); }
.intent-form { display: flex; flex-direction: column; gap: 12px; }
.intent-form .section-label { margin: 6px 0 0; }
.intent-form .hint { margin: 0; }
.pay-amount {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 16px;
  border-radius: 22px;
  text-align: center;
  color: #f4fbf6;
  background: var(--gradient);
  border: var(--glow-border);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  animation: rise 0.4s both;
}
.pay-amount small { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.pay-amount b { font-family: var(--font-mono, ui-monospace, monospace); font-size: 26px; letter-spacing: 0.01em; word-break: break-all; }
.pay-amount span { font-size: 14px; opacity: 0.9; }
.pay-amount .btn { margin-top: 8px; background: rgba(255, 255, 255, 0.14); color: #f4fbf6; border-color: rgba(255, 255, 255, 0.25); }
.pay-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--orange) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--orange) 30%, transparent);
}
.pay-status.detected {
  background: color-mix(in srgb, var(--green) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--green) 35%, transparent);
}
.pay-status div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pay-status strong { font-size: 14px; }
.pay-status small { font-size: 12px; color: var(--muted); }
.spinner {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--orange) 25%, transparent);
  border-top-color: var(--orange);
  animation: spin 0.9s linear infinite;
}
.pay-status.detected .spinner { border-color: color-mix(in srgb, var(--green) 25%, transparent); border-top-color: var(--green); }
@keyframes spin { to { transform: rotate(360deg); } }
.center-link { align-self: center; padding: 6px; }
.manual-fallback {
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px dashed var(--border);
}
.manual-fallback summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); }
.manual-fallback[open] summary { margin-bottom: 12px; }
.declare-form { display: flex; flex-direction: column; gap: 12px; }
.declare-form .hint { margin: 0; }

/* ---------- Écran de succès ---------- */
.success {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px 20px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  overflow: hidden;
}
.success.open { opacity: 1; visibility: visible; }
.success-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  text-align: center;
  padding: 30px 22px 22px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  transform: translateY(24px) scale(0.96);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.success.open .success-card { transform: none; }
.success-check {
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--green) 16%, transparent);
}
.success.open .success-check { animation: pop 0.5s 0.15s both; }
.success-check .ico { width: 38px; height: 38px; stroke-width: 3; }
.success h2 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.success p { margin: 0 0 20px; color: var(--muted); line-height: 1.45; }
.success-actions { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.success-actions .btn { width: 100%; }
.success-actions .link { margin-top: 6px; padding: 6px; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i {
  position: absolute;
  top: -16px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
}
.success.open .confetti i { animation: confetti-fall linear both; }
@keyframes confetti-fall {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0.9; transform: translate(var(--drift), 105vh) rotate(var(--spin)); }
}
.rank {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  color: #f4fbf6;
  background: var(--gradient);
  border: var(--glow-border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* ---------- États vides & chargement ---------- */
.empty {
  text-align: center;
  color: var(--muted);
  padding: 44px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
  animation: rise 0.4s both;
}
.empty-icon {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  color: var(--orange);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--orange) 35%, transparent);
  box-shadow: 0 0 32px color-mix(in srgb, var(--orange) 25%, transparent);
}
.empty-icon .ico { width: 32px; height: 32px; }
.empty strong { color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.empty span { max-width: 300px; line-height: 1.45; }
.empty .btn { margin-top: 10px; }
.skeleton {
  height: 132px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%) 0 0 / 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
.muted-box {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
}

/* ---------- Listes ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
}
.row.clickable { cursor: pointer; }
.row.clickable:active { transform: scale(0.99); }
.row .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row .info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .info small { color: var(--muted); }
.row .info[role='button'] { cursor: pointer; }
.row-price { color: var(--orange); font-family: var(--font-mono); font-size: 14px; margin-top: 2px; }
.row img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.row .emoji { font-size: 22px; width: 36px; text-align: center; flex-shrink: 0; }
.thumb-sm {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
}
.thumb-sm .ico { width: 24px; height: 24px; }
.tx-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.tx-icon .ico { width: 19px; height: 19px; }
.tx-icon.in { background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--green); }
.tx-icon.out, .tx-icon.support { background: color-mix(in srgb, var(--orange) 15%, transparent); color: var(--orange); }
.plus { color: var(--green); }
.tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); vertical-align: middle; }

/* ---------- Boutons ---------- */
.btn {
  border: 0;
  border-radius: 14px;
  padding: 11px 16px;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.1s, opacity 0.15s, filter 0.15s;
}
.btn .ico { width: 18px; height: 18px; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.green { background: var(--green); }
.btn.secondary { background: var(--surface-2); color: var(--text); }
.btn.ghost { background: none; color: var(--muted); padding: 8px 6px; }
.btn.danger { background: none; color: var(--red); padding: 8px 6px; }
.btn.small { padding: 8px 11px; font-size: 13px; border-radius: 11px; gap: 5px; }
.btn.small .ico { width: 15px; height: 15px; }
.btn.block { width: 100%; padding: 16px; font-size: 16px; border-radius: 18px; }
.btn.gradient {
  background: var(--gradient);
  border: var(--glow-border);
  color: #f4fbf6;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 0;
  background: none;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.icon-btn.danger { color: var(--red); }
.icon-btn .ico { width: 19px; height: 19px; }

/* ---------- Panier ---------- */
.discount-form { display: flex; gap: 8px; margin-top: 14px; }
.discount-form input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  text-transform: uppercase;
  outline: 0;
}
.discount-form input::placeholder { text-transform: none; color: var(--muted); }
.discount-form input:focus { border-color: var(--orange); }
.discount-form .btn { border-radius: 16px; padding: 0 18px; }
.discount-applied {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 6px 6px 6px 14px;
  border-radius: 16px;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, transparent);
  border: 1px dashed color-mix(in srgb, var(--green) 50%, transparent);
  animation: rise 0.3s both;
}
.discount-applied span { flex: 1; color: var(--text); }
.methods { display: flex; flex-direction: column; gap: 10px; }
.method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.method:disabled { opacity: 0.5; cursor: default; }
.method.selected { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 7%, var(--surface)); }
.method-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  flex-shrink: 0;
}
.method.selected .method-icon { color: var(--orange); background: color-mix(in srgb, var(--orange) 15%, transparent); }
.method-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.method-text small { color: var(--muted); font-size: 13px; }
.radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  flex-shrink: 0;
  transition: 0.15s;
}
.method.selected .radio { border-color: var(--orange); background: var(--orange); box-shadow: inset 0 0 0 4px var(--surface); }
.info-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--orange) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--orange) 20%, transparent);
  font-size: 14px;
  line-height: 1.45;
}
.info-box .ico { color: var(--orange); margin-top: 1px; }
.info-box p { margin: 0; }
.checkout-bar {
  position: sticky;
  bottom: calc(var(--nav-h) + 10px + var(--app-bottom));
  z-index: 5;
  margin-top: 16px;
  padding: 14px 16px 16px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.summary-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--muted); }
.summary-line.discount { color: var(--green); }
.summary-line.total { color: var(--text); font-size: 17px; font-weight: 700; margin: 2px 0 8px; }
.summary-line.total .mono { font-size: 19px; }

/* ---------- Commandes ---------- */
.order-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 16px 12px; }
.order-head > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.order-head small { color: var(--muted); font-size: 13px; }
.status { flex-shrink: 0; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.status.paid { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.status.refunded { color: var(--muted); background: var(--surface-2); }
.order-items { border-top: 1px solid var(--border); }
.order-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.order-item + .order-item { border-top: 1px solid var(--border); }
.order-item .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.order-item .info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.order-item .info small { color: var(--muted); }
.order-item .thumb-sm { width: 44px; height: 44px; border-radius: 12px; }
.order-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: var(--surface-2);
  font-size: 14px;
  color: var(--muted);
}
.order-foot span { display: inline-flex; align-items: center; gap: 6px; }
.order-foot .ico { width: 15px; height: 15px; }
.order-foot b { color: var(--text); font-size: 15px; }

/* ---------- Wallet ---------- */
.wallet-card {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 22px;
  margin-bottom: 14px;
  border-radius: 24px;
  color: #f4fbf6;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    var(--gradient);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  animation: rise 0.4s both;
}
.wc-head { display: flex; align-items: center; gap: 12px; }
.wc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wc-title strong {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wc-title span { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.wc-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--gold);
}
.wc-icon .ico { width: 18px; height: 18px; }
.wc-label { display: block; margin-top: 24px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; }
.wc-amount { display: block; margin-top: 4px; font-size: 38px; letter-spacing: -0.03em; }
.support-row { margin-top: 24px; }

/* ---------- Feuille du bas (recharge) ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  max-width: 760px;
  margin: 0 auto;
  padding: 10px 18px calc(20px + var(--app-bottom));
  border-radius: 26px 26px 0 0;
  background: var(--surface);
  transform: translateY(110%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet-open .sheet-backdrop { opacity: 1; pointer-events: auto; }
.sheet-open .sheet { transform: none; }
.sheet-handle { width: 42px; height: 5px; border-radius: 3px; background: var(--surface-2); margin: 0 auto 14px; }
.sheet h3 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.sheet form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.amounts { display: flex; gap: 8px; flex-wrap: wrap; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
label.field input {
  height: 50px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  outline: 0;
}
label.field input:focus { border-color: var(--orange); }

/* ---------- Barre de navigation du bas ---------- */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 8px 8px calc(10px + var(--app-bottom));
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.nav-item {
  flex: 1;
  min-width: 0;
  max-width: 120px;
  border: 0;
  background: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 2px 6px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}
.nav-item .ico { width: 23px; height: 23px; }
.nav-item.active {
  color: #f4fbf6;
  background: var(--gradient);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 6px 16px rgba(0, 0, 0, 0.25);
}
.nav-item.active .ico { animation: pop 0.35s; }
.icon-wrap { position: relative; display: inline-flex; }
.count {
  position: absolute;
  top: -6px;
  right: -9px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border: 2px solid var(--bg);
  box-sizing: content-box;
}
.count.bump { animation: pop 0.35s; }

/* ---------- Fiche article (plein écran) ---------- */
.detail {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding-bottom: calc(150px + var(--app-bottom));
}
.detail.open { transform: none; }
.detail .thumb { aspect-ratio: 1; max-height: 62vh; max-width: 760px; margin: 0 auto; }
.detail .thumb .badge { top: 16px; left: 16px; font-size: 12px; }
.detail .content { max-width: 760px; margin: 0 auto; padding: 18px 16px; }
.detail .cat-pill {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, transparent);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.detail h2 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.2; }
.detail .price b { font-size: 22px; }
.detail .price s { font-size: 16px; }
.detail .desc { white-space: pre-line; line-height: 1.55; opacity: 0.88; margin: 16px 0 0; }
.detail .perks {
  margin-top: 20px;
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
}
.detail .perks div { display: flex; gap: 10px; align-items: center; }
.detail .perks .ico { color: var(--orange); width: 18px; height: 18px; }
.detail .close {
  position: fixed;
  top: calc(14px + var(--app-top));
  right: calc(14px + var(--app-right));
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.detail .buy-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(12px + var(--app-bottom));
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.detail .buy-bar .btn { max-width: 728px; margin: 0 auto; display: flex; }
/* Dans Telegram, on utilise les boutons natifs (MainButton / BackButton). */
.in-telegram .detail .close { display: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(var(--nav-h) + 24px + var(--app-bottom));
  margin: 0 auto;
  max-width: 420px;
  background: #0c1a13;
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  text-align: center;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: 0.25s;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.toast.show { opacity: 1; transform: none; }

/* ---------- Administration ---------- */
.admin-body { padding-bottom: 24px; }
.admin-body main { padding: 16px; max-width: 760px; margin: 0 auto; }
.admin-header {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    var(--gradient);
  border: var(--glow-border);
  color: #f4fbf6;
}
.admin-header .inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: calc(20px + var(--app-top)) calc(16px + var(--app-right)) 18px calc(16px + var(--app-left));
  max-width: 760px;
  margin: 0 auto;
}
.admin-header h1 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.admin-header p { margin: 4px 0 0; font-size: 14px; opacity: 0.92; }

.tabs { display: flex; gap: 6px; padding: 12px 16px 0; max-width: 760px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.tab {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.tab.active { background: var(--green); border-color: var(--green); color: #fff; }
form.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}
form.panel h3 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
form.panel label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
form.panel label.inline { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 15px; font-weight: 500; }
form.panel input[type='text'], form.panel input[type='number'], form.panel textarea, form.panel select {
  font: inherit;
  font-weight: 400;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 12px;
  outline: 0;
  width: 100%;
}
form.panel input:focus, form.panel textarea:focus, form.panel select:focus { border-color: var(--orange); }
form.panel textarea { resize: vertical; min-height: 90px; }
form.panel input[type='file'] { color: var(--text); font-size: 13px; font-weight: 400; }
input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--green); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.stat b { display: block; font-family: var(--font-display); font-size: 20px; color: var(--orange); }
.stat span { color: var(--muted); font-size: 13px; }
.admin-body .row { gap: 8px; }
.list-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin: 22px 0 10px; }
#address-fields { display: flex; flex-direction: column; gap: 10px; }
#address-fields input { font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; }
.review-row .info strong { white-space: normal; }
.review-row .link { padding: 0; align-self: flex-start; text-decoration: none; margin: 2px 0 4px; }
.review-actions { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.review-actions input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}
#lines-input { font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; line-height: 1.5; white-space: pre; }
#lines-field { display: flex; flex-direction: column; gap: 6px; }
#lines-field .hint { margin: 0; }
.delivered { margin-top: 6px; }
.delivered summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--orange); }
.delivered-line {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.delivered-line:last-child { border-bottom: 0; }
.delivered-line code { font-size: 12px; word-break: break-all; white-space: pre-wrap; }
.admin-body .row .info strong { white-space: nowrap; }

/* ---------- Fiche article : infos et animation d'ouverture ---------- */
.detail { transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1); }
.detail-hero { padding: 16px 16px 0; max-width: 760px; margin: 0 auto; }
.detail-hero .thumb {
  border-radius: 24px;
  border: 1px solid var(--border);
  max-height: 46vh;
  aspect-ratio: 16 / 11;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}
.detail-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 4px; }
.detail-head h2 { margin: 0; }
.detail-head .cat-pill { margin: 0; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.info-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.info-tile small, .desc-card small, .avail-card small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.info-tile strong { font-size: 15px; }
.tile-ico {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  color: var(--orange);
  background: color-mix(in srgb, var(--orange) 14%, transparent);
}
.tile-ico .ico { width: 17px; height: 17px; }
.desc-card, .avail-card {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.desc-card p { margin: 6px 0 0; white-space: pre-line; line-height: 1.55; font-size: 14px; }
.avail-card { display: flex; justify-content: space-between; align-items: flex-end; }
.avail-card > div { display: flex; flex-direction: column; gap: 4px; }
.avail-card .right { align-items: flex-end; }
.avail-card strong { font-size: 17px; }
.avail-card .ok { color: var(--green); }
.avail-card .ko { color: var(--red); }
.avail-card .mono { font-size: 22px; }
.detail .buy-bar { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.detail .buy-bar .btn { max-width: 728px; width: 100%; }
.btn.outline { background: var(--surface); color: var(--text); border: 1px solid var(--border); }

/* Ouverture : l'image grossit doucement, puis les blocs apparaissent en cascade. */
@keyframes zoomIn { from { opacity: 0; transform: scale(0.92); } }
.detail.open .detail-hero .thumb { animation: zoomIn 0.5s 0.08s cubic-bezier(0.16, 1, 0.3, 1) both; }
.detail.open .content > * { animation: rise 0.45s cubic-bezier(0.16, 1, 0.3, 1) both; }
.detail.open .content > :nth-child(2) { animation-delay: 0.12s; }
.detail.open .content > :nth-child(3) { animation-delay: 0.16s; }
.detail.open .content > :nth-child(4) { animation-delay: 0.2s; }
.detail.open .content > :nth-child(5) { animation-delay: 0.24s; }
.detail.open .content > :nth-child(6) { animation-delay: 0.28s; }
.detail.open .info-tile { animation: rise 0.45s both; }
.detail.open .info-tile:nth-child(2) { animation-delay: 0.24s; }
.detail.open .info-tile:nth-child(3) { animation-delay: 0.28s; }
.detail.open .info-tile:nth-child(4) { animation-delay: 0.32s; }
.detail.open .buy-bar { animation: rise 0.45s 0.3s both; }
/* Admin : groupe des infos de la fiche article. */
.info-fields { border: 1px dashed var(--border); border-radius: 14px; padding: 12px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.info-fields legend { padding: 0 6px; font-size: 13px; font-weight: 700; color: var(--text); }
.info-fields legend .hint { display: inline; font-weight: 500; margin: 0; }

/* ---------- Survol : élévation + lumière (souris uniquement, pas sur mobile) ---------- */
@keyframes sheen { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(220%) skewX(-20deg); } }

.card, .btn, .tile, .chip, .method, .row.clickable, .info-tile, .nav-item, .search-pill, .balance-pill {
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s, border-color 0.25s, filter 0.25s, background 0.2s, color 0.2s;
}
.card { isolation: isolate; }
.card .thumb img { transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
/* Reflet lumineux qui traverse la carte / le bouton. */
.card::after, .btn.gradient::after, .btn:not(.ghost):not(.danger):not(.secondary):not(.outline)::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 45%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(-120%) skewX(-20deg);
  z-index: 2;
}
.btn { position: relative; overflow: hidden; }

@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--orange) 45%, transparent);
    box-shadow:
      0 14px 30px rgba(0, 0, 0, 0.18),
      0 0 0 1px color-mix(in srgb, var(--orange) 25%, transparent),
      -10px -6px 28px color-mix(in srgb, var(--orange) 22%, transparent),
      10px 10px 28px color-mix(in srgb, var(--green) 20%, transparent);
  }
  .card:hover .thumb img { transform: scale(1.06); }
  .card:hover::after { animation: sheen 0.9s ease; }
  .card:hover .add { transform: scale(1.08); box-shadow: 0 0 18px color-mix(in srgb, var(--orange) 55%, transparent); }

  .btn:not(:disabled):hover { transform: translateY(-2px); filter: brightness(1.08); }
  .btn:not(:disabled):hover::after { animation: sheen 0.8s ease; }
  .btn.gradient:not(:disabled):hover {
    box-shadow:
      0 12px 28px rgba(0, 0, 0, 0.28),
      -8px -4px 24px color-mix(in srgb, var(--orange) 35%, transparent),
      8px 6px 24px color-mix(in srgb, var(--green) 30%, transparent);
  }
  .btn.outline:not(:disabled):hover, .btn.secondary:not(:disabled):hover {
    border-color: color-mix(in srgb, var(--orange) 50%, transparent);
    box-shadow: 0 0 18px color-mix(in srgb, var(--orange) 20%, transparent);
  }
  .add:hover { transform: scale(1.12); box-shadow: 0 0 20px color-mix(in srgb, var(--orange) 60%, transparent); }

  .chip:hover:not(.active), .tile:hover, .method:not(:disabled):hover, .row.clickable:hover, .info-tile:hover,
  .search-pill:hover, .balance-pill:hover {
    border-color: color-mix(in srgb, var(--orange) 45%, transparent);
    box-shadow: 0 0 20px color-mix(in srgb, var(--orange) 16%, transparent);
  }
  .tile:hover, .info-tile:hover { transform: translateY(-3px); }
  .chip:hover { transform: translateY(-1px); }
  .nav-item:not(.active):hover { color: var(--text); background: color-mix(in srgb, var(--orange) 8%, transparent); }
  .icon-btn:hover { background: var(--surface-2); color: var(--text); }
  .icon-btn.danger:hover { color: var(--red); box-shadow: 0 0 14px color-mix(in srgb, var(--red) 25%, transparent); }
}

/* ==========================================================================
   Plein écran & responsive
   ========================================================================== */

/* Pages superposées (fiche article, recharge, succès) : elles démarrent sous l'encoche / les boutons Telegram. */
.detail { padding-top: var(--app-top); padding-left: var(--app-left); padding-right: var(--app-right); }
.success { padding-top: calc(24px + var(--app-top)); }
.page { padding-left: calc(16px + var(--app-left)); padding-right: calc(16px + var(--app-right)); }
.bottom-nav { padding-left: calc(8px + var(--app-left)); padding-right: calc(8px + var(--app-right)); }
.toast { bottom: calc(var(--nav-h) + 24px + var(--app-bottom)); }

/* Plein écran : Telegram dessine ses boutons (Fermer / Menu) par-dessus le haut de l'écran,
   la barre du haut prend donc une couleur pleine pour rester lisible sous eux. */
.is-fullscreen .appbar { background: var(--bg); }

/* Petits téléphones */
@media (max-width: 360px) {
  .page { padding-left: calc(12px + var(--app-left)); padding-right: calc(12px + var(--app-right)); }
  .grid { gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card .body { padding: 8px 10px 10px; }
  .card h3 { font-size: 14px; }
  .nav-item { font-size: 11px; }
  .page-title { font-size: 23px; }
}

/* Téléphone à l'horizontale : barre de navigation plus basse pour garder de la place. */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --nav-h: 58px; }
  .nav-item { flex-direction: row; gap: 6px; padding: 8px 10px; }
  .detail-hero .thumb { max-height: 70vh; }
}

/* Tablette & ordinateur (Telegram Desktop, Telegram Web en grand) */
@media (min-width: 900px) {
  .appbar-inner { max-width: 1120px; padding-top: 12px; padding-bottom: 12px; }
  .page { max-width: 1120px; padding-top: 22px; }
  /* Pages de lecture : on garde une largeur confortable. */
  #cart .page, #orders .page, #wallet .page { max-width: 760px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
  .rail { margin: 0; padding: 2px 0 8px; }
  .rail .card { flex-basis: 200px; }
  .chips { margin: 18px 0 0; padding: 2px 0; flex-wrap: wrap; overflow: visible; }
  .hero-card { padding: 28px 30px; }
  .hero-card h1 { font-size: 34px; }

  /* Navigation : pastille flottante centrée au lieu d'une barre pleine largeur. */
  .bottom-nav {
    left: 50%;
    right: auto;
    bottom: calc(16px + var(--app-bottom));
    transform: translateX(-50%);
    width: min(560px, calc(100% - 32px));
    padding: 6px;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  }
  body { padding-bottom: calc(var(--nav-h) + 40px + var(--app-bottom)); }

  /* Fiche article : visuel à gauche, infos à droite. */
  #detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 8px 32px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 24px 0;
    align-items: start;
  }
  #detail-body .detail-hero { position: sticky; top: calc(24px + var(--app-top)); padding: 0; max-width: none; margin: 0; width: 100%; }
  #detail-body .detail-hero .thumb { aspect-ratio: 1; max-height: calc(100vh - 220px); }
  #detail-body .content { padding: 4px 0 0; max-width: none; margin: 0; width: 100%; }
  .detail { padding-bottom: calc(110px + var(--app-bottom)); }
  .detail .buy-bar { flex-direction: row; justify-content: center; }
  .detail .buy-bar .btn { max-width: 340px; margin: 0; }

  /* Page de recharge, écran de succès, feuille du bas : colonne centrée. */
  #deposit-body { max-width: 620px; margin: 0 auto; }
  .sheet { border-radius: 26px; bottom: calc(16px + var(--app-bottom)); max-width: 520px; }

  /* Administration */
  .admin-body main, .tabs, .admin-header .inner { max-width: 960px; }
}

@media (min-width: 1400px) {
  .appbar-inner, .page, #detail-body { max-width: 1280px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (min-width: 900px) {
  /* La navigation flotte 16 px plus haut : le récapitulatif du panier et les messages suivent. */
  .checkout-bar { bottom: calc(var(--nav-h) + 30px + var(--app-bottom)); }
  .toast { bottom: calc(var(--nav-h) + 40px + var(--app-bottom)); }
}
/* ---------- Quantités (articles livrés par liste) ---------- */
.add { position: relative; }
.qty-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  border: 2px solid var(--surface);
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}
.qty-stepper {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.qty-stepper button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
}
.qty-stepper button:active:not(:disabled) { transform: scale(0.9); }
.qty-stepper button:disabled { opacity: 0.35; cursor: default; }
.qty-stepper span { min-width: 30px; text-align: center; font-size: 15px; }
.cart-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 8px;
  align-items: center;
}
.cart-row .info { grid-column: 2; }
.cart-row .icon-btn { grid-column: 3; grid-row: 1; }
.cart-row:has(.qty-stepper) .thumb-sm { grid-row: 1 / span 2; align-self: start; }
.cart-row .qty-stepper { grid-column: 2 / 4; grid-row: 2; justify-self: end; }
.unit-price { display: block; font-family: var(--font-body); font-weight: 500; font-size: 12px; color: var(--muted); }
.qty-row {
  width: 100%;
  max-width: 728px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}
.qty-row small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }

@media (min-width: 900px) {
  .detail .buy-bar { flex-wrap: wrap; }
  .detail .buy-bar .qty-row { max-width: 688px; }
}
/* ---------- Bouton musique (barre du haut) ---------- */
.music-toggle {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--green);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s, color 0.2s, background 0.2s;
}
.music-toggle .ico { width: 20px; height: 20px; }
.music-toggle:active { transform: scale(0.9); }
.music-toggle.off { color: var(--muted); }
/* Petite animation des ondes quand la musique joue. */
.music-toggle:not(.off) .ico path:nth-child(2) { animation: sound-wave 1.6s ease-in-out infinite; transform-origin: 12px 12px; }
@keyframes sound-wave { 50% { opacity: 0.45; } }
/* ---------- Recharge PayPal.me : référence à mettre en note ---------- */
.ref-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 2px dashed color-mix(in srgb, var(--orange) 55%, transparent);
  text-align: center;
}
.ref-card small { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ref-card code { font-size: 28px; letter-spacing: 0.06em; color: var(--orange); user-select: all; -webkit-user-select: all; }
.info-box.alert {
  background: color-mix(in srgb, var(--orange) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--orange) 45%, transparent);
}
.info-box.alert .ico { color: var(--orange); }
.pay-steps { margin: 0; padding: 0 0 0 22px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.4; }
.pay-steps li::marker { color: var(--orange); font-weight: 700; }
/* ---------- Liquid glass : lignes du panier et récapitulatif du total ---------- */
:root {
  --glass-tint: rgba(255, 255, 255, 0.42);
  --glass-tint-2: rgba(255, 255, 255, 0.16);
  --glass-edge: rgba(255, 255, 255, 0.65);
  --glass-shine: rgba(255, 255, 255, 0.55);
  --glass-shadow: 0 10px 30px rgba(20, 60, 40, 0.14);
}
:root[data-theme='dark'] {
  --glass-tint: rgba(60, 44, 32, 0.38);
  --glass-tint-2: rgba(30, 22, 16, 0.22);
  --glass-edge: rgba(255, 236, 214, 0.16);
  --glass-shine: rgba(255, 236, 214, 0.14);
  --glass-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}
.cart-row,
.checkout-bar {
  position: relative;
  isolation: isolate; /* le reflet (::before) passe sous le contenu */
  overflow: hidden;
  background: linear-gradient(135deg, var(--glass-tint), var(--glass-tint-2));
  border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow:
    inset 0 1px 0 var(--glass-shine),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    var(--glass-shadow);
}
/* Reflet de lumière en haut à gauche, comme sur une plaque de verre bombée. */
.cart-row::before,
.checkout-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(120% 80% at 0% 0%, var(--glass-shine), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 40%);
  opacity: 0.6;
}
/* Le récapitulatif reste lisible même s'il flotte au-dessus des articles. */
.checkout-bar { -webkit-backdrop-filter: blur(24px) saturate(190%); backdrop-filter: blur(24px) saturate(190%); }
/* Boutons − / + et corbeille légèrement vitrés eux aussi. */
.cart-row .qty-stepper { background: rgba(255, 255, 255, 0.08); border-color: var(--glass-edge); }
/* Sans backdrop-filter (vieux navigateurs) : fond plein pour garder un bon contraste. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cart-row, .checkout-bar { background: var(--surface); }
}
/* ---------- Panier : blocs empilés avec un espacement régulier, sans chevauchement ---------- */
/* Le récapitulatif n'est plus « collant » : en restant accroché en bas de l'écran, il passait par-dessus
   le moyen de paiement et le message d'information. Il suit maintenant le contenu, après tous les blocs. */
#cart-body { display: flex; flex-direction: column; gap: 14px; }
#cart-body > * { margin-top: 0; margin-bottom: 0; }
#cart-body > .list { display: flex; flex-direction: column; gap: 10px; }
#cart-body > .section-label { margin: 6px 0 -6px; }
#cart-body .checkout-bar { position: relative; bottom: auto; margin-top: 4px; }
/* ==========================================================================
   Admin : gestion (tableau de bord, clients, messages, alertes de stock)
   ========================================================================== */
:root { --chart-bar: #007a4a; } /* contraste et lisibilité validés sur fond clair */
:root[data-theme='dark'] { --chart-bar: #14a06a; } /* idem sur fond sombre */

.tabs .tab { flex: 0 0 auto; position: relative; }
.tab-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  vertical-align: 1px;
}
.admin-body main > section { display: flex; flex-direction: column; gap: 14px; }
.admin-body main > section.hidden { display: none; }
div.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
div.panel h3, div.panel h4 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 600; }
div.panel h3 { font-size: 17px; }
div.panel h4 { font-size: 14px; }

/* En-tête + choix de la période */
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dash-head h3 { margin: 0; font-family: var(--font-display); font-size: 18px; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.segmented button {
  border: 0; background: none; padding: 7px 12px; border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer;
}
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }

/* Indicateurs clés */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kpi {
  display: flex; flex-direction: column; gap: 4px; padding: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.kpi span { font-size: 12px; font-weight: 700; color: var(--muted); }
.kpi b { font-size: 20px; color: var(--text); }
.kpi-sub { font-size: 12px; color: var(--muted); }
.kpi-sub.up { color: var(--green); }
.kpi-sub.down { color: var(--red); }
.kpis.small { margin-top: 4px; }
.kpis.small .kpi { background: var(--surface-2); padding: 10px 12px; }
.kpis.small .kpi b { font-size: 16px; }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kpis.small { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Graphique : chiffre d'affaires par jour (une série, barres fines, grille discrète) */
.bar-chart { display: flex; gap: 8px; height: 200px; }
.chart-empty { margin: auto; text-align: center; max-width: 280px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 20px; text-align: right; }
.chart-y span { font-size: 10px; color: var(--muted); white-space: nowrap; }
.chart-plot { position: relative; flex: 1; min-width: 0; }
.chart-grid { position: absolute; inset: 0 0 20px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid i { display: block; border-top: 1px dashed var(--border); }
.chart-grid i:last-child { border-top-style: solid; border-color: color-mix(in srgb, var(--muted) 40%, transparent); }
.chart-bars { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 2px; }
.bar-hit {
  position: relative; flex: 1; min-width: 0; border: 0; padding: 0 0 20px; background: none; cursor: pointer;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
}
.bar { display: block; width: 100%; max-width: 22px; background: var(--chart-bar); border-radius: 4px 4px 0 0; transition: filter 0.15s; }
.bar-hit:hover .bar, .bar-hit:focus-visible .bar { filter: brightness(1.2); }
.bar-label {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  font-size: 10px; color: var(--muted); white-space: nowrap;
}
.chart-tip {
  position: absolute; top: -6px; transform: translate(-50%, -100%); z-index: 2;
  padding: 6px 10px; border-radius: 10px; white-space: nowrap; pointer-events: none;
  background: var(--text); color: var(--bg); font-size: 12px; font-weight: 600;
}
.table-view { margin-top: 12px; }
.table-view summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.data-table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; color: var(--muted); font-weight: 700; padding: 6px 4px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 6px 4px; border-bottom: 1px dashed var(--border); }
.data-table td:last-child, .data-table th:last-child { text-align: right; }

/* Classements (articles les plus vendus, recharges, historique client) */
.dash-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .dash-grid { grid-template-columns: 1fr 1fr; } }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.rank-row:last-child { border-bottom: 0; }
.rank-n {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); font-size: 12px; font-weight: 800;
}
.rank-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row small { color: var(--muted); white-space: nowrap; }
.rank-row b.neg, b.neg { color: var(--red); }

/* Alertes de stock */
.alert-panel {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--orange) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--orange) 45%, transparent);
}
.alert-panel.hidden { display: none; }
.stock-line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.stock-line .low { color: var(--orange); }
.stock-line .ko { color: var(--red); }

/* Exports */
.export-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

/* Clients */
.field-search input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px;
}
#customer-detail { display: flex; flex-direction: column; gap: 14px; }
#customer-detail.hidden { display: none; }
#customer-detail > .btn.ghost { align-self: flex-start; }
.admin-body .row b.mono { white-space: nowrap; }

/* Aperçu d'un message groupé, façon bulle Telegram */
.bubble-preview { display: flex; flex-direction: column; gap: 6px; }
.bubble-preview small { color: var(--muted); font-size: 12px; font-weight: 700; }
.bubble {
  align-self: flex-start; max-width: 90%; padding: 10px 12px; border-radius: 16px 16px 16px 4px;
  background: var(--surface-2); white-space: pre-wrap; line-height: 1.45; font-size: 14px;
}
.bubble-button {
  align-self: flex-start; max-width: 90%; padding: 8px 14px; border-radius: 10px; text-align: center;
  background: color-mix(in srgb, var(--green) 18%, var(--surface)); color: var(--text); font-weight: 600; font-size: 13px;
}
#broadcast-form textarea { resize: vertical; }
/* Les panneaux du tableau de bord ne débordent jamais : les noms longs sont tronqués, les montants restent visibles. */
.dash-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-grid > .panel, .kpis > .kpi { min-width: 0; }
.rank-row b { flex-shrink: 0; }
.rank-row small { flex-shrink: 0; }
@media (max-width: 420px) {
  /* Sur téléphone, le détail (« 41 vendu(s) ») passe sous le nom. */
  .rank-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'n name amount' 'n sub amount'; column-gap: 10px; row-gap: 1px; }
  .rank-row .rank-n { grid-area: n; }
  .rank-row .rank-name { grid-area: name; }
  .rank-row small { grid-area: sub; }
  .rank-row b { grid-area: amount; }
  .rank-row:not(:has(.rank-n)) { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'name amount' 'sub amount'; }
}
/* ---------- Admin : réglages (interrupteur) ---------- */
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
.setting-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.setting-text strong { font-size: 15px; }
.setting-text small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.switch { position: relative; flex-shrink: 0; width: 52px; height: 30px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch-track {
  position: absolute; inset: 0; border-radius: 15px; background: var(--surface-2);
  border: 1px solid var(--border); transition: background 0.2s;
}
.switch-track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); transition: transform 0.2s;
}
.switch input:checked + .switch-track { background: var(--green); border-color: var(--green); }
.switch input:checked + .switch-track::after { transform: translateX(22px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--orange); outline-offset: 2px; }
.switch input:disabled + .switch-track { opacity: 0.6; }
/* ---------- Admin : changer la musique ---------- */
#music-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
#music-form .hint { margin: 0; }
#music-form label:not(.dropzone) { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
#music-form input[type='text'] {
  font: inherit; font-weight: 400; color: var(--text); background: var(--surface-2);
  border: 1px solid transparent; border-radius: 12px; padding: 11px 12px; outline: 0; width: 100%;
}
#music-form input[type='text']:focus { border-color: var(--orange); }
.dropzone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 22px 16px; border-radius: 16px; text-align: center; cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--muted) 45%, transparent);
  background: var(--surface-2);
  transition: border-color 0.2s, background 0.2s;
}
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone-icon { font-size: 28px; }
.dropzone strong { font-size: 15px; word-break: break-all; }
.dropzone small { color: var(--muted); font-size: 12px; }
.dropzone.dragging, .dropzone:hover { border-color: var(--orange); }
.dropzone.has-file { border-style: solid; border-color: var(--green); background: color-mix(in srgb, var(--green) 10%, var(--surface)); }
.music-current { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.music-line { display: flex; gap: 10px; align-items: center; }
.music-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-2); font-size: 20px;
}
.music-line div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.music-line small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.music-current audio { width: 100%; height: 40px; }
.music-current .link { padding: 0; }