/* =========================================================================
   VapShop — Feuille de style (maquette de démonstration)
   Thème sombre + violet / vert menthe. Responsive PC + mobile.
   ========================================================================= */

:root {
  --bg: #12101c;
  --bg-2: #1b1830;
  --surface: #221f3a;
  --surface-2: #2b2750;
  --border: #362f5c;
  --violet: #7c4dff;
  --violet-2: #9b6bff;
  --mint: #4dd0c1;
  --mint-2: #6ee7d8;
  --text: #eceafc;
  --muted: #a49fc7;
  --danger: #ff5c7a;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 3px 10px rgba(0, 0, 0, 0.28);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

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

/* ---------- Bandeau démonstration ---------- */
.demo-banner {
  background: repeating-linear-gradient(45deg, #ffcf33, #ffcf33 12px, #1b1830 12px, #1b1830 24px);
  color: #12101c;
  font-weight: 700;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  padding: 4px 0;
}
.demo-banner span {
  background: #12101c;
  color: #ffcf33;
  padding: 2px 12px;
  border-radius: 20px;
}

/* ---------- Bandeau Espace Pro ---------- */
.pro-strip {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}
.pro-strip .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  height: 34px;
}
.pro-strip a.pro-link {
  color: var(--mint);
  font-weight: 600;
  border: 1px solid var(--mint);
  padding: 2px 10px;
  border-radius: 20px;
  transition: 0.2s;
}
.pro-strip a.pro-link:hover { background: var(--mint); color: #12101c; }

/* ---------- Header ---------- */
header.site-header {
  background: var(--bg-2);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
}
.header-main {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.5rem;
  white-space: nowrap;
}
.logo .logo-mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--violet), var(--mint));
  display: grid; place-items: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
}
.logo .brand-vap { color: var(--text); }
.logo .brand-shop { color: var(--mint); }

/* Recherche */
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 560px;
}
.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 30px;
  padding: 4px 6px 4px 18px;
  transition: 0.2s;
}
.search-box:focus-within {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.25);
}
.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  padding: 8px 6px;
  outline: none;
}
.search-box input::placeholder { color: var(--muted); }
.search-box .search-btn {
  border: none;
  background: var(--violet);
  color: #fff;
  border-radius: 24px;
  padding: 9px 16px;
  font-weight: 600;
}
.search-box .search-btn:hover { background: var(--violet-2); }

/* Suggestions Ajax simulées */
.suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 60;
  display: none;
}
.suggestions.open { display: block; }
.suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.suggestion:last-child { border-bottom: none; }
.suggestion:hover { background: var(--surface-2); }
.suggestion .thumb {
  width: 34px; height: 34px; border-radius: 8px; flex: none;
}
.suggestion .s-name { font-weight: 600; }
.suggestion .s-meta { font-size: 0.78rem; color: var(--muted); }
.suggestion .s-price { margin-left: auto; color: var(--mint); font-weight: 700; }
.suggestions .s-empty { padding: 14px; color: var(--muted); text-align: center; }

/* Actions header */
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.cart-btn {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 30px;
  padding: 9px 16px 9px 14px;
  display: flex; align-items: center; gap: 8px;
  font-weight: 600;
}
.cart-btn:hover { border-color: var(--mint); }
.cart-count {
  background: var(--mint);
  color: #12101c;
  border-radius: 50%;
  min-width: 20px; height: 20px;
  display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 800;
  padding: 0 4px;
}
.burger {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  width: 44px; height: 44px;
  font-size: 1.3rem;
}

/* ---------- Navigation / Méga-menu ---------- */
nav.mega-nav {
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.nav-list {
  display: flex;
  list-style: none;
  margin: 0; padding: 0;
  gap: 4px;
}
.nav-item { position: static; }
.nav-item > a {
  display: block;
  padding: 14px 18px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 3px solid transparent;
}
.nav-item:hover > a { color: var(--mint); border-bottom-color: var(--mint); }

/* Panneau méga-menu plein largeur */
.mega-panel {
  position: absolute;
  left: 0; right: 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 26px 0 32px;
  display: none;
  z-index: 55;
}
.nav-item:hover .mega-panel { display: block; }
.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.mega-col h4 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--mint);
}
.mega-col ul { list-style: none; margin: 0; padding: 0; }
.mega-col li a {
  display: block;
  padding: 7px 0;
  color: var(--muted);
  border-bottom: 1px solid transparent;
}
.mega-col li a:hover { color: var(--text); }
.mega-promo {
  grid-column: span 4;
  margin-top: 8px;
  background: linear-gradient(120deg, rgba(124,77,255,0.25), rgba(77,208,193,0.2));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Slider bannière ---------- */
.slider {
  position: relative;
  overflow: hidden;
  height: 340px;
}
.slides {
  display: flex;
  height: 100%;
  transition: transform 0.55s ease;
}
.slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 8%;
  position: relative;
}
.slide .slide-inner { max-width: 560px; position: relative; z-index: 2; }
.slide h2 { font-size: 2.2rem; margin: 0 0 10px; }
.slide p { font-size: 1.05rem; color: rgba(255,255,255,0.85); margin: 0 0 18px; }
.slide .btn-cta {
  background: #fff; color: #12101c; font-weight: 700;
  border: none; border-radius: 30px; padding: 12px 26px; font-size: 1rem;
}
.slide .btn-cta:hover { background: var(--mint); }
.slider-dots {
  position: absolute; bottom: 16px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 10px; z-index: 3;
}
.slider-dots button {
  width: 12px; height: 12px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.4);
}
.slider-dots button.active { background: #fff; width: 30px; border-radius: 6px; }
.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.35); color: #fff; border: none;
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.4rem; z-index: 3;
}
.slider-arrow.prev { left: 14px; }
.slider-arrow.next { right: 14px; }

/* ---------- Sections & grille produits ---------- */
.section { padding: 42px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 22px; flex-wrap: wrap; gap: 8px;
}
.section-head h2 { margin: 0; font-size: 1.6rem; }
.section-head .sub { color: var(--muted); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex; flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--violet);
}
.product-media {
  position: relative;
  height: 170px;
  display: grid; place-items: center;
  font-size: 3rem;
}
.product-media .ph-label {
  position: absolute; bottom: 8px; right: 10px;
  font-size: 0.65rem; color: rgba(255,255,255,0.75);
  background: rgba(0,0,0,0.3); padding: 2px 8px; border-radius: 10px;
}
.badge-promo {
  position: absolute; top: 10px; left: 10px;
  background: var(--danger); color: #fff;
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 10px; border-radius: 20px;
}
.product-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-body .p-brand { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 1px; color: var(--mint); }
.product-body .p-name { font-weight: 700; font-size: 1.05rem; }
.product-body .p-cat { font-size: 0.8rem; color: var(--muted); }
.price-row { display: flex; align-items: baseline; gap: 10px; margin-top: auto; }
.price-now { font-size: 1.25rem; font-weight: 800; color: var(--mint); }
.price-old { text-decoration: line-through; color: var(--muted); font-size: 0.9rem; }
.price-ttc { font-size: 0.7rem; color: var(--muted); }
.card-actions { display: flex; gap: 8px; margin-top: 12px; }
.btn {
  border: none; border-radius: 10px; padding: 10px 14px;
  font-weight: 600; font-size: 0.9rem; transition: 0.2s;
}
.btn-primary { background: var(--violet); color: #fff; flex: 1; }
.btn-primary:hover { background: var(--violet-2); }
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--mint); color: var(--mint); }
.btn-mint { background: var(--mint); color: #12101c; }
.btn-mint:hover { background: var(--mint-2); }

/* ---------- Filtres catégorie ---------- */
.cat-hero {
  background: linear-gradient(120deg, rgba(124,77,255,0.3), rgba(77,208,193,0.18));
  border-bottom: 1px solid var(--border);
  padding: 30px 0;
}
.cat-hero h1 { margin: 0 0 6px; font-size: 1.9rem; }
.cat-hero p { margin: 0; color: var(--muted); }
.cat-toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px;
}
.chip {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); border-radius: 30px; padding: 8px 16px; font-size: 0.85rem;
}
.chip.active, .chip:hover { border-color: var(--mint); color: var(--mint); }

/* ---------- Modal / Panneau déclinaisons ---------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(6, 5, 14, 0.72);
  backdrop-filter: blur(3px);
  display: none;
  z-index: 200;
  align-items: center; justify-content: center;
  padding: 18px;
}
.overlay.open { display: flex; }
.modal {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%; max-width: 640px;
  max-height: 88vh; overflow: auto;
  box-shadow: var(--shadow);
}
.modal-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg-2); z-index: 2;
}
.modal-head .m-thumb { width: 48px; height: 48px; border-radius: 10px; }
.modal-head h3 { margin: 0; font-size: 1.15rem; }
.modal-head .m-sub { font-size: 0.8rem; color: var(--muted); }
.modal-close {
  margin-left: auto; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); width: 38px; height: 38px; border-radius: 10px; font-size: 1.1rem;
}
.modal-body { padding: 16px 20px; }
.ref-table { width: 100%; border-collapse: collapse; }
.ref-table th {
  text-align: left; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--border);
}
.ref-table td { padding: 10px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ref-flavor { font-weight: 600; }
.ref-nic { font-size: 0.8rem; color: var(--muted); }
.ref-price { color: var(--mint); font-weight: 700; white-space: nowrap; }
.qty {
  display: inline-flex; align-items: center; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; background: var(--surface);
}
.qty button { background: var(--surface-2); border: none; color: var(--text); width: 32px; height: 34px; font-size: 1.1rem; }
.qty button:hover { color: var(--mint); }
.qty input {
  width: 44px; text-align: center; border: none; background: transparent;
  color: var(--text); font-weight: 700; font-size: 0.95rem; -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.modal-foot {
  padding: 16px 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  position: sticky; bottom: 0; background: var(--bg-2);
}
.modal-foot .sel-info { color: var(--muted); font-size: 0.9rem; }
.modal-foot .btn-mint { margin-left: auto; padding: 12px 22px; }

/* ---------- Fiche produit ---------- */
.product-page { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; padding: 34px 0; }
.product-page .pp-media {
  border-radius: 16px; height: 380px; display: grid; place-items: center;
  font-size: 6rem; border: 1px solid var(--border); position: relative;
}
.pp-info h1 { margin: 0 0 6px; font-size: 2rem; }
.pp-info .pp-brand { color: var(--mint); text-transform: uppercase; letter-spacing: 1px; font-size: 0.8rem; }
.pp-info .pp-desc { color: var(--muted); margin: 14px 0 20px; }
.pp-info h3 { font-size: 1.1rem; margin: 22px 0 10px; }

/* ---------- Mini-panier latéral ---------- */
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 380px; max-width: 92vw;
  background: var(--bg-2); border-left: 1px solid var(--border);
  box-shadow: var(--shadow); z-index: 250;
  transform: translateX(100%); transition: transform 0.3s ease;
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer .cd-head {
  padding: 18px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.cart-drawer .cd-head h3 { margin: 0; font-size: 1.2rem; }
.cart-drawer .cd-body { flex: 1; overflow: auto; padding: 12px 16px; }
.cart-item {
  display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border);
}
.cart-item .ci-thumb { width: 46px; height: 46px; border-radius: 8px; flex: none; }
.cart-item .ci-name { font-weight: 600; font-size: 0.92rem; }
.cart-item .ci-meta { font-size: 0.76rem; color: var(--muted); }
.cart-item .ci-line { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cart-item .ci-price { margin-left: auto; color: var(--mint); font-weight: 700; }
.cart-item .ci-remove { background: none; border: none; color: var(--danger); font-size: 0.8rem; }
.cart-empty { color: var(--muted); text-align: center; padding: 40px 10px; }
.cart-drawer .cd-foot { padding: 16px 20px; border-top: 1px solid var(--border); }
.cd-total { display: flex; justify-content: space-between; font-size: 1.15rem; font-weight: 800; margin-bottom: 12px; }
.cd-total .t-val { color: var(--mint); }
.cd-foot .btn-mint { width: 100%; padding: 13px; font-size: 1rem; }
.cd-foot .disclaimer { font-size: 0.72rem; color: var(--muted); text-align: center; margin-top: 10px; }

/* ---------- Vérification d'âge ---------- */
.age-gate {
  position: fixed; inset: 0;
  background: rgba(6,5,14,0.95);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.age-gate.hidden { display: none; }
.age-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 18px; max-width: 440px; width: 100%;
  padding: 34px 30px; text-align: center; box-shadow: var(--shadow);
}
.age-card .age-logo {
  width: 60px; height: 60px; border-radius: 16px; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--violet), var(--mint));
  display: grid; place-items: center; font-size: 1.8rem;
}
.age-card h2 { margin: 0 0 6px; font-size: 1.5rem; }
.age-card p { color: var(--muted); margin: 0 0 22px; }
.age-actions { display: flex; gap: 12px; }
.age-actions button { flex: 1; padding: 14px; border-radius: 12px; font-size: 1rem; font-weight: 700; border: none; }
.age-yes { background: var(--mint); color: #12101c; }
.age-yes:hover { background: var(--mint-2); }
.age-no { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.age-no:hover { border-color: var(--danger); color: var(--danger); }
.age-denied { margin-top: 20px; color: var(--danger); font-weight: 600; display: none; }
.age-legal { font-size: 0.72rem; color: var(--muted); margin-top: 18px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--mint); color: #12101c; font-weight: 700;
  padding: 12px 22px; border-radius: 30px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: 0.3s; z-index: 300;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--bg-2); border-top: 1px solid var(--border);
  padding: 34px 0 24px; margin-top: 30px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 26px; }
.footer-grid h4 { color: var(--mint); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 5px 0; color: var(--muted); font-size: 0.9rem; }
.footer-bottom {
  border-top: 1px solid var(--border); margin-top: 26px; padding-top: 18px;
  text-align: center; color: var(--muted); font-size: 0.82rem;
}
.footer-bottom strong { color: #ffcf33; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .mega-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .product-page { grid-template-columns: 1fr; }
  .product-page .pp-media { height: 280px; }
}

@media (max-width: 720px) {
  .burger { display: block; }
  .header-main { flex-wrap: wrap; }
  .search-wrap { order: 3; flex-basis: 100%; max-width: none; }

  /* Le méga-menu devient un panneau off-canvas (burger) */
  nav.mega-nav {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 300px; max-width: 84vw; z-index: 260;
    background: var(--bg-2); border-right: 1px solid var(--border);
    transform: translateX(-100%); transition: transform 0.3s ease;
    overflow-y: auto; padding-top: 10px;
  }
  nav.mega-nav.open { transform: translateX(0); }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-item > a { border-bottom: 1px solid var(--border); }
  .mega-panel {
    position: static; display: none; box-shadow: none;
    background: var(--surface); padding: 6px 14px 14px;
  }
  .nav-item:hover .mega-panel { display: none; }
  .nav-item.mobile-open .mega-panel { display: block; }
  .mega-grid { grid-template-columns: 1fr; gap: 10px; }
  .mega-promo { grid-column: span 1; }

  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .slider { height: 260px; }
  .slide h2 { font-size: 1.5rem; }
  .slide { padding: 0 6%; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-backdrop { display: none; }
  .nav-backdrop.open {
    display: block; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 255;
  }
}

@media (max-width: 460px) {
  .product-grid { grid-template-columns: 1fr; }
  .price-now { font-size: 1.1rem; }
}
