/* ============================================================
   HanoutStock — Boutique : look « Vitrine Pro » (1/2)
   Refonte CSS complète : commerce propre et crédible.
   Fini les badges géants : pastilles discrètes, hiérarchie nette,
   cartes premium, hero lumineux, CTA WhatsApp affirmé.
   Structure HTML/JS inchangée. Couleurs via data-color.
   ============================================================ */

:root {
  --primary: #F28B00;
  --primary-dark: #E07D00;
  --secondary: #F92400;
  --primary-rgb: 242, 139, 0;
  --secondary-rgb: 249, 36, 0;
  --dark: #484848;
  --dark-2: #343434;
  --light: #F5F5F5;
  --gray: #919191;
  --white: #ffffff;
  --line: #e8e8e8;
  --on-dark: #ffffff;
  --hero-fade: #fff7ec;
  --hero-grad: linear-gradient(135deg, #ffe0b0, #ffd1a3 55%, #ffb199);
  --foot: #fafafa;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 22px;
  --grad-brand: linear-gradient(135deg, var(--primary), var(--secondary));
  --ring: rgba(var(--primary-rgb), .14);
  --shadow: 0 6px 20px rgba(72, 72, 72, .10);
  --shadow-lg: 0 14px 40px rgba(72, 72, 72, .18);
  --glow: 0 10px 26px rgba(var(--primary-rgb), .35);
  --font-head: 'Cairo', 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Manrope', 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --wa: #22c55e;
  --wa-dark: #16a34a;
  --ink-soft: #6b6b76;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--dark);
  background: var(--light);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, h5 { font-family: var(--font-head); color: var(--dark); font-weight: 800; line-height: 1.25; }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--primary); text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
body.no-scroll { overflow: hidden; }
.hidden { display: none !important; }
.mobile-only { display: none; }
.ic { width: 1.15em; height: 1.15em; vertical-align: -.2em; fill: currentColor; flex: none; }

/* ---------- Chargement ---------- */
.loader-wrap {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center;
  background: var(--white);
}
.loader-wrap::after {
  content: 'SOUQ HANOUTSTOCK'; font-family: var(--font-head); font-weight: 800; font-size: 15px;
  letter-spacing: 3px; text-transform: uppercase; color: var(--gray); opacity: .8;
}
.spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid var(--ring); border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Erreur ---------- */
.error-wrap {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: var(--white);
}
.error-card {
  text-align: center; max-width: 380px; padding: 36px 28px;
  background: var(--white);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
}
.error-card .big { font-size: 50px; margin-bottom: 12px; }
.error-card p { color: var(--dark); margin-bottom: 20px; font-weight: 600; }
.error-card button {
  background: var(--grad-brand); color: #fff; border: none;
  padding: 12px 30px; border-radius: 999px; font-weight: 800; font-size: 15px;
  transition: .25s;
}
.error-card button:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ---------- Barre supérieure ---------- */
.top-bar { background: var(--dark-2); color: #fff; font-size: 12.5px; }
.top-bar-inner {
  max-width: 1180px; margin: 0 auto; padding: 7px 16px;
  display: flex; align-items: center; gap: 12px;
}
.top-online { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; opacity: .95; }
.online-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--wa);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); }
  70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.announce {
  display: inline-flex; align-items: center; min-width: 0;
  background: rgba(255, 255, 255, .12); color: #fff;
  border-radius: 20px; padding: 3px 12px; font-weight: 700; font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.announce-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-bar .lang-btn {
  margin-inline-start: auto; flex: none;
  background: transparent; border: 1.5px solid rgba(255, 255, 255, .45);
  color: #fff; border-radius: 20px; padding: 4px 14px; font-size: 12.5px;
  font-weight: 700; transition: .25s;
}
.top-bar .lang-btn:hover { background: #fff; color: var(--dark-2); border-color: #fff; }

/* ---------- En-tête ---------- */
.shop-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-badge {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 21px; color: #fff;
  background: var(--grad-brand); border-radius: 14px; box-shadow: var(--glow);
}
.brand-title { min-width: 0; }
.brand-name {
  font-family: var(--font-head); font-weight: 800; font-size: 19px; color: var(--dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-slogan, .brand-sub { font-size: 12px; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { text-transform: uppercase; letter-spacing: 1.4px; font-size: 10.5px; font-weight: 700; }
.header-search { flex: 1; max-width: 460px; margin-inline-start: auto; }
.search-wrap { position: relative; }
.search-wrap input {
  width: 100%; padding: 11px 42px 11px 16px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--light); color: var(--dark);
  font: inherit; font-size: 14px; outline: none; transition: .2s;
}
.search-wrap input:focus { border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 4px var(--ring); }
.search-ico {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: grid; place-items: center;
  background: var(--grad-brand); color: #fff; border-radius: 50%; font-size: 14px;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  background: var(--dark-2); color: #fff; border: none; border-radius: 999px;
  padding: 10px 18px; font-weight: 800; font-size: 14px; transition: .2s;
}
.cart-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.cart-ico { font-size: 17px; }
.cart-badge {
  min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-grid; place-items: center;
  background: var(--grad-brand); border-radius: 999px;
  font-size: 12px; font-weight: 800;
}

/* ---------- Hero ---------- */
.hero {
  max-width: 1180px; margin: 22px auto 0; padding: 0 16px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: center;
}
.hero-text { min-width: 0; padding: 12px 0; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--ring); color: var(--primary-dark);
  border-radius: 999px; padding: 6px 14px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .3px; margin-bottom: 14px;
}
.hero-badge:empty { display: none; }
.hero-text h1 {
  font-size: clamp(30px, 4.6vw, 50px); letter-spacing: -.5px; margin-bottom: 10px;
}
.hero-slogan { color: var(--dark); font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.hero-tagline { color: var(--gray); font-size: 15px; margin-bottom: 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta {
  background: var(--grad-brand); color: #fff; border: none; border-radius: 999px;
  padding: 14px 30px; font-weight: 800; font-size: 15px; box-shadow: var(--glow);
  transition: .2s;
}
.hero-cta:hover { transform: translateY(-2px); filter: brightness(1.06); }
.hero-wa {
  display: inline-flex; align-items: center; gap: 9px;
  border: 2px solid var(--wa); color: var(--wa-dark); border-radius: 999px;
  padding: 12px 24px; font-weight: 800; font-size: 15px; background: transparent;
  transition: .2s;
}
.hero-wa:hover { background: var(--wa); color: #fff; transform: translateY(-2px); }
.wa-ico { font-size: 16px; }
.hero-collage { position: relative; min-height: 300px; }
.hero-collage-bg {
  position: absolute; inset: 0;
  background: var(--hero-grad); border-radius: var(--radius-xl);
  opacity: .55;
}
.hero-tile {
  position: absolute; background: var(--white); border-radius: 14px; padding: 7px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.hero-tile img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; display: block; }

/* ---------- Atouts ---------- */
.features-strip {
  max-width: 1180px; margin: 26px auto 0; padding: 0 16px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.feature {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 14px 15px; min-width: 0;
}
.feat-ico {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center; font-size: 21px;
  background: var(--ring); border-radius: 12px;
}
.feat-body { min-width: 0; }
.feat-body b { display: block; font-size: 13.5px; color: var(--dark); line-height: 1.3; }
.feat-body small { display: block; font-size: 12px; color: var(--gray); line-height: 1.35; }

/* ---------- Bannières catégories ---------- */
.cat-banners {
  max-width: 1180px; margin: 22px auto 0; padding: 0 16px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.cat-banners:empty { display: none; }
.cat-banner {
  display: flex; align-items: center; gap: 13px; text-align: start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 10px 14px 10px 10px; cursor: pointer; transition: .2s; min-width: 0;
  font: inherit; color: var(--dark); width: 100%;
}
.cat-banner:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.cat-banner-img {
  width: 58px; height: 58px; flex: none; border-radius: 12px;
  background-size: cover; background-position: center;
}
.cat-banner-body { min-width: 0; flex: 1; }
.cat-banner-name { display: block; font-weight: 800; font-size: 14px; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-banner-count { font-size: 12px; color: var(--gray); }

/* ---------- Zone produits ---------- */
.product-area { max-width: 1180px; margin: 0 auto; padding: 6px 16px 30px; }
.search-mobile { margin: 14px 0 4px; }
.browse-title {
  font-size: 21px; margin: 26px 0 4px; display: flex; align-items: center; gap: 10px;
}
.browse-title::after { content: ''; height: 3px; width: 44px; border-radius: 3px; background: var(--grad-brand); }
.products-count { font-size: 13px; color: var(--gray); margin-bottom: 12px; }
.cat-nav { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 12px; scrollbar-width: none; }
.cat-nav::-webkit-scrollbar { display: none; }
.cat-pill {
  flex: none; padding: 8px 18px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--white); color: var(--dark);
  font-size: 13.5px; font-weight: 700; cursor: pointer; transition: .2s; user-select: none;
}
.cat-pill:hover { border-color: var(--primary); }
.cat-pill.active, .cat-pill.tap { background: var(--dark-2); border-color: var(--dark-2); color: #fff; }
.cat-pill.tap { transform: scale(.94); }
.cat-sections { display: flex; flex-direction: column; gap: 6px; }
.cat-section { min-width: 0; }
.cat-head { display: flex; align-items: center; gap: 9px; margin: 22px 0 12px; }
.cat-title { font-size: 19px; display: flex; align-items: center; gap: 10px; margin: 0; }
.cat-bar { width: 5px; height: 22px; border-radius: 4px; background: var(--grad-brand); }
.best-fire { font-size: 18px; }
.best-section { min-width: 0; }
.carousel-wrap { position: relative; }
.carousel {
  display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 14px;
  scroll-snap-type: x proximity; scrollbar-width: none;
  mask-image: linear-gradient(to inline-end, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, #000 92%, transparent);
}
.carousel::-webkit-scrollbar { display: none; }
.carousel .p-card { flex: 0 0 172px; width: 172px; scroll-snap-align: start; }
.car-nav {
  position: absolute; top: 34%; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--white); border: 1px solid var(--line); color: var(--dark);
  font-size: 20px; line-height: 1; box-shadow: var(--shadow);
  display: grid; place-items: center; transition: .2s;
}
.car-nav:hover { background: var(--dark-2); color: #fff; border-color: var(--dark-2); }
.car-nav-prev { inset-inline-start: -14px; }
.car-nav-next { inset-inline-end: -14px; }
.car-shadow { display: none; }

/* ---------- Carte produit ---------- */
.product-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  content-visibility: auto;
}
.p-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column;
  animation: riseIn .5s cubic-bezier(.2, .9, .3, 1) backwards;
}
.p-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.p-media {
  position: relative; aspect-ratio: 1; background: var(--light);
  display: grid; place-items: center; overflow: hidden;
}
.p-media-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-media-emoji { font-size: 44px; opacity: .5; }
/* Pastille stock discrète (fini le gros badge) */
.p-badge {
  position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .2px;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(20, 20, 25, .72); color: #fff;
}
.p-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-badge.ok { color: #7df0a9; }
.p-badge.low { color: #ffd166; }
.p-badge.out { background: var(--secondary); color: #fff; }
.p-badge.out::before { display: none; }
.p-promo {
  position: absolute; top: 8px; inset-inline-end: 8px; z-index: 2;
  background: var(--secondary); color: #fff;
  font-size: 11.5px; font-weight: 800;
  padding: 4px 9px; border-radius: 999px; box-shadow: var(--shadow);
}
.p-body { padding: 11px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.p-name {
  font-size: 13.5px; font-weight: 700; color: var(--dark); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 36px;
}
.p-cat { font-size: 11.5px; color: var(--gray); }
.p-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 7px; }
.p-price-row { display: flex; align-items: baseline; gap: 7px; min-width: 0; flex-wrap: wrap; }
.p-price { font-size: 16.5px; font-weight: 800; color: var(--primary-dark); }
.p-old { font-size: 12.5px; color: var(--gray); }
.p-add {
  width: 38px; height: 38px; flex: none; border-radius: 50%; border: none;
  background: var(--ring); color: var(--primary-dark);
  font-size: 20px; font-weight: 800; line-height: 1;
  display: grid; place-items: center; transition: .18s;
}
.p-add:hover { background: var(--grad-brand); color: #fff; transform: scale(1.07); }
.p-add.added { background: var(--wa); color: #fff; }
.p-add.out { opacity: .35; pointer-events: none; }
.p-add.bump { animation: bump .36s ease; }
@keyframes bump { 30% { transform: scale(1.25); } }
.fly-dot {
  position: fixed; z-index: 1200; width: 14px; height: 14px; border-radius: 50%;
  background: var(--grad-brand); pointer-events: none;
  animation: fly .7s cubic-bezier(.3, .7, .4, 1) forwards;
}
@keyframes fly { to { transform: translateY(40px) scale(.4); opacity: 0; } }

/* ---------- Bandeau promo ---------- */
.promo-banner {
  margin: 26px 0 6px; padding: 26px 26px;
  border-radius: var(--radius-xl); color: #fff;
  background: linear-gradient(120deg, var(--primary-dark), var(--primary) 45%, var(--secondary));
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  box-shadow: var(--glow); overflow: hidden; position: relative;
}
.promo-banner::before {
  content: ''; position: absolute; inset-inline-end: -60px; top: -60px;
  width: 210px; height: 210px; border-radius: 50%;
  background: rgba(255, 255, 255, .14);
}
.promo-value { font-family: var(--font-head); font-size: 46px; font-weight: 800; line-height: 1; }
.promo-body { flex: 1; min-width: 180px; }
.promo-body b { font-size: 17px; }
.promo-cta {
  background: #fff; color: var(--primary-dark); border: none; border-radius: 999px;
  padding: 13px 28px; font-weight: 800; font-size: 14.5px; transition: .2s;
}
.promo-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }

/* ---------- Vue filtre / recherche ---------- */
.filter-head { display: flex; align-items: center; gap: 10px; margin: 18px 0 6px; flex-wrap: wrap; }
.filter-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-weight: 700; font-size: 13.5px; color: var(--dark); transition: .2s;
}
.filter-back:hover { border-color: var(--primary); }
.see-arr { font-size: 17px; font-weight: 800; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px; scrollbar-width: none; flex: 1; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 15px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--white); border: 1.5px solid var(--line); color: var(--dark);
  cursor: pointer; transition: .2s; user-select: none;
}
.chip.active { background: var(--dark-2); border-color: var(--dark-2); color: #fff; }
.see-more {
  display: block; margin: 4px auto 0; padding: 11px 30px; border-radius: 999px;
  background: var(--white); border: 1.5px solid var(--line); color: var(--dark);
  font-weight: 800; font-size: 14px; transition: .2s;
}
.see-more:hover { border-color: var(--primary); color: var(--primary-dark); }
.empty-state { text-align: center; padding: 46px 16px; color: var(--gray); }
.empty-state .big { font-size: 46px; margin-bottom: 10px; }

/* ---------- Contact / localisation ---------- */
.shop-contact { max-width: 1180px; margin: 0 auto; padding: 10px 16px 8px; }
.contact-title { font-size: 19px; display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.contact-title::after { content: ''; height: 3px; width: 44px; border-radius: 3px; background: var(--grad-brand); }
.contact-pin { font-size: 19px; }
.map-wrap { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
.map-wrap iframe { width: 100%; height: 280px; border: 0; display: block; }
.contact-line {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; font-size: 14px; color: var(--dark); margin-top: 10px;
}
.contact-ico { font-size: 17px; }

/* ---------- Pied de page ---------- */
.shop-footer { background: var(--foot); border-top: 1px solid var(--line); margin-top: 26px; }
.footer-grid {
  max-width: 1180px; margin: 0 auto; padding: 34px 16px 20px;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 24px;
}
.footer-col h3 { font-size: 14px; margin-bottom: 12px; }
.footer-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.brand-badge-sm {
  width: 34px; height: 34px; display: inline-grid; place-items: center;
  background: var(--grad-brand); border-radius: 10px; font-size: 17px;
}
.footer-brand b { font-size: 16px; }
.footer-tag { font-size: 13px; color: var(--gray); margin-bottom: 10px; }
.footer-powered { color: var(--primary-dark); }
.footer-link, .footer-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--dark); padding: 4px 0; }
a.footer-link:hover, .wa-link:hover { color: var(--primary-dark); }
.footer-base {
  max-width: 1180px; margin: 0 auto; padding: 14px 16px calc(14px + var(--safe-b));
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--gray);
}
#onlineLabel { margin-inline-start: auto; font-weight: 700; }
.foot-credit a { color: var(--gray); }

/* ---------- Fiche produit ---------- */
.modal {
  position: fixed; inset: 0; z-index: 500;
  display: grid; place-items: center; padding: 18px;
  background: rgba(15, 12, 25, .78);
}
.modal-content {
  width: min(430px, 100%); max-height: 92vh; max-height: 92dvh; overflow-y: auto;
  background: var(--white); border-radius: 20px; box-shadow: var(--shadow-lg);
  animation: sheetUp .25s ease;
}
.modal-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px 18px 0; }
.modal-head h2 { font-size: 18px; flex: 1; }
.modal-close {
  width: 34px; height: 34px; flex: none; border-radius: 50%; border: none;
  background: var(--light); color: var(--dark); font-size: 20px; line-height: 1; transition: .2s;
}
.modal-close:hover { background: var(--secondary); color: #fff; }
.modal-media { margin: 14px 18px 0; border-radius: 14px; overflow: hidden; background: var(--light); display: grid; place-items: center; min-height: 220px; }
.modal-media img { width: 100%; max-height: 340px; object-fit: contain; display: block; cursor: zoom-in; }
.modal-media .p-media-emoji { font-size: 64px; opacity: .5; padding: 40px; }
.modal-info { padding: 14px 18px 0; }
.modal-price-row { display: flex; align-items: baseline; gap: 10px; }
.modal-price { font-size: 23px; font-weight: 800; color: var(--primary-dark); }
.modal-old { font-size: 15px; color: var(--gray); }
.modal-stock { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 800; }
.modal-stock.ok { color: var(--wa-dark); }
.modal-stock.low { color: #B45309; }
.modal-stock.out { color: var(--secondary); }
.modal-zoom-hint { font-size: 11.5px; color: var(--gray); margin-top: 6px; }
.modal-action { display: flex; gap: 10px; padding: 16px 18px 18px; }
.qtybox {
  display: flex; align-items: center; gap: 2px;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 4px;
}
.qtybox button {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--light); color: var(--dark); font-size: 19px; font-weight: 800; transition: .18s;
}
.qtybox button:hover { background: var(--dark-2); color: #fff; }
.qtybox span { min-width: 30px; text-align: center; font-weight: 800; color: var(--dark); }
.modal-add {
  flex: 1; border: none; border-radius: 999px;
  background: var(--wa); color: #fff; font-weight: 800; font-size: 15px; transition: .2s;
}
.modal-add:hover { background: var(--wa-dark); }
@keyframes sheetUp { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }

/* ---------- Panier ---------- */
.fab-cart {
  position: fixed; inset-inline-start: 14px; bottom: calc(14px + var(--safe-b)); z-index: 300;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--dark-2); color: #fff; border: none; border-radius: 999px;
  padding: 13px 20px; font-weight: 800; font-size: 14px; box-shadow: var(--shadow-lg);
  transition: .2s;
}
.fab-cart:hover { transform: translateY(-2px); }
.fab-cart .cart-badge { background: var(--grad-brand); }
.fab-label { font-size: 13.5px; }
.fab-wa {
  position: fixed; inset-inline-end: 14px; bottom: calc(14px + var(--safe-b)); z-index: 300;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--wa); color: #fff; border-radius: 999px;
  padding: 13px 20px; font-weight: 800; font-size: 14px; box-shadow: 0 10px 26px rgba(34, 197, 94, .4);
  transition: .2s;
}
.fab-wa:hover { background: var(--wa-dark); transform: translateY(-2px); }
.fab-label-wa { font-size: 13.5px; }
.cart-sheet {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 600;
  width: min(400px, 100%); display: flex; flex-direction: column;
  background: var(--white); box-shadow: var(--shadow-lg);
  transform: translateX(105%);
}
[dir="rtl"] .cart-sheet { transform: translateX(-105%); }
.cart-sheet.open { transform: none; transition: transform .28s cubic-bezier(.2, .9, .3, 1); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 18px; border-bottom: 1px solid var(--line); }
.cart-head h2 { font-size: 17px; margin: 0; }
.cart-lines { flex: 1; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.c-line { display: flex; gap: 10px; align-items: center; background: var(--light); border: 1px solid var(--line); border-radius: 14px; padding: 9px 10px; }
.c-thumb { width: 54px; height: 54px; flex: none; border-radius: 10px; background: var(--white); display: grid; place-items: center; font-size: 24px; overflow: hidden; }
.c-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c-info { flex: 1; min-width: 0; }
.c-name { display: block; font-size: 13px; font-weight: 700; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-num { font-size: 11.5px; color: var(--gray); }
.c-qty { display: flex; align-items: center; gap: 2px; flex: none; background: var(--white); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; }
.c-qty .c-num { min-width: 24px; text-align: center; font-weight: 800; font-size: 14px; color: var(--dark); }
.c-step { width: 28px; height: 28px; border-radius: 50%; border: none; background: var(--light); color: var(--dark); font-size: 16px; font-weight: 800; line-height: 1; display: grid; place-items: center; transition: background .18s, color .18s; }
.c-step:hover:not(:disabled) { background: var(--dark-2); color: #fff; }
.c-step:disabled { opacity: .3; }
.c-price { font-size: 13.5px; font-weight: 800; color: var(--dark); white-space: nowrap; }
.c-old { font-size: 11.5px; color: var(--gray); margin-inline-start: 5px; }
.c-total { font-size: 13.5px; font-weight: 800; color: var(--primary-dark); white-space: nowrap; min-width: 64px; text-align: end; }
.cart-empty { text-align: center; padding: 40px 16px; color: var(--gray); }
.cart-empty .big { font-size: 52px; margin-bottom: 8px; }
.cart-foot { padding: 15px 18px calc(16px + var(--safe-b)); border-top: 1px solid var(--line); }
.cart-total-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cart-total-row .lbl { font-weight: 700; color: var(--dark); }
.cart-total-row .val { font-size: 21px; font-weight: 800; color: var(--primary-dark); }
.btn-wa {
  width: 100%; border: none; border-radius: 999px; padding: 15px;
  background: var(--wa); color: #fff; font-weight: 800; font-size: 15.5px; transition: .2s;
}
.btn-wa:hover { background: var(--wa-dark); }
.btn-clear {
  width: 100%; margin-top: 8px; background: transparent; border: none;
  color: var(--gray); font-size: 13px; font-weight: 600;
}
.btn-clear:hover { color: var(--secondary); }

/* ---------- Toast / haut / loupe ---------- */
.toast {
  position: fixed; top: calc(12px + var(--safe-t)); inset-inline: 12px; z-index: 1300;
  max-width: 480px; margin-inline: auto; text-align: center;
  background: var(--dark-2); color: #fff; border-radius: 12px;
  padding: 13px 18px; font-size: 14px; font-weight: 700;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
.toast.fade-out { opacity: 0; transition: opacity .3s; }
.back-top {
  position: fixed; inset-inline-end: 14px; bottom: calc(76px + var(--safe-b)); z-index: 290;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--white); border: 1px solid var(--line); color: var(--dark);
  font-size: 20px; box-shadow: var(--shadow); transition: .2s;
}
.back-top:hover { background: var(--dark-2); color: #fff; }
.lightbox {
  position: fixed; inset: 0; z-index: 1400;
  background: rgba(10, 8, 18, .9);
  display: grid; place-items: center; padding: 20px;
}
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 12px; }
.lightbox-close {
  position: absolute; top: calc(14px + var(--safe-t)); inset-inline-end: 14px;
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 22px;
}

/* ---------- États ---------- */
.tap { transform: scale(.94) !important; }
.pop { animation: pop .35s cubic-bezier(.2, 1.6, .45, 1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ============================================================
   Variations de couleur — data-color posé sur <html>
   Orange = défaut (palette de base ci-dessus)
   ============================================================ */
html[data-color="orange"] {
  --primary: #F28B00;
  --primary-dark: #E07D00;
  --secondary: #F92400;
  --primary-rgb: 242, 139, 0;
  --secondary-rgb: 249, 36, 0;
  --hero-fade: #fff7ec;
  --hero-grad: linear-gradient(135deg, #ffe0b0, #ffd1a3 55%, #ffb199);
}

html[data-color="rose"] {
  --primary: #E91E8B;
  --primary-dark: #C2185B;
  --secondary: #F472B6;
  --primary-rgb: 233, 30, 139;
  --secondary-rgb: 244, 114, 182;
  --hero-fade: #fce7f3;
  --hero-grad: linear-gradient(135deg, #ffd6e7, #f8b4d4 55%, #f5a0c8);
}

html[data-color="violet"] {
  --primary: #7C3AED;
  --primary-dark: #6D28D9;
  --secondary: #A855F7;
  --primary-rgb: 124, 58, 237;
  --secondary-rgb: 168, 85, 247;
  --hero-fade: #f3e8ff;
  --hero-grad: linear-gradient(135deg, #e9d8ff, #d3b8ff 55%, #c4a0ff);
}

html[data-color="marron"] {
  --primary: #92400E;
  --primary-dark: #78350F;
  --secondary: #B45309;
  --primary-rgb: 146, 64, 14;
  --secondary-rgb: 180, 83, 9;
  --hero-fade: #fdf3e3;
  --hero-grad: linear-gradient(135deg, #f3d7b2, #eac08a 55%, #e0ab70);
}

html[data-color="gris"] {
  --primary: #6B7280;
  --primary-dark: #4B5563;
  --secondary: #9CA3AF;
  --primary-rgb: 107, 112, 128;
  --secondary-rgb: 156, 163, 175;
  --hero-fade: #ececec;
  --hero-grad: linear-gradient(135deg, #e2e2e2, #d3d3d3 55%, #c6c6c6);
}

html[data-color="bleu"] {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --secondary: #60A5FA;
  --primary-rgb: 37, 99, 235;
  --secondary-rgb: 96, 165, 255;
  --hero-fade: #e8f1ff;
  --hero-grad: linear-gradient(135deg, #cfe4ff, #a9cfff 55%, #8fbcff);
}

html[data-color="vert"] {
  --primary: #059669;
  --primary-dark: #047857;
  --secondary: #34D399;
  --primary-rgb: 5, 150, 105;
  --secondary-rgb: 52, 211, 153;
  --hero-fade: #e6f7ef;
  --hero-grad: linear-gradient(135deg, #c8f0dc, #a5e7c3 55%, #8cdfb0);
}

/* ============================================================
   Mode sombre — data-theme="dark" posé sur <html>
   ============================================================ */
html[data-theme="dark"] {
  --dark: #F0F0F0;
  --dark-2: #202020;
  --light: #141414;
  --gray: #A8A8A8;
  --white: #1E1E1E;
  --line: #2E2E2E;
  --on-dark: #141414;
  --foot: #191919;
  --hero-fade: rgba(255, 255, 255, 0);
  --shadow: 0 8px 24px rgba(0, 0, 0, .6);
  --shadow-lg: 0 14px 42px rgba(0, 0, 0, .7);
}

/* ============================================================
   ANIMATIONS — reveals au scroll (sans JS), micro-interactions.
   Tout en transform/opacity.
   ============================================================ */
@keyframes riseIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
  .feature, .cat-banner, .promo-banner, .shop-contact .contact-title, .map-wrap, .contact-line {
    animation: riseIn .7s cubic-bezier(.2, .9, .3, 1) backwards;
    animation-timeline: view();
    animation-range: entry 0% entry 28%;
  }
  .browse-title::after, .contact-title::after {
    transform-origin: center;
    animation: growBar .7s cubic-bezier(.2, .9, .3, 1) backwards;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }
}
@keyframes growBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- RTL ---------- */
[dir="rtl"] .cat-banner, [dir="rtl"] .feature, [dir="rtl"] .contact-line { text-align: right; }
[dir="rtl"] .search-wrap input { padding: 11px 16px 11px 42px; }
[dir="rtl"] .car-nav-prev { transform: scaleX(-1); }
[dir="rtl"] .car-nav-next { transform: scaleX(-1); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 18px; }
  .hero-collage { min-height: 240px; }
  .features-strip { grid-template-columns: repeat(2, 1fr); }
  .cat-banners { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .car-nav { display: none; }
}
@media (max-width: 620px) {
  body { font-size: 14.5px; }
  .mobile-only { display: block; }
  .header-inner { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .header-search { display: none; }
  .brand-name { font-size: 17px; }
  .hero { margin-top: 14px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-cta, .hero-wa { text-align: center; justify-content: center; }
  .hero-collage { min-height: 210px; }
  .cat-banners { grid-template-columns: 1fr; }
  .features-strip { grid-template-columns: 1fr; }
  .carousel .p-card { flex-basis: 158px; width: 158px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-name { font-size: 12.5px; }
  .p-price { font-size: 15px; }
  .promo-banner { padding: 22px 18px; }
  .promo-value { font-size: 38px; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-content { border-radius: 20px 20px 0 0; max-height: 92dvh; }
  .cart-sheet { top: auto; inset-inline: 0; bottom: 0; width: 100%; max-height: 88dvh; max-height: 88vh; border-radius: 20px 20px 0 0; transform: translateY(105%); }
  .cart-sheet.open { transform: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
  .fab-label, .fab-label-wa { display: none; }
  .fab-cart, .fab-wa { padding: 14px; border-radius: 50%; }
  .back-top { bottom: calc(150px + var(--safe-b)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* Diaporama galerie (overlay produit) */
.ov-slider { position: relative; width: 100%; display: block; }
.ov-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: rgba(20, 20, 25, .55); color: #fff;
  font-size: 20px; line-height: 1; z-index: 2; cursor: pointer;
  display: grid; place-items: center;
}
.ov-prev { inset-inline-start: 8px; }
.ov-next { inset-inline-end: 8px; }
.ov-dots {
  position: absolute; bottom: 8px; left: 0; right: 0; z-index: 2;
  display: flex; gap: 6px; justify-content: center;
}
.ov-dot {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .55); box-shadow: 0 1px 4px rgba(0, 0, 0, .35); cursor: pointer;
  transition: width .18s ease, background .18s ease;
}
.ov-dot.active { width: 18px; background: #fff; }
/* Logo de la boutique (store_params.logo) */
.brand-badge.has-logo { background: #fff; padding: 0; border-radius: 50%; overflow: hidden; }
.brand-badge.has-logo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.hero-badge.has-logo {
  background: #fff; padding: 0; border-radius: 50%; overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .10);
}
.hero-badge.has-logo img {
  height: clamp(88px, 11.5vw, 108px); width: auto; aspect-ratio: 1 / 1;
  object-fit: cover; border-radius: 50%; display: block;
}
/* En-tete en mode sombre : le fond etait code en blanc, le nom devenait invisible */
html[data-theme="dark"] .shop-header {
  background: rgba(24, 24, 24, .92);
  border-bottom-color: var(--line);
  backdrop-filter: blur(10px);
}
/* Logo dans le hero : taille plus discrete (le nom reste affiche) */
.hero-badge.has-logo img { height: clamp(56px, 9vw, 76px); }
/* Hero : logo A GAUCHE du nom (comme l'en-tete), nom + slogan a droite */
.hero-text.has-logo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 16px;
  align-items: center;
}
.hero-text.has-logo .hero-badge {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: center;
  margin-bottom: 0;
  padding: 0;
}
.hero-text.has-logo .hero-badge img {
  height: clamp(84px, 11.5vw, 108px); width: auto;
  aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%;
}
.hero-text.has-logo #heroTitle { grid-column: 2; margin-bottom: 4px;
  font-size: clamp(22px, 3.4vw, 36px); line-height: 1.15; }
.hero-text.has-logo #heroSlogan { grid-column: 2; margin-bottom: 0; }
.hero-text.has-logo .hero-tagline { grid-column: 2; margin-top: 4px; }
.hero-text.has-logo .hero-actions { grid-column: 1 / -1; margin-top: 18px; }