/*
  styles.css — Design épuré, neutre, moderne et responsive
  - Palette: gris froids, contrastes doux, beaucoup d’espace blanc
  - Typographie: Inter (system fallback), tailles fluides
  - Layout: container max-width, grilles adaptatives
  - Accessibilité: focus visible, contrastes suffisants
*/

:root {
  --bg: #ffffff;
  --text: #0f172a; /* slate-900 */
  --muted: #475569; /* slate-600 */
  --subtle: #94a3b8; /* slate-400 */
  --border: #e2e8f0; /* slate-200 */
  --soft: #f8fafc;  /* slate-50 */
  --primary: #5b3df5; /* brand purple from logo */
  --primary-contrast: #ffffff;
  --ghost: #e5e7eb;
  --chip: #f1f5f9;
  --radius: 12px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.06);
  --shadow-2: 0 6px 24px rgba(0,0,0,.08);
  --brand-purple: #5b3df5; /* primary logo start */
  --brand-purple-2: #7c4dff; /* primary logo end */
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1000; display: none;
  background: rgba(15,23,42,.32);
}
.mobile-menu.open { display: block; }
.mobile-menu .sheet {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(92vw, 420px);
  background: #fff; box-shadow: var(--shadow-2); border-left: 1px solid var(--border);
  display: grid; grid-template-rows: auto auto 1fr; gap: 0;
}
.mobile-menu .sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px; border-bottom: 1px solid var(--border);
}
.mobile-menu .sheet-header .close { background: transparent; border: 0; font-weight: 700; color: var(--muted); cursor: pointer; }
.mobile-menu .sheet-search { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.mobile-menu .sheet-search input[type="search"] {
  width: 100%; height: 40px; border: 1px solid var(--border); border-radius: 999px; padding: 0 14px; font: inherit;
}
.mobile-menu .sheet-body { overflow: auto; }
.mobile-menu .menu-list { list-style: none; padding: 8px 0; margin: 0; }
.mobile-menu .menu-list li { border-bottom: 1px solid var(--border); }
.mobile-menu .menu-list a { display: flex; align-items: center; justify-content: space-between; padding: 14px; color: var(--text); }
.mobile-menu .menu-list a:hover { background: var(--soft); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-1);
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--primary);
  color: var(--primary-contrast);
  border-color: transparent;
}

.btn-ghost {
  background: #fff;
}

.chip {
  display: inline-block;
  background: var(--chip);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 0;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-logo { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-2)); color: #fff; font-weight: 800; font-size: 16px; }
.brand-text { letter-spacing: .2px; }

.nav ul { display: flex; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav a {
  color: var(--muted);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  transition: background .2s ease, color .2s ease;
}
.nav a:hover { color: var(--text); background: var(--soft); }
.nav a.active { color: #fff; background: var(--brand-purple); box-shadow: var(--shadow-1); }

/* Header dropdown */
.has-dropdown { position: relative; }
.has-dropdown > a::after { content: "\25BE"; /* ▼ */ margin-left: 6px; font-size: 10px; }
.dropdown { display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 8px; z-index: 55; }
.dropdown ul, .dropdown { list-style: none; margin: 0; }
.dropdown a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--muted); }
.dropdown a:hover { background: var(--soft); color: var(--text); }
.has-dropdown:hover > .dropdown, .has-dropdown:focus-within > .dropdown { display: block; }

/* Mobile: place dropdown in flow when menu open */
@media (max-width: 768px) {
  .dropdown { position: static; display: none; border: 0; box-shadow: none; padding: 0; }
  .has-dropdown.open > .dropdown, .nav.open .has-dropdown > .dropdown { display: block; }
}

.nav-toggle {
  display: none; position: relative; width: 40px; height: 40px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
}
.nav-toggle .bar { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text); transition: transform .2s ease, opacity .2s ease; }
.nav-toggle .bar:nth-child(1) { top: 12px; }
.nav-toggle .bar:nth-child(2) { top: 19px; }
.nav-toggle .bar:nth-child(3) { top: 26px; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.search { display: block; }
.search input {
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 14px;
  width: 260px;
  background: #fff;
}
.search input:focus { outline: 3px solid rgba(99,102,241,.25); outline-offset: 0; }
.icon-link { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }

/* Hero */
.hero { padding: 88px 0; background: var(--soft); }
.hero-gradient { background: linear-gradient(135deg, #4a35e0 0%, #5b3df5 45%, #7c4dff 100%); color: #fff; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-copy h1 { margin: 0 0 12px; font-size: clamp(36px, 5vw, 64px); line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; }
.hero-copy p { margin: 0 0 20px; color: rgba(255,255,255,.9); font-size: 18px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-media img { border-radius: var(--radius); box-shadow: var(--shadow-2); }

/* Announcement bar */
.announcement { background: linear-gradient(90deg, #dc2626, #f97316); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .2px; }
.announcement-inner { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 38px; }
.announcement .badge { background: rgba(255,255,255,.18); color: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.announcement .timer { background: rgba(255,255,255,.18); padding: 4px 10px; border-radius: 999px; }

/* Trust panel (floating card under hero) */
.trust-panel { position: relative; margin-top: -46px; }
.trust-inner { display: grid; }
.trust-card { margin: 0 auto; background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: 20px; padding: 16px 20px; box-shadow: 0 10px 30px rgba(0,0,0,.12); display: grid; grid-auto-flow: column; gap: 22px; width: min(980px, 92%); overflow-x: auto; }
.trust-item { color: var(--muted); font-weight: 700; white-space: nowrap; }

/* Special offer section */
.special { padding: 56px 0; background: #fff; }
.special-inner { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 24px; align-items: center; border: 1px solid var(--border); border-radius: 20px; padding: 18px; box-shadow: var(--shadow-1); }
.special-media img { border-radius: 16px; box-shadow: var(--shadow-2); }
.special-copy h2 { margin: 6px 0 8px; font-size: clamp(22px, 3vw, 34px); }
.special .badge.red { display: inline-block; background: #ef4444; color: #fff; border-radius: 999px; padding: 6px 10px; font-weight: 700; font-size: 12px; }
.price-row { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.price { font-size: 28px; font-weight: 800; }

/* Sections / Catégories */
.sections { padding: 28px 0; background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pill-grid { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.pill { display: inline-block; padding: 10px 14px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--muted); font-weight: 600; }
.pill:hover { color: var(--text); border-color: #d1d5db; }

/* Produits */
.products { padding: 40px 0; background: #fff; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product-card { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: var(--shadow-1); display: grid; }
.product-card img { aspect-ratio: 16/10; object-fit: cover; }
.product-body { padding: 14px; display: grid; gap: 8px; }
.product-meta { display: flex; align-items: center; justify-content: space-between; }
.product-meta .price { font-size: 18px; font-weight: 800; }

/* Produit vedette */
.product-featured { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; margin-bottom: 20px; border-width: 2px; }
.product-featured img { aspect-ratio: 16/9; }
.product-featured .product-body h3 { font-size: clamp(22px, 3.2vw, 32px); margin: 0 0 6px; }
.product-featured .product-body p { color: var(--muted); margin: 0 0 6px; }
.product-featured .tick-list { margin-top: 6px; }

  /* Shop page */
  .offer-banner { padding: 20px 0; }
  .offer-card { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 16px; border: 1px solid var(--border); border-radius: 16px; padding: 16px; background: #fff; box-shadow: var(--shadow-1); }
  .offer-media img { border-radius: 12px; }
  .offer-copy h1 { margin: 0 0 8px; font-size: clamp(22px, 3.2vw, 34px); }
  .offer-price strong { font-size: 28px; font-weight: 800; color: #ef4444; }
  .offer-price s { color: var(--subtle); margin-left: 8px; }
  .offer-perks { list-style: none; padding: 0; margin: 10px 0 0; color: var(--muted); display: grid; gap: 4px; }

  .shop-layout { padding: 20px 0 60px; }
  .shop-grid { display: grid; grid-template-columns: 280px 1fr; gap: 20px; }
  .filters { display: grid; gap: 12px; align-content: start; position: sticky; top: 90px; }
  .filter-card { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: #fff; box-shadow: var(--shadow-1); }
  .filter-card h3 { margin: 0 0 8px; font-size: 16px; }
  .filter-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; color: var(--muted); }
  .filter-search input { width: 100%; height: 40px; border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; }
  .filter-list label:has(input:checked) { color: var(--text); font-weight: 600; }

  .shop-products { display: grid; gap: 16px; }
  .shop-header h2 { margin: 0; }
  .shop-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

  .product-card.sale .price s { color: var(--subtle); margin-left: 6px; font-weight: 500; }
  .product-card { position: relative; }
  .product-card .ribbon { position: absolute; top: 10px; left: -6px; background: #ef4444; color: #fff; padding: 4px 10px; font-size: 12px; font-weight: 700; border-top-right-radius: 8px; border-bottom-right-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
  .price-range { color: var(--subtle); font-size: 12px; }

/* Panier */
.cart-button { position: relative; }
.cart-badge { position: absolute; top: -6px; right: -6px; background: #ef4444; color: #fff; border-radius: 999px; padding: 0 6px; height: 18px; min-width: 18px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; }
.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 360px; background: #fff; border-left: 1px solid var(--border); box-shadow: var(--shadow-2); transform: translateX(100%); transition: transform .25s ease; z-index: 60; display: grid; grid-template-rows: auto 1fr auto; }
.cart-drawer.open { transform: translateX(0); }
.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); }
.cart-header h3 { margin: 0; font-size: 20px; }
.cart-items { padding: 14px; display: grid; gap: 12px; overflow: auto; }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: #fff; box-shadow: var(--shadow-1); }
.cart-item .name { font-weight: 600; }
.cart-item .controls { display: inline-flex; align-items: center; gap: 8px; }
.qty { display: inline-flex; align-items: center; gap: 8px; }
.qty button { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.cart-footer { border-top: 1px solid var(--border); padding: 16px; display: grid; gap: 12px; background: #fff; }
.cart-total { display: flex; align-items: center; justify-content: space-between; }
.cart-footer input { height: 44px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; font: inherit; background: #fff; }
.cart-footer input[aria-invalid="true"] { border-color: #ef4444; background: #fef2f2; }
.cart-footer .form-hint { margin: -4px 0 2px; color: #ef4444; font-size: 13px; }
.cart-footer .btn { width: 100%; }

/* Articles */
.articles { padding: 56px 0; }
.section-header { display: grid; gap: 8px; margin-bottom: 20px; }
.section-header h2 { margin: 0; font-size: 28px; }
.section-header p { margin: 0; color: var(--muted); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-1);
  display: grid;
}
.card-media img { aspect-ratio: 16/10; object-fit: cover; }
.card-body { padding: 14px; display: grid; gap: 8px; }
.card-body h3 { margin: 2px 0; font-size: 18px; line-height: 1.35; }
.card-body p { margin: 0; color: var(--muted); }
.card-meta { display: flex; gap: 8px; align-items: center; color: var(--subtle); font-size: 13px; }

.section-cta { display: flex; justify-content: center; margin-top: 24px; }

/* Article vedette + liste éditoriale */
.card-featured {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  padding: 0;
  margin-bottom: 20px;
}
.card-featured .card-media img { aspect-ratio: 21/9; object-fit: cover; height: 100%; }
.card-featured .card-body { padding: 16px; display: grid; gap: 10px; }
.card-featured h3 { font-size: clamp(20px, 2.5vw, 26px); line-height: 1.25; }

.article-list { display: grid; gap: 12px; }
.list-item {
  display: grid;
  grid-template-columns: 156px 1fr;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
}
.list-item .thumb img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/10; border-radius: 10px; }
.list-item .content { display: grid; gap: 6px; align-content: start; }
.list-item h3 { margin: 0; font-size: 18px; line-height: 1.35; }

/* Affichage combiné avec l’ancienne grille si besoin */
.card-grid { margin-top: 20px; }

/* Newsletter */
.newsletter { padding: 64px 0; background: var(--soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.newsletter-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; align-items: center; }
.newsletter-copy h2 { margin: 0 0 8px; }
.newsletter-copy p { margin: 0; color: var(--muted); }
.newsletter-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.newsletter-form input {
  height: 44px;
  border-radius: 10px; border: 1px solid var(--border);
  padding: 0 12px;
  font: inherit;
}
.form-hint { margin: 8px 0 0; color: var(--muted); font-size: 14px; grid-column: 1/-1; }

/* About */
.about { padding: 64px 0; }
.about-inner { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 32px; align-items: center; }
.about-media img { border-radius: var(--radius); box-shadow: var(--shadow-2); }
.about-copy h2 { margin: 0 0 10px; font-size: 26px; }
.about-copy p { margin: 0 0 10px; color: var(--muted); }
.tick-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tick-list li { position: relative; padding-left: 22px; }
.tick-list li::before { content: "✔"; position: absolute; left: 0; top: 0; color: #16a34a; font-size: 14px; }

/* Footer */
.site-footer { background: linear-gradient(135deg, #4a35e0 0%, #5b3df5 45%, #7c4dff 100%); color: #fff; margin-top: 40px; }
.site-footer a { color: rgba(255,255,255,.9); }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr; gap: 24px; padding: 40px 0; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-top: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.9); }
.footer-brand .brand { font-weight: 800; color: #fff; }
.footer-links nav ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-links nav ul li strong { color: #fff; }
.footer-newsletter .newsletter-form { display: flex; gap: 8px; }
.footer-links a:hover { color: var(--text); }
.footer-newsletter .newsletter-form { grid-template-columns: 1fr auto; }
.footer-bottom { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.footer-bottom .small { color: var(--subtle); }
.social { list-style: none; display: flex; gap: 14px; padding: 0; margin: 0; }
.social a { color: var(--muted); }
.social a:hover { color: var(--text); }

/* Focus visible pour l’accessibilité */
:focus-visible { outline: 3px solid #60a5fa; outline-offset: 2px; border-radius: 6px; }

/* Responsivité */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .newsletter-inner { grid-template-columns: 1fr; }
  .special-inner { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-grid { grid-template-columns: 1fr; }
  .shop-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; }
  .search { display: none; }
}

@media (max-width: 768px) {
  .nav-toggle { display: inline-block; }
  .nav { position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-1); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: 10px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr; }
  .card-featured { grid-template-columns: 1fr; }
  .list-item { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .shop-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .card-grid { grid-template-columns: 1fr; }
  .trust-card { width: 94%; }
}

/* Global compact header for small phones */
@media (max-width: 560px) {
  .container { padding: 0 10px; }
  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 4px;
    min-height: 52px;
  }
  .brand { gap: 8px; }
  .brand-text { font-size: 13px; line-height: 1; white-space: nowrap; }
  .header-actions { gap: 6px; }
  /* Use more specific selectors + !important to override per-page styles */
  .site-header .header-search { width: min(180px, 42vw) !important; }
  .site-header .header-search input[type="search"] { height: 30px !important; padding: 4px 10px !important; font-size: 12.5px !important; border-radius: 999px !important; }
  .icon-link, .cart-button { width: 32px; height: 32px; }
}
