/* ============================================================
   CYRANO COFFEE — Design System v2
   Street × Luxe · Noir de jais & Or brossé
   ============================================================ */

:root {
  /* Fonds */
  --bg: #050505;
  --bg-2: #0a0a0d;
  --bg-3: #111014;
  --bg-card: #0d0c10;
  --glass: rgba(9, 9, 12, 0.78);
  --glass-strong: rgba(7, 7, 10, 0.94);

  /* Or */
  --gold-deep: #8a6d3b;
  --gold: #d4af37;
  --gold-mid: #c5a15a;
  --gold-light: #e8ca7f;
  --gold-pale: #f7ecc9;
  --gold-glow: rgba(212, 175, 55, 0.35);
  --gold-grad: linear-gradient(135deg, #f7ecc9 0%, #d4af37 45%, #a9822f 100%);

  /* Texte */
  --ink: #f2efe8;
  --ink-2: #9b968c;
  --ink-3: #67635b;

  /* Marques */
  --snap: #fffc00;
  --tg: #2aabee;
  --ok: #4ade80;
  --err: #f87171;

  /* Typo */
  --f-street: 'Permanent Marker', cursive;
  --f-luxe: 'Cinzel', Georgia, serif;
  --f-sans: 'Montserrat', system-ui, sans-serif;

  /* Divers */
  --r-sm: 10px; --r-md: 16px; --r-lg: 22px; --r-xl: 28px;
  --t-fast: 0.18s ease;
  --t: 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-slow: 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.6);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --app-max: 560px; /* largeur de la colonne app sur grand écran (PC) */
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

/* Aucune barre de défilement, nulle part */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }

html {
  -webkit-text-size-adjust: 100%; /* évite le réajustement de taille de texte iOS */
}
html, body {
  height: 100%;
  overflow-x: hidden;
  overscroll-behavior-y: none; /* pas de rebond bizarre en fin de page */
}

body {
  font-family: var(--f-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-user-select: none; user-select: none;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; -webkit-user-drag: none; }

/* Texte doré */
.gold-text, .header-name {
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Braises canvas */
#ember-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 400; opacity: 0.5;
}

/* Grain street subtil */
.grain {
  position: fixed; inset: 0; z-index: 401; pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ============================================================
   1. INTRO — STAMP STREET
   ============================================================ */
#intro-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(circle at 50% 38%, #141109 0%, #070706 55%, #020202 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.7, 0, 0.25, 1), opacity 0.5s ease;
}
#intro-screen.exit { transform: translateY(-102%); opacity: 0.6; }

/* Flash quand le tampon claque */
.intro-flash {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(247, 236, 201, 0.5), transparent 60%);
  opacity: 0;
  animation: flashHit 0.35s ease-out 0.62s;
}
@keyframes flashHit { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }

/* Le conteneur qui tremble aux impacts */
.intro-shake {
  display: flex; flex-direction: column; align-items: center;
  animation: hitShake 0.28s linear 0.64s, hitShake 0.22s linear 1.32s;
}
@keyframes hitShake {
  0% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(-5px, 3px) rotate(-0.6deg); }
  40% { transform: translate(5px, -3px) rotate(0.5deg); }
  60% { transform: translate(-3px, -2px) rotate(-0.3deg); }
  80% { transform: translate(3px, 2px) rotate(0.2deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

/* Logo qui claque comme un tampon */
.intro-stage { position: relative; width: 190px; height: 190px; margin-bottom: 10px; }
.intro-logo {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  opacity: 0;
  filter: drop-shadow(0 0 24px rgba(212, 175, 55, 0.25));
  animation: stampIn 0.5s cubic-bezier(0.2, 1.6, 0.35, 1) 0.22s forwards,
             logoBreathe 4s ease-in-out 1.6s infinite;
}
@keyframes stampIn {
  0%   { opacity: 0; transform: scale(2.6) rotate(4deg); filter: blur(10px); }
  60%  { opacity: 1; transform: scale(0.94) rotate(-1deg); filter: blur(0); }
  80%  { transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1) rotate(0); filter: blur(0); }
}
@keyframes logoBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

/* Onde de choc à l'impact */
.intro-logo-ring {
  position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--gold);
  opacity: 0; pointer-events: none;
  animation: shockwave 0.7s ease-out 0.66s;
}
@keyframes shockwave {
  0% { opacity: 0.9; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.7); }
}

/* Mots street qui claquent */
.intro-words { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.intro-word-main {
  font-family: var(--f-street);
  font-size: clamp(3rem, 17vw, 4.4rem);
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  transform: rotate(-3deg);
  opacity: 0;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.8));
  animation: wordStamp 0.4s cubic-bezier(0.2, 1.5, 0.4, 1) 1s forwards;
}
.intro-word-sub {
  font-family: var(--f-street);
  font-size: clamp(1.5rem, 8.5vw, 2.2rem);
  color: var(--ink);
  letter-spacing: 0.12em;
  transform: rotate(1.8deg);
  margin-top: 2px;
  opacity: 0;
  animation: wordStamp 0.35s cubic-bezier(0.2, 1.5, 0.4, 1) 1.28s forwards;
}
@keyframes wordStamp {
  0%   { opacity: 0; transform: scale(2.2) rotate(-8deg); filter: blur(6px); }
  70%  { opacity: 1; transform: scale(0.96) rotate(-3deg); filter: blur(0); }
  100% { opacity: 1; transform: scale(1) rotate(-3deg); }
}
.intro-word-sub { animation-name: wordStampSub; }
@keyframes wordStampSub {
  0%   { opacity: 0; transform: scale(2) rotate(9deg); filter: blur(6px); }
  70%  { opacity: 1; transform: scale(0.96) rotate(1.8deg); filter: blur(0); }
  100% { opacity: 1; transform: scale(1) rotate(1.8deg); }
}

.intro-divider {
  width: 0; height: 1.5px; margin: 22px 0 12px;
  background: var(--gold-grad);
  box-shadow: 0 0 8px var(--gold-glow);
  animation: growLine 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) 1.6s forwards;
}
@keyframes growLine { to { width: 170px; } }

.intro-tagline {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.34em;
  padding-left: 0.34em; color: var(--gold-light);
  opacity: 0; animation: fadeUp 0.5s ease 1.8s forwards;
}

.progress-container {
  width: 150px; height: 2px; margin-top: 26px;
  background: rgba(212, 175, 55, 0.14); border-radius: 2px; overflow: hidden;
  opacity: 0; animation: fadeUp 0.4s ease 0.5s forwards;
}
.progress-bar {
  height: 100%; width: 0%;
  background: var(--gold-grad); box-shadow: 0 0 10px var(--gold-glow);
  animation: fillBar 2.9s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
}
@keyframes fillBar { to { width: 100%; } }

.intro-skip {
  position: absolute; bottom: calc(26px + var(--safe-bottom)); left: 0; right: 0;
  text-align: center; font-size: 0.6rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--ink-3);
  opacity: 0; animation: fadeUp 0.6s ease 2.2s forwards;
}

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

/* ============================================================
   2. APP
   ============================================================ */
#app-container {
  position: relative; z-index: 2;
  opacity: 0; transform: translateY(18px) scale(0.99);
  transition: opacity 0.7s ease 0.1s, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.1s;
  min-height: 100vh;
  padding-bottom: calc(28px + var(--safe-bottom)); /* compact : pas de scroll pour rien */
}
/* Quand la barre panier est visible, on lui laisse la place */
body.has-cart #app-container { padding-bottom: calc(120px + var(--safe-bottom)); }
/* Réserve la place du bouton admin flottant pour qu'il ne chevauche jamais le footer */
body.is-admin #app-container { padding-bottom: calc(96px + var(--safe-bottom)); }
body.is-admin.has-cart #app-container { padding-bottom: calc(120px + var(--safe-bottom)); }
#app-container.fade-in { opacity: 1; transform: translateY(0) scale(1); }

/* Header */
.app-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + var(--safe-top)) 16px 12px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid rgba(212, 175, 55, 0.16);
}
.header-brand { display: flex; align-items: center; gap: 11px; }
.header-logo {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
  border: 1.5px solid var(--gold-mid);
  box-shadow: 0 0 14px var(--gold-glow);
}
.header-titles { display: flex; flex-direction: column; gap: 2px; }
.header-name { font-family: var(--f-luxe); font-weight: 700; letter-spacing: 0.24em; font-size: 0.95rem; }
.header-status { display: flex; align-items: center; gap: 6px; font-size: 0.62rem; color: var(--ink-2); }
.status-indicator { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.status-indicator.online { animation: blip 2s ease-in-out infinite; }
@keyframes blip { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.header-actions { display: flex; align-items: center; gap: 9px; }
.sound-toggle {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--bg-3); border: 1px solid rgba(212, 175, 55, 0.18);
  color: var(--ink-2); font-size: 0.9rem; cursor: pointer;
  transition: transform var(--t-fast), color var(--t), border-color var(--t);
}
.sound-toggle:active { transform: scale(0.88); }
.sound-toggle.on { color: var(--gold-light); border-color: rgba(212, 175, 55, 0.35); }

.cart-trigger {
  position: relative; width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(145deg, #17140d, #0c0b08);
  border: 1px solid rgba(212, 175, 55, 0.32);
  color: var(--gold-light); font-size: 1.1rem; cursor: pointer;
  transition: transform var(--t-fast);
}
.cart-trigger:active { transform: scale(0.9); }
.cart-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--gold-grad); color: #191307;
  font-size: 0.68rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px var(--gold-glow);
}
.cart-count.bump { animation: bump 0.42s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes bump {
  0% { transform: scale(1); filter: blur(0); }
  35% { transform: scale(1.6); filter: blur(1.5px); }
  100% { transform: scale(1); filter: blur(0); }
}

/* Hero : l'affiche pleine, sans texte par-dessus */
.hero-banner {
  position: relative; margin: 14px 14px 0;
  border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: var(--shadow-card), 0 0 30px rgba(212, 175, 55, 0.08);
}
.banner-img { width: 100%; display: block; will-change: transform; }
.banner-edge {
  position: absolute; inset: 0; border-radius: var(--r-xl); pointer-events: none;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.55);
}

/* Ticker street — boucle parfaite (contenu doublé en JS) */
.promo-ticker {
  margin: 14px 0 4px;
  background: linear-gradient(90deg, #0d0a05, #161009, #0d0a05);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  overflow: hidden; padding: 10px 0;
  transform: rotate(-0.6deg) scale(1.01);
}
.promo-ticker {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.ticker-text {
  display: inline-flex; align-items: center; gap: 30px;
  white-space: nowrap; will-change: transform;
  animation: tickerScroll 30s linear infinite;
  font-family: var(--f-street);
  font-size: 0.82rem; letter-spacing: 0.04em;
  color: var(--gold-light);
}
.ticker-text .tick-sep { color: var(--gold-deep); font-size: 0.7rem; }
@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Titre de section street */
.section-heading {
  display: flex; flex-direction: column; align-items: center;
  margin: 26px 0 6px;
}
.street-title {
  font-family: var(--f-street);
  font-size: 1.9rem;
  transform: rotate(-1.5deg);
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7));
}
.street-underline {
  width: 90px; height: 5px; margin-top: 4px;
  background: var(--gold-grad); border-radius: 3px;
  transform: rotate(-1.5deg) skewX(-18deg);
  opacity: 0.85;
}

/* Recherche */
.search-filter-section { padding: 14px 16px 0; }
.search-box {
  display: flex; align-items: center;
  background: var(--bg-3);
  border: 1px solid rgba(212, 175, 55, 0.16);
  border-radius: var(--r-md); padding: 0 14px; height: 50px;
  transition: border-color var(--t), box-shadow var(--t);
}
.search-box:focus-within { border-color: var(--gold-mid); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12); }
.search-icon { color: var(--gold-mid); font-size: 0.9rem; }
#search-input {
  flex: 1; border: none; background: transparent; outline: none;
  color: var(--ink); font-family: var(--f-sans); font-size: 16px;
  padding: 0 12px; -webkit-user-select: text; user-select: text;
}
#search-input::placeholder { color: var(--ink-3); }
.hidden-btn { display: none; background: none; border: none; color: var(--ink-2); font-size: 1rem; cursor: pointer; }
.hidden-btn.show { display: block; }

/* Onglets */
.categories-tabs {
  display: flex; gap: 8px; padding: 14px 16px;
  overflow-x: auto; scrollbar-width: none;
}
.categories-tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0; padding: 10px 18px; border-radius: 999px;
  background: var(--bg-3); border: 1px solid rgba(212, 175, 55, 0.14);
  color: var(--ink-2); font-family: var(--f-sans);
  font-size: 0.8rem; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: color var(--t), background var(--t), transform var(--t-fast);
}
.tab-btn:active { transform: scale(0.93); }
.tab-btn.active {
  color: #191307; border-color: transparent;
  background: var(--gold-grad);
  box-shadow: 0 6px 18px var(--gold-glow);
}

/* ============================================================
   CATALOGUE — cases produits (placeholders "?" prêts à remplir)
   ============================================================ */
.catalog-section { padding: 2px 16px 0; }
.products-grid.is-empty { min-height: 30vh; }
.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.product-card {
  position: relative;
  background: linear-gradient(165deg, #121016 0%, #0a090c 100%);
  border: 1px solid rgba(212, 175, 55, 0.16);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-card);
  opacity: 0; transform: translateY(26px) scale(0.96);
  filter: blur(4px);
  transition: opacity var(--t-slow), transform var(--t-slow), filter var(--t-slow), border-color var(--t);
}
.product-card.revealed { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
.product-card:active { transform: scale(0.975); }

.product-badge {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(7, 7, 10, 0.8); backdrop-filter: blur(6px);
  border: 1px solid rgba(212, 175, 55, 0.38);
  color: var(--gold-light);
  font-family: var(--f-street); font-size: 0.62rem; letter-spacing: 0.06em;
}

.product-image-container {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden; cursor: pointer;
}
.product-img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.product-card:active .product-img { transform: scale(1.06); }

/* Case "?" en attente de produit */
.ph-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(-45deg, rgba(212, 175, 55, 0.045) 0 10px, transparent 10px 22px),
    radial-gradient(circle at 50% 45%, #171307, #08080a 75%);
}
.ph-img .ph-mark {
  font-family: var(--f-street);
  font-size: 4rem; line-height: 1;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  opacity: 0.9; transform: rotate(-6deg);
  animation: phFloat 3.4s ease-in-out infinite;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.8));
}
@keyframes phFloat {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50% { transform: rotate(-4deg) translateY(-6px); }
}
.ph-img::after {
  content: ""; position: absolute; top: 0; left: -130%;
  width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(247, 236, 201, 0.07), transparent);
  transform: skewX(-20deg);
  animation: phSweep 3.8s ease-in-out infinite;
}
@keyframes phSweep { 0% { left: -130%; } 45% { left: 140%; } 100% { left: 140%; } }
.ph-img.small .ph-mark { font-size: 1.5rem; animation: none; }

.product-info { padding: 12px 13px 14px; }
.product-variety {
  font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-mid); font-weight: 800;
}
.product-title {
  font-family: var(--f-street); font-weight: 400; font-size: 1.05rem;
  margin: 5px 0 9px; line-height: 1.15; color: var(--ink); cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 1.2em;
}
.product-stats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 11px; min-height: 20px; }
.stat-tag {
  font-size: 0.58rem; font-weight: 800; padding: 3px 8px; border-radius: 6px;
  background: rgba(212, 175, 55, 0.08); border: 1px solid rgba(212, 175, 55, 0.22);
  color: var(--gold-light);
}
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-price {
  font-family: var(--f-sans); font-weight: 800; font-size: 1rem;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.add-to-cart-btn {
  position: relative;
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px;
  background: var(--gold-grad); border: none; color: #191307;
  font-size: 0.95rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px var(--gold-glow);
  transition: transform var(--t-fast);
}
.add-to-cart-btn:active { transform: scale(0.82) rotate(90deg); }
.add-to-cart-btn.pinged::after {
  content: ""; position: absolute; inset: -4px; border-radius: 14px;
  border: 2px solid var(--gold-light);
  animation: ringPing 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
@keyframes ringPing { from { opacity: 0.9; transform: scale(0.85); } to { opacity: 0; transform: scale(1.6); } }

.card-quantity-selector {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg); border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px; padding: 3px;
}
.qty-card-btn {
  width: 28px; height: 28px; border-radius: 8px; border: none;
  background: rgba(212, 175, 55, 0.12); color: var(--gold-light);
  font-size: 0.7rem; cursor: pointer;
}
.qty-card-btn:active { background: var(--gold-mid); color: #191307; }
.qty-card-val { min-width: 20px; text-align: center; font-weight: 800; font-size: 0.85rem; color: var(--gold-light); }

.no-results {
  grid-column: 1 / -1; text-align: center; color: var(--ink-3); padding: 44px 20px;
}
.no-results i { font-size: 2rem; color: var(--gold-deep); margin-bottom: 12px; display: block; }

.app-footer {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 30px 30px 4px; text-align: center;
  font-size: 0.62rem; letter-spacing: 0.06em; color: var(--ink-3);
}
.footer-logo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; opacity: 0.75; border: 1px solid rgba(212, 175, 55, 0.25); }

/* Barre panier collante */
.bottom-sticky-bar {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(14px + var(--safe-bottom)); z-index: 450;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 12px 20px;
  background: var(--glass-strong); backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: var(--r-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(212, 175, 55, 0.12);
  transform: translateY(170%); opacity: 0;
  transition: transform var(--t-slow), opacity var(--t-slow);
}
.bottom-sticky-bar.visible { transform: translateY(0); opacity: 1; }
.sticky-info { display: flex; flex-direction: column; }
#sticky-cart-total { font-weight: 800; font-size: 1.02rem; color: var(--gold-light); }
#sticky-cart-items { font-size: 0.64rem; color: var(--ink-2); }
.checkout-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 20px; border-radius: 14px; border: none;
  background: var(--gold-grad); color: #191307;
  font-family: var(--f-sans); font-weight: 800; font-size: 0.84rem;
  cursor: pointer; box-shadow: 0 6px 18px var(--gold-glow);
  transition: transform var(--t-fast);
}
.checkout-btn:active { transform: scale(0.95); }

/* Le bouton admin reprend la position qu'occupaient les FAB (bas gauche) */

/* ============================================================
   3. TUNNEL DE COMMANDE (drawer 3 étapes)
   ============================================================ */
#cart-drawer-overlay, #product-modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t), visibility var(--t);
}
#cart-drawer-overlay.visible, #product-modal-overlay.visible { opacity: 1; visibility: visible; }

#cart-drawer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 600;
  max-height: 92vh; display: flex; flex-direction: column;
  background: var(--bg-2);
  border-top: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.85);
  transform: translateY(100%);
  transition: transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
  padding-bottom: var(--safe-bottom);
}
#cart-drawer.visible { transform: translateY(0); }

.drawer-header {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 22px 20px 14px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}
.drawer-notch {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 44px; height: 4px; border-radius: 2px; background: var(--gold-deep); opacity: 0.6;
}
.drawer-header h2 {
  font-family: var(--f-street); font-size: 1.25rem; font-weight: 400;
  color: var(--gold-light); transform: rotate(-1deg);
}
.drawer-back {
  position: absolute; left: 16px; top: 55%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.22);
  background: var(--bg-3); color: var(--gold-light);
  cursor: pointer; font-size: 0.85rem;
  opacity: 0; pointer-events: none; transition: opacity var(--t);
}
.drawer-back.show { opacity: 1; pointer-events: auto; }
#close-cart-btn, #close-modal-btn {
  position: absolute; right: 16px; top: 55%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: var(--bg-3); color: var(--ink-2); cursor: pointer; font-size: 0.9rem;
}

/* Fil d'étapes */
.drawer-progress {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 40px 4px;
}
.step-dot {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3); border: 1.5px solid rgba(212, 175, 55, 0.2);
  color: var(--ink-3); font-size: 0.78rem;
  transition: background var(--t), color var(--t), border-color var(--t), box-shadow var(--t);
}
.step-dot.active {
  background: var(--gold-grad); color: #191307; border-color: transparent;
  box-shadow: 0 4px 16px var(--gold-glow);
}
.step-dot.done { background: rgba(212, 175, 55, 0.16); color: var(--gold-light); border-color: rgba(212, 175, 55, 0.4); }
.step-line { flex: 1; max-width: 54px; height: 1.5px; background: rgba(212, 175, 55, 0.18); }

.drawer-content { overflow-y: auto; padding: 16px 18px 22px; }

/* Étapes */
.drawer-step { display: none; }
.drawer-step.active { display: block; animation: stepIn 0.36s cubic-bezier(0.22, 0.61, 0.36, 1); }
@keyframes stepIn { from { opacity: 0; transform: translateX(30px); filter: blur(5px); } to { opacity: 1; transform: translateX(0); filter: blur(0); } }
.drawer-step.back-anim { animation: stepInBack 0.36s cubic-bezier(0.22, 0.61, 0.36, 1); }
@keyframes stepInBack { from { opacity: 0; transform: translateX(-30px); filter: blur(5px); } to { opacity: 1; transform: translateX(0); filter: blur(0); } }

.step-label {
  font-family: var(--f-street); font-weight: 400; font-size: 1.05rem;
  color: var(--ink); margin-bottom: 14px; transform: rotate(-0.8deg);
}

/* Panier vide */
.empty-cart-message { text-align: center; padding: 46px 20px; color: var(--ink-3); }
.empty-cart-message i { font-size: 2.6rem; color: var(--gold-deep); margin-bottom: 14px; }
.empty-cart-message p { margin-bottom: 18px; font-size: 0.9rem; }
.btn-primary {
  padding: 12px 22px; border-radius: 12px; border: 1px solid var(--gold-mid);
  background: transparent; color: var(--gold-light);
  font-weight: 700; font-family: var(--f-sans); cursor: pointer; font-size: 0.82rem;
}

/* Items panier */
.cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  animation: fadeUp 0.3s ease;
}
.cart-item-img {
  width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex-shrink: 0;
  border: 1px solid rgba(212, 175, 55, 0.22); background: #111; overflow: hidden;
}
div.cart-item-img { display: flex; }
.cart-item-details { flex: 1; min-width: 0; }
.cart-item-title { font-family: var(--f-street); font-weight: 400; font-size: 0.95rem; margin-bottom: 2px; }
.cart-item-meta { font-size: 0.62rem; color: var(--gold-mid); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.cart-item-price-qty { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-item-price { font-weight: 800; color: var(--gold-light); font-size: 0.88rem; white-space: nowrap; }
.qty-selector { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 10px; padding: 3px; }
.qty-btn {
  width: 26px; height: 26px; border-radius: 8px; border: none;
  background: rgba(212, 175, 55, 0.12); color: var(--gold-light); font-size: 0.65rem; cursor: pointer;
}
.qty-btn:active { background: var(--gold-mid); color: #191307; }
.qty-value { min-width: 18px; text-align: center; font-weight: 800; font-size: 0.85rem; }

.pricing-rows { margin: 16px 0; }
.price-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.88rem; color: var(--ink-2); }
.price-row.total-row {
  border-top: 1px solid rgba(212, 175, 55, 0.2); margin-top: 6px; padding-top: 13px;
  font-size: 1.15rem; font-weight: 800; color: var(--ink);
}
.price-row.total-row span:last-child { color: var(--gold-light); }

/* Choix méthode */
.delivery-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.delivery-card {
  padding: 16px 10px; border-radius: var(--r-md);
  background: var(--bg-3); border: 1.5px solid rgba(212, 175, 55, 0.14);
  text-align: center; cursor: pointer; color: var(--ink);
  font-family: var(--f-sans);
  transition: border-color var(--t), background var(--t), transform var(--t-fast);
}
.delivery-card:active { transform: scale(0.96); }
.delivery-card.active {
  border-color: var(--gold-mid); background: rgba(212, 175, 55, 0.09);
  box-shadow: 0 6px 22px rgba(212, 175, 55, 0.1);
}
.delivery-card .card-icon { font-size: 1.5rem; color: var(--gold-light); margin-bottom: 7px; }
.delivery-card .card-title { font-weight: 800; font-size: 0.9rem; }
.delivery-card .card-sub { font-size: 0.62rem; color: var(--ink-2); margin-top: 3px; }

/* Formulaires */
.method-form { animation: fadeUp 0.3s ease; }
.form-field { margin-bottom: 13px; }
.form-field label {
  display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px;
}
.form-field .req { color: var(--gold-light); }
.form-field .opt { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink-3); }
.form-field input {
  width: 100%; height: 50px; padding: 0 15px;
  background: var(--bg-3); border: 1px solid rgba(212, 175, 55, 0.16);
  border-radius: var(--r-sm); outline: none;
  color: var(--ink); font-family: var(--f-sans); font-size: 16px;
  -webkit-user-select: text; user-select: text;
  transition: border-color var(--t), box-shadow var(--t);
}
.form-field input:focus { border-color: var(--gold-mid); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1); }
.form-field input::placeholder { color: var(--ink-3); }
.form-field.error input { border-color: var(--err); animation: fieldShake 0.35s ease; }
@keyframes fieldShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); }
}

.drive-info {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; margin-bottom: 14px;
  background: rgba(212, 175, 55, 0.06);
  border: 1px dashed rgba(212, 175, 55, 0.35); border-radius: var(--r-sm);
  font-size: 0.78rem; color: var(--ink-2); line-height: 1.55;
}
.drive-info i { color: var(--gold-light); margin-top: 2px; }

/* Récap */
.recap-hint { font-size: 0.78rem; color: var(--ink-2); margin: -6px 0 14px; line-height: 1.55; }
.recap-hint b { color: var(--gold-light); }
.recap-box {
  background: var(--bg); border: 1px dashed rgba(212, 175, 55, 0.4);
  border-radius: var(--r-md); padding: 15px; margin-bottom: 16px;
  max-height: 30vh; overflow-y: auto;
}
.recap-box pre {
  font-family: var(--f-sans); font-size: 0.78rem; line-height: 1.65;
  white-space: pre-wrap; word-break: break-word; color: var(--ink);
  -webkit-user-select: text; user-select: text;
}

/* Boutons */
.step-actions { margin-top: 14px; }
.recap-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-block { width: 100%; }
.btn-gold {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px; border-radius: var(--r-md); border: 1.5px solid transparent;
  background: var(--gold-grad); color: #191307;
  font-family: var(--f-sans); font-weight: 800; font-size: 0.92rem;
  cursor: pointer; box-shadow: 0 6px 20px var(--gold-glow);
  transition: transform var(--t-fast), background var(--t), color var(--t), border-color var(--t), box-shadow var(--t);
}
.btn-gold:active { transform: scale(0.97); }

/* État "copié" : discret, validé, dans le thème */
.btn-gold.copied {
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.45);
  color: var(--ok);
  box-shadow: none;
}

/* Boutons de redirection : structure noire du thème, l'identité de
   la plateforme portée par l'icône et un liseré discret */
.btn-checkout {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px; border-radius: var(--r-md);
  background: var(--bg-3); border: 1.5px solid rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-family: var(--f-sans); font-weight: 800; font-size: 0.92rem;
  cursor: pointer; transition: transform var(--t-fast), border-color var(--t), box-shadow var(--t), opacity var(--t);
}
.btn-checkout:active { transform: scale(0.97); }
.btn-checkout i { font-size: 1.25rem; }
.snapchat-checkout-btn { border-color: rgba(255, 252, 0, 0.35); }
.snapchat-checkout-btn i { color: var(--snap); }
.telegram-checkout-btn { border-color: rgba(42, 171, 238, 0.3); padding: 13px; font-size: 0.8rem; font-weight: 700; color: var(--ink-2); }
.telegram-checkout-btn i { color: var(--tg); font-size: 1rem; }

/* Tant que ce n'est pas copié, les redirections attendent leur tour */
.recap-actions.await-copy .btn-checkout { opacity: 0.45; }
.recap-actions .snapchat-checkout-btn.ready {
  opacity: 1;
  animation: snapReady 1.8s ease-in-out infinite;
}
@keyframes snapReady {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 252, 0, 0); border-color: rgba(255, 252, 0, 0.35); }
  50% { box-shadow: 0 0 22px rgba(255, 252, 0, 0.16); border-color: rgba(255, 252, 0, 0.75); }
}

.btn-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.25); font-size: 0.7rem; font-weight: 900;
}
.btn-checkout .btn-step-num { background: rgba(255, 255, 255, 0.08); }

/* ============================================================
   4. MODAL PRODUIT
   ============================================================ */
#product-modal {
  position: fixed; left: 50%; top: 50%; z-index: 600;
  width: calc(100% - 40px); max-width: 420px; max-height: 86vh;
  transform: translate(-50%, -50%) scale(0.9); opacity: 0; visibility: hidden;
  background: var(--bg-2);
  border: 1px solid rgba(212, 175, 55, 0.3); border-radius: var(--r-xl);
  overflow: hidden auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
  transition: transform var(--t), opacity var(--t), visibility var(--t);
}
#product-modal.visible { transform: translate(-50%, -50%) scale(1); opacity: 1; visibility: visible; }
#close-modal-btn { z-index: 5; top: 14px; right: 14px; transform: none; background: rgba(7, 7, 10, 0.75); backdrop-filter: blur(6px); }

.modal-img-container { position: relative; aspect-ratio: 16 / 11; overflow: hidden; }
.modal-img {
  width: 100%; height: 100%; object-fit: cover;
  filter: blur(10px) saturate(0.8); transform: scale(1.08);
  animation: focusPull 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) 0.05s forwards;
}
@keyframes focusPull { to { filter: blur(0) saturate(1); transform: scale(1); } }
.modal-img-container::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg-2), transparent 55%);
  pointer-events: none;
}
.modal-info-body { padding: 4px 22px 24px; margin-top: -26px; position: relative; z-index: 2; }
.modal-variety { font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-mid); font-weight: 800; }
.modal-title { font-family: var(--f-street); font-weight: 400; font-size: 1.6rem; margin: 6px 0 12px; line-height: 1.1; transform: rotate(-1deg); }
.modal-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.modal-stat {
  font-size: 0.68rem; font-weight: 800; padding: 5px 11px; border-radius: 8px;
  background: rgba(212, 175, 55, 0.1); border: 1px solid rgba(212, 175, 55, 0.26); color: var(--gold-light);
}
.modal-description { color: var(--ink-2); font-size: 0.85rem; line-height: 1.7; margin-bottom: 22px; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.modal-price { font-weight: 800; font-size: 1.5rem; color: var(--gold-light); }
.modal-action-btn {
  flex: 1; padding: 15px; border-radius: var(--r-md); border: none;
  background: var(--gold-grad); color: #191307;
  font-family: var(--f-sans); font-weight: 800; font-size: 0.9rem; cursor: pointer;
  box-shadow: 0 6px 20px var(--gold-glow); transition: transform var(--t-fast);
}
.modal-action-btn:active { transform: scale(0.96); }

/* Toast */
#toast {
  position: fixed; left: 50%; bottom: calc(104px + var(--safe-bottom));
  transform: translateX(-50%) translateY(30px); z-index: 700;
  background: var(--glass-strong); backdrop-filter: blur(14px);
  border: 1px solid rgba(212, 175, 55, 0.38); border-radius: 999px;
  padding: 12px 22px; font-size: 0.82rem; font-weight: 700; color: var(--gold-light);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t), transform var(--t), visibility var(--t);
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
#toast i { color: var(--ok); }

/* ============================================================
   RUPTURE DE STOCK
   ============================================================ */
.product-card.soldout { pointer-events: none; }
.product-card.soldout .product-image-container,
.product-card.soldout .product-info { opacity: 0.45; filter: grayscale(0.9); }
.soldout-stamp {
  position: absolute; top: 42%; left: 50%; z-index: 4;
  transform: translate(-50%, -50%) rotate(-14deg);
  font-family: var(--f-street); font-size: 1.15rem; letter-spacing: 0.08em;
  color: var(--err);
  border: 2.5px solid var(--err); border-radius: 8px;
  padding: 4px 14px;
  background: rgba(5, 5, 5, 0.7); backdrop-filter: blur(2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}
.soldout-stamp i { margin-right: 6px; }
.soldout-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 12px;
  border: 1.5px solid rgba(248, 113, 113, 0.5);
  color: var(--err); font-size: 0.68rem; font-weight: 800;
}

/* ============================================================
   CADEAU DÈS 50€ 🚬
   ============================================================ */
.gift-progress { margin: 4px 0 14px; }
.gift-bar {
  height: 7px; border-radius: 4px; overflow: hidden;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.18);
}
.gift-fill {
  height: 100%; width: 0%;
  background: var(--gold-grad);
  box-shadow: 0 0 10px var(--gold-glow);
  border-radius: 4px;
  transition: width var(--t-slow);
}
.gift-text { display: block; margin-top: 7px; font-size: 0.72rem; font-weight: 700; color: var(--ink-2); }
.gift-progress.earned .gift-fill { background: linear-gradient(135deg, #b7f7c9, #4ade80); box-shadow: 0 0 12px rgba(74, 222, 128, 0.35); }
.gift-progress.earned .gift-text { color: var(--ok); }

/* ============================================================
   ADMIN — gestion du menu
   ============================================================ */
.admin-fab {
  position: fixed; left: 16px; bottom: calc(28px + var(--safe-bottom)); z-index: 450;
  width: 50px; height: 50px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: var(--gold-grad); border: none; color: #191307;
  font-size: 1.15rem; cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55), 0 0 18px var(--gold-glow);
  transition: transform var(--t-fast);
}
.admin-fab:active { transform: scale(0.88); }
body.is-admin .admin-fab { display: flex; }

#admin-drawer-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t), visibility var(--t);
}
#admin-drawer-overlay.visible { opacity: 1; visibility: visible; }
#admin-drawer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 600;
  max-height: 92vh; display: flex; flex-direction: column;
  background: var(--bg-2);
  border-top: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.85);
  transform: translateY(100%);
  transition: transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
  padding-bottom: var(--safe-bottom);
}
#admin-drawer.visible { transform: translateY(0); }
#close-admin-btn {
  position: absolute; right: 16px; top: 55%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: var(--bg-3); color: var(--ink-2); cursor: pointer; font-size: 0.9rem;
}

#admin-products-list { margin-top: 16px; }
.admin-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.admin-row-info { flex: 1; min-width: 0; }
.admin-row-info b {
  display: block; font-family: var(--f-street); font-weight: 400;
  font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-row-info span { font-size: 0.66rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; }
.admin-row.off .admin-row-info { opacity: 0.45; }
.admin-row.off .admin-row-info b { text-decoration: line-through; text-decoration-color: var(--err); }
.admin-row-actions { display: flex; gap: 7px; }
.admin-act {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: var(--bg-3); color: var(--gold-light);
  font-size: 0.8rem; cursor: pointer; transition: transform var(--t-fast);
}
.admin-act:active { transform: scale(0.88); }
.admin-act.danger { color: var(--err); border-color: rgba(248, 113, 113, 0.3); }
.admin-act.off-state { color: var(--err); border-color: rgba(248, 113, 113, 0.45); background: rgba(248, 113, 113, 0.08); }

/* Formulaire admin */
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-field select, .form-field textarea {
  width: 100%; padding: 0 15px;
  background: var(--bg-3); border: 1px solid rgba(212, 175, 55, 0.16);
  border-radius: var(--r-sm); outline: none;
  color: var(--ink); font-family: var(--f-sans); font-size: 16px;
  -webkit-user-select: text; user-select: text;
  transition: border-color var(--t), box-shadow var(--t);
}
.form-field select { height: 50px; appearance: none; }
.form-field textarea { padding: 13px 15px; resize: vertical; min-height: 76px; }
.form-field select:focus, .form-field textarea:focus { border-color: var(--gold-mid); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1); }

.soldout-toggle {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; margin-top: 4px;
  background: var(--bg-3); border: 1px solid rgba(248, 113, 113, 0.22);
  border-radius: var(--r-sm); cursor: pointer;
  font-size: 0.78rem; color: var(--ink-2);
}
.soldout-toggle input { display: none; }
.soldout-toggle-box {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(248, 113, 113, 0.4);
  color: transparent; font-size: 0.75rem;
  transition: background var(--t), color var(--t);
}
.soldout-toggle input:checked + .soldout-toggle-box { background: rgba(248, 113, 113, 0.16); color: var(--err); }

/* Sélecteur d'image (galerie / fichiers) */
.image-picker { display: flex; align-items: center; gap: 14px; }
.image-preview {
  width: 74px; height: 74px; border-radius: var(--r-sm); flex-shrink: 0;
  background: var(--bg-3); border: 1.5px dashed rgba(212, 175, 55, 0.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); font-size: 1.4rem; overflow: hidden;
}
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview.has-img { border-style: solid; border-color: rgba(212, 175, 55, 0.35); }
.image-picker-actions { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.btn-pick-image, .btn-remove-image {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 14px; border-radius: var(--r-sm); cursor: pointer;
  font-family: var(--f-sans); font-weight: 700; font-size: 0.78rem;
  transition: transform var(--t-fast);
}
.btn-pick-image:active, .btn-remove-image:active { transform: scale(0.96); }
.btn-pick-image { background: rgba(212, 175, 55, 0.1); border: 1px solid rgba(212, 175, 55, 0.32); color: var(--gold-light); }
.btn-remove-image { background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.3); color: var(--err); }

/* ============================================================
   MODALE DE CADRAGE — sélection carrée, drag + zoom
   ============================================================ */
#crop-modal-overlay {
  position: fixed; inset: 0; z-index: 700;
  background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity var(--t), visibility var(--t);
}
#crop-modal-overlay.visible { opacity: 1; visibility: visible; }
#crop-modal {
  position: fixed; left: 50%; top: 50%; z-index: 710;
  width: calc(100% - 40px); max-width: 380px;
  transform: translate(-50%, -50%) scale(0.9); opacity: 0; visibility: hidden;
  background: var(--bg-2); border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--r-xl); padding: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
  transition: transform var(--t), opacity var(--t), visibility var(--t);
}
#crop-modal.visible { transform: translate(-50%, -50%) scale(1); opacity: 1; visibility: visible; }
.crop-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.crop-header h3 { font-family: var(--f-street); font-weight: 400; font-size: 1.05rem; color: var(--gold-light); }
.crop-header button {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(212, 175, 55, 0.2);
  background: var(--bg-3); color: var(--ink-2); cursor: pointer; font-size: 0.85rem;
}
.crop-viewport {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  margin: 0 auto; border-radius: var(--r-md); overflow: hidden;
  background: #050505; border: 1px solid rgba(212, 175, 55, 0.25);
  touch-action: none; cursor: grab; user-select: none;
}
.crop-viewport:active { cursor: grabbing; }
.crop-viewport img {
  position: absolute; top: 0; left: 0; max-width: none; max-height: none;
  transform-origin: 0 0; pointer-events: none;
}
.crop-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(212, 175, 55, 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(212, 175, 55, 0.35) 1px, transparent 1px);
  background-size: 33.33% 33.33%;
  box-shadow: inset 0 0 0 1.5px rgba(212, 175, 55, 0.55);
}
.crop-controls { display: flex; align-items: center; gap: 12px; margin: 16px 0 6px; color: var(--gold-primary); }
.crop-controls input[type="range"] {
  flex: 1; height: 4px; border-radius: 2px; background: rgba(212, 175, 55, 0.18);
  appearance: none; outline: none;
}
.crop-controls input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold-grad); box-shadow: 0 2px 8px var(--gold-glow); cursor: pointer;
}
.crop-controls input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; border: none;
  background: var(--gold-grad); box-shadow: 0 2px 8px var(--gold-glow); cursor: pointer;
}
#crop-confirm-btn { margin-top: 12px; }

/* Divers */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
@media (max-width: 360px) {
  .products-grid { gap: 10px; }
  .intro-word-main { font-size: 2.8rem; }
}

/* ============================================================
   PC / GRAND ÉCRAN — colonne app centrée, comme un téléphone
   posé au milieu de l'écran (au lieu d'étirer tout en largeur)
   ============================================================ */
@media (min-width: 640px) {
  #app-container { max-width: var(--app-max); margin: 0 auto; }

  #cart-drawer, #admin-drawer {
    left: 50%; right: auto;
    width: 100%; max-width: var(--app-max);
    transform: translate(-50%, 100%);
  }
  #cart-drawer.visible, #admin-drawer.visible { transform: translate(-50%, 0); }

  .bottom-sticky-bar {
    left: 50%; right: auto; transform: translateX(-50%) translateY(160%);
    width: calc(var(--app-max) - 24px);
  }
  .bottom-sticky-bar.visible { transform: translateX(-50%) translateY(0); }

  .admin-fab { left: calc(50% - (var(--app-max) / 2) + 16px); }
}
