/* ============================================================
   style.css — Custom Styles, Animations & Theme
   ============================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* ---- CSS Custom Properties (will be overridden by JS for store settings) ---- */
:root {
  --primary: #6366f1;
  --accent: #8b5cf6;
  --bg: #ffffff;
  --bg-secondary: #f1f5f9;
  --card: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 16px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.08);
  --shadow-hover: 0 20px 60px rgba(0,0,0,0.12);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Dark Mode ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f172a;
    --bg-secondary: #1e293b;
    --card: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
    --shadow: 0 1px 3px rgba(0,0,0,0.2), 0 6px 16px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.3);
    --shadow-hover: 0 20px 60px rgba(0,0,0,0.4);
  }
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-secondary: #1e293b;
  --card: #1e293b;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --border: #334155;
  --shadow: 0 1px 3px rgba(0,0,0,0.2), 0 6px 16px rgba(0,0,0,0.15);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.3);
  --shadow-hover: 0 20px 60px rgba(0,0,0,0.4);
}

/* ---- Thème Glace (glassmorphism) ---- */
[data-theme="glace"] {
  --bg: #e8eef9;
  --bg-secondary: rgba(255,255,255,0.5);
  --card: rgba(255,255,255,0.55);
  --text: #1e2a4a;
  --text-secondary: #5b6b8c;
  --border: rgba(255,255,255,0.6);
  --shadow: 0 1px 3px rgba(99,140,255,0.08), 0 6px 16px rgba(99,140,255,0.06);
  --shadow-lg: 0 10px 40px rgba(99,140,255,0.12);
  --shadow-hover: 0 20px 60px rgba(99,140,255,0.18);
}
[data-theme="glace"] body {
  background: linear-gradient(135deg, #a8c8f0 0%, #c9b8f0 35%, #f0c9d8 70%, #f5d9a8 100%);
  background-attachment: fixed;
  position: relative;
}
[data-theme="glace"] body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,var(--glace-overlay-opacity, 0.35));
  pointer-events: none;
  z-index: 0;
}
[data-theme="glace"] #app {
  position: relative;
  z-index: 1;
}
[data-theme="glace"] .modal-sheet,
[data-theme="glace"] .product-card,
[data-theme="glace"] .btn-back-chip,
[data-theme="glace"] .cat-chip {
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.6);
}
.glass-frame {
  background: rgba(255,255,255,0.45) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.6) !important;
}

/* ---- Reflet verre sur les vignettes produit (thème Glace) ---- */
[data-theme="glace"] .product-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    rgba(255,255,255,0) 35%,
    rgba(255,255,255,0.35) 48%,
    rgba(255,255,255,0.5) 52%,
    rgba(255,255,255,0) 65%
  );
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
}
[data-theme="glace"] .product-card {
  border: 1px solid rgba(255,255,255,0.5);
}

/* ---- Base ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 99px; }

/* ---- Typography ---- */
.font-display { font-family: 'Playfair Display', serif; }

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(99, 102, 241, 0); }
}
@keyframes giftHaloPulse {
  0%, 100% { box-shadow: 0 0 16px 2px #f59e0b40, 0 0 32px 6px #f59e0b20; }
  50%       { box-shadow: 0 0 22px 4px #f59e0b60, 0 0 40px 10px #f59e0b30; }
}
.link-halo-pulse {
  animation: linkHaloPulse 2.8s ease-in-out infinite;
}
.link-halo-pulse:nth-child(2n) { animation-delay: 0.4s; }
.link-halo-pulse:nth-child(3n) { animation-delay: 0.8s; }
@keyframes linkHaloPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--link-halo-rgb, 99,102,241), 0.3); }
  50%       { box-shadow: 0 0 20px 4px rgba(var(--link-halo-rgb, 99,102,241), 0.5); }
}
.telegram-contact-halo {
  animation: telegramHaloPulse 2.6s ease-in-out infinite;
}
@keyframes telegramHaloPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(38,165,228,0.4), 0 0 0 0 rgba(38,165,228,0.35); }
  50%       { box-shadow: 0 8px 24px rgba(38,165,228,0.4), 0 0 22px 6px rgba(38,165,228,0.55); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up { animation: fadeInUp 0.6s ease-out forwards; }
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }
.animate-scale-in { animation: scaleIn 0.4s ease-out forwards; }
.animate-slide-down { animation: slideDown 0.3s ease-out forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* Scroll-triggered animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }

/* ---- Skeleton Loading ---- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border) 50%, var(--bg-secondary) 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ---- Cards ---- */
.product-card {
  background: transparent;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition-bounce), box-shadow var(--transition);
  cursor: pointer;
  position: relative;
  filter: drop-shadow(0 0 var(--card-halo-spread, 0px) var(--card-halo-color, transparent));
  animation: cardHaloPulse 2.5s ease-in-out infinite;
}
@keyframes cardHaloPulse {
  0%, 100% { filter: drop-shadow(0 0 var(--card-halo-spread, 0px) var(--card-halo-color, transparent)); }
  50%       { filter: drop-shadow(0 0 calc(var(--card-halo-spread, 0px) * 2) var(--card-halo-color, transparent)); }
}
.product-card:hover, .product-card:active {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-hover);
  animation: none;
  filter: drop-shadow(0 0 calc(var(--card-halo-spread, 0px) * 2.5) var(--card-halo-color, transparent));
}
/* Image prend toute la carte */
.product-card .card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--bg-secondary);
  width: 100%;
  height: 100%;
}
.product-card .card-img img,
.product-card .card-img video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}
.product-card:hover .card-img img {
  transform: scale(1.08);
}
/* Info en overlay en bas de l'image */
.card-info-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-promo { background: #ef4444; color: #fff; }
.badge-new {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border-radius: 99px !important;
  box-shadow: 0 0 8px rgba(34,197,94,0.6), 0 2px 6px rgba(0,0,0,0.2);
  animation: badgeNewPulse 2s ease-in-out infinite;
  position: relative;
  overflow: visible !important;
}
@keyframes badgeNewPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(34,197,94,0.5), 0 2px 6px rgba(0,0,0,0.2); }
  50%       { box-shadow: 0 0 14px rgba(34,197,94,0.9), 0 2px 8px rgba(0,0,0,0.3); }
}
.badge-bestseller { background: #f59e0b; color: #1e293b; }
.badge-out { background: #64748b; color: #fff; }
.badge-soon { background: #3b82f6; color: #fff; }

/* ---- Buttons ---- */
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(99,102,241,0.3); }
.btn-primary:active { transform: translateY(0) scale(0.98); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 10px 24px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-ghost:hover { background: var(--bg-secondary); color: var(--primary); }
.btn-ghost.active { color: #ef4444; }

/* ---- Wishlist Heart ---- */
.wishlist-btn-plain {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform var(--transition);
  color: #fff;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}
.wishlist-btn-plain:hover { transform: scale(1.2); }
.wishlist-btn-plain.active { color: #ef4444; }

/* ---- Card info background (opacity controlled) ---- */
:root {
  --card-rgb: 255, 255, 255;
}
[data-theme="dark"], .dark {
  --card-rgb: 15, 23, 42;
}
.card-info-bg {
  backdrop-filter: blur(0px);
}

/* ---- Hero Carousel ---- */
.hero-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: scale(1.05);
}
.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  position: relative;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.15) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
}
.hero-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 16px 0;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.hero-dot.active {
  width: 28px;
  background: var(--primary);
}

/* ---- Category Chips ---- */
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 99px;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
  position: relative;
  z-index: 0;
}
.cat-chip[data-halo]::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 99px;
  z-index: -1;
  background: conic-gradient(from 0deg, var(--chip-halo-color, transparent) 0%, transparent 35%, var(--chip-halo-color, transparent) 70%, transparent 100%);
  filter: blur(8px);
  opacity: 0.85;
  animation: chipHaloSpin 3s linear infinite;
}
@keyframes chipHaloSpin {
  to { transform: rotate(360deg); }
}
.cat-chip:hover, .cat-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.cat-chip.active { box-shadow: 0 4px 16px rgba(99,102,241,0.3); }

/* ---- Back button (style pastille) ---- */
.btn-back-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 99px;
  border: 2px solid var(--border);
  background: var(--card);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
  position: relative;
  z-index: 0;
  animation: backChipHaloPulse 3s ease-in-out infinite;
}
@keyframes backChipHaloPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--back-halo-color, 99,102,241), 0); }
  50%       { box-shadow: 0 0 10px 2px rgba(var(--back-halo-color, 99,102,241), var(--back-halo-intensity, 0.25)); }
}
.btn-back-chip i, .btn-back-chip svg {
  transition: transform 0.2s ease;
}
.btn-back-chip:hover {
  background: var(--primary);
  color: #fff !important;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(var(--back-halo-color, 99,102,241), calc(var(--back-halo-intensity, 0.25) * 1.8)), 0 0 16px 4px rgba(var(--back-halo-color, 99,102,241), calc(var(--back-halo-intensity, 0.25) * 1.2));
  transform: translateY(-1px);
  animation-play-state: paused;
}
.btn-back-chip:hover i, .btn-back-chip:hover svg {
  transform: translateX(-3px);
}
.btn-back-chip:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 2px 6px rgba(var(--back-halo-color, 99,102,241), calc(var(--back-halo-intensity, 0.25) * 1.2));
}

/* ---- Bottom Navigation ---- */
.bottom-nav {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 480px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 14px 0;
  background: transparent;
  border-radius: 28px;
  z-index: 300;
  isolation: isolate;
}
.bottom-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: 28px;
  background: linear-gradient(90deg,
    #ff4d8d, #c054f5, #6a7dff, #4dd8ff, #c054f5, #ff4d8d
  );
  background-size: 300% 100%;
  animation: navBorderFlow 6s linear infinite;
  box-shadow:
    0 0 4px 2px rgba(192,84,245,0.9),
    0 0 14px 4px rgba(106,125,255,0.6),
    0 0 28px 8px rgba(255,77,141,0.35);
}
.bottom-nav-bg-fill {
  position: absolute;
  inset: 3px;
  z-index: -1;
  border-radius: 25px;
  background: #050508;
}
@keyframes navBorderFlow {
  from { background-position: 0% 50%; }
  to   { background-position: 300% 50%; }
}
.bottom-nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #8a8a94;
  cursor: pointer;
  padding: 6px 14px;
  transition: all var(--transition);
  background: none;
  border: none;
  text-transform: capitalize;
}
.bottom-nav-item span {
  line-height: 1.2;
}
.bottom-nav-item i, .bottom-nav-item svg {
  width: 24px;
  height: 24px;
}
.bottom-nav-item:hover {
  color: #fff;
}
.bottom-nav-item.active {
  color: var(--primary, #ff6a00);
}
.bottom-nav-item.active i,
.bottom-nav-item.active svg {
  filter: drop-shadow(0 0 6px rgba(var(--primary-rgb, 255,106,0), 0.8));
}
.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--primary, #ff6a00);
  box-shadow: 0 0 8px rgba(var(--primary-rgb, 255,106,0), 0.9);
}
.bottom-nav-item .badge-count {
  position: absolute;
  top: -2px;
  right: 4px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(239,68,68,0.6);
}

/* ---- Modal / Product Detail ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}
.modal-overlay.open { display: flex; }
.modal-sheet {
  background: var(--card);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 92vh;
  overflow-y: auto;
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overscroll-behavior: contain;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  margin: 12px auto;
}

/* ---- Search ---- */
.search-box {
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border-radius: 99px;
  border: 2px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: all var(--transition);
}
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}
.search-box .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  overflow: hidden;
  display: none;
}
.search-suggestions.open { display: block; animation: slideDown 0.2s ease-out; }
.search-suggestion-item {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background var(--transition);
  font-size: 14px;
}
.search-suggestion-item:hover { background: var(--bg-secondary); }

/* ---- Horizontal Scroll ---- */
.scroll-x {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 8px;
  touch-action: pan-x;
}
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x > * { scroll-snap-align: start; flex-shrink: 0; }

/* ---- Star Rating ---- */
.stars { display: flex; gap: 2px; }
.star { color: #fbbf24; font-size: 14px; }
.star.empty { color: var(--border); }

/* ---- Variant Selector ---- */
.variant-group { margin-bottom: 16px; }
.variant-group h4 { font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.variant-options { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-opt {
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.variant-opt:hover { border-color: var(--primary); }
.variant-opt.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.variant-opt:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- Filter Drawer ---- */
.filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 150;
  display: none;
}
.filter-overlay.open { display: block; animation: fadeIn 0.2s ease; }
.filter-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: var(--card);
  z-index: 151;
  padding: 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.filter-drawer.open { transform: translateX(0); }

/* ---- Toast Notification ---- */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  padding: 12px 24px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 500;
  z-index: 999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Image Gallery ---- */
.gallery-main {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-secondary);
  aspect-ratio: 4/3;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.gallery-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--transition);
  background: var(--bg-secondary);
}
.gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Admin ---- */
.admin-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  z-index: 50;
  overflow-y: auto;
  transition: transform var(--transition);
}
.admin-main {
  margin-left: 260px;
  padding: 24px;
  min-height: 100vh;
}
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); width: 280px; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; padding: 16px; }
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}
.admin-nav-item:hover, .admin-nav-item.active {
  background: var(--bg-secondary);
  color: var(--primary);
}

.admin-input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}
.admin-input:focus { border-color: var(--primary); }
.admin-textarea { resize: vertical; min-height: 80px; }

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.admin-table th {
  text-align: left;
  padding: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

/* ---- Utility ---- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }
.truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Page Transitions ---- */
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease-out; }

/* ---- Price ---- */
.price-current { color: var(--primary); font-weight: 700; }
.price-old { text-decoration: line-through; color: var(--text-secondary); font-size: 14px; }

/* ---- Safe area for bottom nav ---- */
.content-area { padding-bottom: 108px; }

/* ---- Zoom effect ---- */
.zoomable { cursor: zoom-in; }
.zoomed {
  position: fixed !important;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: fadeIn 0.2s ease;
}
.zoomed img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 8px;
}
/* ============================================================
   FEATURED PRODUCT OVERLAY STYLES
   ============================================================ */
.featured-card { position: relative; overflow: hidden; }

/* Base overlay layer */
.featured-overlay {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
}

/* ---- SHIMMER ---- */
.fo-shimmer {
  background:
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(255,255,255,0.22) 0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at 80% 80%, rgba(99,102,241,0.18) 0%, transparent 55%);
  animation: foShimmer 4s ease-in-out infinite;
  mix-blend-mode: screen;
}
@keyframes foShimmer {
  0%   { opacity: .5; transform: translateY(0) scale(1); }
  33%  { opacity: 1;  transform: translateY(-6px) scale(1.02); }
  66%  { opacity: .7; transform: translateY(3px) scale(.99); }
  100% { opacity: .5; transform: translateY(0) scale(1); }
}
.featured-card:hover .fo-shimmer {
  animation-duration: 1.5s;
  background:
    radial-gradient(ellipse 80% 60% at 30% 30%, rgba(255,255,255,.32) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 70% 70%, rgba(99,102,241,.25) 0%, transparent 55%);
}

/* ---- PARTICLES & STARS (canvas – animated via JS) ---- */
.fo-canvas { width: 100%; height: 100%; mix-blend-mode: screen; }

/* ---- GLITCH ---- */
.fo-glitch { overflow: hidden; }
.glitch-line {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary, #6366f1), #00ffff, transparent);
  opacity: 0;
}
.glitch-line.l1 { animation: glitchLine1 3.5s infinite; mix-blend-mode: screen; }
.glitch-line.l2 { animation: glitchLine2 4.2s 1.1s infinite; mix-blend-mode: screen; }
.glitch-scanline {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px, rgba(0,0,0,.08) 3px, rgba(0,0,0,.08) 4px
  );
  animation: glitchScan 6s linear infinite;
  opacity: .5;
}
@keyframes glitchLine1 {
  0%,89%  { top: 0%; opacity: 0; }
  90%  { top: 30%; opacity: 1; }
  91%  { top: 32%; opacity: 0; filter: blur(1px); }
  92%  { top: 65%; opacity: 1; }
  93%  { top: 68%; opacity: 0; }
  100% { opacity: 0; }
}
@keyframes glitchLine2 {
  0%,92%  { top: 0%; opacity: 0; }
  93%  { top: 50%; opacity: 1; filter: hue-rotate(120deg); }
  94%  { top: 52%; opacity: 0; }
  95%  { top: 80%; opacity: 1; }
  96%  { top: 82%; opacity: 0; }
  100% { opacity: 0; }
}
@keyframes glitchScan {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}
.featured-card:hover .fo-glitch .glitch-line { animation-duration: 0.8s !important; }

/* ---- HOLOGRAPHIC ---- */
.fo-holographic {
  background: linear-gradient(125deg,
    rgba(255,0,128,.18), rgba(121,40,202,.20), rgba(0,212,255,.18),
    rgba(121,40,202,.20), rgba(255,0,128,.18));
  background-size: 300% 300%;
  animation: foHolo 4s ease infinite;
  mix-blend-mode: screen;
}
@keyframes foHolo {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.featured-card:hover .fo-holographic { animation-duration: 1s; }

/* ---- AURORA ---- */
.fo-aurora { overflow: hidden; }
.aurora-inner {
  position: absolute;
  width: 200%; height: 200%;
  top: -50%; left: -50%;
  background: conic-gradient(from 0deg at 50% 50%,
    rgba(0,255,135,.25), rgba(96,239,255,.20),
    rgba(0,97,255,.18), rgba(96,239,255,.20),
    rgba(0,255,135,.25));
  animation: foAurora 8s linear infinite;
  mix-blend-mode: screen;
  border-radius: 50%;
}
@keyframes foAurora { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.featured-card:hover .aurora-inner { animation-duration: 3s; }

/* ---- FIRE ---- */
.fo-fire {
  background: linear-gradient(to top,
    rgba(255,69,0,.7) 0%,
    rgba(255,140,0,.5) 30%,
    rgba(255,215,0,.3) 60%,
    transparent 100%);
  animation: foFire 1.8s ease-in-out infinite;
  mix-blend-mode: hard-light;
  transform-origin: bottom center;
}
@keyframes foFire {
  0%,100% { transform: scaleY(1)   scaleX(1); opacity: .7; }
  25%      { transform: scaleY(1.06) scaleX(.98); opacity: .9; }
  50%      { transform: scaleY(1.12) scaleX(1.02); opacity: 1; }
  75%      { transform: scaleY(1.04) scaleX(.99); opacity: .85; }
}
.featured-card:hover .fo-fire { animation-duration: .6s; }

/* ---- RIPPLE ---- */
.fo-ripple { display: flex; align-items: center; justify-content: center; }
.ripple-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--primary, #6366f1);
  opacity: 0;
}
.ripple-ring.r1 { width: 40%; height: 40%; animation: foRipple 2.4s ease-out infinite; }
.ripple-ring.r2 { width: 40%; height: 40%; animation: foRipple 2.4s .8s ease-out infinite; }
.ripple-ring.r3 { width: 40%; height: 40%; animation: foRipple 2.4s 1.6s ease-out infinite; }
@keyframes foRipple {
  0%   { transform: scale(.5); opacity: .8; }
  100% { transform: scale(2.8); opacity: 0; }
}
.featured-card:hover .ripple-ring { animation-duration: 1s !important; }

/* ---- LOGO in header ---- */
#mainLogoImage {
  max-height: 72px;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
}

/* ---- DnD zone for admin ---- */
.dnd-zone { transition: border-color .2s, background .2s, transform .2s; }

/* ---- Info Page Prose ---- */
.prose-content h1, .prose-content h2, .prose-content h3 {
  font-weight: 700;
  margin: 1rem 0 0.5rem;
  color: var(--text);
}
.prose-content h1 { font-size: 1.5rem; }
.prose-content h2 { font-size: 1.25rem; }
.prose-content h3 { font-size: 1.1rem; }
.prose-content p { margin: 0.5rem 0; }
.prose-content ul, .prose-content ol { padding-left: 1.5rem; margin: 0.5rem 0; }
.prose-content li { margin: 0.25rem 0; }
.prose-content a { color: var(--primary); text-decoration: underline; }
.prose-content strong { font-weight: 700; }
.prose-content em { font-style: italic; }

/* ============================================================
   SPLASH LOADER
   ============================================================ */
#splashLoader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #0f172a);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#splashLoader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-inner {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.splash-logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: 50%;
  animation: splashPulse 1.6s ease-in-out infinite;
  position: relative;
  z-index: 2;
}
.splash-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--primary, #f97316);
  border-right-color: var(--primary, #f97316);
  animation: splashSpin 1s linear infinite;
}
@keyframes splashPulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(0.93); opacity: 0.85; }
}
@keyframes splashSpin {
  to { transform: rotate(360deg); }
}

/* ---- Media sortable drag & drop ---- */
.media-drag-handle {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 10;
  font-size: 14px;
  line-height: 1;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.45);
  border-radius: 4px;
  padding: 2px 4px;
  cursor: grab;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.media-sortable.drag-over {
  outline: 2px dashed var(--primary);
  outline-offset: 2px;
  transform: scale(0.96);
  transition: transform 0.1s ease;
}

/* ============================================================
   SETTINGS ACCORDEONS
   ============================================================ */
.settings-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.settings-group[open] {
  box-shadow: var(--shadow);
}
.settings-group-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  user-select: none;
  transition: background var(--transition);
}
.settings-group-title::-webkit-details-marker { display: none; }
.settings-group-title::after {
  content: '›';
  margin-left: auto;
  font-size: 1.2rem;
  transition: transform 0.2s ease;
  color: var(--text-secondary);
}
.settings-group[open] .settings-group-title::after {
  transform: rotate(90deg);
}
.settings-group-title:hover {
  background: var(--bg-secondary);
}
.settings-group-body {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
}
.settings-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ============================================================
   AUTH SCREEN
   ============================================================ */
@keyframes authHaloPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%,-50%) scale(1); }
  50%       { opacity: 1;   transform: translate(-50%,-50%) scale(1.15); }
}
@keyframes authFloatUp {
  0%   { transform: translateY(0)   scale(1);   opacity: 0.8; }
  100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

/* ---- iOS Safari background fix ---- */
/* Empêche le saut du fond sur scroll iOS */
@supports (-webkit-overflow-scrolling: touch) {
  body {
    -webkit-overflow-scrolling: touch;
  }
  .ios-bg-fixed {
    position: fixed !important;
    inset: 0 !important;
    background-attachment: scroll !important;
  }
}

/* ============================================================
   BANNIÈRE DÉFILANTE
   ============================================================ */
#infoBanner {
  position: relative;
  overflow: hidden;
  z-index: 39;
  display: none;
  border-top: 2px solid rgba(0,0,0,0.6);
  border-bottom: 2px solid rgba(0,0,0,0.6);
  box-sizing: border-box;
}
#infoBanner.active { display: block; }
#infoBannerHalo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
#infoBannerTrack {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: bannerScroll 18s linear infinite;
  position: relative;
  z-index: 1;
  padding: 0.5rem 0;
}
@keyframes bannerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes bannerScrollLong {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-98%); }
}
#infoBanner:hover #infoBannerTrack {
  animation-play-state: paused;
}

/* ---- Contenteditable placeholder ---- */
[contenteditable][data-placeholder]:empty::before {
  content: attr(data-placeholder);
  color: var(--text-secondary);
  opacity: 0.6;
  pointer-events: none;
}
