:root{
  /* Thème pro : neutre froid + bleu institutionnel */
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;

  --primary: #1e40af;
  --primary-soft: #3b82f6;
  --accent: #334155;
  --accent-soft: #475569;
  --success: #15803d;
  --danger: #b91c1c;

  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow2: 0 14px 36px rgba(15, 23, 42, 0.10);

  /* Boutons : dégradés multi-teintes (bleu → cyan, violet → fuchsia) */
  --btn-primary-1: #1e3a8a;
  --btn-primary-2: #2563eb;
  --btn-primary-3: #0891b2;
  --btn-primary-glow: rgba(37, 99, 235, 0.28);

  --btn-accent-1: #5b21b6;
  --btn-accent-2: #7c3aed;
  --btn-accent-3: #db2777;
  --btn-accent-glow: rgba(124, 58, 237, 0.3);

  --btn-ghost-border: rgba(203, 213, 225, 0.95);
  --btn-ghost-hover-border: rgba(99, 102, 241, 0.42);
  --btn-ghost-hover-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(238, 242, 255, 0.88));
}

*{ box-sizing: border-box; }
button, input, select, textarea{ font-family: inherit; }
html, body{ height: 100%; }

/* Empêche le débordement horizontal sur petits écrans */
/* Toujours thème clair : ignore le mode sombre du système (OS / navigateur). */
html {
  overflow-x: hidden;
  color-scheme: light;
}

/*
 * Safari iOS + RTL : si un bloc dépasse la largeur du viewport, WebKit peut
 * « réduire » toute la page (marge blanche à gauche, contenu à droite) et
 * faire disparaître visuellement le header sticky + la tabbar fixed.
 */
html[dir="rtl"]{
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html[dir="rtl"] body{
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  background:
    radial-gradient(1000px 600px at 8% -8%, rgba(30, 64, 175, 0.06), transparent 58%),
    radial-gradient(900px 500px at 100% 0%, rgba(15, 23, 42, 0.04), transparent 55%),
    var(--bg);
  color: var(--text);
}

a{ color: inherit; text-decoration: none; }
.container{
  width: min(1120px, 92%);
  margin: 0 auto;
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
}

/* Navbar premium */
.navbar{
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--border);
}
.nav-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 0;
  position: relative;
  gap: 10px;
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-weight: 900; letter-spacing: 0.2px;
}
.brand-badge{
  width: 12px; height: 12px; border-radius: 999px;
  background: linear-gradient(135deg, var(--btn-primary-1), var(--btn-primary-2) 55%, var(--btn-primary-3));
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.nav-links{ display:flex; gap:12px; align-items:center; flex-wrap: wrap; }

/* Sélecteur de langue (navbar) */
.lang-switch{
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-inline-end: 4px;
}
.lang-switch__select{
  max-width: min(140px, 38vw);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-inline-end: 28px;
}
[dir="rtl"] .lang-switch__select{
  background-position: left 10px center;
  padding-inline-end: 10px;
  padding-inline-start: 28px;
}
.lang-switch__btn{
  margin-inline-start: 6px;
  padding: 6px 10px !important;
  font-size: 12px !important;
}

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

/* RTL — arabe */
[dir="rtl"] body{
  font-family: "Noto Sans Arabic", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}
[dir="rtl"] .nav-inner{
  flex-direction: row-reverse;
  min-width: 0;
  max-width: 100%;
}
[dir="rtl"] .brand{
  min-width: 0;
}
[dir="rtl"] .nav-links{
  flex-direction: row-reverse;
}
[dir="rtl"] .footer-row{
  flex-direction: row-reverse;
}
[dir="rtl"] .mobile-tabbar__badge{
  right: auto;
  left: 50%;
  transform: translateX(-14px);
}

/* Barre du bas : ordre visuel en arabe */
[dir="rtl"] .mobile-tabbar{
  flex-direction: row-reverse;
}

.pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 10px 14px;
  border: 1px solid var(--btn-ghost-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.75));
  border-radius: 999px;
  color: var(--text);
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .22s ease, border-color .2s ease, background .2s ease, color .15s ease;
}
.pill:hover{
  transform: translateY(-1px);
  color: var(--btn-primary-2);
  border-color: rgba(37, 99, 235, 0.28);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(224, 242, 254, 0.45));
  box-shadow: 0 10px 26px var(--btn-primary-glow), 0 6px 18px rgba(15, 23, 42, 0.06);
}
.pill:active{
  transform: translateY(0);
}
.pill:focus-visible{
  outline: 2px solid var(--btn-primary-2);
  outline-offset: 2px;
}

/* Pastille compteur (Panier) — même esprit que .mobile-tabbar__badge */
.pill--nav-indicator{
  position: relative;
  padding-right: 22px;
}
.nav-pill-badge{
  position: absolute;
  top: -5px;
  right: 4px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  color: #fff;
  background: #dc2626;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
[dir="rtl"] .pill--nav-indicator{
  padding-right: 14px;
  padding-left: 22px;
}
[dir="rtl"] .nav-pill-badge{
  right: auto;
  left: 4px;
}

.pill--muted{
  opacity: 0.88;
  font-weight: 750;
  font-size: 13px;
  cursor: default;
}
.pill--muted:hover{
  transform: none;
  color: var(--muted);
  border-color: var(--btn-ghost-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.75));
  box-shadow: none;
}
.pill--success{
  border-color: rgba(22, 163, 74, 0.35);
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.95), rgba(187, 247, 208, 0.4));
  color: #14532d;
  font-size: 13px;
  font-weight: 750;
  opacity: 0.92;
  cursor: default;
}
.pill--success:hover{
  transform: none;
  box-shadow: none;
  border-color: rgba(22, 163, 74, 0.35);
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.95), rgba(187, 247, 208, 0.4));
  color: #14532d;
}
.pill--danger{
  border-color: rgba(225, 29, 72, 0.3);
  background: linear-gradient(135deg, rgba(255, 250, 250, 0.95), rgba(254, 202, 202, 0.4));
  color: #9f1239;
  font-size: 13px;
  font-weight: 750;
  opacity: 0.92;
  cursor: default;
}
.pill--danger:hover{
  transform: none;
  box-shadow: none;
  border-color: rgba(225, 29, 72, 0.3);
  background: linear-gradient(135deg, rgba(255, 250, 250, 0.95), rgba(254, 202, 202, 0.4));
  color: #9f1239;
}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap: 10px;
  border-radius: 999px;
  padding: 11px 14px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .22s ease, filter .15s ease, border-color .2s ease, background .2s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); filter: brightness(0.97); }
.btn:disabled,
.btn[disabled]{
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: none;
  pointer-events: none;
}
.btn-primary:disabled,
.btn-accent:disabled{
  box-shadow: none;
}

.btn-primary{
  background: linear-gradient(135deg, var(--btn-primary-1) 0%, var(--btn-primary-2) 42%, var(--btn-primary-3) 100%);
  color: #fff;
  box-shadow: 0 10px 28px var(--btn-primary-glow);
}
.btn-primary:hover{
  box-shadow:
    0 14px 36px rgba(8, 145, 178, 0.22),
    0 8px 24px rgba(37, 99, 235, 0.22);
}

.btn-accent{
  background: linear-gradient(135deg, var(--btn-accent-1) 0%, var(--btn-accent-2) 40%, var(--btn-accent-3) 100%);
  color: #fff;
  box-shadow: 0 10px 28px var(--btn-accent-glow);
}
.btn-accent:hover{
  box-shadow:
    0 14px 36px rgba(219, 39, 119, 0.2),
    0 8px 24px rgba(124, 58, 237, 0.22);
}

.btn-ghost{
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--btn-ghost-border);
  color: var(--text);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.btn-ghost:hover{
  background: var(--btn-ghost-hover-bg);
  border-color: var(--btn-ghost-hover-border);
  box-shadow: 0 10px 26px rgba(99, 102, 241, 0.1), 0 4px 14px rgba(15, 23, 42, 0.05);
}

/* Secondaire destructif (annulation commande, suppression compte) — même famille que btn-accent / rose */
.btn-ghost--danger{
  border-color: rgba(225, 29, 72, 0.32);
  color: #9f1239;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 241, 242, 0.78));
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.06);
}
.btn-ghost--danger:hover{
  border-color: rgba(219, 39, 119, 0.42);
  background: linear-gradient(135deg, rgba(255, 250, 250, 0.98), rgba(254, 205, 211, 0.42));
  color: #881337;
  box-shadow: 0 10px 26px rgba(219, 39, 119, 0.12), 0 4px 14px rgba(15, 23, 42, 0.05);
}

.btn--compact{
  padding: 8px 12px;
  font-size: 13px;
}

/* Layout */
.main{
  padding: 22px 0 36px;
  min-height: calc(100vh - 70px);
}

/* Hero */
.hero{ padding: 46px 0 22px; }
.hero-grid{
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: center;
}
@media (max-width: 900px){
  .hero-grid{ grid-template-columns: 1fr; }
}
.h-title{
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  margin: 0 0 12px;
  letter-spacing: -0.6px;
}
.h-sub{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}
.h-actions{ display:flex; gap: 10px; flex-wrap: wrap; }

/* Cards / grid */
.card{
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(226,232,240,0.95);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(2,6,23,0.05);
}
.card-pad{ padding: 18px; }

.grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 1100px){ .grid{ grid-template-columns: repeat(3, 1fr);} }
@media (max-width: 780px){ .grid{ grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 520px){ .grid{ grid-template-columns: 1fr;} }

.shop-card, .product-card{
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.shop-card:hover, .product-card:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow2);
  border-color: rgba(30, 64, 175, 0.18);
}

/* ✅ image des cartes (remplace l'ancien .thumb pour les cards) */
.card-thumb{
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display:block;
  background: #f1f5f9;
}

.meta{ padding: 14px; display:flex; flex-direction:column; gap: 8px; }
.title{
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.2px;
}
.mini{
  display:flex; gap: 8px; flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.badge{
  display:inline-flex; align-items:center; gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(226,232,240,0.95);
  background: rgba(255,255,255,0.7);
}
.badge-accent{ border-color: rgba(30, 64, 175, 0.28); background: rgba(30, 64, 175, 0.06); }
.badge-primary{ border-color: rgba(30, 64, 175, 0.32); }
.badge-success{ border-color: rgba(22,163,74,0.30); }

.price{
  font-weight: 900;
  font-size: 16px;
}
.row{
  display:flex; align-items:center; justify-content:space-between; gap: 10px;
}

/* Forms */
.form-card{
  max-width: 460px;
  margin: 28px auto;
  padding: 22px;
}
.input{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(226,232,240,0.95);
  background: rgba(255,255,255,0.9);
  outline: none;
}
.input:focus{
  border-color: rgba(30, 64, 175,0.45);
  box-shadow: 0 0 0 4px rgba(30, 64, 175,0.12);
}
.input:disabled{
  cursor: not-allowed;
  opacity: 0.85;
  background: rgba(241,245,249,0.95);
  color: var(--muted);
}
.label{ font-weight: 800; font-size: 13px; margin: 10px 0 6px; display:block; }

/* Better inputs for select / file */
select.input{
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(2,6,23,0.6) 50%),
    linear-gradient(135deg, rgba(2,6,23,0.6) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}
input[type="file"].input{ padding: 10px; }

.alert{
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(226,232,240,0.95);
  background: rgba(255,255,255,0.8);
  margin: 12px 0;
}
.alert-success{ border-color: rgba(22,163,74,0.35); }
.alert-danger{ border-color: rgba(220,38,38,0.30); }
.alert-info{ border-color: rgba(59,130,246,0.35); }
.alert-warning{ border-color: rgba(180, 83, 9, 0.35); background: rgba(255, 251, 235, 0.75); }

/* Lien d'évitement (accessibilité clavier) */
.skip-link{
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10000;
}
.skip-link:focus{
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(226,232,240,0.95);
  box-shadow: 0 4px 14px rgba(2,6,23,0.12);
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
}

/* ---------- Product Page (style B) ---------- */
.product-wrap{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 900px){
  .product-wrap{ grid-template-columns: 1fr; }
}

.sticky-media{
  position: sticky;
  top: 92px;
}

.media-box{
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(226,232,240,0.95);
  background: rgba(255,255,255,0.85);
  box-shadow: 0 10px 30px rgba(2,6,23,0.05);
}
.media-main{
  width: 100%;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.9);
}
@media (max-width: 900px){
  .media-main{ height: 420px; }
}
.media-main img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumb-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  border-top: 1px solid rgba(226,232,240,0.95);
  background: rgba(255,255,255,0.7);
}

/* ✅ miniatures produit */
.thumb{
  width: 78px;
  height: 78px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  background: #f1f5f9;
}
.thumb:hover{
  border-color: rgba(30, 64, 175,0.35);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(2,6,23,0.10);
}
.thumb.is-active{
  border-color: rgba(30, 64, 175,0.55);
  box-shadow: 0 0 0 4px rgba(30, 64, 175,0.14);
}

.chip-row{ display:flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--btn-ghost-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 252, 0.72));
  cursor: pointer;
  font-weight: 900;
  color: var(--text);
  transition: transform .18s ease, box-shadow .22s ease, border-color .2s ease, background .2s ease;
}
.chip:hover{
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 10px 24px var(--btn-primary-glow), 0 6px 16px rgba(15, 23, 42, 0.05);
}
.chip.is-selected{
  border-color: rgba(37, 99, 235, 0.45);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(8, 145, 178, 0.12));
  color: #0c4a6e;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.15);
}
.chip:focus-visible{
  outline: 2px solid var(--btn-primary-2);
  outline-offset: 2px;
}
.chip--compact{
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

.color-row{ display:flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.color-row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:10px;
}

.color-dot{
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 2px solid rgba(226,232,240,0.95);
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(2,6,23,0.10);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease, filter .15s ease;
  overflow: hidden;
}

.color-dot:hover{
  transform: translateY(-1px);
}

.color-dot.is-selected{
  box-shadow:
    0 0 0 4px rgba(255,255,255,0.95),
    0 0 0 7px rgba(37, 99, 235, 0.35),
    0 6px 18px rgba(8, 145, 178, 0.2);
}

/* ✅ couleur indisponible */
.color-dot.is-disabled{
  opacity: 0.38 !important;
  filter: grayscale(100%) brightness(0.9);
  cursor: not-allowed !important;
  box-shadow: none !important;
  border: 2px solid rgba(220,38,38,0.55) !important;
}

/* ✅ barre rouge inclinée */
.color-dot.is-disabled::after{
  content: "";
  position: absolute;
  width: 64px;
  height: 4px;
  background: #dc2626;
  top: 18px;
  left: -11px;
  transform: rotate(-45deg);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.75);
  z-index: 3;
}

/* empêcher l'effet hover sur couleur indisponible */
.color-dot.is-disabled:hover{
  transform: none;
}

.btn-wa{
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 16px 16px;
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
  color: #062812;
  background: linear-gradient(135deg, #22c55e, #a7f3d0);
  box-shadow: 0 14px 30px rgba(34,197,94,0.25);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-wa:hover{ transform: translateY(-1px); box-shadow: 0 18px 40px rgba(34,197,94,0.28); }
.btn-wa:active{ transform: translateY(0); filter: brightness(.98); }

.small-muted{ color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ---------- Dashboard (style B) ---------- */
.dash-hero{
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(226,232,240,0.95);
  background:
    radial-gradient(900px 400px at 20% 0%, rgba(30, 64, 175,0.22), transparent 55%),
    radial-gradient(900px 400px at 110% -10%, rgba(30, 64, 175,0.18), transparent 55%),
    rgba(255,255,255,0.78);
  box-shadow: 0 14px 40px rgba(2,6,23,0.08);
}

.kpi-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 900px){
  .kpi-grid{ grid-template-columns: 1fr; }
}
.kpi{
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(226,232,240,0.95);
  background: rgba(255,255,255,0.7);
}
.kpi .label{ margin:0; font-size: 12px; color: var(--muted); font-weight: 900; letter-spacing: .3px; text-transform: uppercase; }
.kpi .value{ margin-top: 8px; font-size: 26px; font-weight: 900; letter-spacing: -0.3px; }

.progress{
  height: 10px;
  border-radius: 999px;
  background: rgba(226,232,240,0.8);
  overflow: hidden;
  border: 1px solid rgba(226,232,240,0.95);
  margin-top: 8px;
}
.progress > span{
  display:block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width .6s ease;
}

.dash-grid{
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 1000px){
  .dash-grid{ grid-template-columns: 1fr; }
}

.inv-row{
  display:grid;
  grid-template-columns: 64px 1fr 120px 220px;
  gap: 12px;
  align-items:center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(226,232,240,0.95);
  background: rgba(255,255,255,0.78);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.inv-row:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(2,6,23,0.10);
  border-color: rgba(30, 64, 175,0.22);
}
.inv-thumb{
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(226,232,240,0.95);
  background: #f1f5f9;
}

.action-row{ display:flex; gap: 10px; justify-content:flex-end; flex-wrap:wrap; }
.btn-mini{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--btn-ghost-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.75));
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
  transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease, filter .15s ease;
}
a.btn-mini:hover,
button.btn-mini:hover{
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.btn-mini.primary{
  border-color: rgba(8, 145, 178, 0.38);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(8, 145, 178, 0.1));
  color: #0e7490;
}
.btn-mini.primary:hover{
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 10px 24px var(--btn-primary-glow);
}
.btn-mini.danger{
  border-color: rgba(244, 63, 94, 0.38);
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.14), rgba(225, 29, 72, 0.1));
  color: #be123c;
}
.btn-mini.danger:hover{
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.15);
}
.btn-mini.success{
  border-color: rgba(34, 197, 94, 0.38);
  background: linear-gradient(135deg, rgba(187, 247, 208, 0.45), rgba(134, 239, 172, 0.25));
  color: #14532d;
}
.btn-mini.success:hover{
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.2);
}

.review{
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(226,232,240,0.95);
  background: rgba(255,255,255,0.78);
  margin-bottom: 10px;
}
.review .who{ font-weight: 900; }
.review .txt{ margin: 8px 0 0; color: var(--text); line-height: 1.7; }
.review .reply{
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(30, 64, 175,0.06);
  border: 1px solid rgba(30, 64, 175,0.16);
}

/* ---------- Product Form ---------- */
.form-shell{
  max-width: 980px;
  margin: 0 auto;
}
.form-title{
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.4px;
}
.form-sub{
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.form-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 900px){
  .form-grid{ grid-template-columns: 1fr; }
}

.field{
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(226,232,240,0.95);
  background: rgba(255,255,255,0.75);
}
.field .help{
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.gallery-grid{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.g-item{
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(226,232,240,0.95);
  background: #f1f5f9;
}
.g-item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.g-del{
  position:absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(220,38,38,0.92);
  color: white;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,0.55);
}
.form-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.form-actions .grow{ flex: 1; }

/* Case à cocher + libellé long (ne pas utiliser .row : space-between écrase le texte sur mobile) */
.ap-checkbox-label {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  cursor: pointer;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.ap-checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  width: auto;
  margin-top: 3px;
  accent-color: var(--btn-primary-2);
}
.ap-checkbox-label > span {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.ap-checkbox-help {
  margin-top: 8px;
  margin-left: 28px;
}
@media (max-width: 980px) {
  .ap-checkbox-help {
    margin-left: 0;
  }
}

/* ---------- Auth pages ---------- */
.auth-wrap{
  max-width: 520px;
  margin: 24px auto;
}
.auth-card{
  padding: 22px;
}
.auth-title{
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.3px;
}
.auth-sub{
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}
.input-group{
  margin-top: 12px;
}
.form-errors{
  margin-top: 12px;
}
.form-errors ul{
  margin: 8px 0 0;
  padding-left: 18px;
}
.auth-footer{
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}
.auth-footer a{
  color: var(--primary);
  font-weight: 900;
}

/* ---------- Profile ---------- */
.profile-hero{
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(226,232,240,0.95);
  background:
    radial-gradient(900px 400px at 10% 0%, rgba(30, 64, 175,0.20), transparent 55%),
    radial-gradient(900px 400px at 110% -10%, rgba(30, 64, 175,0.16), transparent 55%),
    rgba(255,255,255,0.78);
  box-shadow: 0 14px 40px rgba(2,6,23,0.08);
  text-align: center;
}
.avatar{
  width: 92px;
  height: 92px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  font-size: 34px;
  margin: 0 auto 12px;
  color: #0b1220;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(226,232,240,0.95);
  box-shadow: 0 12px 30px rgba(2,6,23,0.10);
}
.profile-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 900px){
  .profile-grid{ grid-template-columns: 1fr; }
}
.kv{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(226,232,240,0.75);
}
.kv:first-child{ border-top: none; }
.kv .k{ color: var(--muted); font-weight: 900; font-size: 13px; }
.kv .v{ font-weight: 900; }
.link-row{
  display:flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

/* ---------- Favorites ---------- */
.fav-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 14px;
}
.fav-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.fav-card{
  position: relative;
  overflow: hidden;
}
.fav-top{
  height: 86px;
  background:
    radial-gradient(500px 200px at 10% 20%, rgba(30, 64, 175,0.25), transparent 60%),
    radial-gradient(500px 200px at 110% -20%, rgba(30, 64, 175,0.20), transparent 60%),
    rgba(30, 64, 175,0.08);
  border-bottom: 1px solid rgba(226,232,240,0.85);
}
.fav-body{
  padding: 14px;
  text-align: center;
  margin-top: -46px;
}
.fav-logo{
  width: 82px;
  height: 82px;
  border-radius: 999px;
  object-fit: cover;
  border: 5px solid rgba(255,255,255,0.92);
  box-shadow: 0 12px 28px rgba(2,6,23,0.12);
  background: #f1f5f9;
}
.fav-logo-fallback{
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  font-size: 32px;
  color:#94a3b8;
  border: 5px solid rgba(255,255,255,0.92);
  box-shadow: 0 12px 28px rgba(2,6,23,0.12);
  background: rgba(255,255,255,0.92);
}
.fav-actions{
  display:flex;
  gap: 10px;
  margin-top: 12px;
}
.fav-actions .grow{ flex: 1; }

.btn-icon{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid rgba(244, 63, 94, 0.32);
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.65), rgba(251, 113, 133, 0.12));
  font-size: 16px;
  color: #be123c;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .22s ease, border-color .2s ease;
}
.btn-icon:hover{
  transform: translateY(-1px);
  border-color: rgba(219, 39, 119, 0.38);
  box-shadow: 0 12px 28px rgba(225, 29, 72, 0.18), 0 6px 16px rgba(15, 23, 42, 0.06);
}
.btn-icon:focus-visible{
  outline: 2px solid var(--btn-accent-2);
  outline-offset: 2px;
}
.btn-icon:active{
  transform: translateY(0);
}

/* ---------- Vendor settings ---------- */
.settings-wrap{
  max-width: 720px;
  margin: 24px auto;
}
.settings-head{
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.logo-preview{
  display:flex;
  gap: 12px;
  align-items:center;
  margin-top: 10px;
}
.logo-preview img{
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(226,232,240,0.95);
  background: #f1f5f9;
}

/* ---------- Navbar responsive (desktop = liens en haut) ---------- */
.nav-toggle{ display:none; }
.nav-burger{
  display:none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--btn-ghost-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.8));
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform .18s ease, box-shadow .22s ease, border-color .2s ease;
}
.nav-burger:hover{
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 12px 28px var(--btn-primary-glow);
}
.nav-burger span{
  display:block;
  width: 18px;
  height: 2px;
  background: rgba(2,6,23,0.75);
  border-radius: 999px;
  margin: 3px 0;
}

/* Barre d’onglets mobile (masquée sur grand écran) */
.mobile-tabbar{ display: none; }
.mobile-top-more{ display: none; }

@media (min-width: 981px){
  .mobile-tabbar,
  .mobile-top-more{
    display: none !important;
  }
  .nav-links{
    display: flex !important;
  }
}

@media (max-width: 980px){
  /* Menu hamburger + liens du haut désactivés : navigation = barre du bas */
  .nav-toggle,
  .nav-burger,
  .navbar .nav-links{
    display: none !important;
  }

  .mobile-tabbar{
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    align-items: flex-end;
    justify-content: space-around;
    padding: 4px 2px calc(6px + env(safe-area-inset-bottom, 0px));
    margin: 0;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.07);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    gap: 2px;
  }

  .mobile-tabbar__item{
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    min-width: 0;
    padding: 6px 2px 4px;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    -webkit-tap-highlight-color: transparent;
    transition: color .15s ease, background .15s ease;
  }

  .mobile-tabbar__item:active{
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(8, 145, 178, 0.06));
  }

  .mobile-tabbar__item.is-active{
    color: var(--btn-primary-2);
  }

  .mobile-tabbar__icon-wrap{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 28px;
  }

  .mobile-tabbar__svg{
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }

  .mobile-tabbar__badge{
    position: absolute;
    top: -4px;
    right: 50%;
    transform: translateX(14px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    color: #fff;
    background: #dc2626;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  }

  .mobile-tabbar__label{
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Onglet central mis en avant (Vendre / Ajouter) */
  .mobile-tabbar__item--accent .mobile-tabbar__icon-wrap{
    height: 40px;
    margin-bottom: 2px;
  }
  .mobile-tabbar__item--accent .mobile-tabbar__svg{
    width: 22px;
    height: 22px;
    padding: 9px;
    box-sizing: content-box;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--btn-primary-1) 0%, var(--btn-primary-2) 45%, var(--btn-primary-3) 100%);
    color: #fff;
    box-shadow: 0 6px 20px var(--btn-primary-glow);
  }
  .mobile-tabbar__item--accent.is-active .mobile-tabbar__label{
    color: var(--btn-accent-2);
  }

  /* 6 onglets (vendeur) : libellés un peu plus compacts */
  .mobile-tabbar--dense .mobile-tabbar__label{
    font-size: 9px;
    letter-spacing: -0.02em;
  }
  .mobile-tabbar--dense .mobile-tabbar__item{
    padding-left: 1px;
    padding-right: 1px;
  }
  .mobile-tabbar--dense .mobile-tabbar__svg{
    width: 22px;
    height: 22px;
  }

  /* Espace sous le contenu pour ne pas masquer le dernier bloc */
  body{
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  /* Grille catalogue : minmax(280px) casse le viewport < ~600px (surtout visible en RTL / Safari) */
  .grid-container{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-width: 100%;
  }

  /* Menu ⋯ en-tête (déconnexion, etc.) */
  .mobile-top-more{
    display: block;
    position: relative;
    margin-inline-start: auto;
    flex-shrink: 0;
  }
  .mobile-top-more__btn{
    list-style: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--btn-ghost-border);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.88));
    cursor: pointer;
    color: var(--muted);
    transition: transform .18s ease, box-shadow .22s ease, border-color .2s ease, color .15s ease;
  }
  .mobile-top-more__btn::-webkit-details-marker{ display: none; }
  .mobile-top-more__btn:hover{
    border-color: rgba(37, 99, 235, 0.2);
    color: var(--text);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  }
  .mobile-top-more[open] .mobile-top-more__btn{
    color: var(--btn-primary-2);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 10px 26px var(--btn-primary-glow);
  }
  .mobile-top-more__panel{
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    min-width: min(240px, 85vw);
    padding: 8px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow2);
    z-index: 85;
  }
  .mobile-top-more__link{
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
  }
  .mobile-top-more__link:hover,
  .mobile-top-more__link:active{
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(8, 145, 178, 0.06));
  }
  .mobile-top-more__link--muted{
    color: var(--muted);
    margin-top: 4px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
  }

  /* RTL (arabe) : chrome mobile — fixed au lieu de sticky (Safari + débordement) */
  html[dir="rtl"]{
    --soukin-mobile-navbar-h: calc(56px + env(safe-area-inset-top, 0px));
  }
  html[dir="rtl"] .navbar{
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    z-index: 100;
    box-sizing: border-box;
  }
  html[dir="rtl"] body{
    padding-top: var(--soukin-mobile-navbar-h);
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    touch-action: pan-y;
  }
  html[dir="rtl"] .hero-elegant,
  html[dir="rtl"] .hero-elegant-left{
    max-width: 100%;
    overflow-x: hidden;
  }
  html[dir="rtl"] .main{
    max-width: 100%;
    overflow-x: hidden;
  }
  html[dir="rtl"] .container{
    max-width: 100%;
  }
  html[dir="rtl"] .mobile-tabbar{
    display: flex !important;
    position: fixed;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    z-index: 120;
    flex-direction: row-reverse;
  }
}

/* ---------- Alert close button ---------- */
.alert-x{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--btn-ghost-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.82));
  color: var(--muted);
  cursor:pointer;
  font-size: 18px;
  line-height: 0;
  font-weight: 900;
  transition: transform .15s ease, border-color .2s ease, background .2s ease, color .15s ease, box-shadow .2s ease;
}
.alert-x:hover{
  color: var(--text);
  border-color: rgba(37, 99, 235, 0.22);
  background: var(--btn-ghost-hover-bg);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}
.alert-x:focus-visible{
  outline: 2px solid var(--btn-primary-2);
  outline-offset: 2px;
}

/* Footer */
.footer{
  margin-top: 40px;
  padding: 22px 0;
  color: var(--muted);
  border-top: 1px solid rgba(226,232,240,0.95);
}
.footer-row{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  flex-wrap:wrap;
}
.footer-sub{
  font-size: 13px;
  margin-top: 6px;
  color: var(--muted);
}
.footer-right{
  font-size: 13px;
  color: var(--muted);
}

.badge-accent {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}


/* =========================================================
   HERO PREMIUM (à ajouter, sans modifier l'existant)
   Utilisé par: <section class="hero-premium"> ... </section>
========================================================= */

.hero-premium{
  padding: 54px 0 18px;
  border-bottom: 1px solid rgba(226,232,240,0.85);
  background:
    radial-gradient(1100px 520px at 18% -10%, rgba(30, 64, 175,0.18), transparent 60%),
    radial-gradient(950px 460px at 90% 0%, rgba(30, 64, 175,0.16), transparent 55%);
}

.hero-grid-premium{
  display:grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 22px;
  align-items: start;
}

@media (max-width: 900px){
  .hero-grid-premium{ grid-template-columns: 1fr; }
}

.hero-left{ padding-right: 6px; }

.hero-title{
  margin:0;
  font-weight: 950;
  letter-spacing: -0.7px;
  font-size: clamp(32px, 3.2vw, 52px);
  line-height: 1.06;
}

.hero-sub{
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15.5px;
  max-width: 60ch;
}

/* Search bar glass */
.hero-search{
  margin-top: 18px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px;
  border-radius: calc(var(--radius) + 6px);
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(226,232,240,0.95);
  box-shadow: 0 14px 45px rgba(2, 6, 23, 0.06);
  backdrop-filter: blur(10px);
}

.hero-search input{
  flex: 1;
  min-width: 240px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 12px;
  font-size: 14.5px;
  color: var(--text);
}

.hero-search input::placeholder{
  color: rgba(71,85,105,0.75);
}

.hero-search button{
  border: 0;
  cursor: pointer;
  padding: 11px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--btn-primary-1) 0%, var(--btn-primary-2) 45%, var(--btn-primary-3) 100%);
  color: white;
  font-weight: 900;
  box-shadow: 0 12px 32px var(--btn-primary-glow);
  transition: transform .18s ease, box-shadow .22s ease, filter .15s ease;
}

.hero-search button:hover{
  transform: translateY(-1px);
  box-shadow:
    0 16px 40px rgba(8, 145, 178, 0.22),
    0 10px 28px rgba(37, 99, 235, 0.2);
}

.hero-reset{
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid rgba(226,232,240,0.95);
  background: rgba(255,255,255,0.65);
  font-weight: 900;
  color: var(--text);
}

.hero-reset:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(2,6,23,0.08);
}

.hero-hint{
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.hero-actions{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Tags */
.hero-tags{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-tags .tag{
  font-size: 13px;
  font-weight: 900;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(226,232,240,0.95);
  box-shadow: 0 10px 24px rgba(2,6,23,0.06);
}

/* Right card premium */
.hero-card{
  border-radius: calc(var(--radius) + 6px);
  padding: 18px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(226,232,240,0.95);
  box-shadow: 0 22px 70px rgba(2,6,23,0.08);
  backdrop-filter: blur(10px);
}

.hero-badges{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-card-title{
  margin: 12px 0 6px;
  font-weight: 950;
  letter-spacing: -0.2px;
}

.hero-card-sub{
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.hero-mini{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}


/* =========================================================
   HERO ULTRA ÉLÉGANT (home)
   (à ajouter en bas de theme.css, sans modifier le reste)
========================================================= */

.hero-elegant{
  padding: 56px 0 22px;
}

.hero-elegant-grid{
  display:grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: start;
}

@media (max-width: 980px){
  .hero-elegant-grid{ grid-template-columns: 1fr; }
}

.hero-kicker{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .35px;
  text-transform: uppercase;
  color: rgba(71,85,105,0.9);
}

.hero-kicker .dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: 0 10px 22px rgba(30, 64, 175,0.28);
}

.hero-elegant-title{
  margin: 14px 0 0;
  font-weight: 950;
  letter-spacing: -0.8px;
  font-size: clamp(34px, 3.6vw, 56px);
  line-height: 1.05;
}

.hero-elegant-title .grad{
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-elegant-sub{
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  max-width: 62ch;
}

.hero-elegant-search{
  margin-top: 18px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px;
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid rgba(226,232,240,0.95);
  background: rgba(255,255,255,0.78);
  box-shadow: 0 18px 60px rgba(2,6,23,0.06);
  backdrop-filter: blur(10px);
}

.hero-search-input{
  flex: 1;
  min-width: 240px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 12px;
  font-size: 14.5px;
  color: var(--text);
}

.hero-search-input::placeholder{
  color: rgba(71,85,105,0.72);
}

.hero-search-btn{
  border: 0;
  cursor: pointer;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 950;
  color: #fff;
  background: linear-gradient(135deg, var(--btn-primary-1) 0%, var(--btn-primary-2) 45%, var(--btn-primary-3) 100%);
  box-shadow: 0 14px 36px var(--btn-primary-glow);
  transition: transform .18s ease, box-shadow .22s ease, filter .15s ease;
}

.hero-search-btn:hover{
  transform: translateY(-1px);
  box-shadow:
    0 18px 44px rgba(8, 145, 178, 0.22),
    0 10px 28px rgba(37, 99, 235, 0.22);
}

.hero-search-reset{
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--btn-ghost-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.75));
  font-weight: 950;
  color: var(--muted);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .22s ease, border-color .2s ease, color .15s ease;
}

.hero-search-reset:hover{
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(37, 99, 235, 0.22);
  background: var(--btn-ghost-hover-bg);
  box-shadow: 0 10px 26px rgba(99, 102, 241, 0.08), 0 6px 16px rgba(15, 23, 42, 0.05);
}

.hero-elegant-hint{
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.hero-elegant-actions{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-elegant-chips{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-elegant-chips .chip{
  padding: 10px 12px;
  font-weight: 950;
  font-size: 13px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

/* Right side glass card */
.hero-glass-card{
  padding: 18px;
  border-radius: calc(var(--radius) + 10px);
  border: 1px solid rgba(226,232,240,0.95);
  background:
    radial-gradient(700px 260px at 20% 0%, rgba(30, 64, 175,0.18), transparent 60%),
    radial-gradient(700px 260px at 110% -10%, rgba(30, 64, 175,0.16), transparent 60%),
    rgba(255,255,255,0.82);
  box-shadow: 0 28px 80px rgba(2,6,23,0.10);
  backdrop-filter: blur(10px);
}

.hero-card-top{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-card-title{
  margin: 12px 0 6px;
  font-weight: 950;
  letter-spacing: -0.2px;
}

.hero-card-sub{
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-card-points{
  margin-top: 14px;
  display:grid;
  gap: 10px;
}

.hero-card-points .p{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(226,232,240,0.90);
  background: rgba(255,255,255,0.65);
}

.hero-card-points .i{
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 950;
  background: rgba(30, 64, 175,0.10);
  border: 1px solid rgba(30, 64, 175,0.16);
}

.hero-card-points .t{
  font-weight: 950;
}

.hero-card-points .s{
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.hero-card-cta{
  margin-top: 14px;
}


/* =========================================================
   PREMIUM UPGRADE (Apple-like cards + micro-animations)
   Colle à la fin de theme.css
========================================================= */

/* Motion / easing */
:root{
  --ease: cubic-bezier(.2,.9,.2,1);
  --glass: rgba(255,255,255,0.72);
  --glass2: rgba(255,255,255,0.55);
  --ring: 0 0 0 6px rgba(30, 64, 175,0.10);
}

/* Smooth overall */
html { scroll-behavior: smooth; }
* { -webkit-tap-highlight-color: transparent; }

/* ---------- HERO ELEGANT ---------- */
.hero-elegant{
  padding: 46px 0 24px;
}
.hero-elegant-grid{
  display:grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: stretch;
}
@media (max-width: 980px){
  .hero-elegant-grid{ grid-template-columns: 1fr; }
}

.hero-elegant-left{
  padding: 18px 8px 18px 0;
}
.hero-kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(226,232,240,0.95);
  background: rgba(255,255,255,0.55);
  font-weight: 900;
  font-size: 12px;
  color: var(--muted);
}
.hero-kicker .dot{
  width: 10px; height: 10px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: 0 10px 22px rgba(30, 64, 175,0.25);
}

.hero-elegant-title{
  margin: 14px 0 10px;
  font-weight: 1000;
  letter-spacing: -0.9px;
  line-height: 1.06;
  font-size: clamp(34px, 4.2vw, 54px);
}
.hero-elegant-title .grad{
  background: linear-gradient(135deg, var(--primary), #3b82f6, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-elegant-sub{
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  max-width: 64ch;
}

/* Search pill */
.hero-elegant-search{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(226,232,240,0.95);
  background: rgba(255,255,255,0.62);
  box-shadow: 0 12px 28px rgba(2,6,23,0.06);
  margin-top: 14px;
}
.hero-search-input{
  flex: 1;
  min-width: 220px;
  border: 0;
  outline: none;
  background: transparent;
  padding: 12px 12px;
  font-weight: 800;
  color: var(--text);
}
.hero-search-input::placeholder{ color: rgba(71,85,105,0.85); }

.hero-search-btn{
  border: 0;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, var(--btn-primary-1) 0%, var(--btn-primary-2) 45%, var(--btn-primary-3) 100%);
  color: #fff;
  box-shadow: 0 12px 30px var(--btn-primary-glow);
  transition: transform .18s var(--ease), box-shadow .22s var(--ease), filter .15s ease;
}
.hero-search-btn:hover{
  transform: translateY(-1px);
  box-shadow:
    0 16px 38px rgba(8, 145, 178, 0.2),
    0 8px 24px rgba(37, 99, 235, 0.2);
}

.hero-search-reset{
  padding: 12px 12px;
  border-radius: 999px;
  border: 1px solid var(--btn-ghost-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.75));
  font-weight: 900;
  color: var(--muted);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .22s ease, border-color .2s ease, color .15s ease;
}
.hero-search-reset:hover{
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(37, 99, 235, 0.22);
  background: var(--btn-ghost-hover-bg);
  box-shadow: 0 10px 26px rgba(99, 102, 241, 0.08), 0 6px 16px rgba(15, 23, 42, 0.05);
}

.hero-elegant-hint{
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.hero-elegant-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 14px;
}

/* Right glass card */
.hero-elegant-right{
  display:flex;
  align-items:stretch;
}
.hero-glass-card{
  width: 100%;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(226,232,240,0.95);
  background:
    radial-gradient(900px 420px at 10% 0%, rgba(30, 64, 175,0.20), transparent 55%),
    radial-gradient(900px 420px at 110% -10%, rgba(30, 64, 175,0.16), transparent 55%),
    rgba(255,255,255,0.72);
  box-shadow: 0 16px 50px rgba(2,6,23,0.10);
}

.hero-card-top{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-start;
}

.hero-card-title{
  margin: 12px 0 6px;
  font-weight: 1000;
  letter-spacing: -0.4px;
}
.hero-card-sub{
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.hero-card-points{
  margin-top: 14px;
  display:grid;
  gap: 10px;
}
.hero-card-points .p{
  display:grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(226,232,240,0.90);
  background: rgba(255,255,255,0.62);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.hero-card-points .p:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(2,6,23,0.08);
}
.hero-card-points .i{
  width: 44px; height: 44px;
  border-radius: 16px;
  display:flex; align-items:center; justify-content:center;
  font-size: 18px;
  border: 1px solid rgba(226,232,240,0.95);
  background: rgba(255,255,255,0.75);
}
.hero-card-points .t{ font-weight: 1000; }
.hero-card-points .s{ color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.5; }

.hero-card-cta{
  margin-top: 12px;
}

/* ---------- Apple-style cards (shops/products) ---------- */
.shop-card, .product-card{
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(226,232,240,0.95);
  transform: translateZ(0);
}

.shop-card::before, .product-card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(700px 240px at 20% 0%, rgba(30, 64, 175,0.12), transparent 60%),
    radial-gradient(700px 240px at 110% -10%, rgba(30, 64, 175,0.10), transparent 55%);
  opacity: 0;
  transition: opacity .25s var(--ease);
  pointer-events:none;
}
.shop-card:hover::before, .product-card:hover::before{ opacity: 1; }

.shop-card:hover, .product-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 60px rgba(2,6,23,0.14);
  border-color: rgba(30, 64, 175,0.24);
}

/* use card-thumb everywhere */
.shop-card .thumb,
.product-card .thumb{
  /* au cas où il reste des .thumb dans tes templates */
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display:block;
  background: #f1f5f9;
}

/* nicer meta spacing */
.meta{
  padding: 14px 14px 16px;
}

/* ---------- Section title nicer ---------- */
.section-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 14px;
}
.section-head h2, .section-head h3{
  margin:0;
  font-weight: 1000;
  letter-spacing:-0.3px;
}

/* ---------- Fade-in animation ---------- */
@media (prefers-reduced-motion: no-preference){
  .fade-up{
    opacity: 0;
    transform: translateY(10px);
    animation: fadeUp .55s var(--ease) forwards;
  }
  .fade-up.d2{ animation-delay: .08s; }
  .fade-up.d3{ animation-delay: .16s; }
  .fade-up.d4{ animation-delay: .24s; }
  @keyframes fadeUp{
    to { opacity: 1; transform: translateY(0); }
  }
}

.color-dot{
  position: relative;
  overflow: hidden;
}

.color-dot.is-disabled{
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.25);
  border: 2px solid rgba(220,38,38,0.35);
  box-shadow: none;
}

.color-dot.is-disabled::after{
  content: "";
  position: absolute;
  width: 70px;
  height: 3px;
  background: #dc2626;
  top: 18px;
  left: -12px;
  transform: rotate(-45deg);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.65);
}


.color-dot{
  position: relative;
  overflow: hidden;
}

.color-dot.is-disabled{
  opacity: 0.35 !important;
  filter: grayscale(100%) brightness(0.85) !important;
  border: 2px solid rgba(220,38,38,0.6) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

.color-dot.is-disabled::after{
  content: "";
  position: absolute;
  width: 68px;
  height: 4px;
  background: #dc2626;
  top: 18px;
  left: -12px;
  transform: rotate(-45deg);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.75);
  z-index: 5;
}

.color-dot.is-disabled:hover{
  transform: none !important;
}

.chip{
  position: relative;
  overflow: hidden;
}

.chip-disabled{
  opacity: 0.4;
  cursor: not-allowed !important;
  border: 2px solid rgba(220,38,38,0.55) !important;
  background: rgba(226,232,240,0.45) !important;
  color: #64748b !important;
}

/* barre rouge */
.chip-disabled::after{
  content: "";
  position: absolute;
  width: 70px;
  height: 3px;
  background: #dc2626;
  top: 14px;
  left: -12px;
  transform: rotate(-45deg);
  border-radius: 999px;
}

.chip--compact.chip-disabled::after{
  width: 52px;
  top: 11px;
  left: -8px;
}

html[dir="rtl"] body {
  direction: rtl;
}

html[dir="rtl"] .hero-elegant-left,
html[dir="rtl"] .meta,
html[dir="rtl"] .small-muted,
html[dir="rtl"] .card,
html[dir="rtl"] .auth-card,
html[dir="rtl"] .form-shell {
  text-align: right;
}

html[dir="rtl"] .row {
  flex-direction: row-reverse;
}

html[dir="rtl"] .nav-inner,
html[dir="rtl"] .nav-links,
html[dir="rtl"] .hero-elegant-actions,
html[dir="rtl"] .chip-row,
html[dir="rtl"] .color-row,
html[dir="rtl"] .action-row {
  direction: rtl;
}


/* Optimisation Mobile Soukin (aligné sur la tabbar : max-width 980px) */
@media (max-width: 980px) {
  /* iOS : évite le zoom automatique sur focus si police < 16px */
  input, select, textarea, .input {
    font-size: max(16px, 1rem) !important;
  }

  /* Lignes type panier / commandes : pile verticale (inline grid-template-columns surchargé) */
  .inv-row{
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    align-items: stretch !important;
    padding: 14px !important;
  }
  .inv-row > .inv-thumb,
  .inv-row > img.inv-thumb{
    width: 100% !important;
    max-width: 140px !important;
    height: 140px !important;
    margin: 0 auto !important;
    justify-self: center;
  }
  /* Contrôles quantité / actions : centrés, retour à la ligne si besoin */
  .inv-row > div{
    justify-self: stretch;
  }

  /* Barres de recherche hero : champs pleine largeur */
  .hero-elegant-search,
  .hero-search,
  .hero-premium .hero-search{
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .hero-search-input,
  .hero-search input{
    min-width: 0 !important;
    width: 100% !important;
  }
  .hero-search-btn,
  .hero-search button{
    width: 100% !important;
  }

  .footer-row{
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    gap: 8px !important;
  }

  /* Fiche produit : image moins haute */
  .media-main{
    height: min(420px, 55vh) !important;
  }

  /* Grille de produits : 2 colonnes sur mobile */
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  /* Cartes boutiques : format horizontal compact */
  .shop-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 10px !important;
    gap: 12px !important;
  }

  .shop-card .card-thumb {
    width: 70px !important;
    height: 70px !important;
    min-width: 70px !important;
    border-radius: 10px !important;
    margin-bottom: 0 !important;
  }

  .shop-card .meta {
    padding: 0 !important;
    flex: 1;
  }

  .shop-card .title {
    font-size: 14px !important;
    margin-bottom: 2px !important;
  }

  /* Cacher la description sur mobile pour gagner de la place */
  .shop-card .meta div[style*="line-height: 1.6"] {
    display: none !important;
  }

  /* Cartes produits : plus petites */
  .product-card .card-thumb {
    height: 160px !important;
  }

  .product-card .title {
    font-size: 13px !important;
  }

  .product-card .price {
    font-size: 14px !important;
  }

  .soukin-filter-actions,
  .soukin-filter-actions--boutique {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .soukin-filter-select {
    min-width: 0 !important;
    width: 100% !important;
  }
}

/* ---------- Filtres marketplace (accueil + fiche boutique) ---------- */
.soukin-filter-shell {
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}
.soukin-filter-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 750;
  font-size: 0.9375rem;
  color: var(--text);
  user-select: none;
  transition: background 0.15s ease;
}
.soukin-filter-trigger::-webkit-details-marker {
  display: none;
}
.soukin-filter-trigger:hover {
  background: rgba(30, 64, 175, 0.04);
}
.soukin-filter-shell[open] .soukin-filter-trigger {
  border-bottom: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.9);
}
.soukin-filter-trigger__icon {
  display: flex;
  color: var(--primary);
  flex-shrink: 0;
}
.soukin-filter-trigger__label {
  flex: 1;
  min-width: 0;
  text-align: start;
}
.soukin-filter-trigger__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 800;
  background: rgba(30, 64, 175, 0.12);
  color: var(--primary);
  border: 1px solid rgba(30, 64, 175, 0.2);
}
.soukin-filter-trigger__chevron {
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
  margin-inline-start: 4px;
  transition: transform 0.2s ease;
}
.soukin-filter-shell[open] .soukin-filter-trigger__chevron {
  transform: rotate(180deg);
}
.soukin-filter-body {
  padding: 1.35rem 1.4rem 1.15rem;
}
.soukin-filter-body--boutique {
  padding-top: 1.15rem;
}
.soukin-filter-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.soukin-filter-panel__title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.soukin-filter-reset {
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--primary);
  text-decoration: none;
}
.soukin-filter-reset:hover {
  text-decoration: underline;
}
.soukin-filter-group {
  margin-bottom: 1.15rem;
}
.soukin-filter-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.55rem;
}
.soukin-filter-hint {
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--muted);
}
.soukin-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.soukin-filter-chips--readonly {
  margin-top: 4px;
}
.soukin-filter-chip-readonly {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(8, 145, 178, 0.08));
  color: var(--btn-primary-2);
  border: 1px solid rgba(37, 99, 235, 0.2);
}
.soukin-boutique-locations {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.soukin-filter-chip {
  position: relative;
  cursor: pointer;
}
.soukin-filter-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.soukin-filter-chip span {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--btn-ghost-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.85));
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.15s ease, box-shadow 0.2s ease;
}
.soukin-filter-chip:hover span {
  border-color: rgba(37, 99, 235, 0.22);
  background: linear-gradient(135deg, #fff, rgba(238, 242, 255, 0.75));
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
}
.soukin-filter-chip input:checked + span {
  border-color: rgba(37, 99, 235, 0.42);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(8, 145, 178, 0.1));
  color: #0c4a6e;
  font-weight: 750;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.12);
}
.soukin-filter-chip input:focus-visible + span {
  outline: 2px solid var(--btn-primary-2);
  outline-offset: 2px;
}
.soukin-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-top: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.soukin-filter-actions--boutique {
  align-items: flex-end;
}
.soukin-filter-select {
  min-width: 200px;
  flex: 1 1 180px;
}
.soukin-filter-select .input,
.soukin-filter-select select.input {
  width: 100%;
}

.soukin-active-filters-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.soukin-filter-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  background: rgba(30, 64, 175, 0.06);
  border: 1px solid rgba(30, 64, 175, 0.12);
  color: var(--muted);
}

/* =========================================================
   Pied de page & pages légales
========================================================= */
.site-footer {
  margin-top: 2.5rem;
  padding: 2.5rem 0 1.35rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(241, 245, 249, 0.92) 100%
  );
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--primary);
}

.site-footer a:focus-visible {
  outline: 2px solid var(--primary-soft);
  outline-offset: 2px;
  border-radius: 4px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: start;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: minmax(200px, 1.1fr) minmax(0, 2fr);
    gap: 2.5rem;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.footer-brand strong {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--text);
}

.footer-flag {
  font-size: 1.1rem;
  line-height: 1;
}

.footer-tagline {
  margin: 0.4rem 0 0;
  max-width: 34ch;
  line-height: 1.55;
  font-size: 0.8125rem;
}

.footer-nav-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text);
  margin: 0 0 0.85rem;
}

.footer-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

@media (min-width: 480px) {
  .footer-nav-list--cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 1.75rem;
  }
}

.footer-bottom {
  margin-top: 1.85rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
}

.footer-made {
  opacity: 0.92;
}

.legal-prose {
  max-width: 46rem;
  margin: 0 auto;
}

.legal-prose h1 {
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 0.35rem;
  line-height: 1.22;
}

.legal-prose .legal-meta {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0 0 1.65rem;
}

.legal-prose h2 {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
  margin: 2rem 0 0.6rem;
  padding-top: 0.15rem;
  line-height: 1.35;
}

.legal-prose h2:first-of-type {
  margin-top: 0.75rem;
}

.legal-prose p,
.legal-prose li {
  line-height: 1.72;
  color: var(--accent);
  margin: 0 0 0.85rem;
  font-size: 0.9375rem;
}

.legal-prose ul,
.legal-prose ol {
  margin: 0 0 1rem;
  padding-inline-start: 1.25rem;
}

.legal-prose li {
  margin-bottom: 0.4rem;
}

.legal-prose strong {
  color: var(--text);
  font-weight: 700;
}

/* ---------- Type de pièce : accordéon (ajouter / modifier produit) ---------- */
.form-grid .field:has(.souk-type-piece) {
  grid-column: 1 / -1;
}

.souk-type-piece {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.souk-type-piece__none {
  margin-bottom: 2px;
}

.souk-type-piece__acc {
  border-radius: 16px;
  border: 1px solid var(--btn-ghost-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.85));
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.souk-type-piece__acc[open] {
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 10px 28px var(--btn-primary-glow), 0 6px 18px rgba(15, 23, 42, 0.06);
}

.souk-type-piece__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  font-weight: 900;
  font-size: 14px;
  color: var(--text);
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.souk-type-piece__summary::-webkit-details-marker {
  display: none;
}

.souk-type-piece__summary::marker {
  display: none;
}

.souk-type-piece__acc[open] .souk-type-piece__summary {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(8, 145, 178, 0.05));
  color: var(--btn-primary-2);
}

.souk-type-piece__chev {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
  margin-top: -4px;
}

.souk-type-piece__acc[open] .souk-type-piece__chev {
  transform: rotate(-135deg);
  margin-top: 4px;
  border-color: var(--btn-primary-2);
}

html[dir="rtl"] .souk-type-piece__summary {
  flex-direction: row-reverse;
}

.souk-type-piece__panel {
  padding: 6px 10px 12px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.72);
}

.souk-type-piece-opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--btn-ghost-border);
  background: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.souk-type-piece-opt:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.1);
}

.souk-type-piece-opt:has(.souk-type-piece__radio:checked) {
  border-color: rgba(37, 99, 235, 0.45);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(8, 145, 178, 0.1));
  color: #0c4a6e;
  font-weight: 750;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12);
}

.souk-type-piece-opt--none {
  font-weight: 800;
  border-style: dashed;
}

.souk-type-piece__radio {
  width: 16px;
  height: 16px;
  accent-color: var(--btn-primary-2);
  flex-shrink: 0;
}

/* ---------- Vendeur : ajouter / modifier produit (mobile) ---------- */
.page-ajouter-produit {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Colonnes d’attributs ajoutées en JS : même flex que les champs serveur */
.page-ajouter-produit .inv-variant-flex .inv-attr-cell.inv-variant-field {
  flex: 1;
  min-width: 140px;
}

@media (max-width: 980px) {
  .page-ajouter-produit .ap-page-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .page-ajouter-produit .ap-page-header .pill {
    align-self: flex-start;
    max-width: 100%;
    justify-content: center;
  }

  .page-ajouter-produit .ap-section-head {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .page-ajouter-produit .form-title {
    font-size: 1.35rem !important;
    line-height: 1.25;
    word-wrap: break-word;
  }

  .page-ajouter-produit .form-grid {
    grid-template-columns: 1fr !important;
  }

  /* Cartes stock : éviter double padding + débordement horizontal */
  .page-ajouter-produit #variantsBlock > .card.card-pad {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .page-ajouter-produit #invOptionsAvancees.card {
    padding: 10px !important;
  }

  .page-ajouter-produit #invOptionsAvancees summary {
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-word;
  }

  .page-ajouter-produit #invOptionsAvancees .field .help.small-muted {
    margin-left: 0 !important;
  }

  /* Lignes de variantes : pile verticale, champs pleine largeur */
  .page-ajouter-produit .inv-variant-flex {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .page-ajouter-produit .inv-variant-flex > .field,
  .page-ajouter-produit .inv-variant-flex > .js-stock-couleur-cell,
  .page-ajouter-produit .inv-variant-flex > .inv-attr-cell,
  .page-ajouter-produit .inv-variant-flex > .js-stock-qty-cell {
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .page-ajouter-produit .inv-variant-flex .inv-attr-cell.inv-variant-field {
    min-width: 0 !important;
  }

  .page-ajouter-produit .inv-variant-actions {
    width: 100% !important;
    justify-content: stretch !important;
  }

  .page-ajouter-produit .inv-variant-actions .js-remove-variant {
    width: 100%;
    justify-content: center;
  }

  .page-ajouter-produit .field .input,
  .page-ajouter-produit .field select,
  .page-ajouter-produit .field textarea {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Éditeur de colonnes personnalisées */
  .page-ajouter-produit #invColumnRows .row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .page-ajouter-produit #invColumnRows .js-remove-col {
    width: 100%;
    justify-content: center;
  }

  .page-ajouter-produit .souk-type-piece__panel {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .page-ajouter-produit .form-actions {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .page-ajouter-produit .form-actions .btn {
    width: 100% !important;
    justify-content: center;
  }

  .page-ajouter-produit .form-actions .grow {
    flex: none !important;
  }

  .page-ajouter-produit .gallery-grid {
    justify-content: center;
  }
}

html[dir="rtl"] .page-ajouter-produit .ap-page-header .pill {
  align-self: flex-end;
}

/* ---------- Boutique : notation par étoiles (page boutique) ---------- */
.avis-star-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0 10px;
  outline: none;
}

.avis-star-btn {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 0 4px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #cbd5e1;
  transition: color 0.15s ease, transform 0.12s ease;
}

.avis-star-btn.is-active {
  color: #f59e0b;
}

.avis-star-btn:focus-visible {
  outline: 2px solid var(--btn-primary-2, #2563eb);
  outline-offset: 3px;
  border-radius: 6px;
}

.avis-star-btn:hover {
  transform: scale(1.06);
  color: #fcd34d;
}

.avis-star-btn.is-active:hover {
  color: #f59e0b;
}

.avis-star-rating__err-client {
  color: var(--danger, #dc2626);
  margin: 0 0 8px !important;
}

/* Page boutique : liste d’avis + formulaire — une colonne sur mobile, formulaire en premier */
.boutique-avis-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 980px) {
  .boutique-avis-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .boutique-avis-grid__form {
    order: -1;
  }

  .boutique-avis-grid__list {
    order: 1;
  }

  .boutique-avis-grid .avis-star-rating {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 2px;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin-left: auto;
    margin-right: auto;
  }

  .boutique-avis-grid .avis-star-btn {
    min-width: 0;
    flex: 0 0 auto;
    width: auto;
    min-height: 40px;
    padding: 0 3px;
    font-size: clamp(1.5rem, 7.5vw, 2rem);
  }
}
