/* ============================================================
   BASE CSS — commun aux 2 sites
   Structure identique, seules les couleurs/fonts varient via theme.css
   ============================================================ */

:root {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 20px 40px rgba(0,0,0,.12);
  --container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .5em;
  color: var(--heading);
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2em; }
h3 { font-size: 1.25rem; margin-top: 1.5em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-top {
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  text-align: center;
  padding: 6px 0;
}
.header-top strong { font-weight: 700; }

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 24px;
}

.brand {
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--header-text);
  text-decoration: none;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px;
  display: inline-block;
  background: var(--accent);
  border-radius: var(--radius);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute; inset: 6px;
  border: 2px solid #fff;
  border-top: none;
  border-radius: 0 0 8px 8px;
}

.main-nav { display: flex; gap: 32px; align-items: center; }
.main-nav > ul {
  display: flex;
  list-style: none;
  margin: 0; padding: 0;
  gap: 24px;
}
.main-nav a {
  color: var(--header-text);
  font-weight: 500;
  font-size: 15px;
  padding: 8px 0;
  display: inline-block;
  position: relative;
}
.main-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}
.nav-item { position: relative; }
.nav-item.has-children > a::after {
  content: "▾"; font-size: 10px; margin-left: 4px; opacity: .6;
}
.nav-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: -16px;
  background: #fff;
  min-width: 220px;
  padding: 8px 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .2s ease;
}
.nav-item:hover > .nav-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown li a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  font-size: 14px;
}
.nav-dropdown li a:hover {
  background: var(--bg-alt);
  color: var(--accent);
}

.cart-btn {
  background: var(--accent);
  color: #fff !important;
  padding: 10px 18px !important;
  border-radius: var(--radius);
  font-weight: 600 !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cart-btn:hover { opacity: .9; text-decoration: none; }
.cart-count {
  background: #fff;
  color: var(--accent);
  border-radius: 999px;
  font-size: 11px;
  padding: 1px 7px;
  font-weight: 700;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-pattern);
  opacity: .06;
  pointer-events: none;
}
.hero-inner {
  max-width: 780px;
  position: relative;
}
.hero h1 {
  color: var(--hero-text);
  margin-bottom: 24px;
}
.hero-sub {
  font-size: 1.2rem;
  line-height: 1.5;
  opacity: .9;
  margin-bottom: 32px;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--hero-text);
  border-color: currentColor;
}
.btn-secondary:hover {
  background: var(--hero-text);
  color: var(--hero-bg);
  text-decoration: none;
}
.btn-block { width: 100%; }

/* ============================================================
   TRUST BAR (sous hero)
   ============================================================ */
.trust-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.trust-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}
.trust-item strong { color: var(--heading); }
.trust-icon {
  width: 22px; height: 22px;
  color: var(--accent);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .trust-items { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-header { max-width: 780px; margin-bottom: 48px; }
.section-eyebrow {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
}
.section-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   GRID CATEGORIES
   ============================================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.category-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all .2s ease;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.category-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transform: translateY(-2px);
}
.category-card svg { width: 100%; height: 140px; margin-bottom: 16px; }
.category-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--heading);
}
.category-card p { color: var(--text-muted); font-size: 14px; margin: 0; }
.category-card .arrow { color: var(--accent); font-weight: 700; margin-top: 12px; display: inline-block; }

/* ============================================================
   PRODUITS
   ============================================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all .2s ease;
}
.product-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.product-media {
  background: var(--bg-alt);
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.product-media svg { max-width: 100%; max-height: 100%; }
.product-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.product-name {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 6px;
  line-height: 1.3;
}
.product-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.5;
  flex: 1;
}
.product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.spec-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  background: var(--bg-alt);
  color: var(--text-muted);
  border-radius: 3px;
  border: 1px solid var(--border);
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.product-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--heading);
}
.product-price small { font-size: 11px; font-weight: 400; color: var(--text-muted); }
.stock-ok { color: #2e7d32; font-size: 12px; font-weight: 600; }
.stock-low { color: #ef6c00; font-size: 12px; font-weight: 600; }
.btn-add {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}
.btn-add:hover { background: var(--accent-dark); }

/* Product featured (larger card) */
.product-card.featured { border: 2px solid var(--accent); position: relative; }
.product-card.featured::before {
  content: "Best-seller";
  position: absolute;
  top: 12px; left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .05em;
  z-index: 1;
}

/* ============================================================
   CONTENT PROSE (sections textuelles)
   ============================================================ */
.prose {
  max-width: 780px;
  font-size: 1.05rem;
  line-height: 1.75;
}
.prose h2 { margin-top: 2.5em; margin-bottom: .6em; }
.prose h3 { margin-top: 2em; margin-bottom: .5em; }
.prose ul, .prose ol { padding-left: 1.5em; margin: 0 0 1em; }
.prose li { margin-bottom: .5em; }
.prose strong { color: var(--heading); }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 8px; opacity: .5; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 60px 0 24px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand { font-weight: 800; font-size: 1.2rem; color: #fff; margin-bottom: 12px; display: block; }
.footer-about p { color: var(--footer-text); opacity: .75; font-size: 14px; }
.footer-col h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--footer-text); opacity: .75; font-size: 14px; }
.footer-col a:hover { opacity: 1; color: var(--accent); text-decoration: none; }
.footer-bottom {
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  opacity: .6;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav > ul { display: none; }
  .hero { padding: 60px 0 70px; }
  .section { padding: 48px 0; }
}

/* ============================================================
   CART DRAWER
   ============================================================ */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: all .2s;
}
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 100vw;
  background: #fff;
  z-index: 100;
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.cart-header h3 { margin: 0; color: var(--heading); }
.cart-close {
  background: transparent; border: 0; font-size: 24px; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.cart-close:hover { background: var(--bg-alt); }
.cart-items { flex: 1; overflow-y: auto; padding: 20px; }
.cart-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.cart-item-thumb {
  width: 60px; height: 60px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  padding: 6px;
}
.cart-item-thumb svg { width: 100%; height: 100%; }
.cart-item-name { font-size: 13px; font-weight: 600; color: var(--heading); margin: 0 0 4px; }
.cart-item-price { font-size: 13px; color: var(--text-muted); }
.cart-item-qty { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.cart-item-qty button {
  width: 22px; height: 22px; border: 1px solid var(--border);
  background: transparent; border-radius: 3px; cursor: pointer;
  font-weight: 700;
}
.cart-item-qty input { width: 36px; text-align: center; border: 1px solid var(--border); border-radius: 3px; padding: 2px; font-size: 12px; }
.cart-item-remove { background: transparent; border: 0; color: #c00; cursor: pointer; font-size: 18px; }
.cart-footer { padding: 20px; border-top: 1px solid var(--border); background: var(--bg-alt); }
.cart-total { display: flex; justify-content: space-between; font-size: 1.15rem; font-weight: 700; margin-bottom: 16px; color: var(--heading); }
.cart-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
