@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,700;1,9..144,300&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --primary: #1a1a1a;
  --accent: #95672D;
  --accent-light: #F5ECD9;
  --bg: #FAFAF8;
  --bg-card: #FFFFFF;
  --text: #1a1a1a;
  --text-muted: #6B6B6B;
  --text-light: #9B9B9B;
  --border: #E8E4DC;
  --border-dark: #D0C8BC;
  --success: #2D7A4F;
  --success-bg: #EAF5EE;
  --danger: #C0392B;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --nav-h: 70px;
  --max-w: 1280px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea { font-family: var(--font-body); }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid rgba(200,169,110,0.38);
  outline-offset: 3px;
}

button:disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none !important;
}

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

/* ─── NAVBAR ─────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,250,248,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.navbar-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo span { color: var(--accent); }

.nav-search {
  flex: 1;
  max-width: 520px;
  position: relative;
}
.nav-search input {
  width: 100%;
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: 40px;
  padding: 0 44px 0 16px;
  font-size: 0.875rem;
  background: var(--bg-card);
  transition: border-color 0.2s;
  outline: none;
}
.nav-search input:focus { border-color: var(--accent); }
.nav-search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-search button svg { color: white; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: all 0.2s;
  white-space: nowrap;
  border: none;
  background: none;
}
.nav-link:hover { background: var(--accent-light); color: var(--text); }
.nav-link.active { color: var(--text); font-weight: 500; }
.btn-sell {
  background: var(--primary);
  color: white !important;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  transition: all 0.2s;
}
.btn-sell:hover { background: #333; transform: translateY(-1px); }

.cart-btn {
  position: relative;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.cart-btn:hover { border-color: var(--accent); }
.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger {
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0;
  display: none; /* hidden desktop */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
  position: relative;
}
.hamburger:hover { background: var(--bg); border-color: var(--border); }
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: absolute;
  left: 11px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s ease,
              top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hamburger span:nth-child(1) { top: 14px; }
.hamburger span:nth-child(2) { top: 20px; }
.hamburger span:nth-child(3) { top: 26px; }
/* Animation hamburger → X quand ouvert */
.hamburger.is-open { background: var(--bg); }
.hamburger.is-open span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-open span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* ─── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #333; transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: #7C5322; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border-dark);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 0.8125rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ─── HERO ───────────────────────────────────────────── */
.hero {
  padding: 64px 0;
  position: relative;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 78% 15%, rgba(200,169,110,0.2), transparent 28%),
    linear-gradient(135deg, #17241f 0%, #1d3329 58%, #14221c 100%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(90deg, transparent, black 60%);
  pointer-events: none;
}
.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  align-items: center;
  gap: clamp(40px, 7vw, 96px);
}
.hero-copy { max-width: 650px; }
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: #F4E6C5;
  padding: 7px 13px;
  border-radius: 40px;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 20px;
}
.hero-tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(200,169,110,0.14);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
  max-width: 620px;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.7);
  max-width: 560px;
  margin: 0 0 30px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-hero-secondary {
  color: white;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.28);
}
.btn-hero-secondary:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.55);
  transform: translateY(-1px);
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 28px;
  color: rgba(255,255,255,0.68);
  font-size: 0.8125rem;
}
.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-trust span::before {
  content: '✓';
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #18241f;
  background: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
}
.hero-visual {
  position: relative;
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 24px;
  background: rgba(255,255,255,0.075);
  box-shadow: 0 28px 70px rgba(0,0,0,0.22);
  backdrop-filter: blur(14px);
}
.hero-visual::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 17px;
  pointer-events: none;
}
.hero-visual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  color: rgba(255,255,255,0.76);
  font-size: 0.8125rem;
  font-weight: 500;
}
.hero-live-dot {
  padding: 4px 9px;
  border-radius: 100px;
  color: #183227;
  background: #DCEFE4;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.hero-role-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
  color: var(--text);
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.12);
}
.hero-role-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-light);
  color: #7A6030;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}
.hero-role-card strong,
.hero-role-card small { display: block; }
.hero-role-card strong { font-size: 0.9375rem; }
.hero-role-card small { margin-top: 2px; color: var(--text-muted); font-size: 0.75rem; }
.hero-role-status {
  padding: 5px 9px;
  border-radius: 100px;
  color: var(--success);
  background: var(--success-bg);
  font-size: 0.6875rem;
  font-weight: 600;
}
.hero-connection {
  height: 46px;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  justify-items: center;
  color: var(--accent);
}
.hero-connection span { width: 1px; background: rgba(200,169,110,0.55); }
.hero-connection svg { transform: rotate(90deg); }
.hero-visual-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
}
.hero-visual-footer div {
  padding: 12px 8px;
  text-align: center;
  background: rgba(13,28,22,0.64);
}
.hero-visual-footer strong,
.hero-visual-footer span { display: block; }
.hero-visual-footer strong { color: white; font-size: 0.8125rem; }
.hero-visual-footer span { margin-top: 2px; color: rgba(255,255,255,0.48); font-size: 0.65rem; }

/* ─── CATEGORIES ─────────────────────────────────────── */
.section { padding: 64px 0; }
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.section-link {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: gap 0.2s;
}
.section-link:hover { gap: 8px; }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  color: var(--text);
}
.cat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.cat-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  display: block;
}
.cat-name { font-size: 0.875rem; font-weight: 500; }
.cat-count { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* ─── PRODUCT CARDS ──────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
/* Grille vedette : exactement 4 colonnes sur PC */
.products-grid--4col {
  grid-template-columns: repeat(4, 1fr);
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.25s;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-dark);
}
.product-img {
  aspect-ratio: 4/3;
  background: var(--bg);
  overflow: hidden;
  position: relative;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-img img { transform: scale(1.04); }
.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary);
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.product-badge.new { background: var(--success); }
.product-badge.promo { background: var(--danger); }
.product-badge.condition { background: #5D5549; }
.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  opacity: 0;
}
.product-card:hover .wishlist-btn { opacity: 1; }
.wishlist-btn:hover { border-color: var(--danger); color: var(--danger); }

.product-body { padding: 16px; flex: 1; }
.product-seller {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.seller-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: var(--accent);
}
.product-name {
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}
.stars { color: var(--accent); font-size: 0.75rem; letter-spacing: 1px; }
.rating-count { font-size: 0.75rem; color: var(--text-muted); }
.product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.price-current {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}
.price-old {
  font-size: 0.875rem;
  color: var(--text-light);
  text-decoration: line-through;
}
.product-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-location { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 3px; }
.add-cart-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.add-cart-btn:hover { background: var(--accent); }

/* ─── BANNER ─────────────────────────────────────────── */
.promo-banner {
  background: var(--primary);
  border-radius: var(--radius-lg);
  padding: 48px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  position: relative;
}
.promo-banner::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(200,169,110,0.15);
}
.promo-content h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}
.promo-content p { color: rgba(255,255,255,0.6); font-size: 1rem; }
.promo-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* ─── VENDORS ────────────────────────────────────────── */
.vendors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.vendor-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  transition: all 0.25s;
  cursor: pointer;
}
.vendor-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-dark); }
.vendor-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-light);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  overflow: hidden;
}
.vendor-name { font-weight: 500; margin-bottom: 4px; }
.vendor-meta { font-size: 0.8125rem; color: var(--text-muted); }
.vendor-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 0.75rem;
  background: var(--success-bg);
  color: var(--success);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}

/* ─── FOOTER ─────────────────────────────────────────── */
footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .logo { color: white; margin-bottom: 16px; }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; max-width: 260px; }
.footer-col h4 { color: white; font-weight: 500; margin-bottom: 16px; font-size: 0.9375rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 0.875rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  font-size: 0.8125rem;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-payments { display: flex; gap: 8px; }
.payment-pill {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  color: white;
  font-weight: 500;
}

/* ─── FORMS ──────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 0.9375rem;
  background: var(--bg-card);
  transition: border-color 0.2s;
  outline: none;
  color: var(--text);
}
.form-control:focus { border-color: var(--accent); }
.form-control.textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 120px; }
.form-select {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 0.9375rem;
  background: var(--bg-card);
  outline: none;
  cursor: pointer;
  appearance: none;
  color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6B6B' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.form-select:focus { border-color: var(--accent); }

/* ─── PAGE LAYOUTS ───────────────────────────────────── */
.page-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.breadcrumb a { color: var(--text-muted); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }

.catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}
.filters-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}
.filter-group { margin-bottom: 28px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 0.9rem;
}
.filter-option input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; }
.filter-count { margin-left: auto; font-size: 0.8rem; color: var(--text-light); }
.price-range { display: flex; gap: 8px; align-items: center; }
.price-range input { flex: 1; }
.price-range span { color: var(--text-muted); font-size: 0.875rem; }

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.results-count { font-size: 0.9rem; color: var(--text-muted); }
.toolbar-right { display: flex; align-items: center; gap: 12px; }
.sort-select {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 0.875rem;
  background: var(--bg-card);
  outline: none;
  color: var(--text);
  cursor: pointer;
}
.view-toggle { display: flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.view-btn {
  background: none;
  border: none;
  padding: 6px 10px;
  color: var(--text-muted);
  transition: all 0.2s;
}
.view-btn.active { background: var(--primary); color: white; }

.url-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 16px;
  color: #735D32;
  background: var(--accent-light);
  border: 1px solid rgba(200,169,110,0.55);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}
.url-filter-banner a { color: #735D32; font-weight: 600; white-space: nowrap; }
.matching-suppliers { margin-bottom: 18px; }
.matching-suppliers-label {
  margin-bottom: 9px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.matching-suppliers-list { display: flex; flex-wrap: wrap; gap: 8px; }
.matching-supplier-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px 7px 7px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
}
.matching-supplier-chip > span:first-child {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #795F2E;
  background: var(--accent-light);
  font-size: 0.65rem;
  font-weight: 700;
}
.catalogue-no-results {
  margin: 28px 0 0;
  padding: 46px 24px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px dashed var(--border-dark);
  border-radius: var(--radius-md);
}
.catalogue-no-results > div { margin-bottom: 8px; color: var(--accent); font-size: 2.5rem; line-height: 1; }
.catalogue-no-results h3 { margin-bottom: 6px; color: var(--text); font-size: 1rem; }
.catalogue-no-results p { margin: 0 auto 16px; max-width: 430px; font-size: 0.875rem; }
.pagination-btn {
  width: 38px;
  height: 38px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}
.pagination-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pagination-btn.is-active { color: white; background: var(--accent); border-color: var(--accent); font-weight: 600; }
.pagination-ellipsis { padding: 0 3px; color: var(--text-muted); }

.products-grid.is-list-view { grid-template-columns: 1fr !important; }
.products-grid.is-list-view .product-card {
  display: grid !important;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  align-items: stretch;
}
.products-grid.is-list-view .product-img { aspect-ratio: auto; min-height: 170px; }
.products-grid.is-list-view .product-body { align-self: center; }
.products-grid.is-list-view .product-footer {
  min-width: 180px;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  border-top: 0;
  border-left: 1px solid var(--border);
}
.products-grid.is-list-view .add-cart-btn { justify-content: center; }

/* ─── PRODUCT DETAIL ─────────────────────────────────── */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.gallery-main {
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.gallery-thumb {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
}
.gallery-thumb.active { border-color: var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-info { padding-top: 8px; }
.product-detail-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.product-detail-price {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}
.product-detail-price .old { font-size: 1.25rem; font-weight: 300; color: var(--text-light); text-decoration: line-through; margin-left: 12px; }
.qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: fit-content;
  margin-bottom: 20px;
}
.qty-btn {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: all 0.2s;
}
.qty-btn:hover { background: var(--bg); color: var(--text); }
.qty-num { width: 48px; text-align: center; font-weight: 500; font-size: 1rem; }
.detail-actions { display: flex; gap: 12px; margin-bottom: 32px; }
.seller-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.seller-info { flex: 1; }
.seller-info h4 { font-weight: 500; margin-bottom: 2px; }
.seller-info p { font-size: 0.8125rem; color: var(--text-muted); }

/* ─── CONTACT BUTTONS (WhatsApp / Appel) ────────────── */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: #25D366;
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  font-family: var(--font-body);
  cursor: pointer;
}
.btn-whatsapp:hover { background: #1ebe5d; transform: translateY(-1px); }
.btn-call {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: #1a6b3a;
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  font-family: var(--font-body);
  cursor: pointer;
}
.btn-call:hover { background: #155a30; transform: translateY(-1px); }

/* Modificateur taille large pour btn-whatsapp et btn-call */
.btn-whatsapp.btn-lg,
.btn-call.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

/* ─── AD BANNER (publicité premium) ─────────────────── */
.ad-banner-strip {
  background: linear-gradient(90deg, #1a1a1a 0%, #2d2d2d 100%);
  border-bottom: 1px solid rgba(200,169,110,0.3);
  padding: 0;
  overflow: hidden;
  position: relative;
}
.ad-banner-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.ad-badge {
  background: var(--accent);
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}
.ad-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  overflow: hidden;
}
.ad-item {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s;
  flex-shrink: 0;
}
.ad-item:hover { color: var(--accent); }
.ad-item-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid rgba(200,169,110,0.3);
}
.ad-separator { color: rgba(255,255,255,0.2); font-size: 1.2rem; flex-shrink: 0; }
.ad-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 1.25rem;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  transition: color 0.2s;
  margin-left: auto;
  flex-shrink: 0;
}
.ad-close:hover { color: white; }

/* ─── AUTH PAGES ─────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--bg);
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  width: 100%;
  max-width: 460px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}
.auth-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-light);
  font-size: 0.875rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 10px;
  font-family: var(--font-body);
  color: var(--text);
}
.social-btn:hover { border-color: var(--border-dark); background: var(--bg); }

/* ─── DASHBOARD ──────────────────────────────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: calc(100vh - var(--nav-h));
}
.sidebar-nav {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}
.sidebar-section {
  padding: 0 12px;
  margin-bottom: 24px;
}
.sidebar-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  padding: 0 12px;
  margin-bottom: 6px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.sidebar-link:hover { background: var(--bg); color: var(--text); }
.sidebar-link.active { background: var(--accent-light); color: var(--accent); font-weight: 500; }
.sidebar-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
}

.dashboard-main { padding: 32px; min-width: 0; }
.dash-panel { min-width: 0; }
.dash-header { margin-bottom: 32px; }
.dash-header h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.dash-header p { color: var(--text-muted); margin-top: 4px; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}
.stat-card-label { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 8px; }
.stat-card-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.stat-card-change {
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 3px;
}
.dashboard-guide {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 32px;
  padding: 32px;
  color: white;
  background: linear-gradient(135deg, #17241f 0%, #213c2f 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.dashboard-guide-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.dashboard-guide h2 {
  max-width: 580px;
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.2;
}
.dashboard-guide-copy > p {
  max-width: 650px;
  margin-top: 10px;
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  line-height: 1.7;
}
.dashboard-guide-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.dashboard-guide .btn-outline { color: white; border-color: rgba(255,255,255,0.28); }
.dashboard-checklist {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.dashboard-checklist > div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
}
.dashboard-checklist > div > span {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #1b2d24;
  background: var(--accent);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}
.dashboard-checklist strong,
.dashboard-checklist small { display: block; }
.dashboard-checklist strong { font-size: 0.8125rem; }
.dashboard-checklist small { margin-top: 2px; color: rgba(255,255,255,0.52); font-size: 0.7rem; }
.change-up { color: var(--success); }
.change-down { color: var(--danger); }

.data-table {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: visible;
}
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.table-header h3 { font-weight: 500; font-size: 1rem; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  padding: 12px 24px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 14px 24px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}
.status-active { background: var(--success-bg); color: var(--success); }
.status-pending { background: #FEF3C7; color: #92400E; }
.status-sold { background: var(--bg); color: var(--text-muted); }

/* ─── TOAST / NOTIFICATION ───────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--primary);
  color: white;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  max-width: 340px;
}
.toast.show { transform: translateY(0); opacity: 1; }

.kc-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20,24,22,0.55);
  backdrop-filter: blur(3px);
}
.kc-confirm-dialog {
  width: min(420px, 100%);
  padding: 28px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.kc-confirm-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: var(--danger);
  background: #FCE8E6;
  border-radius: 50%;
  font-weight: 700;
}
.kc-confirm-dialog h2 { font-family: var(--font-display); font-size: 1.35rem; }
.kc-confirm-dialog p { margin-top: 8px; color: var(--text-muted); font-size: 0.875rem; }
.kc-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.kc-confirm-actions .btn { justify-content: center; }
.kc-btn-danger { color: white; background: var(--danger); }
.kc-btn-danger:hover { background: #9F2E23; }

/* ─── MOBILE NAV — Drawer latéral B2B ─────────────────────── */
/* Backdrop overlay (apparaît quand le drawer s'ouvre)
   z-index 105 : au-dessus de la navbar (100) pour que le drawer la recouvre. */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 105;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-nav-backdrop.is-open { opacity: 1; pointer-events: auto; }

/* Drawer principal — slide-in depuis la droite.
   z-index 110 : recouvre la navbar (100) pour que l'avatar et le bouton X
   du drawer ne soient pas masqués par le logo / "+ Produit". */
.mobile-nav {
  display: flex;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 88vw);
  background: var(--bg-card);
  z-index: 110;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.34, 1.1, 0.64, 1);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  visibility: hidden;
  -webkit-overflow-scrolling: touch;
}
.mobile-nav.is-open { transform: translateX(0); visibility: visible; }
/* Compatibilité avec l'ancien sélecteur .open utilisé par d'autres scripts */
.mobile-nav.open { transform: translateX(0); visibility: visible; }
.mobile-nav.open ~ .mobile-nav-backdrop { opacity: 1; pointer-events: auto; }

/* Header drawer — compte utilisateur + bouton fermer */
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-card) 100%);
  flex-shrink: 0;
}
.mobile-nav-account {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.mobile-nav-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(200, 169, 110, 0.3);
}
.mobile-nav-avatar.guest {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px dashed var(--border);
  box-shadow: none;
}
.mobile-nav-account-info { min-width: 0; flex: 1; }
.mobile-nav-account-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Fraunces', serif;
}
.mobile-nav-account-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.mobile-nav-account-cta {
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  margin-top: 2px;
  display: inline-block;
}
.mobile-nav-close {
  width: 34px; height: 34px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
}
.mobile-nav-close:hover { background: var(--bg); border-color: var(--accent); }

/* Sections du drawer */
.mobile-nav-section { padding: 18px 12px 6px; }
.mobile-nav-section + .mobile-nav-section { padding-top: 6px; }
.mobile-nav-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 12px 8px;
}

/* Liens du drawer */
.mobile-nav-link {
  padding: 12px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 14px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background 0.18s, color 0.18s;
  width: 100%;
}
.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
  background: var(--bg);
  outline: none;
}
.mobile-nav-link.is-active {
  background: var(--accent-light, #F5EFE2);
  color: var(--accent);
}
.mobile-nav-link-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.18s, color 0.18s;
}
.mobile-nav-link:hover .mobile-nav-link-icon,
.mobile-nav-link.is-active .mobile-nav-link-icon {
  background: var(--accent);
  color: white;
}
.mobile-nav-link-text { flex: 1; min-width: 0; }
.mobile-nav-link-arrow {
  color: var(--text-muted);
  opacity: 0.6;
  flex-shrink: 0;
}
.mobile-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 12px;
}

/* CTA primaire (Devenir fournisseur) */
.mobile-nav-cta-primary {
  margin: 12px;
  padding: 14px 16px;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.18s, transform 0.1s;
  box-shadow: 0 2px 12px rgba(200, 169, 110, 0.25);
}
.mobile-nav-cta-primary:hover { background: #7C5322; }
.mobile-nav-cta-primary:active { transform: scale(0.98); }

/* Footer drawer */
.mobile-nav-footer {
  margin-top: auto;
  padding: 16px 12px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.mobile-nav-footer .mobile-nav-link { padding: 10px 12px; font-size: 0.875rem; }
.mobile-nav-copyright {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
  padding: 0 12px;
}

/* Empêcher le scroll du body quand drawer ouvert */
body.has-drawer-open { overflow: hidden; }

/* ─── Bouton "+ Produit" navbar mobile ─────────────────── */
.navbar-add-product-mobile {
  display: none;
  align-items: center;
  background: var(--accent);
  color: white !important;
  border-radius: var(--radius-sm);
  padding: 7px 13px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}
.navbar-add-product-mobile:hover { background: #7C5322; }

/* ─── ÉLÉMENTS MOBILES (masqués sur desktop) ─────────── */
.filters-toggle-btn {
  display: none;
  align-items: center; gap: 8px;
  padding: 9px 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.mobile-catalogue-search {
  display: none;
  position: sticky;
  top: var(--nav-h);
  z-index: 50;
  background: var(--bg);
  padding: 10px 0 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.mobile-catalogue-search input {
  width: 100%;
  height: 42px;
  border: 1.5px solid var(--border);
  border-radius: 40px;
  padding: 0 48px 0 18px;
  font-size: 0.9375rem;
  background: var(--bg-card);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.mobile-catalogue-search input:focus { border-color: var(--accent); }
.mobile-catalogue-search .mob-search-btn {
  position: absolute;
  right: 7px; top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  border: none;
  border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: white;
  font-size: 0.875rem;
}
/* Barre de recherche mobile générique (index, produit) — cachée sur desktop */
.mobile-search-bar {
  display: none;
  position: sticky;
  top: var(--nav-h);
  z-index: 50;
  background: var(--bg);
  padding: 10px 16px 8px;
  border-bottom: 1px solid var(--border);
}
.mobile-search-bar-inner { position: relative; max-width: 720px; margin: 0 auto; }
.mobile-search-bar input {
  width: 100%;
  height: 42px;
  border: 1.5px solid var(--border);
  border-radius: 40px;
  padding: 0 48px 0 18px;
  font-size: 16px;
  background: var(--bg-card);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.mobile-search-bar input:focus { border-color: var(--accent); }
.mobile-search-bar .mob-search-btn {
  position: absolute;
  right: 7px; top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  border: none;
  border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: white;
}

/* Tiroir filtres : caché sur desktop */
.filters-drawer-overlay { display: none; }
.filters-drawer { display: none; }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-layout { grid-template-columns: minmax(0, 1fr) minmax(340px, 0.85fr); gap: 40px; }
  .catalog-layout { grid-template-columns: 220px 1fr; gap: 24px; }
  .product-detail { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .dashboard-guide { grid-template-columns: 1fr; }
  /* Formulaire ajout produit : sidebar droite passe sous le contenu principal */
  #panel-add .form-layout-main {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  /* ── Inputs : empêcher le zoom iOS (font-size >= 16px sur les inputs <16px) ── */
  input[type="number"], input[type="tel"], input[type="email"], input[type="password"],
  input[type="text"], input[type="search"], textarea, select {
    font-size: 16px !important;
  }
  /* ── Tap targets : agrandir les boutons tactiles ── */
  .wishlist-btn { width: 38px !important; height: 38px !important; opacity: 1; }
  .toast {
    left: 16px;
    right: 16px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    max-width: none;
    justify-content: center;
    text-align: center;
  }
  /* ── Navbar ── */
  .nav-search { display: none; }
  /* Garder .nav-links visible mais ne montrer QUE le bouton panier :
     sinon le panier devient inaccessible sur mobile. */
  .nav-links { display: flex; margin-left: auto; gap: 0; }
  .nav-links > *:not(.cart-btn) { display: none !important; }
  .nav-links .cart-btn { margin-right: 8px; }
  .hamburger { display: flex; flex-shrink: 0; margin-left: 0; }
  .navbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 0; padding: 0 16px; }
  .navbar-add-product-mobile { display: inline-flex; margin-left: 0; margin-right: 8px; }
  .logo { flex-shrink: 0; }

  /* ── Container ── */
  .container { padding: 0 16px; }

  /* ── Catalogue / Filtres ── */
  .catalog-layout { grid-template-columns: 1fr; }
  .filters-sidebar { display: none; }

  /* ── Bouton toggle filtres (mobile seulement) ── */
  .filters-toggle-btn { display: inline-flex; }

  /* ── Barre de recherche mobile catalogue ── */
  .mobile-catalogue-search { display: block; }
  .catalog-toolbar { scroll-margin-top: calc(var(--nav-h) + 70px); }
  /* ── Barre de recherche mobile générique ── */
  .mobile-search-bar { display: block; }

  /* ── Tiroir filtres ── */
  .filters-drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 150; }
  .filters-drawer-overlay.open { display: block; }
  .filters-drawer {
    display: flex; flex-direction: column;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--bg-card);
    border-radius: 20px 20px 0 0;
    z-index: 151;
    max-height: 82vh;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.34, 1.1, 0.64, 1);
    box-shadow: 0 -4px 32px rgba(0,0,0,0.12);
  }
  .filters-drawer.open { transform: translateY(0); }
  .filters-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .filters-drawer-header h3 { font-size: 1rem; font-weight: 600; margin: 0; }
  .filters-drawer-close {
    background: var(--bg); border: 1px solid var(--border); border-radius: 50%;
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1rem; line-height: 1;
  }
  .filters-drawer-body { overflow-y: auto; padding: 16px 20px; flex: 1; }
  .filters-drawer-footer {
    display: flex; gap: 10px; padding: 14px 20px;
    border-top: 1px solid var(--border); flex-shrink: 0;
  }
  .filters-drawer-footer .btn { flex: 1; justify-content: center; }

  /* ── Tableau responsive : cartes mobile (JS gère le layout) ── */
  .data-table { overflow: visible; }
  .data-table table { display: table; overflow-x: visible; min-width: unset; }

  /* ── Page produit ── */
  .product-detail { grid-template-columns: 1fr; gap: 24px; }
  /* Actions detail : pile verticalement */
  .detail-actions { flex-direction: column; }
  .detail-actions .btn-whatsapp,
  .detail-actions .btn-call { width: 100%; justify-content: center; }
  /* Seller box boutons : wrap */
  .seller-box { flex-wrap: wrap; }

  /* ── Hero ── */
  .hero { padding: 42px 0 38px; }
  .hero-layout { grid-template-columns: 1fr; gap: 0; }
  .hero-copy { max-width: 560px; }
  .hero-visual { display: none; }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 3rem); max-width: 520px; }
  .hero p { font-size: 1rem; margin-bottom: 24px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; max-width: 360px; justify-content: center; }
  .hero-trust { margin-top: 22px; gap: 9px 14px; }

  /* ── Promo banner ── */
  .promo-banner { flex-direction: column; padding: 28px 20px; text-align: center; }
  .promo-content h2 { font-size: 1.5rem; }
  .promo-actions { flex-direction: column; align-items: center; }
  .promo-actions .btn { width: 100%; max-width: 280px; text-align: center; justify-content: center; }

  /* ── Footer ── */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  /* ── Dashboard layout : sidebar masquée, main pleine largeur ── */
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar-nav { display: none; }
  .sidebar-nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    width: 260px;
    height: calc(100vh - var(--nav-h));
    z-index: 90;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
  }
  /* Dashboard main : padding réduit */
  .dashboard-main { padding: 20px 16px; }
  .dashboard-guide { padding: 24px 20px; gap: 24px; }
  /* Dashboard header : empilé sur mobile */
  .dash-header { margin-bottom: 20px; }
  .dash-header[style*="display:flex"],
  .dash-header[style*="display: flex"] {
    flex-wrap: wrap !important;
    gap: 12px !important;
  }

  /* ── Stats cards : 2 colonnes sur mobile ── */
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* ── Products grid : force 2 colonnes ── */
  .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
  .products-grid--4col { grid-template-columns: repeat(2, 1fr) !important; }
  .products-grid.is-list-view { grid-template-columns: 1fr !important; }
  .products-grid.is-list-view .product-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }
  .products-grid.is-list-view .product-img { min-height: 132px; }
  .products-grid.is-list-view .product-footer {
    grid-column: 1 / -1;
    min-width: 0;
    flex-direction: row;
    align-items: center;
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  /* ── Categories / vendors ── */
  .categories-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .cat-card { padding: 18px 12px; }
  .cat-icon { font-size: 1.6rem; margin-bottom: 8px; }
  .vendors-grid { grid-template-columns: repeat(2, 1fr); }

  /* ── Tableau responsive : scroll horizontal ── */
  .data-table { overflow: visible; } /* visible pour les menus popover mobile */
  .data-table table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 560px; }

  /* ── Auth card ── */
  .auth-card { padding: 28px 20px !important; }

  /* ── Formulaire ajout produit : 1 colonne ── */
  /* Grille principale (.form-layout-main : 1fr 360px) → 1 colonne */
  .form-layout-main {
    grid-template-columns: 1fr !important;
  }
  /* Sous-grilles catégorie/état et prix/stock (1fr 1fr) → 1 colonne */
  #panel-add div[style*="grid-template-columns:1fr 1fr"],
  #panel-add div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  /* Paliers grid (1fr 1fr auto) : garder 3 col mais réduire le gap */
  #paliers-container div[style*="grid-template-columns:1fr 1fr auto"],
  #paliers-container div[style*="grid-template-columns: 1fr 1fr auto"] {
    gap: 8px !important;
  }
  /* Revenue stats (3 colonnes) → 2 colonnes */
  #panel-revenue .stats-row { grid-template-columns: repeat(2, 1fr) !important; }

  /* ── Section header : empilé ── */
  .section-header { flex-direction: column; align-items: flex-start; }

  /* ── Page header ── */
  .page-header h1 { font-size: 1.625rem; }
  .page-header { padding: 32px 0 24px; }
}

@media (max-width: 480px) {
  .navbar .logo { font-size: 1.32rem; }
  .navbar-inner:has(.navbar-add-product-mobile) .nav-links .cart-btn { display: none; }
  .navbar-add-product-mobile { padding: 7px 10px; font-size: 0.75rem; }
  /* ── Catalogue toolbar (très petits écrans) ── */
  .catalog-toolbar {
    flex-wrap: nowrap;
    gap: 4px;
    margin-bottom: 12px;
  }
  .sort-select {
    max-width: 100px;
    font-size: 0.7rem;
    padding: 0 4px;
  }
  .filters-toggle-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  /* ── Products grids → 2 colonnes sur mobile (force) ── */
  .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .products-grid--4col { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  /* Cartes produit compactes pour tenir sur 2 colonnes */
  .product-card { padding: 0; min-width: 0; }
  .product-body { padding: 8px; }
  .product-footer { padding: 6px 8px; }
  .product-card .product-img { aspect-ratio: 1/1; }
  .product-seller { font-size: 0.68rem; margin-bottom: 3px; }
  .product-name { font-size: 0.78rem; line-height: 1.3; margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .price-current { font-size: 0.88rem; }
  .price-old { font-size: 0.68rem; }
  .product-location { font-size: 0.68rem; }

  /* ── Categories : 3 par ligne, compact ── */
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cat-card { padding: 14px 8px; }
  .cat-icon { font-size: 1.4rem; margin-bottom: 6px; }
  .cat-name { font-size: 0.75rem; }
  .cat-count { font-size: 0.65rem; }

  /* ── Vendors : 2 par ligne ── */
  .vendors-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .vendor-card { padding: 12px 8px; }
  .vendor-avatar { width: 36px; height: 36px; font-size: 0.75rem; margin-bottom: 6px; }
  .vendor-name { font-size: 0.75rem; font-weight: 600; }
  .vendor-meta { font-size: 0.65rem; line-height: 1.3; }
  .vendor-card > div[style*="font-size:0.8125rem"] { font-size: 0.65rem !important; }
  .vendor-badge { font-size: 0.65rem; padding: 3px 8px; margin-top: 6px; }

  /* ── Stats → 1 colonne ── */
  .stats-row { grid-template-columns: 1fr; }
  .dashboard-main .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dashboard-main .stat-card { padding: 14px; min-width: 0; }
  .dashboard-main .stat-card-value { font-size: 1.35rem; overflow-wrap: anywhere; }
  .dashboard-main .stat-card-change { font-size: 0.72rem; line-height: 1.35; }

  .hero h1 { font-size: 2.25rem; }
  .hero-trust { font-size: 0.75rem; }

  /* ── Footer ── */
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  /* ── Auth card extra padding reduction ── */
  .auth-card { padding: 24px 16px !important; border-radius: var(--radius-md); }

  /* ── Dashboard main ── */
  .dashboard-main { padding: 16px 12px; }

  /* ── Catalogue toolbar compact (une seule ligne) ── */
  .catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 16px;
  }
  .toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .sort-select {
    max-width: 120px;
    font-size: 0.75rem;
    height: 32px;
    padding: 0 6px;
  }
  .filters-toggle-btn {
    font-size: 0.8125rem;
    padding: 7px 12px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .results-count { display: none; }
  .url-filter-banner { align-items: flex-start; font-size: 0.8125rem; }

  /* ── Promo banner ── */
  .promo-banner { padding: 24px 16px; }
  .promo-content h2 { font-size: 1.375rem; }

  /* ── Revenue stats (3 colonnes) → 1 colonne ── */
  #panel-revenue .stats-row { grid-template-columns: 1fr !important; }

  /* ── Paliers sous-grille : empiler les 2 inputs, garder le bouton suppr ── */
  #paliers-container div[style*="grid-template-columns:1fr 1fr auto"],
  #paliers-container div[style*="grid-template-columns: 1fr 1fr auto"] {
    grid-template-columns: 1fr auto !important;
    gap: 8px !important;
  }
  /* Le 1er enfant (qty) prend toute la largeur, le 2e (prix) + 3e (delete) sur 1 ligne */
  #paliers-container div[style*="grid-template-columns:1fr 1fr auto"] > div:first-child,
  #paliers-container div[style*="grid-template-columns: 1fr 1fr auto"] > div:first-child {
    grid-column: 1 / -1;
  }

  /* ── Formulaire sous-grilles ── */
  #panel-add div[style*="grid-template-columns:1fr 1fr"],
  #panel-add div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* ── Table ── */
  /* mobile utilise les cartes JS, pas de min-width forcée */
}

/* ─── ANIMATIONS ─────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease forwards; }
.fade-up-1 { animation-delay: 0.1s; opacity: 0; }
.fade-up-2 { animation-delay: 0.2s; opacity: 0; }
.fade-up-3 { animation-delay: 0.3s; opacity: 0; }
.fade-up-4 { animation-delay: 0.4s; opacity: 0; }

/* ─── UTILS ──────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.hidden { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
