/* STL Prime Vault - Base styles */
:root {
  --bg: #f7f7f5;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --primary: #111111;
  --accent: #10b981;
  --accent-hover: #059669;
  --border: #e5e5e5;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --transition: 0.25s ease;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.logo-with-img {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.site-logo-img {
  height: 32px;
  width: auto;
  max-width: 48px;
  object-fit: contain;
  display: block;
}
.site-logo-text { line-height: 1.1; }
.logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span { color: var(--accent); }
.nav-main { display: flex; gap: 24px; font-weight: 500; font-size: 0.95rem; }
.nav-main a:hover { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.search-box {
  position: relative;
  flex: 1;
  max-width: 320px;
}
.search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}
.search-box input:focus { border-color: var(--accent); }
.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.4;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero */
.hero--no-image {
  grid-template-columns: 1fr;
}
.hero {
  padding: 64px 0 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  background: #ecfdf5;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.hero h1,
.hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
/* Laisse la mise en forme TinyMCE (gras, taille, couleur) s'exprimer */
.hero-title strong, .hero-title b { font-weight: 800; }
.hero-title em, .hero-title i { font-style: italic; }
.hero .hero-title p {
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  max-width: none;
  display: block;
}
.hero-title br { display: block; content: ""; margin: 0; line-height: 1.25; }
.hero-sub { line-height: 1.45; }
.hero .hero-sub p { margin: 0; padding: 0; line-height: inherit; color: inherit; max-width: none; }
.hero-sub br { line-height: 1.45; }
.hero > p, .hero-content > p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 28px; max-width: 480px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #333; transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.stat-value { font-size: 1.5rem; font-weight: 800; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.hero-image {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 420px;
  width: 100%;
  margin-left: auto;
}
.hero-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 420px);
  max-height: 420px;
  object-fit: contain;
}

/* Sections */
.section { padding: 48px 0; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-title { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; }
.section-link { font-size: 0.9rem; color: var(--accent); font-weight: 600; }

/* Categories / Rays */
.rays-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.ray-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
}
.ray-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.ray-card img { width: 100%; height: 180px; object-fit: cover; }
.ray-card-body { padding: 16px; }
.ray-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.ray-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag {
  font-size: 0.7rem;
  padding: 3px 8px;
  background: var(--bg);
  border-radius: 6px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Products grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-card-img {
  position: relative;
  aspect-ratio: 1;
  background: #f0f0f0;
  overflow: hidden;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-card-img img { transform: scale(1.04); }
.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  pointer-events: none;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.fav-btn:hover, .fav-btn.active { color: #e11d48; }
.product-card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.product-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
.product-price { font-weight: 700; font-size: 1.05rem; margin-top: auto; padding-top: 10px; }
.product-card .btn { width: 100%; margin-top: 12px; justify-content: center; padding: 10px; font-size: 0.875rem; }

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--primary);
  color: #fff;
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.9rem; margin-top: 12px; max-width: 280px; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; opacity: 0.7; }
.footer-col a { display: block; color: rgba(255,255,255,0.8); font-size: 0.9rem; margin-bottom: 8px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* Forms */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 0.875rem; margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  background: var(--bg-card);
  transition: border-color var(--transition);
}
.form-control:focus { outline: none; border-color: var(--accent); }
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* Cart & Account */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 14px; text-align: left; border-bottom: 1px solid var(--border); }
.cart-table th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.qty-input { width: 70px; padding: 8px; border-radius: 8px; border: 1px solid var(--border); text-align: center; }

/* Account tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 28px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.tab {
  padding: 12px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.tab.active, .tab:hover { color: var(--text); border-color: var(--accent); }

/* Responsive */
@media (max-width: 900px) {
  .hero--no-image {
  grid-template-columns: 1fr;
}
.hero { grid-template-columns: 1fr; gap: 32px; }
  .hero-image { order: -1; max-height: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .header-inner { gap: 12px; }
  .search-box { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .rays-grid { grid-template-columns: 1fr; }
}

/* Animations discrètes */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp 0.5s ease forwards; }
.product-card, .ray-card { animation: fadeInUp 0.4s ease both; }
.product-card:nth-child(2) { animation-delay: 0.05s; }
.product-card:nth-child(3) { animation-delay: 0.1s; }
.product-card:nth-child(4) { animation-delay: 0.15s; }
.product-card:nth-child(5) { animation-delay: 0.2s; }


/* Scrollbars client */
* {
  scrollbar-width: thin;
  scrollbar-color: #c4c4c4 #f0f0f0;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 8px; }
*::-webkit-scrollbar-thumb { background: #c4c4c4; border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: #999; }


/* ===== Desktop submenu categories (PC) ===== */
.nav-item-has-sub { position: relative; }
.nav-item-has-sub > a { display: inline-flex; align-items: center; gap: 4px; }
.nav-caret { font-size: 0.7em; opacity: 0.75; }
.nav-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 50;
}
.nav-item-has-sub:hover .nav-submenu,
.nav-item-has-sub:focus-within .nav-submenu { display: block; }
.nav-submenu a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  white-space: nowrap;
}
.nav-submenu a:hover { background: var(--bg); color: var(--accent); }
.nav-sub-all { font-weight: 600; color: var(--accent); }

/* Caches sur PC */
.nav-burger { display: none; }
.mobile-menu-panel { display: none; }

/* ===== MOBILE UNIQUEMENT — PC inchange ===== */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    max-width: 100%;
  }

  /* Marges internes plus generueses */
  .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .section { padding-left: 0; padding-right: 0; }
  .product-card-body,
  .ray-card-body { padding: 12px 14px; }
  .hero--no-image {
  grid-template-columns: 1fr;
}
.hero { padding-left: 0; padding-right: 0; }

  main, header, footer, section {
    max-width: 100%;
  }
  img { max-width: 100%; height: auto; }

  /* Menu horizontal desktop cache */
  .nav-main { display: none !important; }
  .search-box { display: none !important; }

  /* Burger visible */
  .nav-burger {
    display: flex !important;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    flex-shrink: 0;
  }
  .nav-burger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: 0.2s ease;
  }
  .nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger.is-open span:nth-child(2) { opacity: 0; }
  .nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Panneau menu */
  .mobile-menu-panel {
    display: none;
    width: 100%;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
  }
  .mobile-menu-panel.is-open { display: block !important; }
  .mobile-menu-inner {
    padding: 14px 20px 20px;
  }
  .mobile-menu-search input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 12px;
  }
  .mobile-menu-link,
  .mobile-menu-parent {
    display: flex;
    width: 100%;
    text-align: left;
    padding: 14px 2px;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
  }
  .mobile-menu-parent.nested {
    font-size: 0.95rem;
    font-weight: 600;
    padding-left: 8px;
  }
  .mobile-menu-subs {
    display: none;
    flex-direction: column;
    padding: 4px 0 8px 12px;
    border-bottom: 1px solid var(--border);
  }
  .mobile-menu-subs.is-open { display: flex !important; }
  .mobile-menu-subs.nested { padding-left: 20px; }
  .mobile-menu-subs a {
    padding: 10px 4px;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
  }
  .mobile-menu-subs a:hover { color: var(--accent); }
  .mobile-menu-all {
    font-weight: 600;
    color: var(--accent) !important;
  }

  .products-grid,
  .rays-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
  .product-card, .ray-card { min-width: 0; }
  .hero--no-image {
  grid-template-columns: 1fr;
}
.hero {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
  .products-grid,
  .rays-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

a.vip-dl, a.btn.vip-dl {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}
.product-card { position: relative; }
.list-fav-form {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  margin: 0;
}
.list-fav-form .fav-btn,
.list-fav-form .fav-btn.active,
.list-fav-form .fav-btn.active:hover {
  position: static;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff !important;
  border: none;
  color: #111;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.list-fav-form .heart-ico,
.fav-detail .heart-ico { width: 18px; height: 18px; display: block; flex: 0 0 18px; }
.fav-detail { display: inline-flex; align-items: center; gap: 8px; }
