/* ==========================================================================
   Vintea — Design system
   Marketplace de seconde main pour l'Algérie
   Aucune dépendance externe. Compatible clair/sombre, LTR/RTL.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Marque */
  --brand-50:  #E7F6F0;
  --brand-100: #C6EADC;
  --brand-200: #94D8C1;
  --brand-300: #5CC2A2;
  --brand-400: #24A67F;
  --brand:     #0E8F6E;
  --brand-600: #0B7355;
  --brand-700: #085B44;
  --brand-800: #064534;

  --sand-50:  #FDF6E9;
  --sand-100: #FAE9C6;
  --sand:     #E9A23B;
  --sand-600: #C7821F;

  --rose-50:  #FDECEC;
  --rose:     #D64545;
  --rose-600: #B62F2F;

  --info-50: #EAF2FE;
  --info:    #2F6FED;

  /* Neutres */
  --ink-900: #0E1512;
  --ink-800: #1A2420;
  --ink-700: #2C3A34;
  --ink-600: #47574F;
  --ink-500: #6B7B73;
  --ink-400: #94A29B;
  --ink-300: #C0CBC5;
  --ink-200: #DEE6E2;
  --ink-100: #EDF2EF;
  --ink-50:  #F6F9F7;

  /* Rôles — thème clair (défaut) */
  --bg:          #FFFFFF;
  --bg-soft:     var(--ink-50);
  --bg-sunken:   #F0F4F2;
  --surface:     #FFFFFF;
  --surface-2:   var(--ink-50);
  --border:      var(--ink-200);
  --border-soft: var(--ink-100);
  --text:        var(--ink-900);
  --text-soft:   var(--ink-600);
  --text-mute:   var(--ink-500);
  --text-invert: #FFFFFF;
  --accent:      var(--brand);
  --accent-ink:  var(--brand-700);
  --accent-soft: var(--brand-50);
  --ring:        color-mix(in srgb, var(--brand) 40%, transparent);

  --shadow-xs: 0 1px 2px rgba(14, 21, 18, .06);
  --shadow-sm: 0 1px 2px rgba(14, 21, 18, .06), 0 2px 6px rgba(14, 21, 18, .05);
  --shadow-md: 0 2px 4px rgba(14, 21, 18, .05), 0 8px 20px rgba(14, 21, 18, .08);
  --shadow-lg: 0 4px 10px rgba(14, 21, 18, .06), 0 20px 44px rgba(14, 21, 18, .12);

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  --container: 1240px;
  --header-h: 64px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Cairo", "Segoe UI", Tahoma, sans-serif;

  --t-fast: 120ms cubic-bezier(.4, 0, .2, 1);
  --t: 200ms cubic-bezier(.4, 0, .2, 1);
}

/* Thème sombre */
:root[data-theme="dark"] {
  --bg:          #0C120F;
  --bg-soft:     #111A16;
  --bg-sunken:   #080D0B;
  --surface:     #141E19;
  --surface-2:   #1B2721;
  --border:      #263630;
  --border-soft: #1D2A24;
  --text:        #E9F1ED;
  --text-soft:   #AFC0B8;
  --text-mute:   #869A91;
  --text-invert: #0C120F;
  --accent:      var(--brand-300);
  --accent-ink:  var(--brand-200);
  --accent-soft: #0E241D;
  --ring:        color-mix(in srgb, var(--brand-300) 45%, transparent);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .35);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, .4), 0 8px 20px rgba(0, 0, 0, .45);
  --shadow-lg: 0 4px 10px rgba(0, 0, 0, .45), 0 20px 44px rgba(0, 0, 0, .55);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
}

/* Les conteneurs d'injection ne doivent pas exister en tant que boîtes :
   un élément sticky ne peut coller qu'à l'intérieur de son parent. Enfermé
   dans un div de sa propre hauteur, l'en-tête disparaissait au premier
   défilement. display:contents le rend enfant direct de <body>. */
#vt-header, #vt-footer { display: contents; }
#main { flex: 1 0 auto; }
html[dir="rtl"] body { font-family: var(--font-ar); }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

/* Un SVG sans attribut width vaut 300 × 150 px par défaut. Les icônes injectées
   au fil du texte reprennent donc la taille de la ligne courante. Toute règle
   de composant définie plus bas reste prioritaire (même spécificité, ordre gagnant). */
svg:not([width]) { width: 1.15em; height: 1.15em; vertical-align: -.15em; }
.summary-row svg, .summary-total svg, .pcard-meta svg, .breadcrumb svg { display: inline-block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 1.05rem + 1.3vw, 1.9rem); }
h3 { font-size: 1.15rem; }

:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: var(--r-xs); }

::selection { background: var(--brand-200); color: var(--ink-900); }

/* ---------- 3. Utilitaires ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .container { padding-inline: 24px; } }

.stack > * + * { margin-top: var(--gap, 16px); }
/* Les paires de boutons doivent pouvoir passer à la ligne sur un écran de 320 px. */
.row { display: flex; align-items: center; gap: var(--gap, 10px); flex-wrap: wrap; }
.row > * { min-width: 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
.muted { color: var(--text-mute); }
.soft { color: var(--text-soft); }
.small { font-size: .875rem; }
.xsmall { font-size: .78rem; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.mt-0 { margin-top: 0 !important; }
.section { padding-block: clamp(32px, 5vw, 64px); }
.section-tight { padding-block: clamp(24px, 3vw, 40px); }
.divider { height: 1px; background: var(--border-soft); border: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 200;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: var(--r-sm);
  transition: top var(--t);
}
.skip-link:focus { top: 12px; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head p { color: var(--text-mute); font-size: .95rem; margin-top: 4px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent-soft);
  padding: 5px 10px; border-radius: var(--r-full);
}
:root[data-theme="dark"] .eyebrow { color: var(--brand-200); }

/* ---------- 4. Boutons ---------- */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-bd: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; min-height: 42px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bd); border-radius: var(--r-full);
  font-weight: 600; font-size: .94rem; white-space: nowrap; cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t), transform var(--t-fast), box-shadow var(--t);
  text-align: center;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary { --btn-bg: var(--brand); --btn-fg: #fff; --btn-bd: var(--brand); }
.btn-primary:hover { --btn-bg: var(--brand-600); --btn-bd: var(--brand-600); }
:root[data-theme="dark"] .btn-primary { --btn-bg: var(--brand-400); --btn-bd: var(--brand-400); --btn-fg: #04140F; }
:root[data-theme="dark"] .btn-primary:hover { --btn-bg: var(--brand-300); --btn-bd: var(--brand-300); }

.btn-dark { --btn-bg: var(--ink-900); --btn-fg: #fff; --btn-bd: var(--ink-900); }
:root[data-theme="dark"] .btn-dark { --btn-bg: var(--ink-100); --btn-fg: var(--ink-900); --btn-bd: var(--ink-100); }

.btn-ghost { --btn-bd: transparent; --btn-bg: transparent; }
.btn-ghost:hover { --btn-bg: var(--surface-2); box-shadow: none; }

.btn-soft { --btn-bg: var(--accent-soft); --btn-fg: var(--accent-ink); --btn-bd: transparent; }
:root[data-theme="dark"] .btn-soft { --btn-fg: var(--brand-200); }

.btn-danger { --btn-bg: var(--rose); --btn-fg: #fff; --btn-bd: var(--rose); }
.btn-danger:hover { --btn-bg: var(--rose-600); --btn-bd: var(--rose-600); }

.btn-sm { padding: 6px 14px; min-height: 34px; font-size: .85rem; }
.btn-lg { padding: 13px 26px; min-height: 50px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }
.btn-icon { padding: 0; width: 42px; min-height: 42px; border-radius: var(--r-full); }
.btn-icon.btn-sm { width: 34px; min-height: 34px; }

/* ---------- 5. Formulaires ---------- */
.field { display: block; }
.field + .field { margin-top: 16px; }
.label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--text-soft); }
.label .req { color: var(--rose); }
.hint { font-size: .78rem; color: var(--text-mute); margin-top: 5px; }
.err { font-size: .78rem; color: var(--rose); margin-top: 5px; font-weight: 600; }

.input, .select, .textarea {
  width: 100%; padding: 11px 14px; min-height: 44px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  transition: border-color var(--t), box-shadow var(--t);
  font-size: .95rem;
}
.input::placeholder, .textarea::placeholder { color: var(--text-mute); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
}
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--rose); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7B73' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 18px;
  background-position: right 12px center;
  padding-inline-end: 38px;
}
html[dir="rtl"] .select { background-position: left 12px center; padding-inline-end: 38px; }

.field-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .field-row.cols-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 640px) { .field-row.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.check { display: flex; align-items: start; gap: 10px; cursor: pointer; font-size: .9rem; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; cursor: pointer; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--r-full);
  background: var(--surface); font-size: .85rem; font-weight: 600; cursor: pointer;
  transition: all var(--t);
}
.chip:hover { border-color: var(--brand-300); }
.chip[aria-pressed="true"], .chip.is-active {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
:root[data-theme="dark"] .chip[aria-pressed="true"], :root[data-theme="dark"] .chip.is-active {
  background: var(--brand-400); border-color: var(--brand-400); color: #04140F;
}

/* ---------- 6. Badges & pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: var(--r-full);
  font-size: .72rem; font-weight: 700; letter-spacing: .01em;
  background: var(--surface-2); color: var(--text-soft);
  border: 1px solid var(--border-soft);
}
.badge-brand { background: var(--brand-50); color: var(--brand-700); border-color: transparent; }
.badge-sand  { background: var(--sand-50); color: var(--sand-600); border-color: transparent; }
.badge-rose  { background: var(--rose-50); color: var(--rose-600); border-color: transparent; }
.badge-info  { background: var(--info-50); color: var(--info); border-color: transparent; }
:root[data-theme="dark"] .badge-brand { background: #0E241D; color: var(--brand-200); }
:root[data-theme="dark"] .badge-sand  { background: #2A2010; color: #F0C57A; }
:root[data-theme="dark"] .badge-rose  { background: #2C1414; color: #F0A0A0; }
:root[data-theme="dark"] .badge-info  { background: #101E36; color: #8FB4FA; }

/* ---------- 7. Cartes ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 20px;
}
.card-flat { background: var(--surface-2); border-color: transparent; }
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: clamp(18px, 3vw, 28px);
}

/* ---------- 8. En-tête ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.header-bar { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }

/* (ancien logo « carre vert + texte » supprime : le logo est celui de la maquette, voir ui.js VT.logoHtml) */

.search {
  position: relative; flex: 1 1 auto; min-width: 0; max-width: 560px;
  display: none;
}
@media (min-width: 900px) { .search { display: block; } }
.search input {
  width: 100%; padding: 10px 16px 10px 42px; min-height: 42px;
  background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-full);
  font-size: .92rem;
}
html[dir="rtl"] .search input { padding: 10px 42px 10px 16px; }
.search input:focus { outline: none; background: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.search .search-ico {
  position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-mute); pointer-events: none;
}
.search-sug {
  position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 120;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: 6px; max-height: 340px; overflow: auto;
}
.search-sug a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); font-size: .9rem; }
.search-sug a:hover, .search-sug a:focus { background: var(--surface-2); }
.search-sug img { width: 34px; height: 42px; object-fit: cover; border-radius: 6px; flex: none; background: var(--surface-2); }

.header-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
/* Sous 400 px, six boutons ne tiennent pas. Thème, langue, favoris et messages
   restent accessibles depuis le menu latéral et la barre d'onglets du bas. */
@media (max-width: 400px) {
  .header-actions [data-theme-toggle],
  .header-actions [data-lang-toggle],
  .header-actions a[href="favoris.html"],
  .header-actions a[href="messages.html"] { display: none; }
}
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-full); color: var(--text-soft);
  transition: background var(--t), color var(--t);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn .dot {
  position: absolute; top: 4px; inset-inline-end: 3px;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--rose); color: #fff; border-radius: var(--r-full);
  font-size: .65rem; font-weight: 800; line-height: 17px; text-align: center;
  border: 2px solid var(--bg);
}
.header .btn-sell { display: none; }
@media (min-width: 720px) { .header .btn-sell { display: inline-flex; } }

.navbar { border-top: 1px solid var(--border-soft); overflow-x: auto; scrollbar-width: none; }
.navbar::-webkit-scrollbar { display: none; }
.navbar ul { display: flex; gap: 2px; }
.navbar a {
  display: block; padding: 11px 13px; font-size: .875rem; font-weight: 600;
  color: var(--text-soft); white-space: nowrap; border-bottom: 2px solid transparent;
  transition: color var(--t), border-color var(--t);
}
.navbar a:hover { color: var(--text); }
.navbar a[aria-current="page"] { color: var(--accent-ink); border-bottom-color: var(--brand); }
:root[data-theme="dark"] .navbar a[aria-current="page"] { color: var(--brand-200); border-bottom-color: var(--brand-300); }

/* Menu mobile */
.drawer {
  position: fixed; inset: 0; z-index: 190; display: none;
}
.drawer.is-open { display: block; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(6, 12, 10, .5); backdrop-filter: blur(2px); }
.drawer-panel {
  position: absolute; inset-block: 0; inset-inline-start: 0; width: min(320px, 86vw);
  background: var(--bg); border-inline-end: 1px solid var(--border);
  padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  animation: slideIn var(--t);
}
html[dir="rtl"] .drawer-panel { animation: slideInRtl var(--t); }
@keyframes slideIn { from { transform: translateX(-100%); } }
@keyframes slideInRtl { from { transform: translateX(100%); } }
.drawer-panel a, .drawer-panel button.drawer-link {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: start;
  padding: 11px 12px; border-radius: var(--r-sm); font-weight: 600; font-size: .95rem;
}
.drawer-panel a:hover, .drawer-panel button.drawer-link:hover { background: var(--surface-2); }
.drawer-panel svg { width: 19px; height: 19px; color: var(--text-mute); flex: none; }

/* ---------- 9. Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 420px at 88% -8%, var(--brand-50), transparent 62%),
    radial-gradient(760px 380px at 4% 108%, var(--sand-50), transparent 60%),
    var(--bg);
  padding-block: clamp(36px, 6vw, 76px);
  border-bottom: 1px solid var(--border-soft);
}
:root[data-theme="dark"] .hero {
  background:
    radial-gradient(1000px 420px at 88% -8%, #0C2B22, transparent 62%),
    radial-gradient(760px 380px at 4% 108%, #24200F, transparent 60%),
    var(--bg);
}
.hero-grid { display: grid; gap: clamp(28px, 4vw, 48px); align-items: center; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }
.hero h1 { margin-bottom: 14px; }
.hero h1 .hl { color: var(--brand); }
:root[data-theme="dark"] .hero h1 .hl { color: var(--brand-300); }
.hero-lede { font-size: clamp(1rem, .95rem + .3vw, 1.14rem); color: var(--text-soft); max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 32px; }
.hero-stats .n { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; color: var(--text); }
.hero-stats .l { font-size: .8rem; color: var(--text-mute); }

.hero-art { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero-art .tile {
  border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2);
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-md);
}
.hero-art .tile img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.hero-art .tile:nth-child(1) { transform: translateY(-14px); }
.hero-art .tile:nth-child(4) { transform: translateY(14px); }
.hero-float {
  position: absolute; inset-inline-end: -6px; bottom: 8%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: 12px 14px; display: flex; gap: 10px; align-items: center;
  max-width: 230px;
}
.hero-float svg { width: 30px; height: 30px; color: var(--brand); flex: none; }
@media (max-width: 520px) { .hero-float { display: none; } }

/* ---------- 10. Catégories ---------- */
.cat-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 116px; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
@media (min-width: 900px) { .cat-scroll { grid-auto-flow: row; grid-template-columns: repeat(8, 1fr); grid-auto-columns: auto; overflow: visible; } }
.cat-card {
  display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center;
  padding: 14px 8px; border-radius: var(--r-md); border: 1px solid var(--border-soft);
  background: var(--surface); transition: all var(--t);
}
.cat-card:hover { border-color: var(--brand-200); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.cat-card .ico {
  width: 46px; height: 46px; border-radius: var(--r-full);
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink);
}
:root[data-theme="dark"] .cat-card .ico { color: var(--brand-200); }
.cat-card .ico svg { width: 24px; height: 24px; }
.cat-card span { font-size: .82rem; font-weight: 600; line-height: 1.25; }

/* ---------- 11. Grille produits ---------- */
.grid-products {
  display: grid; gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 560px)  { .grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px)  { .grid-products { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .grid-products { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.grid-products.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .grid-products.cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid-products.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.pcard { position: relative; display: flex; flex-direction: column; }
.pcard-media {
  position: relative; display: block; border-radius: var(--r-md); overflow: hidden;
  background: var(--surface-2); aspect-ratio: 3 / 4;
}
.pcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms cubic-bezier(.2,.7,.3,1); }
.pcard:hover .pcard-media img { transform: scale(1.045); }
.pcard-flags { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; flex-direction: column; gap: 5px; align-items: start; }
.pcard-flags .badge { box-shadow: var(--shadow-xs); }
.pcard-fav {
  position: absolute; top: 7px; inset-inline-end: 7px;
  width: 34px; height: 34px; border-radius: var(--r-full);
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(6px); color: var(--text-soft);
  border: 1px solid var(--border-soft); transition: all var(--t);
}
.pcard-fav:hover { transform: scale(1.08); color: var(--rose); }
.pcard-fav svg { width: 18px; height: 18px; }
.pcard-fav[aria-pressed="true"] { color: var(--rose); }
.pcard-fav[aria-pressed="true"] svg { fill: currentColor; }
.pcard-body { padding: 9px 2px 0; display: flex; flex-direction: column; gap: 2px; }
.pcard-title { font-size: .875rem; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-meta { font-size: .76rem; color: var(--text-mute); }
.pcard-price { display: flex; align-items: baseline; gap: 7px; margin-top: 3px; flex-wrap: wrap; }
.pcard-price .p { font-size: 1rem; font-weight: 800; letter-spacing: -.02em; }
.pcard-price .old { font-size: .8rem; color: var(--text-mute); text-decoration: line-through; }
.pcard-price .prot { font-size: .72rem; color: var(--brand); font-weight: 600; }
:root[data-theme="dark"] .pcard-price .prot { color: var(--brand-300); }
.pcard-sold {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(8, 14, 12, .55); color: #fff; font-weight: 800; letter-spacing: .06em;
  font-size: .8rem; text-transform: uppercase;
}

/* ---------- 12. Layout catalogue ---------- */
.cat-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 980px) { .cat-layout { grid-template-columns: 258px minmax(0, 1fr); } }

.filters {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 16px; position: sticky; top: calc(var(--header-h) + 12px);
  max-height: calc(100vh - var(--header-h) - 24px); overflow-y: auto;
}
@media (max-width: 979px) {
  .filters {
    position: fixed; inset: 0; z-index: 195; max-height: none; border-radius: 0;
    display: none; overflow-y: auto; padding-bottom: 90px;
  }
  .filters.is-open { display: block; }
  .filters-close { display: flex !important; }
  .filters-apply { display: flex !important; }
}
.filters-close { display: none; position: sticky; top: 0; background: var(--surface); padding-bottom: 12px; margin: -16px -16px 8px; padding: 14px 16px; border-bottom: 1px solid var(--border-soft); align-items: center; justify-content: space-between; z-index: 2; }
.filters-apply { display: none; position: sticky; bottom: 0; margin: 16px -16px -16px; padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--border); }

.fgroup { border-bottom: 1px solid var(--border-soft); padding-block: 14px; }
.fgroup:first-of-type { padding-top: 0; }
.fgroup:last-of-type { border-bottom: 0; }
.fgroup > summary {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: .9rem; cursor: pointer; list-style: none; user-select: none;
}
.fgroup > summary::-webkit-details-marker { display: none; }
.fgroup > summary::after {
  content: ""; width: 9px; height: 9px; flex: none;
  border-right: 2px solid var(--text-mute); border-bottom: 2px solid var(--text-mute);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform var(--t);
}
.fgroup[open] > summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.fgroup-body { padding-top: 12px; display: flex; flex-direction: column; gap: 9px; }
.fgroup-body.scroll { max-height: 210px; overflow-y: auto; padding-inline-end: 4px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.tag-x {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px;
  background: var(--accent-soft); color: var(--accent-ink); border-radius: var(--r-full);
  font-size: .8rem; font-weight: 600;
}
:root[data-theme="dark"] .tag-x { color: var(--brand-200); }
.tag-x button { display: grid; place-items: center; width: 18px; height: 18px; border-radius: var(--r-full); opacity: .7; }
.tag-x button:hover { opacity: 1; background: rgba(0,0,0,.08); }
.tag-x svg { width: 12px; height: 12px; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 36px; flex-wrap: wrap; }
.pagination button {
  min-width: 38px; height: 38px; padding: 0 10px; border-radius: var(--r-sm);
  border: 1px solid var(--border); font-weight: 600; font-size: .88rem; background: var(--surface);
  transition: all var(--t);
}
.pagination button:hover:not([disabled]) { border-color: var(--brand-300); }
.pagination button[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
:root[data-theme="dark"] .pagination button[aria-current="page"] { background: var(--brand-400); border-color: var(--brand-400); color: #04140F; }
.pagination button[disabled] { opacity: .4; cursor: default; }

/* ---------- 13. Page produit ---------- */
.pdp { display: grid; gap: clamp(24px, 4vw, 44px); align-items: start; }
@media (min-width: 900px) { .pdp { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } }
@media (min-width: 900px) { .pdp-aside { position: sticky; top: calc(var(--header-h) + 16px); } }

.gallery { display: flex; flex-direction: column; gap: 12px; }
.gallery-main { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border-soft); }
.gallery-main img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: var(--r-full); display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm); color: var(--text);
}
.gallery-nav.prev { inset-inline-start: 10px; }
.gallery-nav.next { inset-inline-end: 10px; }
.gallery-nav svg { width: 18px; height: 18px; }
html[dir="rtl"] .gallery-nav svg { transform: scaleX(-1); }
.gallery-thumbs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumbs button {
  width: 72px; flex: none; border-radius: var(--r-sm); overflow: hidden;
  border: 2px solid transparent; background: var(--surface-2); transition: border-color var(--t);
}
.gallery-thumbs button[aria-current="true"] { border-color: var(--brand); }
.gallery-thumbs img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

.price-block { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price-main { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.price-prot { font-size: .95rem; font-weight: 700; color: var(--brand); }
:root[data-theme="dark"] .price-prot { color: var(--brand-300); }

.spec-list { display: grid; gap: 0; }
.spec-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); font-size: .9rem; }
.spec-list > div:last-child { border-bottom: 0; }
.spec-list dt { color: var(--text-mute); }
.spec-list dd { font-weight: 600; text-align: end; }

.seller-box { display: flex; gap: 13px; align-items: center; }
.avatar { width: 48px; height: 48px; border-radius: var(--r-full); object-fit: cover; background: var(--surface-2); flex: none; }
.avatar-sm { width: 34px; height: 34px; }
.avatar-lg { width: 76px; height: 76px; }
.avatar-ini { display: grid; place-items: center; background: var(--p-teal-600, var(--brand)); color: #fff; font: 700 1.5rem/1 var(--font); letter-spacing: .02em; }
.seller-box a, .seller-mini-nom a { color: inherit; text-decoration: none; }
.seller-box a:hover, .seller-mini-nom a:hover { text-decoration: underline; }
.stars { display: inline-flex; gap: 1px; color: var(--sand); }
.stars svg { width: 15px; height: 15px; fill: currentColor; }
.stars .off { color: var(--ink-300); }
:root[data-theme="dark"] .stars .off { color: var(--ink-700); }

.trust-list { display: grid; gap: 12px; }
.trust-list li { display: flex; gap: 11px; align-items: start; font-size: .88rem; }
.trust-list svg { width: 19px; height: 19px; color: var(--brand); flex: none; margin-top: 2px; }
:root[data-theme="dark"] .trust-list svg { color: var(--brand-300); }

.review { padding: 16px 0; border-bottom: 1px solid var(--border-soft); }
.review:last-child { border-bottom: 0; }

/* ---------- 14. Vendre (multi-étapes) ---------- */
.steps { display: flex; gap: 6px; margin-bottom: 28px; }
.step { flex: 1; }
.step .bar { height: 4px; border-radius: var(--r-full); background: var(--border); transition: background var(--t); }
.step.done .bar, .step.current .bar { background: var(--brand); }
.step .lb { font-size: .74rem; font-weight: 700; color: var(--text-mute); margin-top: 7px; display: block; }
.step.current .lb, .step.done .lb { color: var(--accent-ink); }
:root[data-theme="dark"] .step.current .lb, :root[data-theme="dark"] .step.done .lb { color: var(--brand-200); }
@media (max-width: 560px) { .step .lb { display: none; } }

.dropzone {
  border: 2px dashed var(--border); border-radius: var(--r-md); padding: 32px 20px;
  text-align: center; background: var(--surface-2); cursor: pointer; transition: all var(--t);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--accent-soft); }
.dropzone svg { width: 34px; height: 34px; color: var(--text-mute); margin: 0 auto 10px; }

.thumbs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 14px; }
.thumb { position: relative; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); aspect-ratio: 3/4; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button {
  position: absolute; top: 5px; inset-inline-end: 5px; width: 24px; height: 24px;
  background: rgba(8,14,12,.72); color: #fff; border-radius: var(--r-full); display: grid; place-items: center;
}
.thumb button svg { width: 13px; height: 13px; }
.thumb .cover-tag { position: absolute; bottom: 5px; inset-inline-start: 5px; font-size: .62rem; }

/* ---------- 15. Panier / Commande ---------- */
.cart-layout { display: grid; gap: 24px; align-items: start; }
/* Sans cela, un élément de grille refuse de descendre sous sa largeur min-content
   et déborde de l'écran sur les petits mobiles. */
.cart-layout > * { min-width: 0; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: minmax(0, 1fr) 350px; } }
@media (min-width: 900px) { .cart-aside { position: sticky; top: calc(var(--header-h) + 16px); } }

.line-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border-soft); }
.line-item:last-child { border-bottom: 0; }
.line-item img { width: 78px; height: 100px; object-fit: cover; border-radius: var(--r-sm); flex: none; background: var(--surface-2); }

.summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; padding: 7px 0; flex-wrap: wrap; }
.summary-row > * { min-width: 0; }
.summary-total { display: flex; justify-content: space-between; gap: 12px; font-size: 1.15rem; font-weight: 800; padding-top: 14px; margin-top: 8px; border-top: 1px solid var(--border); flex-wrap: wrap; }

.radio-card {
  display: flex; gap: 12px; align-items: start; padding: 14px;
  border: 1px solid var(--border); border-radius: var(--r-md); cursor: pointer;
  transition: all var(--t); background: var(--surface);
}
.radio-card:hover { border-color: var(--brand-300); }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--brand); }
.radio-card input { margin-top: 3px; accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.radio-card .rc-title { font-weight: 700; font-size: .93rem; }
.radio-card .rc-desc { font-size: .8rem; color: var(--text-mute); margin-top: 2px; }
.radio-card .rc-price { margin-inline-start: auto; font-weight: 700; font-size: .9rem; white-space: nowrap; }

/* ---------- 15 bis. Cartes bancaires ---------- */
.carte-logos { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.carte-logo {
  padding: 3px 8px; border: 1px solid var(--border); border-radius: var(--r-xs);
  font-size: .66rem; font-weight: 800; letter-spacing: .02em; color: var(--text-mute);
  background: var(--surface); white-space: nowrap;
  transition: opacity var(--t), border-color var(--t), color var(--t);
}
.carte-logo.is-off { opacity: .3; }
.carte-logo.is-on {
  border-color: var(--brand); color: var(--brand); opacity: 1;
  background: var(--accent-soft);
}
:root[data-theme="dark"] .carte-logo.is-on { color: var(--brand-200); border-color: var(--brand-300); }
.radio-card .carte-logos { margin-top: 10px; }

/* ---------- 16. Messagerie ---------- */
.msg-layout { display: grid; gap: 0; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; min-height: 560px; background: var(--surface); }
@media (min-width: 820px) { .msg-layout { grid-template-columns: 310px minmax(0, 1fr); } }
.msg-list { border-inline-end: 1px solid var(--border); overflow-y: auto; max-height: 620px; }
.msg-list button {
  display: flex; gap: 11px; width: 100%; text-align: start; padding: 13px 14px;
  border-bottom: 1px solid var(--border-soft); transition: background var(--t);
}
.msg-list button:hover { background: var(--surface-2); }
.msg-list button[aria-current="true"] { background: var(--accent-soft); }
.msg-thread { display: flex; flex-direction: column; max-height: 620px; }
.msg-thread-head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 11px; }
.msg-body { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-soft); }
.bubble { max-width: 76%; padding: 10px 14px; border-radius: 16px; font-size: .9rem; line-height: 1.5; box-shadow: var(--shadow-xs); }
.bubble.them { background: var(--surface); border-start-start-radius: 4px; align-self: flex-start; }
.bubble.me { background: var(--brand); color: #fff; border-end-end-radius: 4px; align-self: flex-end; }
:root[data-theme="dark"] .bubble.me { background: var(--brand-600); }
.bubble .t { display: block; font-size: .68rem; opacity: .7; margin-top: 4px; }
.msg-compose { padding: 12px; border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: end; }
@media (max-width: 819px) { .msg-list.is-hidden-mobile, .msg-thread.is-hidden-mobile { display: none; } }

/* ---------- 17. Profil ---------- */
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; margin-bottom: 24px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  padding: 11px 15px; font-weight: 600; font-size: .9rem; color: var(--text-mute);
  border-bottom: 2px solid transparent; white-space: nowrap; transition: all var(--t);
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--accent-ink); border-bottom-color: var(--brand); }
:root[data-theme="dark"] .tabs button[aria-selected="true"] { color: var(--brand-200); border-bottom-color: var(--brand-300); }

.order-card { border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; }
.order-card + .order-card { margin-top: 12px; }

.timeline { display: grid; gap: 0; margin-top: 14px; }
.timeline li { display: flex; gap: 12px; padding-bottom: 16px; position: relative; }
.timeline li:not(:last-child)::before {
  content: ""; position: absolute; inset-inline-start: 9px; top: 22px; bottom: 0; width: 2px; background: var(--border);
}
.timeline li.done:not(:last-child)::before { background: var(--brand); }
.timeline .pt { width: 20px; height: 20px; border-radius: var(--r-full); flex: none; background: var(--border); display: grid; place-items: center; z-index: 1; }
.timeline li.done .pt { background: var(--brand); color: #fff; }
.timeline .pt svg { width: 12px; height: 12px; }

/* ---------- 18. Contenu éditorial ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 34px; margin-bottom: 12px; }
.prose h3 { margin-top: 24px; margin-bottom: 8px; }
.prose p, .prose li { color: var(--text-soft); font-size: .96rem; }
.prose p + p { margin-top: 12px; }
.prose ul { list-style: disc; padding-inline-start: 22px; margin-top: 10px; display: grid; gap: 6px; }
.prose ol { list-style: decimal; padding-inline-start: 22px; margin-top: 10px; display: grid; gap: 6px; }
.prose a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
:root[data-theme="dark"] .prose a { color: var(--brand-200); }
.prose strong { color: var(--text); }

.faq-item { border-bottom: 1px solid var(--border-soft); }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0; font-weight: 650; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--text-mute); font-weight: 400; line-height: 1; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-a { padding-bottom: 18px; color: var(--text-soft); font-size: .93rem; }

/* ---------- 19. Sections marketing ---------- */
.feature-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature {
  padding: 22px; border-radius: var(--r-md); background: var(--surface);
  border: 1px solid var(--border-soft);
}
.feature .ico { width: 42px; height: 42px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 14px; }
:root[data-theme="dark"] .feature .ico { color: var(--brand-200); }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.02rem; margin-bottom: 6px; }
.feature p { font-size: .89rem; color: var(--text-mute); }

.steps-3 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: s; }
.step-item { counter-increment: s; position: relative; padding-top: 8px; }
.step-item::before {
  content: counter(s); display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: var(--r-full);
  background: var(--brand); color: #fff; font-weight: 800; font-size: 1rem; margin-bottom: 14px;
}
:root[data-theme="dark"] .step-item::before { background: var(--brand-400); color: #04140F; }
.step-item h3 { font-size: 1rem; margin-bottom: 5px; }
.step-item p { font-size: .89rem; color: var(--text-mute); }

.banner {
  border-radius: var(--r-xl); padding: clamp(26px, 4vw, 46px);
  background: linear-gradient(135deg, var(--brand-700), var(--brand-400));
  color: #fff; display: grid; gap: 20px; align-items: center;
}
@media (min-width: 800px) { .banner { grid-template-columns: 1.4fr auto; } }
.banner h2 { color: #fff; }
.banner p { color: rgba(255,255,255,.88); margin-top: 8px; max-width: 56ch; }
.banner .btn { --btn-bg: #fff; --btn-fg: var(--brand-700); --btn-bd: #fff; }

.wilaya-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.wilaya-grid a { padding: 9px 12px; border-radius: var(--r-sm); background: var(--surface-2); font-size: .84rem; font-weight: 600; transition: all var(--t); }
.wilaya-grid a:hover { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- 20. Pied de page ---------- */
.footer { margin-top: auto; background: var(--bg-soft); border-top: 1px solid var(--border-soft); padding-block: 44px 26px; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-brand { grid-column: auto; max-width: 280px; } }
.footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-mute); margin-bottom: 12px; font-weight: 700; }
.footer li + li { margin-top: 8px; }
.footer a { font-size: .89rem; color: var(--text-soft); transition: color var(--t); }
.footer a:hover { color: var(--accent-ink); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .82rem; color: var(--text-mute); }
.socials { display: flex; gap: 8px; }
.socials a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--border-soft); }
.socials svg { width: 17px; height: 17px; }
.pay-methods { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pay-methods span { padding: 5px 10px; border: 1px solid var(--border); border-radius: var(--r-xs); font-size: .7rem; font-weight: 700; color: var(--text-mute); background: var(--surface); }

/* ---------- 21. Barre mobile ---------- */
.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 90;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(14px); border-top: 1px solid var(--border-soft);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 720px) { .tabbar { display: none; } }
body:has(.tabbar) { padding-bottom: 62px; }
@media (min-width: 720px) { body:has(.tabbar) { padding-bottom: 0; } }
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 8px 4px; font-size: .66rem; font-weight: 600; color: var(--text-mute); position: relative;
}
.tabbar a[aria-current="page"] { color: var(--accent-ink); }
:root[data-theme="dark"] .tabbar a[aria-current="page"] { color: var(--brand-200); }
.tabbar svg { width: 21px; height: 21px; }
.tabbar .sell-fab { color: #fff; }
.tabbar .sell-fab .fab { width: 38px; height: 38px; border-radius: var(--r-full); background: var(--brand); display: grid; place-items: center; margin-top: -14px; box-shadow: var(--shadow-md); }
.tabbar .dot { position: absolute; top: 5px; inset-inline-end: calc(50% - 18px); min-width: 15px; height: 15px; padding: 0 3px; background: var(--rose); color: #fff; border-radius: var(--r-full); font-size: .6rem; font-weight: 800; line-height: 15px; text-align: center; }

/* ---------- 22. Toasts, modales, états ---------- */
.toasts { position: fixed; z-index: 300; bottom: 20px; inset-inline-end: 20px; display: flex; flex-direction: column; gap: 10px; max-width: min(340px, calc(100vw - 32px)); }
@media (max-width: 719px) { .toasts { bottom: 74px; inset-inline: 16px; max-width: none; } }
.toast {
  display: flex; gap: 10px; align-items: start; padding: 13px 15px;
  background: var(--ink-900); color: #fff; border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); font-size: .88rem; animation: toastIn 260ms cubic-bezier(.2,.8,.3,1);
}
:root[data-theme="dark"] .toast { background: var(--surface-2); border: 1px solid var(--border); }
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--brand-300); }
.toast.err svg { color: #FF8B8B; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.97); } }

.modal { position: fixed; inset: 0; z-index: 250; display: none; place-items: center; padding: 16px; }
.modal.is-open { display: grid; }
.modal-scrim { position: absolute; inset: 0; background: rgba(6, 12, 10, .55); backdrop-filter: blur(3px); }
.modal-panel {
  position: relative; background: var(--bg); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  width: min(460px, 100%); max-height: 88vh; overflow-y: auto; padding: 26px;
  animation: modalIn 220ms cubic-bezier(.2,.8,.3,1); border: 1px solid var(--border);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.modal-close { position: absolute; top: 14px; inset-inline-end: 14px; width: 34px; height: 34px; border-radius: var(--r-full); display: grid; place-items: center; color: var(--text-mute); }
.modal-close:hover { background: var(--surface-2); }
.modal-close svg { width: 17px; height: 17px; }

.empty { text-align: center; padding: 56px 20px; }
.empty .ico { width: 66px; height: 66px; border-radius: var(--r-full); background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 18px; color: var(--text-mute); }
.empty .ico svg { width: 30px; height: 30px; }
.empty h3 { margin-bottom: 7px; }
.empty p { color: var(--text-mute); font-size: .93rem; max-width: 42ch; margin: 0 auto 22px; }

.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--border-soft) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-sm); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.empty .ico.spin svg { animation: vt-spin 0.9s linear infinite; }
@keyframes vt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .empty .ico.spin svg { animation: none; }
}

.alert { display: flex; gap: 11px; padding: 13px 15px; border-radius: var(--r-sm); font-size: .88rem; border: 1px solid; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert-info { background: var(--info-50); border-color: color-mix(in srgb, var(--info) 25%, transparent); color: var(--info); }
.alert-warn { background: var(--sand-50); border-color: color-mix(in srgb, var(--sand) 35%, transparent); color: var(--sand-600); }
.alert-ok   { background: var(--brand-50); border-color: color-mix(in srgb, var(--brand) 25%, transparent); color: var(--brand-700); }
:root[data-theme="dark"] .alert-info { background: #101E36; color: #8FB4FA; }
:root[data-theme="dark"] .alert-warn { background: #2A2010; color: #F0C57A; }
:root[data-theme="dark"] .alert-ok   { background: #0E241D; color: var(--brand-200); }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .82rem; color: var(--text-mute); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--accent-ink); text-decoration: underline; }
.breadcrumb .sep { opacity: .5; }
html[dir="rtl"] .breadcrumb .sep { transform: scaleX(-1); display: inline-block; }

/* ---------- 23. Recherche géographique et carte ---------- */
.geo-search { display: flex; flex-direction: column; gap: 10px; }

.geo-combo { max-width: 480px; }
.geo-combo-field { position: relative; }
.geo-combo-list {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0;
  max-height: 320px; overflow-y: auto; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}
.geo-combo-list.hidden { display: none; }
.geo-combo-option {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: .9rem;
}
.geo-combo-option:hover, .geo-combo-option.is-active { background: var(--surface-2); }
.geo-combo-secondaire { color: var(--text-mute); font-size: .76rem; flex: none; }
.geo-combo-etat { padding: 10px; color: var(--text-mute); font-size: .87rem; list-style: none; }

.geo-position { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.geo-rayon { display: flex; align-items: center; gap: 8px; }
.geo-rayon.hidden { display: none; }
#geo-position-explication { max-width: 60ch; margin: 0; }
#geo-position-statut:empty { display: none; }

.geo-carte-panel.hidden { display: none; }
.geo-carte-panel { position: relative; margin-top: 4px; }
.geo-carte {
  width: 100%; height: 380px; border-radius: var(--r-md); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
}
.geo-map-empty, .geo-map-error { margin-top: 10px; }
.geo-retour-zone { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 400; }
.geo-retour-zone.hidden { display: none; }
.geo-popup { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.geo-popup .btn { margin-top: 6px; align-self: flex-start; }

@media (max-width: 480px) {
  .geo-combo { max-width: 100%; }
  .geo-position { align-items: flex-start; }
  .geo-carte { height: 280px; }
}

/* ---------- 24. Impression ---------- */
@media print {
  .header, .footer, .tabbar, .toasts, .btn, .drawer { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---- Bandeau d'information / maintenance (assets/js/site-config.js) ---- */
.vt-bandeau {
  margin: 12px auto 0; max-width: var(--container); box-sizing: border-box;
  width: calc(100% - 32px); padding: 12px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
  font-size: .95rem; line-height: 1.45; overflow-wrap: anywhere;
}
.vt-bandeau strong { font-weight: 700; }
.vt-bandeau-info   { border-left: 4px solid var(--info); }
.vt-bandeau-succes { border-left: 4px solid var(--brand); }
.vt-bandeau-alerte { border-left: 4px solid var(--rose); }

/* ---- Indicateurs Vintea (VT.badgesVintea) ----
   Identite propre : pastille arrondie a filet, icone du jeu du site. Texte
   en --accent-ink / --text (contraste >= 4.5:1 en clair comme en sombre) ;
   la couleur de filet n'est qu'un repere secondaire, jamais seule porteuse
   du sens. */
.vt-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; align-items: center; }
.vt-badge-vintea {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  padding: 2px 9px 2px 6px; border-radius: var(--r-full);
  border: 1.5px solid currentColor; background: var(--surface);
  font-size: .75rem; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.vt-badge-vintea span { overflow: hidden; text-overflow: ellipsis; }
.vt-badge-certifie { color: var(--accent-ink); }
.vt-badge-vendu    { color: var(--text); border-color: var(--sand); }
.vt-badge-ico { width: 14px; height: 14px; flex: none; }
.vt-badges-detail { flex-direction: column; align-items: flex-start; gap: 4px; margin: 8px 0 10px; }
.vt-badges-detail .vt-badge-vintea { font-size: .85rem; }
.vt-badge-exp { font-size: .8rem; color: var(--text-soft); line-height: 1.4; }
.vt-badge-lien { font-size: .8rem; color: var(--accent-ink); text-decoration: underline; }

/* ---- Autocompletion (assets/js/suggest.js) ---- */
.sug-hote { position: relative; }
.sug-hote .search-sug { top: calc(100% + 4px); }
.sug-opt { display: flex; gap: 10px; align-items: center; padding: 8px 10px;
  border-radius: var(--r-sm); font-size: .9rem; cursor: pointer; }
.sug-opt:hover, .sug-opt.is-active { background: var(--surface-2); outline: 2px solid var(--ring); outline-offset: -2px; }
.sug-ico { width: 16px; height: 16px; flex: none; color: var(--text-mute); }
.sug-etat { padding: 8px 10px; font-size: .85rem; color: var(--text-soft); }

/* ---- Espace professionnel (espace-pro.html) ---- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 16px; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 560px; }
.table th, .table td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.table th { font-weight: 700; color: var(--text-soft); background: var(--bg-soft); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: .9rem; }
.kv dt { color: var(--text-soft); }
.kv dd { margin: 0; text-align: end; }
.select-sm { padding: 4px 8px; font-size: .85rem; min-height: 32px; width: auto; }
.h3 { font-size: 1.1rem; margin-bottom: 10px; }

/* ---------- 13 bis. Fiche article : cœur, points, carte vendeur, achat protégé ---------- */
.gallery-main { touch-action: pan-y; }
.gallery-fav {
  position: absolute; inset-block-end: 10px; inset-inline-end: 10px;
  min-width: 44px; height: 44px; padding: 0 12px; border-radius: var(--r-full);
  display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem;
  background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm); color: var(--text);
}
.gallery-fav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; }
.gallery-fav[aria-pressed="true"] { color: var(--rose, #d6336c); }
.gallery-fav[aria-pressed="true"] svg { fill: currentColor; }
.gallery-dots {
  position: absolute; inset-block-end: 18px; inset-inline: 64px; display: flex;
  justify-content: center; gap: 6px; pointer-events: none;
}
.gallery-dot {
  width: 7px; height: 7px; border-radius: var(--r-full);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); transition: background var(--t), transform var(--t);
}
.gallery-dot[aria-current="true"] { background: var(--surface); transform: scale(1.3); }

.seller-mini {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-lg);
}
.seller-mini-info { min-width: 0; display: grid; gap: 3px; justify-items: start; }
.seller-mini-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.seller-mini-desktop { display: none; }
@media (min-width: 900px) {
  .seller-mini-mobile { display: none; }
  .seller-mini-desktop { display: flex; }
}
.star-half { position: relative; display: inline-flex; }
.star-half svg + svg { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
html[dir="rtl"] .star-half svg + svg { clip-path: inset(0 0 0 50%); }

.price-prot { display: inline-flex; align-items: center; gap: 6px; }
.price-prot .prot-ico { width: 16px; height: 16px; flex: none; }
.achat-protege {
  display: flex; gap: 11px; align-items: flex-start; margin-top: 12px; padding: 12px 14px;
  border: 1px solid var(--border-soft); border-radius: var(--r-md, 14px);
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
}
.achat-protege > svg { width: 22px; height: 22px; color: var(--brand); flex: none; margin-top: 1px; }
.achat-protege a { color: var(--brand); font-weight: 600; text-decoration: underline; }

/* Lieu (epingle + wilaya) sur une seule ligne, sens de lecture respecte (RTL). */
.lieu-ligne { display: inline-flex; align-items: center; gap: 5px; margin: 0; }
.lieu-ligne svg { width: 14px; height: 14px; flex: none; }
/* Conseils photo / carte d'adresse de livraison */
.conseils-photo { margin: 0; padding-inline-start: 20px; display: grid; gap: 9px; }
.adr-carte { display: grid; gap: 3px; padding: 14px 16px; border: 1px solid var(--border-soft); border-radius: var(--r-md, 14px); background: var(--surface-2); }
.adr-carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
