/* =========================================================
   🌸 AutoShop — Feuille de style v4
   Refonte purement esthétique (aucune logique modifiée)
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Palette */
  --pink: #ff2d95;
  --pink-soft: #ff7ac0;
  --pink-deep: #c4106b;
  --violet: #a855f7;
  --violet-deep: #6d28d9;
  --cyan: #22d3ee;

  --grad-primary: linear-gradient(135deg, #ff2d95 0%, #ff5bb0 45%, #a855f7 100%);
  --grad-text: linear-gradient(120deg, #ffffff 0%, #ffd6ec 35%, #ff2d95 70%, #a855f7 100%);
  --grad-line: linear-gradient(90deg, transparent, rgba(255, 45, 149, .75), rgba(168, 85, 247, .55), transparent);

  /* Fonds */
  --bg: #07050b;
  --bg-elev: rgba(255, 255, 255, .045);
  --bg-elev-2: rgba(255, 255, 255, .075);
  --bg-card: rgba(20, 14, 26, .66);
  --bg-sheet: rgba(16, 11, 22, .92);

  /* Bordures */
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 45, 149, .38);

  /* Texte */
  --text: #f6f2f8;
  --text-secondary: #b6adc4;
  --text-muted: #7d7489;

  /* Ombres & lueurs */
  --glow-sm: 0 0 12px rgba(255, 45, 149, .35);
  --glow-md: 0 0 22px rgba(255, 45, 149, .45), 0 0 60px rgba(168, 85, 247, .18);
  --shadow-card: 0 10px 30px -12px rgba(0, 0, 0, .8);
  --shadow-float: 0 24px 60px -18px rgba(0, 0, 0, .9);

  /* Formes */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* Mouvement */
  --ease: cubic-bezier(.22, .8, .3, 1);
  --fast: .18s var(--ease);
  --base: .3s var(--ease);

  /* Typo */
  --font: 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  /* Reserve la hauteur de la barre de navigation flottante */
  padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  line-height: 1.5;
  letter-spacing: .1px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Halo d'ambiance (aurora) — décor pur, ne capte aucun clic */
body::before {
  content: '';
  position: fixed;
  inset: -30vh -20vw;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(60vw 55vw at 8% 0%, rgba(255, 45, 149, .38), transparent 64%),
    radial-gradient(52vw 48vw at 98% 8%, rgba(168, 85, 247, .32), transparent 62%),
    radial-gradient(70vw 45vw at 50% 106%, rgba(196, 16, 107, .26), transparent 70%);
  filter: blur(28px) saturate(120%);
  animation: drift 22s ease-in-out infinite alternate;
}

/* Grain / trame fine pour casser les aplats */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .35;
  background-image:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 34px 34px, 34px 34px;
  mask-image: radial-gradient(70% 60% at 50% 0%, #000 0%, transparent 85%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 0%, #000 0%, transparent 85%);
}

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

::selection {
  background: rgba(255, 45, 149, .35);
  color: #fff;
}

/* ---------- Conteneur ---------- */
#app {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 14px 10px;
  padding-left: max(14px, env(safe-area-inset-left, 0px));
  padding-right: max(14px, env(safe-area-inset-right, 0px));
}

/* ---------- En-tête ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 4px 14px;
  padding-top: max(16px, env(safe-area-inset-top, 0px));
  margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(7, 5, 11, .92) 55%, rgba(7, 5, 11, 0) 100%);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  border-image: var(--grad-line) 1;
}

header h1 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.4px;
  line-height: 1.1;
}

.logo-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1.5px solid rgba(255, 45, 149, .55);
  box-shadow: var(--glow-sm), 0 0 0 3px rgba(255, 45, 149, .1);
  animation: halo 4.5s ease-in-out infinite;
}

@keyframes halo {
  0%, 100% { box-shadow: var(--glow-sm), 0 0 0 3px rgba(255, 45, 149, .1); }
  50%      { box-shadow: var(--glow-md), 0 0 0 5px rgba(255, 45, 149, .07); }
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.02;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-text-sub {
  font-size: .62em;
  font-weight: 600;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  opacity: .85;
}

#balance-display {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  font-size: .98rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
  transition: border-color var(--base), box-shadow var(--base);
}

#balance-display:hover {
  border-color: var(--border-strong);
  box-shadow: var(--glow-sm);
}

.balance-cur {
  font-size: .86rem;
  font-weight: 600;
  color: var(--text-secondary);
}

#balance-amount {
  font-size: 1.06rem;
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Navigation principale ---------- */
/* Barre de navigation flottante, ancree en bas de l'ecran */
#tabs {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 60;
  width: min(592px, calc(100% - 20px));
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 6px;
  border-radius: var(--r-lg);
  background: rgba(18, 12, 24, .82);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 -6px 30px -10px rgba(0, 0, 0, .95), var(--shadow-float);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.tab {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding: 9px 3px 11px;
  text-align: center;
  line-height: 1.25;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  border-radius: var(--r-md);
  cursor: pointer;
  font-family: inherit;
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .1px;
  transition: color var(--fast), background var(--base), border-color var(--base), box-shadow var(--base), transform var(--fast);
  -webkit-tap-highlight-color: transparent;
}

.tab:hover {
  color: var(--text);
  background: var(--bg-elev-2);
}

.tab:active {
  transform: scale(.97);
}

.tab.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 45, 149, .22), rgba(168, 85, 247, .18));
  border-color: var(--border-strong);
  box-shadow: var(--glow-sm), inset 0 1px 0 rgba(255, 255, 255, .14);
}

.tab.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 18px;
  height: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: var(--grad-primary);
  box-shadow: var(--glow-sm);
}

/* Icône + libellé empilés dans chaque onglet */
.tab-ico {
  position: relative;
  display: block;
  font-size: 1.12rem;
  line-height: 1.3;
  filter: saturate(115%);
  transition: transform var(--base);
}

.tab-lbl {
  display: block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: -.1px;
  white-space: nowrap;
}

.tab.active .tab-ico {
  transform: translateY(-1px) scale(1.08);
}

/* L'onglet admin s'aligne avec les autres dans la barre du bas */
.tab.admin-only {
  display: none;
}

#cart-count {
  position: absolute;
  top: -4px;
  left: calc(50% + 5px);
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  font-size: .68rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--grad-primary);
  border: 1.5px solid #0f0a15;
  box-shadow: var(--glow-sm);
}

/* ---------- Sections ---------- */
.section {
  display: none;
}

.section.active {
  display: block;
  animation: sectionIn .35s var(--ease) both;
}

@keyframes sectionIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.section > h2 {
  position: relative;
  margin-bottom: 18px;
  padding-left: 13px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.3px;
}

.section > h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12%;
  bottom: 12%;
  width: 4px;
  border-radius: 4px;
  background: var(--grad-primary);
  box-shadow: var(--glow-sm);
}

/* ---------- Filtres catégories ---------- */
.categories {
  display: flex;
  gap: 8px;
  margin: 0 -8px 18px;
  padding: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.categories::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  flex: 0 0 auto;
  scroll-snap-align: start;
  padding: 9px 17px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--r-pill);
  cursor: pointer;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--base);
  -webkit-tap-highlight-color: transparent;
}

.cat-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.cat-btn:active {
  transform: scale(.96);
}

.cat-btn.active {
  color: #fff;
  background: var(--grad-primary);
  border-color: transparent;
  box-shadow: var(--glow-md);
}

/* ---------- Grille produits ---------- */
.products-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--base), border-color var(--base), box-shadow var(--base);
  animation: cardIn .4s var(--ease) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

/* Voile lumineux en haut de carte */
.product-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--grad-line);
  opacity: .8;
}

.product-card::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -30%;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 45, 149, .22), transparent 70%);
  opacity: 0;
  transition: opacity var(--base);
  pointer-events: none;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-float), var(--glow-sm);
}

.product-card:hover::after {
  opacity: 1;
}

.product-card:active {
  transform: translateY(-1px) scale(.99);
}

/* Ligne principale : vignette + informations */
.product-main {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 14px;
}

/* Vignette de gauche */
.product-media {
  position: relative;
  flex: 0 0 104px;
  display: grid;
  place-items: center;
  align-self: center;
  width: 104px;
  height: 68px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-media-icon {
  font-size: 1.6rem;
  opacity: .85;
  filter: drop-shadow(0 0 10px rgba(255, 45, 149, .35));
}

/* Image introuvable : on retombe sur un aplat discret */
.product-media.is-fallback::after {
  content: '💳';
  font-size: 1.6rem;
  opacity: .8;
}

/* Colonne de droite */
.product-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.product-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  margin-top: 8px;
}

.product-card h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.2px;
  color: var(--text);
}

.product-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Badges a cote du nom */
.product-badges {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 5px;
}

/* Six teintes, attribuees par le libelle (voir tone() dans app.js) */
.tone-0 { --t: 255, 45, 149;  --tc: #ffb4d8; }  /* rose    */
.tone-1 { --t: 168, 85, 247;  --tc: #d9b8ff; }  /* violet  */
.tone-2 { --t: 34, 211, 238;  --tc: #9beef8; }  /* cyan    */
.tone-3 { --t: 52, 211, 153;  --tc: #96eecb; }  /* vert    */
.tone-4 { --t: 251, 191, 36;  --tc: #ffdd8f; }  /* ambre   */
.tone-5 { --t: 96, 165, 250;  --tc: #b3d3ff; }  /* bleu    */

.badge {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--tc, #ffd9ec);
  background: rgba(var(--t, 255, 45, 149), .17);
  border: 1px solid rgba(var(--t, 255, 45, 149), .45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 12px -4px rgba(var(--t, 255, 45, 149), .8);
}

/* Rangee de pastilles sous la vignette */
.product-tags {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.tag {
  padding: 6px 4px;
  border-radius: var(--r-sm);
  font-size: .66rem;
  font-weight: 600;
  text-align: center;
  color: var(--tc, var(--text-secondary));
  background: rgba(var(--t, 255, 255, 255), .12);
  border: 1px solid rgba(var(--t, 255, 255, 255), .32);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background var(--fast), border-color var(--fast), box-shadow var(--fast);
}

.product-card:hover .tag {
  background: rgba(var(--t, 255, 255, 255), .2);
  border-color: rgba(var(--t, 255, 255, 255), .5);
  box-shadow: 0 0 14px -6px rgba(var(--t, 255, 255, 255), .9);
}

/* Ligne d'info + date de publication */
.product-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  font-size: .72rem;
  color: var(--text-muted);
}

.product-note {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-date {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
  opacity: .8;
}

.product-card p {
  font-size: .82rem;
  line-height: 1.45;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .price {
  margin: 0;
  white-space: nowrap;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -.4px;
  font-variant-numeric: tabular-nums;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.product-card .add-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: clamp(.78rem, 3.1vw, .88rem);
  font-weight: 800;
  letter-spacing: .2px;
  white-space: nowrap;
  color: #fff;
  background: var(--grad-primary);
  background-size: 180% 180%;
  cursor: pointer;
  /* Anneau sombre + ombre portee : detache le bouton des pastilles colorees */
  box-shadow:
    0 0 0 3px rgba(7, 5, 11, .85),
    0 8px 20px -8px rgba(255, 45, 149, .95),
    inset 0 1px 0 rgba(255, 255, 255, .32);
  transition: box-shadow var(--base), transform var(--fast), background-position var(--base);
  -webkit-tap-highlight-color: transparent;
}

/* Pictogramme discret qui signale l'action */
.product-card .add-btn::before {
  content: '+';
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, .22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
}

.product-card .add-btn:hover {
  background-position: 100% 0;
  transform: translateY(-1px);
  box-shadow:
    0 0 0 3px rgba(7, 5, 11, .85),
    var(--glow-md),
    inset 0 1px 0 rgba(255, 255, 255, .38);
}

.product-card .add-btn:active {
  transform: scale(.97);
}

/* ---------- Panier ---------- */
#cart-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

#cart-items > p {
  padding: 34px 18px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-elev);
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--base), transform var(--fast);
  animation: cardIn .3s var(--ease) both;
}

.cart-item:hover {
  border-color: var(--border-strong);
}

.cart-item span:first-child {
  flex: 1;
  font-weight: 600;
  font-size: .93rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item span:nth-child(2) {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--pink-soft);
  white-space: nowrap;
}

.cart-item button {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: .95rem;
  line-height: 1;
  color: #ff8080;
  background: rgba(255, 68, 68, .12);
  border: 1px solid rgba(255, 68, 68, .28);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--fast);
  -webkit-tap-highlight-color: transparent;
}

.cart-item button:hover {
  background: rgba(255, 68, 68, .24);
  border-color: rgba(255, 68, 68, .55);
  box-shadow: 0 0 14px rgba(255, 68, 68, .3);
}

.cart-item button:active {
  transform: scale(.92);
}

.total {
  display: block;
  margin: 16px 0;
  padding: 15px 17px;
  font-size: 1.12rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 45, 149, .12), rgba(168, 85, 247, .08));
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* ---------- Boutons génériques ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .2px;
  cursor: pointer;
  transition: all var(--base);
  -webkit-tap-highlight-color: transparent;
}

.btn.primary {
  color: #fff;
  background: var(--grad-primary);
  background-size: 180% 180%;
  box-shadow: 0 10px 26px -12px rgba(255, 45, 149, .95), inset 0 1px 0 rgba(255, 255, 255, .25);
}

.btn.primary:hover:not(:disabled) {
  background-position: 100% 0;
  box-shadow: var(--glow-md), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.btn.primary:active:not(:disabled) {
  transform: scale(.98);
}

.btn:disabled {
  opacity: .42;
  cursor: not-allowed;
  box-shadow: none;
  filter: grayscale(.35);
}

/* ---------- Recharge ---------- */
.crypto-selector {
  padding: 16px;
  margin-bottom: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.crypto-selector label {
  display: block;
  margin-bottom: 2px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.deposit-amounts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.amount-btn {
  position: relative;
  padding: 18px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--r-lg);
  cursor: pointer;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  transition: all var(--base);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent;
}

.amount-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--base);
  z-index: -1;
}

.amount-btn:hover {
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--glow-md);
}

.amount-btn:hover::before {
  opacity: 1;
}

.amount-btn:active {
  transform: translateY(-1px) scale(.97);
}

#deposit-message:not(:empty) {
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card), var(--glow-sm);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: sectionIn .3s var(--ease) both;
}

/* Le détail du dépôt est rendu par .deposit-ticket : les anciennes règles qui
   ciblaient les paragraphes par leur rang ont été retirées, elles habillaient
   un balisage qui n'existe plus. */
#deposit-message p {
  margin-bottom: 10px;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  word-break: break-word;
}

#deposit-message a {
  color: var(--pink-soft);
  word-break: break-all;
  text-decoration-color: rgba(255, 122, 192, .4);
  text-underline-offset: 3px;
}

#deposit-message a:hover {
  color: var(--pink);
}

#deposit-message .btn {
  margin-top: 6px;
}

#verify-result:empty {
  display: none;
}

#verify-result {
  margin-top: 12px;
}

#verify-result p {
  padding: 11px 13px;
  border-radius: var(--r-md);
  font-size: .88rem;
  font-weight: 600;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
}

/* ---------- Commandes ---------- */
#orders-list > p {
  padding: 30px 20px;
  text-align: center;
  font-size: .92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--bg-elev);
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
}

.order-card {
  padding: 16px;
  margin-bottom: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--base), transform var(--fast);
}

.order-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

/* =========================================================
   Admin — panneau de pilotage
   ========================================================= */
/* Definies au niveau racine : les badges de statut servent aussi dans
   l'historique des commandes cote client, hors du panel admin. */
:root {
  --adm-ok: #4ade80;
  --adm-warn: #ffc857;
  --adm-info: #22d3ee;
  --adm-danger: #fb7185;
}

/* ---------- En-tête ---------- */
.admin-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
  padding: 15px 16px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 45, 149, .14), rgba(168, 85, 247, .07) 60%, transparent),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: sectionIn .35s var(--ease) both;
}

.admin-head::after {
  content: '';
  position: absolute;
  right: -60px;
  bottom: -90px;
  width: 190px;
  height: 190px;
  background: radial-gradient(circle, rgba(255, 45, 149, .3), transparent 70%);
  pointer-events: none;
}

.admin-head-ico {
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  font-size: 1.3rem;
  background: var(--grad-primary);
  border-radius: 15px;
  box-shadow: var(--glow-sm), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.admin-head-txt {
  min-width: 0;
}

.admin-head h2 {
  margin: 0;
  padding: 0;
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: -.4px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.admin-head h2::before,
.admin-head h2::after {
  display: none;
}

.admin-head p {
  margin: 3px 0 0;
  font-size: .74rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ---------- Onglets (segmented control) ---------- */
.admin-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tab {
  flex: 1 0 auto;
  padding: 9px 14px;
  background: transparent;
  border: 0;
  color: var(--text-secondary);
  border-radius: var(--r-pill);
  cursor: pointer;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color var(--fast), background var(--base), box-shadow var(--base);
  -webkit-tap-highlight-color: transparent;
}

.admin-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .05);
}

.admin-tab:active {
  transform: scale(.97);
}

.admin-tab.active {
  color: #fff;
  background: var(--grad-primary);
  box-shadow: var(--glow-sm), inset 0 1px 0 rgba(255, 255, 255, .28);
}

#admin-content {
  animation: sectionIn .3s var(--ease) both;
}

/* ---------- Barre d'outils ---------- */
.adm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.adm-count {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.adm-toolbar .btn {
  width: auto;
  margin: 0;
  padding: 9px 15px;
  font-size: .82rem;
}

/* ---------- Statistiques ---------- */
#admin-content .stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.adm-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 15px 14px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--base), transform var(--fast), box-shadow var(--base);
}

.adm-stat:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card), var(--glow-sm);
}

.adm-stat-ico {
  margin-bottom: 6px;
  font-size: 1.15rem;
  line-height: 1;
  opacity: .9;
}

.adm-stat-val {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.8px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.adm-stat.accent .adm-stat-val {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.adm-stat-lbl {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Listes en cartes ---------- */
.adm-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.adm-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px 12px;
  padding: 13px 14px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--base), transform var(--fast), box-shadow var(--base);
  animation: sectionIn .28s var(--ease) both;
}

.adm-card.with-avatar {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.adm-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--base);
}

.adm-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card), var(--glow-sm);
}

.adm-card:hover::before {
  opacity: 1;
}

.adm-main {
  min-width: 0;
}

.adm-title {
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: -.2px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.adm-title .mono,
.adm-title.mono {
  font-family: var(--font-mono);
  font-size: .86rem;
  letter-spacing: 0;
}

.adm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.adm-chip {
  padding: 3px 9px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .2px;
  color: var(--pink-soft);
  background: rgba(255, 45, 149, .1);
  border: 1px solid rgba(255, 45, 149, .22);
  border-radius: var(--r-pill);
  white-space: nowrap;
}

.adm-chip.ghost {
  color: var(--text-muted);
  background: rgba(255, 255, 255, .04);
  border-color: var(--border);
}

.adm-chip.mono {
  font-family: var(--font-mono);
  font-size: .64rem;
}

.adm-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  text-align: right;
}

.adm-price {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.4px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.adm-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 45, 149, .55), rgba(168, 85, 247, .45));
  border: 1px solid var(--border-strong);
  border-radius: 50%;
}

/* Actions */
.adm-actions {
  display: flex;
  gap: 6px;
}

.adm-icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-size: .85rem;
  color: var(--text);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--fast);
  -webkit-tap-highlight-color: transparent;
}

.adm-icon-btn:hover {
  border-color: var(--border-strong);
  box-shadow: var(--glow-sm);
}

.adm-icon-btn.danger:hover {
  border-color: rgba(251, 113, 133, .5);
  background: rgba(251, 113, 133, .12);
  box-shadow: 0 0 12px rgba(251, 113, 133, .3);
}

.adm-icon-btn:active {
  transform: scale(.92);
}

/* Pied de carte (contrôles pleine largeur) */
.adm-foot {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.adm-select,
.adm-input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 9px 11px;
  font-family: inherit;
  font-size: .82rem;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: border-color var(--fast), box-shadow var(--fast);
  -webkit-appearance: none;
  appearance: none;
}

.adm-select {
  background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
    linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
  cursor: pointer;
}

.adm-select option {
  background: var(--bg-sheet);
  color: var(--text);
}

.adm-select:focus,
.adm-input:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: var(--glow-sm);
}

.adm-btn-sm {
  flex: 0 0 auto;
  padding: 9px 15px;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-primary);
  border: 0;
  border-radius: var(--r-sm);
  cursor: pointer;
  box-shadow: var(--glow-sm);
  transition: transform var(--fast), box-shadow var(--base);
  -webkit-tap-highlight-color: transparent;
}

.adm-btn-sm:hover {
  box-shadow: var(--glow-md);
}

.adm-btn-sm:active {
  transform: scale(.95);
}

/* ---------- Badges de statut ---------- */
.adm-badge {
  padding: 4px 10px;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid;
  border-radius: var(--r-pill);
}

.adm-badge.pending {
  color: var(--adm-warn);
  background: rgba(255, 200, 87, .12);
  border-color: rgba(255, 200, 87, .32);
}

.adm-badge.paid {
  color: var(--adm-info);
  background: rgba(34, 211, 238, .12);
  border-color: rgba(34, 211, 238, .32);
}

.adm-badge.delivered {
  color: var(--adm-ok);
  background: rgba(74, 222, 128, .12);
  border-color: rgba(74, 222, 128, .32);
}

.adm-badge.cancelled {
  color: var(--adm-danger);
  background: rgba(251, 113, 133, .12);
  border-color: rgba(251, 113, 133, .32);
}

/* ---------- État vide ---------- */
.adm-empty {
  padding: 34px 18px;
  text-align: center;
  background: var(--bg-elev);
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
}

.adm-empty span {
  display: block;
  margin-bottom: 8px;
  font-size: 1.8rem;
  opacity: .5;
}

.adm-empty p {
  margin: 0;
  font-size: .84rem;
  color: var(--text-muted);
}

/* ---------- Panneaux, listes et graphique du panel ---------- */
.adm-panel {
  padding: 15px;
  margin-bottom: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.adm-h3 {
  margin: 0 0 12px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: var(--pink-soft);
}

.adm-row-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: .84rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  overflow-wrap: anywhere;
}

.adm-row-line:last-child {
  border-bottom: none;
}

.adm-row-line strong {
  color: var(--text);
  white-space: nowrap;
}

.adm-muted {
  color: var(--text-muted);
  font-size: .78rem;
}

.adm-rank {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  margin-right: 5px;
  font-size: .68rem;
  font-weight: 800;
  color: #fff;
  background: var(--grad-primary);
  border-radius: 50%;
}

/* Graphique en barres, sans bibliothèque */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 110px;
  padding-top: 6px;
}

.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}

.chart-bar {
  width: 100%;
  max-width: 18px;
  background: var(--grad-primary);
  border-radius: 4px 4px 2px 2px;
  transition: opacity var(--fast);
}

.chart-bar.empty {
  background: rgba(255, 255, 255, .1);
}

.chart-col:hover .chart-bar {
  opacity: .75;
}

.chart-lbl {
  margin-top: 5px;
  font-size: .58rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.adm-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  font-size: .82rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-secondary);
}

/* Case a cocher dessinee a la main : l'apparence native est incoherente d'un
   appareil a l'autre, et une zone de 22px reste confortable au doigt. */
input[type='checkbox'] {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  position: relative;
  cursor: pointer;
  background: rgba(0, 0, 0, .35);
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  transition: background var(--fast), border-color var(--fast);
  -webkit-appearance: none;
  appearance: none;
}

input[type='checkbox']:hover {
  border-color: var(--pink);
}

input[type='checkbox']:checked {
  background: var(--grad-primary);
  border-color: transparent;
}

/* La coche : deux traits en L pivotes, plutot qu'une image a charger */
input[type='checkbox']:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 6.5px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

input[type='checkbox']:focus-visible {
  box-shadow: var(--glow-sm);
}

.adm-check {
  cursor: pointer;
}

.adm-check input {
  width: 22px;
  margin: 0;
}

.adm-btn-sm.ghost {
  color: var(--text-secondary);
  background: var(--bg-elev-2);
  box-shadow: none;
}

/* ---------- Réserve d'exemplaires ---------- */
#pool-section {
  padding: 13px 14px;
  margin: 14px 0;
  background: rgba(34, 211, 238, .05);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

#pool-section label {
  margin-top: 0;
}

.pool-state {
  margin-top: 10px;
}

.pool-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.pool-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 190px;
  overflow-y: auto;
}

.pool-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.pool-item code {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

/* ---------- Code promo côté client ---------- */
.promo-box {
  padding: 13px 14px;
  margin: 14px 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.promo-box label {
  display: block;
  margin: 0 0 8px;
  font-size: .7rem;
  ;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--pink-soft);
}

.promo-row {
  display: flex;
  gap: 8px;
}

.promo-row input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 11px 12px;
  font-family: var(--font-mono);
  font-size: .88rem;
  text-transform: uppercase;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.promo-row input:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: var(--glow-sm);
}

.promo-feedback:empty {
  display: none;
}

.promo-feedback {
  margin: 9px 0 0;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.promo-feedback.ok {
  color: var(--adm-ok);
}

.promo-feedback.error {
  color: var(--adm-danger);
}

/* Total du panier détaillé */
.total-line {
  display: block;
  font-size: .84rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.total-line.total-discount {
  color: var(--adm-ok);
}

.total-net {
  display: block;
  margin-top: 4px;
}

/* ---------- Archives des sites ---------- */
.adm-chip.danger {
  color: var(--adm-danger);
  background: rgba(251, 113, 133, .12);
  border-color: rgba(251, 113, 133, .3);
}

.adm-alert {
  margin-bottom: 12px;
  padding: 12px 14px;
  font-size: .8rem;
  line-height: 1.5;
  color: var(--adm-warn);
  background: rgba(255, 200, 87, .09);
  border: 1px solid rgba(255, 200, 87, .28);
  border-radius: var(--r-md);
}

.adm-alert .mono,
.adm-empty .mono,
#admin-content .mono {
  font-family: var(--font-mono);
}

.site-file-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.site-file-row select {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.site-file-row .adm-btn-sm {
  padding: 0 14px;
}

#site-file-section {
  padding: 13px 14px;
  margin: 14px 0;
  background: rgba(255, 45, 149, .05);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

#site-file-section label {
  margin-top: 0;
}

#site-file-section code {
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: .92em;
  background: rgba(255, 255, 255, .07);
  border-radius: 5px;
}

/* =========================================================
   Page d'accueil
   ========================================================= */
.home-hero {
  position: relative;
  padding: 22px 18px;
  margin-bottom: 16px;
  overflow: hidden;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 45, 149, .16), rgba(168, 85, 247, .09) 60%, transparent),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: sectionIn .35s var(--ease) both;
}

.home-hero::after {
  content: '';
  position: absolute;
  top: -70px;
  right: -50px;
  width: 190px;
  height: 190px;
  background: radial-gradient(circle, rgba(255, 45, 149, .28), transparent 70%);
  pointer-events: none;
}

.home-hero h2 {
  position: relative;
  margin: 0;
  padding: 0;
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -.6px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hero h2::before,
.home-hero h2::after {
  display: none;
}

.home-hero p {
  position: relative;
  margin: 10px 0 0;
  font-size: .88rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-wrap: balance;
}

.home-hero .btn {
  position: relative;
  margin-top: 16px;
}

/* =========================================================
   Envoi d'archives
   ========================================================= */
.upload-zone {
  padding: 20px 16px;
  margin-bottom: 14px;
  text-align: center;
  cursor: pointer;
  background: rgba(34, 211, 238, .05);
  border: 1.5px dashed rgba(34, 211, 238, .35);
  border-radius: var(--r-lg);
  transition: all var(--base);
  -webkit-tap-highlight-color: transparent;
}

.upload-zone:hover {
  background: rgba(34, 211, 238, .09);
  border-color: rgba(34, 211, 238, .6);
}

.upload-zone.dragging {
  background: rgba(34, 211, 238, .14);
  border-color: var(--cyan);
  box-shadow: 0 0 24px -6px rgba(34, 211, 238, .5);
  transform: scale(1.01);
}

.upload-zone.busy {
  cursor: progress;
  border-style: solid;
}

.upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.upload-ico {
  font-size: 1.7rem;
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, .45));
}

.upload-inner strong {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text);
}

.upload-sub {
  font-size: .74rem;
  line-height: 1.5;
  color: var(--text-muted);
  text-wrap: balance;
}

.upload-progress {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.upload-bar {
  height: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, .08);
  border-radius: var(--r-pill);
}

.upload-bar-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  border-radius: var(--r-pill);
  transition: width .2s linear;
}

.upload-status {
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

/* Diffusion : le bouton d'envoi doit se distinguer d'une action anodine */
#broadcast-message {
  min-height: 120px;
  font-size: .88rem;
  line-height: 1.5;
  resize: vertical;
}

#broadcast-count {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   Parrainage
   ========================================================= */
.referral {
  padding: 15px 14px;
  margin-top: 14px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, .09), rgba(168, 85, 247, .06) 60%, transparent),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.referral-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 12px;
}

.referral-ico {
  flex: 0 0 auto;
  font-size: 1.5rem;
  line-height: 1.1;
  filter: drop-shadow(0 0 9px rgba(34, 211, 238, .45));
}

.referral-head strong {
  display: block;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
}

.referral-head p {
  margin: 4px 0 0;
  font-size: .8rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.referral-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.referral-stats > div {
  padding: 10px 6px;
  text-align: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.referral-stats strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.4px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.referral-stats span {
  display: block;
  margin-top: 2px;
  font-size: .64rem;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.referral-apply {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.referral-apply-lbl {
  display: block;
  margin-bottom: 8px;
  font-size: .74rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* =========================================================
   Captures d'écran
   ========================================================= */
#shots-section {
  padding: 13px 14px;
  margin: 14px 0;
  background: rgba(168, 85, 247, .05);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

#shots-section > label {
  margin-top: 0;
}

.shots-zone {
  padding: 15px 12px;
  margin-bottom: 4px;
}

.shots-zone.disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Vignettes dans le panel */
.shots-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.shot-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.shot-item img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  background: rgba(0, 0, 0, .3);
  border-radius: var(--r-sm);
}

.shot-label {
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  font-family: inherit;
  font-size: .74rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.shot-label:focus {
  outline: none;
  border-color: var(--border-strong);
}

.shot-actions {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.shot-actions .adm-icon-btn {
  width: 28px;
  height: 28px;
  font-size: .74rem;
}

/* Galerie côté client */
.detail-gallery {
  margin-top: 16px;
}

.detail-gallery-lbl {
  display: block;
  margin-bottom: 8px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--pink-soft);
}

.shot-picker {
  display: flex;
  gap: 7px;
  align-items: stretch;
}

.shot-picker select {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
    linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.shot-picker select:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: var(--glow-sm);
}

.shot-picker select option {
  background: var(--bg-sheet);
  color: var(--text);
}

.shot-nav {
  flex: 0 0 auto;
  width: 38px;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-secondary);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--fast);
  -webkit-tap-highlight-color: transparent;
}

.shot-nav:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.shot-nav:active {
  transform: scale(.93);
}

.shot-frame {
  position: relative;
  margin-top: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, .35);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  animation: sectionIn .25s var(--ease) both;
}

.shot-frame img {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: contain;
}

.shot-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 9px;
  font-size: .68rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, .65);
  border-radius: var(--r-pill);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.shot-missing {
  margin: 0;
  padding: 28px 12px;
  font-size: .82rem;
  text-align: center;
  color: var(--text-muted);
}

/* Pastille « aperçus » sur la carte produit */
.product-shots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  margin-left: 6px;
  font-size: .64rem;
  font-weight: 700;
  color: var(--violet);
  background: rgba(168, 85, 247, .13);
  border: 1px solid rgba(168, 85, 247, .3);
  border-radius: var(--r-pill);
  vertical-align: middle;
}

@media (max-width: 400px) {
  .shots-grid {
    grid-template-columns: 1fr;
  }

  .shot-item img {
    height: 120px;
  }
}

/* =========================================================
   Annonces
   ========================================================= */
#announcements:not(:empty) {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 16px;
}

.announce {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: sectionIn .34s var(--ease) both;
}

/* Liseré coloré à gauche : donne le ton d'un coup d'œil */
.announce::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--announce-accent);
}

.announce-ico {
  flex: 0 0 auto;
  font-size: 1.3rem;
  line-height: 1.25;
  filter: drop-shadow(0 0 8px var(--announce-glow));
}

.announce-txt {
  min-width: 0;
}

.announce-txt strong {
  display: block;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: -.2px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.announce-txt p {
  margin: 5px 0 0;
  font-size: .82rem;
  line-height: 1.55;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

/* Quatre tonalités */
.announce.tone-info {
  --announce-accent: linear-gradient(180deg, #22d3ee, #0ea5b7);
  --announce-glow: rgba(34, 211, 238, .5);
  border-color: rgba(34, 211, 238, .26);
  background: linear-gradient(135deg, rgba(34, 211, 238, .08), transparent 62%), var(--bg-card);
}

.announce.tone-promo {
  --announce-accent: var(--grad-sale);
  --announce-glow: rgba(255, 59, 107, .55);
  border-color: rgba(255, 59, 107, .3);
  background: linear-gradient(135deg, rgba(255, 59, 107, .1), transparent 62%), var(--bg-card);
}

.announce.tone-success {
  --announce-accent: linear-gradient(180deg, #4ade80, #22a95a);
  --announce-glow: rgba(74, 222, 128, .5);
  border-color: rgba(74, 222, 128, .26);
  background: linear-gradient(135deg, rgba(74, 222, 128, .08), transparent 62%), var(--bg-card);
}

.announce.tone-warning {
  --announce-accent: linear-gradient(180deg, #ffc857, #e0a020);
  --announce-glow: rgba(255, 200, 87, .5);
  border-color: rgba(255, 200, 87, .28);
  background: linear-gradient(135deg, rgba(255, 200, 87, .09), transparent 62%), var(--bg-card);
}

/* Pastilles de style dans le panel */
.adm-chip.announce-chip-info { color: var(--adm-info); background: rgba(34, 211, 238, .12); border-color: rgba(34, 211, 238, .3); }
.adm-chip.announce-chip-promo { color: #fff; background: var(--grad-sale); border-color: transparent; }
.adm-chip.announce-chip-success { color: var(--adm-ok); background: rgba(74, 222, 128, .12); border-color: rgba(74, 222, 128, .3); }
.adm-chip.announce-chip-warning { color: var(--adm-warn); background: rgba(255, 200, 87, .12); border-color: rgba(255, 200, 87, .3); }

.adm-icon-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.adm-icon-btn:disabled:hover {
  border-color: var(--border);
  box-shadow: none;
}

/* =========================================================
   Recherche boutique (BIN, nom, description, pastilles)
   ========================================================= */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.search-ico {
  position: absolute;
  left: 14px;
  font-size: .95rem;
  opacity: .55;
  pointer-events: none;
}

/* Le sélecteur global des champs impose déjà largeur et fond : on ne règle
   ici que ce qui est propre à la barre (place pour l'icône et la croix). */
.search-box input#search-input {
  margin: 0;
  padding: 12px 42px 12px 40px;
  border-radius: var(--r-pill);
  font-size: .9rem;
}

.search-box input#search-input::placeholder {
  color: var(--text-muted);
}

.search-clear {
  position: absolute;
  right: 6px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  font-family: inherit;
  font-size: .78rem;
  color: var(--text-secondary);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--fast);
  -webkit-tap-highlight-color: transparent;
}

/* display:grid l'emporterait sur l'attribut hidden : la croix resterait
   visible sur un champ vide. */
.search-clear[hidden],
.search-status[hidden] {
  display: none;
}

.search-clear:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.search-clear:active {
  transform: scale(.9);
}

/* Variante du panel : plus discrète, posée sous la barre d'outils */
.search-box.compact {
  margin-bottom: 10px;
}

.search-box.compact input#adm-search-input {
  margin: 0;
  padding: 10px 40px 10px 38px;
  font-size: .86rem;
  border-radius: var(--r-pill);
}

.search-box.compact input#adm-search-input::placeholder {
  color: var(--text-muted);
}

.search-status {
  margin: -6px 0 12px;
  padding-left: 14px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2px;
  color: var(--text-muted);
}

/* Bouton « voir les résultats ailleurs » dans l'état vide */
.adm-empty .adm-btn-sm {
  margin-top: 12px;
}

/* ---------- Tri du catalogue ---------- */
.sorts {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -4px 0 16px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sorts::-webkit-scrollbar {
  display: none;
}

.sorts-label {
  flex: 0 0 auto;
  padding-right: 2px;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sort-btn {
  flex: 0 0 auto;
  padding: 6px 11px;
  font-family: inherit;
  font-size: .74rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-secondary);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all var(--fast);
  -webkit-tap-highlight-color: transparent;
}

.sort-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.sort-btn:active {
  transform: scale(.96);
}

.sort-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 45, 149, .3), rgba(168, 85, 247, .22));
  border-color: var(--border-strong);
  box-shadow: var(--glow-sm);
}

/* =========================================================
   Import en masse
   ========================================================= */
.adm-toolbar-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

#import-data {
  min-height: 120px;
  font-family: var(--font-mono);
  font-size: .78rem;
  line-height: 1.5;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

.import-colonnes {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
}

.import-colonne {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px 8px;
  padding: 8px 9px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.import-colonne-num {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--pink-soft);
  white-space: nowrap;
}

.import-colonne select {
  margin: 0;
  padding: 7px 26px 7px 9px;
  font-size: .8rem;
  background-position: right 8px center;
}

/* Extrait de la première ligne : montre à quoi correspond la colonne */
.import-colonne-ex {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.import-apercu {
  padding: 13px 14px;
  margin: 14px 0;
  background: rgba(34, 211, 238, .05);
  border: 1px solid rgba(34, 211, 238, .25);
  border-radius: var(--r-md);
}

.import-apercu .adm-h3 {
  margin-bottom: 10px;
}

.import-apercu-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.import-apercu-item:last-of-type {
  border-bottom: none;
}

.import-apercu-item strong {
  font-size: .85rem;
  color: var(--text);
  overflow-wrap: anywhere;
}

.import-apercu-item span {
  font-size: .78rem;
  color: var(--pink-soft);
}

.import-apercu-item code {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

/* =========================================================
   Produits mis en avant
   Contour dore anime et reflet qui balaye : l'oeil s'y pose avant le reste
   du catalogue, sans recouvrir aucun texte.
   ========================================================= */
:root {
  --gold: #ffc857;
  --gold-2: #ffe9a8;
}

.product-card.featured {
  position: relative;
  border-color: rgba(255, 200, 87, .55);
  box-shadow: var(--shadow-card), 0 0 22px -4px rgba(255, 200, 87, .35);
}

.product-card.featured:hover {
  border-color: rgba(255, 200, 87, .85);
  box-shadow: var(--shadow-card), 0 0 30px -4px rgba(255, 200, 87, .55);
}

/* Produit a la fois en promo et mis en avant : le contour dore l'emporte.
   La mise en avant est un choix editorial, elle doit rester le signal le plus
   fort ; la remise reste annoncee par sa pastille sur la vignette. */
.product-card.on-sale.featured {
  border-color: rgba(255, 200, 87, .55);
  box-shadow: var(--shadow-card), 0 0 22px -4px rgba(255, 200, 87, .35);
}

.product-card.on-sale.featured:hover {
  border-color: rgba(255, 200, 87, .85);
  box-shadow: var(--shadow-card), 0 0 30px -4px rgba(255, 200, 87, .55);
}

/* Reflet diagonal qui traverse la carte toutes les 5 s */
.product-card.featured::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(105deg,
    transparent 35%,
    rgba(255, 233, 168, .14) 47%,
    rgba(255, 255, 255, .22) 50%,
    rgba(255, 233, 168, .14) 53%,
    transparent 65%);
  background-size: 260% 100%;
  background-position: 160% 0;
  animation: brillance 5s var(--ease) infinite;
}

@keyframes brillance {
  0%, 62% { background-position: 160% 0; }
  100% { background-position: -60% 0; }
}

/* Le contenu repasse au-dessus du reflet */
.product-card.featured > * {
  position: relative;
  z-index: 2;
}

/* Etoile posee dans la vignette, en bas a droite : la pastille de promo
   occupe deja le haut a gauche, aucune collision possible. */
.featured-star {
  position: absolute;
  right: 5px;
  bottom: 4px;
  z-index: 2;
  font-size: .82rem;
  line-height: 1;
  filter: drop-shadow(0 0 5px rgba(255, 200, 87, .9));
  animation: etoilePulse 2.8s var(--ease) infinite;
}

@keyframes etoilePulse {
  0%, 100% { transform: scale(1); opacity: .95; }
  50% { transform: scale(1.18); opacity: 1; }
}

/* Pastille dans le panel */
.adm-chip.featured-chip {
  color: #3a2a00;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border-color: transparent;
  font-weight: 700;
}

/* =========================================================
   Promotions
   ========================================================= */
/* Onglet « Promos » : teinte chaude pour se distinguer des catégories */
.cat-btn.cat-sale {
  border-color: rgba(255, 59, 107, .4);
  color: #ff8fa8;
}

.cat-btn.cat-sale.active {
  color: #fff;
  background: var(--grad-sale);
  border-color: transparent;
  box-shadow: 0 4px 16px -6px rgba(255, 59, 107, .9);
}

:root {
  --sale: #ff3b6b;
  --sale-2: #ff8a3d;
  --grad-sale: linear-gradient(135deg, #ff3b6b 0%, #ff8a3d 100%);
}

/* Carte en promo : liseré chaud et pastille de remise */
.product-card.on-sale {
  position: relative;
  border-color: rgba(255, 59, 107, .45);
  box-shadow: var(--shadow-card), 0 0 20px rgba(255, 59, 107, .18);
}

.product-card.on-sale:hover {
  border-color: rgba(255, 59, 107, .7);
  box-shadow: var(--shadow-card), 0 0 26px rgba(255, 59, 107, .3);
}

/* Posée sur la vignette et non dans le coin de la carte : la zone du titre
   accueille déjà le nom et les badges, une pastille hors flux les recouvrait.
   La vignette est en position:relative, elle sert de repère. */
.sale-flag {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  max-width: calc(100% - 12px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 8px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: -.2px;
  color: #fff;
  background: var(--grad-sale);
  border-radius: var(--r-pill);
  box-shadow: 0 4px 14px -4px rgba(255, 59, 107, .8);
  animation: salePulse 2.4s var(--ease) infinite;
}

@keyframes salePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

/* Prix : ancien barré au-dessus, prix promo en dégradé chaud */
.price-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.price-old {
  font-size: .76rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 59, 107, .8);
  text-decoration-thickness: 1.5px;
}

.price.price-sale {
  background: var(--grad-sale);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Fiche produit */
.detail-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 12px 0;
}

.detail-price-row .detail-price {
  margin: 0;
  background: var(--grad-sale);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.detail-price-old {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 59, 107, .8);
}

.detail-save {
  /* flex-basis force le passage à la ligne, max-width garde la pastille
     ajustée au texte : width seul serait écrasé par flex-basis. */
  flex-basis: 100%;
  max-width: fit-content;
  padding: 6px 11px;
  font-size: .76rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-sale);
  border-radius: var(--r-pill);
  box-shadow: 0 6px 18px -8px rgba(255, 59, 107, .9);
  align-self: flex-start;
}

/* Panel admin */
.adm-chip.promo {
  color: #fff;
  background: var(--grad-sale);
  border-color: transparent;
  font-weight: 700;
}

.adm-price-old {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 59, 107, .7);
}

#promo-preview.promo-error {
  color: var(--sale);
}

/* ---------- Recharge : montant libre ---------- */
.deposit-custom {
  margin-top: 14px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.deposit-custom label {
  display: block;
  margin: 0 0 8px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--pink-soft);
}

.deposit-custom-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.deposit-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.deposit-input-wrap input {
  width: 100%;
  margin: 0;
  padding: 12px 34px 12px 13px;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--fast), box-shadow var(--fast);
  -webkit-appearance: none;
  appearance: none;
}

/* Les fleches du champ numerique n'apportent rien sur mobile */
.deposit-input-wrap input::-webkit-outer-spin-button,
.deposit-input-wrap input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.deposit-input-wrap input[type='number'] {
  -moz-appearance: textfield;
}

.deposit-input-wrap input:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: var(--glow-sm);
}

.deposit-cur {
  position: absolute;
  top: 50%;
  right: 13px;
  transform: translateY(-50%);
  font-size: .92rem;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

.deposit-custom-row .btn {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 18px;
  font-size: .88rem;
}

.deposit-error:empty {
  display: none;
}

.deposit-error {
  margin: 9px 0 0;
  font-size: .78rem;
  font-weight: 600;
  color: #fb7185;
}

/* ---------- Recharge du solde ---------- */
.deposit-ticket {
  padding: 16px;
  margin-top: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: sectionIn .3s var(--ease) both;
}

.deposit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: .86rem;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.deposit-row span {
  color: var(--text-muted);
}

.deposit-row strong {
  color: var(--text);
  text-align: right;
}

.deposit-lbl {
  display: block;
  margin: 14px 0 6px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--pink-soft);
}

.deposit-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  cursor: pointer;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--fast), background var(--fast);
  -webkit-tap-highlight-color: transparent;
}

.deposit-copy:hover {
  border-color: var(--border-strong);
  background: var(--bg-elev-2);
}

.deposit-copy:active {
  transform: scale(.99);
}

.deposit-copy code {
  font-family: var(--font-mono);
  font-size: .84rem;
  color: var(--text);
  overflow-wrap: anywhere;
}

.deposit-copy code.addr {
  font-size: .74rem;
}

.deposit-copy span {
  flex: 0 0 auto;
  opacity: .6;
}

/* Les sélecteurs sont doublés avec #deposit-message : une règle historique
   « #deposit-message p » l'emporterait sinon sur ces classes. */
.deposit-warn,
#deposit-message .deposit-warn {
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: .78rem;
  line-height: 1.5;
  color: #ffc857;
  background: rgba(255, 200, 87, .09);
  border: 1px solid rgba(255, 200, 87, .28);
  border-radius: var(--r-md);
}

.deposit-hint,
#deposit-message .deposit-hint {
  margin: 12px 0 0;
  font-size: .78rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.deposit-ok,
#deposit-message .deposit-ok {
  display: block;
  margin-top: 10px;
  font-size: .84rem;
  font-weight: 600;
  color: #4ade80;
}

.deposit-timer,
#deposit-message .deposit-timer {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--cyan);
}

.deposit-timer.expired,
#deposit-message .deposit-timer.expired {
  color: #fb7185;
}

#deposit-message .deposit-row span {
  color: var(--text-muted);
}

#deposit-message .deposit-row strong {
  color: var(--text);
}

.deposit-ticket .btn {
  margin-top: 14px;
}

/* ---------- Fiche produit (client) ---------- */
.detail-hero {
  display: grid;
  place-items: center;
  height: 128px;
  margin-bottom: 14px;
  font-size: 3rem;
  background: linear-gradient(135deg, rgba(255, 45, 149, .14), rgba(168, 85, 247, .08));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.detail-hero img {
  max-width: 78%;
  max-height: 104px;
  object-fit: contain;
}

.detail-cat {
  display: inline-block;
  padding: 3px 10px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--pink-soft);
  background: rgba(255, 45, 149, .1);
  border: 1px solid rgba(255, 45, 149, .22);
  border-radius: var(--r-pill);
}

.detail-title {
  margin: 10px 0 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--text);
}

.detail-badges,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.detail-price {
  margin: 12px 0;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -1px;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.detail-desc {
  font-size: .9rem;
  line-height: 1.65;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.detail-delivery {
  margin-top: 14px;
  padding: 11px 13px;
  font-size: .8rem;
  line-height: 1.5;
  color: var(--text);
  background: rgba(34, 211, 238, .08);
  border: 1px solid rgba(34, 211, 238, .25);
  border-radius: var(--r-md);
}

.detail-stock {
  margin-top: 14px;
  padding: 10px 12px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--adm-warn);
  background: rgba(255, 200, 87, .09);
  border: 1px solid rgba(255, 200, 87, .28);
  border-radius: var(--r-md);
}

/* Article du panier devenu indisponible */
.cart-item.unavailable {
  opacity: .55;
}

.cart-item.unavailable em {
  font-style: normal;
  font-weight: 700;
  color: var(--adm-danger);
}

.detail-note {
  margin-top: 12px;
  font-size: .8rem;
  color: var(--pink-soft);
}

.detail-date {
  margin-top: 4px;
  font-size: .74rem;
  color: var(--text-muted);
}

#detail-body .btn {
  margin-top: 18px;
}

/* ---------- Paramètres ---------- */
.adm-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.adm-field label {
  margin-top: 0;
  margin-bottom: 7px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--pink-soft);
}

.adm-field input,
.adm-field textarea {
  margin: 0;
}

.adm-field textarea {
  min-height: 92px;
  resize: vertical;
}

.adm-hint {
  margin: 6px 0 0;
  font-size: .72rem;
  color: var(--text-muted);
}

.adm-save {
  margin-top: 2px;
}

/* ---------- Formulaires ---------- */
label {
  display: block;
  margin-top: 12px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Les cases a cocher sont exclues : appearance:none leur retire leur apparence
   native et une largeur de 100% en fait un rectangle vide, invisible et
   impossible a viser. Elles ont leur propre style plus bas. */
input:not([type='checkbox']):not([type='radio']),
textarea,
select {
  width: 100%;
  padding: 12px 13px;
  margin: 7px 0 4px;
  font-family: inherit;
  font-size: .93rem;
  color: var(--text);
  background: rgba(0, 0, 0, .35);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color var(--fast), box-shadow var(--fast), background var(--fast);
  -webkit-appearance: none;
  appearance: none;
}

textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff7ac0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px;
  cursor: pointer;
}

select option {
  background: #140e1a;
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:hover,
textarea:hover,
select:hover {
  border-color: rgba(255, 255, 255, .18);
}

input:focus,
textarea:focus,
select:focus {
  background: rgba(0, 0, 0, .5);
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 45, 149, .18), var(--glow-sm);
}

/* Accessibilité clavier */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--pink-soft);
  outline-offset: 2px;
}

/* ---------- Modale ---------- */
.modal {
  display: none; /* piloté par le script */
  position: fixed;
  z-index: 1000;
  inset: 0;
  padding: 16px;
  background: rgba(5, 3, 8, .72);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  justify-content: center;
  align-items: center;
  animation: fadeIn .22s var(--ease) both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: 86vh;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-sheet);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-float), var(--glow-md);
  animation: modalIn .32s var(--ease) both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

.modal-content h2 {
  margin-bottom: 6px;
  padding-right: 44px;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -.3px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.modal-content .btn {
  margin-top: 20px;
}

.close {
  position: absolute;
  top: 16px;
  right: 16px;
  float: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  color: var(--text-secondary);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--fast);
  -webkit-tap-highlight-color: transparent;
}

.close:hover {
  color: #fff;
  background: rgba(255, 45, 149, .22);
  border-color: var(--border-strong);
  transform: rotate(90deg);
}

/* ---------- Barre de défilement ---------- */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 45, 149, .45) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 45, 149, .55), rgba(168, 85, 247, .45));
  border-radius: var(--r-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 45, 149, .8), rgba(168, 85, 247, .7));
}

/* ---------- Responsive ---------- */
@media (max-width: 400px) {
  header h1 {
    font-size: 1.28rem;
  }

  .logo-mark {
    width: 37px;
    height: 37px;
    flex-basis: 37px;
  }

  #balance-display {
    padding: 8px 11px;
    font-size: .88rem;
  }

  .deposit-amounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .adm-stat {
    padding: 13px 12px;
  }

  .adm-stat-val {
    font-size: 1.22rem;
  }

  .adm-card,
  .adm-card.with-avatar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
  }

  .adm-card.with-avatar .adm-avatar {
    display: none;
  }

  .admin-tab {
    padding: 8px 11px;
    font-size: .78rem;
  }

  .tab {
    padding: 9px 2px 10px;
  }

  .tab-lbl {
    font-size: .62rem;
  }

  .tab-ico {
    font-size: 1.05rem;
  }

  .product-card .add-btn {
    padding: 9px 14px;
    gap: 5px;
  }
}

@media (max-width: 360px) {
  .product-media {
    flex-basis: 84px;
    width: 84px;
    height: 56px;
  }

  .product-card {
    gap: 11px;
    padding: 12px;
  }
}

/* ---------- Préférences utilisateur ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   Diffusion : message composé dans Telegram
   ========================================================= */
.broadcast-rich {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card), var(--glow-sm);
}

.broadcast-steps {
  margin: 4px 0 14px;
  padding-left: 20px;
  font-size: .84rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.broadcast-steps li::marker {
  font-weight: 700;
  color: var(--pink-soft);
}

/* =========================================================
   Icônes SVG (sprite défini dans index.html)
   fill/stroke sont hérités par le contenu de <use>, ce qui laisse chaque
   icône prendre la couleur de son contexte sans règle supplémentaire.
   ========================================================= */
.ico-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ico {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  vertical-align: -0.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

/* Tailles usuelles */
.ico-lg { width: 1.6em; height: 1.6em; vertical-align: -0.35em; }
.ico-xl { width: 2.2em; height: 2.2em; vertical-align: -0.5em; }

/* Un bouton texte + icône garde son alignement */
.btn .ico,
.adm-btn-sm .ico,
.cat-btn .ico,
.sort-btn .ico,
.admin-tab .ico {
  margin-right: 6px;
}

/* =========================================================
   Alertes sur les BIN
   ========================================================= */
.alerts-head h2 {
  margin: 0 0 6px;
  font-size: 1.24rem;
  font-weight: 800;
  letter-spacing: -.3px;
}

.alerts-head p {
  margin: 0 0 16px;
  font-size: .86rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.alerts-add {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 6px;
}

.alerts-add input {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 3px;
  text-align: center;
  border-radius: var(--r-pill);
}

.alerts-add .btn {
  margin: 0;
  width: auto;
  flex: 0 0 auto;
  padding: 0 18px;
  border-radius: var(--r-pill);
}

.alerts-feedback {
  margin: 0 0 14px;
  min-height: 16px;
  padding-left: 4px;
  font-size: .76rem;
  font-weight: 600;
  color: var(--text-muted);
}

.alerts-feedback.ok { color: var(--adm-ok, #4ade80); }
.alerts-feedback.error { color: #ff6b8a; }

.alerts-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.alert-card {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

.alert-card.has-stock {
  border-color: rgba(74, 222, 128, .35);
}

.alert-main {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  min-width: 0;
}

.alert-bin {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
}

.alert-wait,
.alert-stock {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  font-family: inherit;
  font-size: .76rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0;
}

.alert-stock {
  color: #4ade80;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Proposition de surveillance depuis la recherche de la boutique */
.search-alert {
  margin: -4px 0 10px;
}

.search-alert[hidden] { display: none; }

.search-alert-btn {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: .84rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-elev-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--fast);
  -webkit-tap-highlight-color: transparent;
}

.search-alert-btn:hover { background: var(--bg-elev); }
.search-alert-btn:active { transform: scale(.985); }

.search-alert-on {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-size: .8rem;
  font-weight: 600;
  color: #4ade80;
}

/* La barre du bas passe à 7 onglets : on resserre légèrement */
#tabs .tab { min-width: 0; }
.tab-lbl { white-space: nowrap; }

/* Sept onglets : le libellé doit rester lisible sur les petits écrans */
.tab-lbl {
  font-size: .64rem;
  letter-spacing: -.1px;
}

/* =========================================================
   THÈME « GLOW » — accord avec la photo de profil (Tsunade CC)
   Reste sur la base sombre d'origine (lisible), mais renforce le
   magenta lumineux et passe le logo/titres en gothique, comme la PP.
   Retirer ce bloc restaure l'aspect d'origine.
   ========================================================= */
:root {
  --grad-primary: linear-gradient(135deg, #ff1f8f 0%, #ff5cc8 52%, #b15cff 100%);
  --glow-sm: 0 0 14px rgba(255, 45, 149, .5);
  --glow-md: 0 0 26px rgba(255, 45, 149, .55), 0 0 70px rgba(168, 85, 247, .28);
}

/* Fond : halo rose un peu plus intense en haut, façon PP */
body::before {
  background:
    radial-gradient(62vw 56vw at 8% 0%, rgba(255, 45, 149, .5), transparent 64%),
    radial-gradient(54vw 50vw at 98% 6%, rgba(177, 92, 255, .38), transparent 62%),
    radial-gradient(80vw 60vw at 50% -12%, rgba(255, 60, 170, .34), transparent 70%);
}

/* Logo gothique blanc + sous-titre net */
.logo-text {
  background: none;
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-family: 'UnifrakturCook', var(--font);
  font-size: 1.34rem;
  letter-spacing: .4px;
}
.logo-text-sub {
  font-family: var(--font);
  -webkit-text-fill-color: rgba(255, 255, 255, .9);
  font-size: .46em;
  letter-spacing: 2.6px;
}
.logo-mark { border-color: rgba(255, 45, 149, .62); }

/* Titres d'accueil en gothique, comme le logo */
.home-hero h2 { font-family: 'UnifrakturCook', var(--font); }

/* =========================================================
   PANEL ADMIN — noir & blanc
   Activé par body.admin-mode (posé à l'ouverture de l'onglet Admin).
   Redéfinit les tokens en niveaux de gris pour tout le panneau et
   ses modales, sans toucher au reste de la boutique.
   ========================================================= */
body.admin-mode {
  --bg: #0c0c0e;
  --bg-elev: rgba(255, 255, 255, .06);
  --bg-elev-2: rgba(255, 255, 255, .11);
  --bg-card: rgba(255, 255, 255, .045);
  --bg-sheet: #17171a;
  --border: rgba(255, 255, 255, .14);
  --border-strong: rgba(255, 255, 255, .45);
  --text: #f5f5f6;
  --text-secondary: rgba(255, 255, 255, .72);
  --text-muted: rgba(255, 255, 255, .46);
  --grad-primary: linear-gradient(135deg, #ededf0, #ffffff);
  --grad-text: #ffffff;
  --grad-line: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent);
  --glow-sm: none;
  --glow-md: none;
  --shadow-card: 0 10px 26px -14px rgba(0, 0, 0, .75);
  --shadow-float: 0 24px 60px -18px rgba(0, 0, 0, .85);
  background: #0c0c0e;
}
body.admin-mode::before,
body.admin-mode::after { display: none !important; }

body.admin-mode header { background: linear-gradient(180deg, rgba(12, 12, 14, .95) 55%, rgba(12, 12, 14, 0) 100%); }
body.admin-mode #tabs { background: rgba(20, 20, 22, .92); }

/* Accents blancs → texte noir, sans lueur */
body.admin-mode .btn.primary,
body.admin-mode .adm-btn-sm,
body.admin-mode .admin-tab.active {
  color: #141414;
  text-shadow: none;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .7);
}
body.admin-mode .sort-btn.active { background: #ededf0; color: #141414; }

/* En-tête du panel : voile neutre au lieu du dégradé rose/violet */
body.admin-mode .admin-head {
  background: linear-gradient(135deg, rgba(255, 255, 255, .09), transparent 60%), rgba(255, 255, 255, .04);
}
body.admin-mode .admin-head-ico { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); }
body.admin-mode .adm-stat.accent { background: rgba(255, 255, 255, .09); }

/* Pastilles, puces et états : niveaux de gris (le libellé porte le sens) */
body.admin-mode .tone-0,
body.admin-mode .tone-1,
body.admin-mode .tone-2,
body.admin-mode .tone-3,
body.admin-mode .tone-4,
body.admin-mode .tone-5 { --t: 255, 255, 255; --tc: #ffffff; }
body.admin-mode .adm-chip,
body.admin-mode .adm-badge {
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .85);
  border-color: rgba(255, 255, 255, .2);
}
body.admin-mode .adm-badge.paid,
body.admin-mode .adm-badge.delivered { background: rgba(255, 255, 255, .18); color: #fff; border-color: rgba(255, 255, 255, .35); }
body.admin-mode .adm-badge.cancelled { background: rgba(255, 255, 255, .04); color: rgba(255, 255, 255, .5); }
body.admin-mode .adm-chip.danger { border-color: rgba(255, 255, 255, .55); color: #fff; }
body.admin-mode .adm-chip.featured-chip { background: rgba(255, 255, 255, .14); color: #fff; }

/* Champs de saisie neutres */
body.admin-mode input:not([type='checkbox']):not([type='radio']),
body.admin-mode textarea,
body.admin-mode select {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .18);
  color: #fff;
}

/* Modales ouvertes depuis l'admin */
body.admin-mode .modal-content { background: #17171a; border-color: rgba(255, 255, 255, .2); }

/* Derniers détails N&B : halo rose de l'en-tête et onglet Admin de la barre */
body.admin-mode .admin-head::after { display: none; }
body.admin-mode .tab.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .08));
  border-color: rgba(255, 255, 255, .4);
  color: #fff;
}
body.admin-mode .tab.active::after { background: #fff; box-shadow: none; }
body.admin-mode .tab.active .tab-ico { filter: none; }

/* Titres de panneaux et accents rose résiduels en mode admin */
body.admin-mode .adm-h3 { color: rgba(255, 255, 255, .82); }
body.admin-mode .adm-rank,
body.admin-mode .adm-row-rank { background: rgba(255, 255, 255, .16); color: #fff; }

/* =========================================================
   Boutique fiches (client)
   ========================================================= */
.fiche-shop {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.fiche-intro {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.fiche-intro-ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg-elev-2);
  color: var(--pink-soft);
}

.fiche-intro strong { display: block; font-size: 1.05rem; font-weight: 800; }
.fiche-intro p { margin: 4px 0 0; font-size: .84rem; line-height: 1.5; color: var(--text-secondary); }

.fiche-result {
  margin: 16px 0 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  font-size: .9rem;
  color: var(--text-secondary);
}
.fiche-count { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.fiche-count.zero { color: var(--text-muted); font-size: 1rem; }

/* Sélecteur de quantité (achat par lot) */
.fiche-qty-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.fiche-qty-preset {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.fiche-qty-preset:hover { border-color: var(--border-strong); color: var(--text); }
.fiche-qty-preset:active { transform: scale(.96); }
#fiche-qty {
  flex: 1 1 90px;
  min-width: 90px;
  text-align: center;
  font-weight: 800;
  font-size: 1rem;
}

.fiche-feedback {
  margin: 12px 0 0;
  min-height: 16px;
  font-size: .82rem;
  font-weight: 600;
  text-align: center;
}
.fiche-feedback.ok { color: #4ade80; }
.fiche-feedback.error { color: #ff6b8a; }

/* Inventaire fiches (panel admin) */
.adm-stats-inline { display: flex; gap: 10px; }
.adm-stats-inline .adm-stat { flex: 1; }
.adm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-chips .adm-chip b { color: var(--text); }

/* =========================================================
   Accueil boutique : choix parmi les 3 types de produits
   ========================================================= */
#shop-home[hidden], #shop-browse[hidden] { display: none; }

.shop-home-title { margin: 4px 0 2px; font-size: 1.3rem; font-weight: 800; letter-spacing: -.3px; }
.shop-home-sub { margin: 0 0 18px; font-size: .88rem; color: var(--text-secondary); }

.shop-choices { display: flex; flex-direction: column; gap: 12px; }

.shop-choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 16px;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-family: inherit;
  transition: transform var(--fast), border-color var(--fast), box-shadow var(--fast);
  -webkit-tap-highlight-color: transparent;
}
.shop-choice:hover { border-color: var(--border-strong); box-shadow: var(--shadow-card), var(--glow-sm); }
.shop-choice:active { transform: scale(.985); }

.shop-choice-ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--glow-sm);
}
.shop-choice-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.shop-choice-txt strong { font-size: 1.05rem; font-weight: 800; }
.shop-choice-txt span { font-size: .82rem; color: var(--text-secondary); }
.shop-choice-go { flex: 0 0 auto; color: var(--text-muted); }

/* En-tête de la vue catégorie : bouton retour + titre */
.shop-browse-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.shop-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 8px 13px;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--fast);
  -webkit-tap-highlight-color: transparent;
}
.shop-back:hover { border-color: var(--border-strong); }
.shop-browse-title { margin: 0; font-size: 1.1rem; font-weight: 800; letter-spacing: -.2px; }

/* Les pastilles de catégorie ne servent plus à la navigation (remplacées par
   les 3 blocs) : hidden doit l'emporter sur leur display:flex. */
.categories[hidden] { display: none !important; }

/* ====== Sites web sur mesure ====== */
.custom-header { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.custom-cta {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: var(--r-lg);
  background: var(--bg-elev); border: 1px solid var(--border);
  color: var(--text); text-align: left; cursor: pointer;
  transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast);
  -webkit-tap-highlight-color: transparent;
}
.custom-cta:hover { border-color: var(--border-strong); box-shadow: var(--shadow-card), var(--glow-sm); }
.custom-cta:active { transform: scale(.985); }
.custom-cta-ico {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-primary); color: #fff;
  box-shadow: var(--glow-sm);
}
.custom-cta-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.custom-cta-txt strong { font-size: 1.02rem; font-weight: 800; }
.custom-cta-txt span { font-size: .82rem; color: var(--text-secondary); }
.custom-cta-go { flex: 0 0 auto; color: var(--text-muted); }

.custom-mine-title { margin: 4px 0 8px; font-size: .95rem; font-weight: 800; color: var(--text-secondary); }
.custom-card {
  padding: 14px 16px; margin-bottom: 10px;
  border-radius: var(--r-md); background: var(--bg-elev);
  border: 1px solid var(--border);
}
.custom-card-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.custom-card-head strong { font-size: .95rem; font-weight: 800; }
.custom-badge {
  padding: 4px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  border: 1px solid var(--border);
}
.custom-badge.warn { background: rgba(255, 176, 32, .12); color: #f4a623; border-color: rgba(255, 176, 32, .3); }
.custom-badge.accent { background: var(--grad-primary); color: #fff; border-color: transparent; }
.custom-badge.ok { background: rgba(74, 222, 128, .12); color: #4ade80; border-color: rgba(74, 222, 128, .3); }
.custom-badge.muted { background: transparent; color: var(--text-muted); }

.custom-desc { margin: 0 0 6px; font-size: .85rem; color: var(--text-secondary); line-height: 1.5; }
.custom-price { margin: 6px 0; font-size: .9rem; color: var(--text); }
.custom-price strong { color: var(--text); font-size: 1.05rem; }
.custom-note {
  margin: 8px 0; padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: .83rem; color: var(--text-secondary); line-height: 1.5;
  white-space: pre-wrap;
}
.custom-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.custom-actions .btn { flex: 1 1 140px; }

.deposit-hint-inline { font-size: .72rem; color: var(--text-muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.modal-lead { margin: 0 0 16px; font-size: .85rem; color: var(--text-secondary); line-height: 1.5; }
#custom-modal textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  font: inherit; resize: vertical;
}

/* ====== Panel admin : Sur mesure ====== */
.custom-admin-list { display: flex; flex-direction: column; gap: 10px; }
.custom-admin-card {
  padding: 12px 14px; border-radius: var(--r-md);
  background: var(--bg-elev); border: 1px solid var(--border); cursor: pointer;
  transition: border-color var(--fast);
}
.custom-admin-card:hover { border-color: var(--border-strong); }
.custom-admin-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.custom-admin-head strong { font-size: .95rem; font-weight: 800; }
.custom-admin-meta { font-size: .78rem; color: var(--text-muted); margin: 4px 0 0; }
.custom-admin-desc { margin: 6px 0 0; font-size: .82rem; color: var(--text-secondary); line-height: 1.45; }

/* Fiche détail admin */
.custom-detail-meta { margin: 12px 0; font-size: .85rem; color: var(--text-secondary); line-height: 1.6; }
.custom-detail-meta div { display: flex; gap: 8px; }
.custom-detail-meta b { color: var(--text); min-width: 110px; display: inline-block; }
.custom-detail-desc {
  padding: 12px 14px; margin: 14px 0;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: .88rem; line-height: 1.55; white-space: pre-wrap;
}
.custom-detail-actions { display: flex; flex-direction: column; gap: 10px; }
