/* ============ AminosTech Pièces Auto — Atelier theme ============ */
:root {
  --ink: #171b21;        /* charbon atelier */
  --steel: #232a33;
  --bg: #f3f4f6;         /* blanc route */
  --card: #ffffff;
  --amber: #f2a20c;      /* signal chantier */
  --amber-dark: #d18a05;
  --oil: #2c4a63;        /* bleu huile */
  --ok: #1e9e6a;
  --danger: #c8442c;
  --line: #e2e5e9;
  --muted: #6b7280;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(23, 27, 33, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Cairo", "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
  background: var(--bg); color: var(--ink);
  line-height: 1.65; font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--oil); text-decoration: none; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.section { padding: 34px 16px; }
.section-title { font-size: 1.35rem; font-weight: 800; margin-bottom: 18px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.empty { color: var(--muted); padding: 24px 0; }
.accent { color: var(--amber); }

/* --- header --- */
.site-header { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 18px; padding: 12px 16px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; }
.logo small { color: #b9c0c9; font-weight: 600; font-size: 0.7rem; }
.logo-mark {
  background: var(--amber); color: var(--ink); font-weight: 800;
  border-radius: 8px; padding: 6px 9px; letter-spacing: 1px;
}
.logo-text { line-height: 1.15; font-size: 0.95rem; }
.header-search { flex: 1; display: flex; min-width: 220px; }
.header-search input {
  flex: 1; border: none; border-radius: 8px 0 0 8px; padding: 10px 14px;
  font-family: inherit; font-size: 0.95rem;
}
[dir="rtl"] .header-search input { border-radius: 0 8px 8px 0; }
.header-search button {
  background: var(--amber); border: none; color: var(--ink); font-weight: 700;
  padding: 0 18px; cursor: pointer; border-radius: 8px 0 0 8px; font-family: inherit;
}
[dir="ltr"] .header-search button { border-radius: 0 8px 8px 0; }
.header-links { display: flex; align-items: center; gap: 16px; }
.header-links a { color: #e7eaee; font-weight: 600; }
.cart-link { position: relative; }
.cart-badge {
  background: var(--amber); color: var(--ink); font-size: 0.72rem; font-weight: 800;
  border-radius: 999px; padding: 1px 7px; margin-inline-start: 4px;
}

/* --- hero + signature hazard strip --- */
.hero {
  background:
    linear-gradient(160deg, rgba(242, 162, 12, 0.08), transparent 45%),
    var(--ink);
  color: #fff; padding: 48px 0 0;
}
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; }
.hero-sub { color: #c6ccd4; margin: 8px 0 26px; max-width: 560px; }
.compat-card {
  background: var(--steel); border: 1px solid #313a45; border-radius: var(--radius);
  padding: 18px; margin-bottom: 42px; box-shadow: var(--shadow);
}
.compat-title { font-weight: 700; color: var(--amber); margin-bottom: 12px; }
.compat-fields { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; }
.compat-fields select, .compat-fields input {
  padding: 11px 12px; border-radius: 8px; border: 1px solid #3a4450;
  background: #1c2229; color: #fff; font-family: inherit; font-size: 0.95rem;
}
.hazard-strip {
  height: 14px;
  background: repeating-linear-gradient(
    -45deg, var(--amber) 0 16px, var(--ink) 16px 32px
  );
}

/* --- boutons --- */
.btn {
  display: inline-block; border: none; cursor: pointer; font-family: inherit;
  font-weight: 700; border-radius: 8px; padding: 11px 20px; font-size: 0.95rem;
  transition: transform 0.12s, background 0.12s; text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: var(--amber-dark); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-block { display: block; width: 100%; margin-top: 10px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* --- categories --- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.cat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px; text-align: center; font-weight: 700; color: var(--ink);
  display: flex; flex-direction: column; gap: 9px; transition: border-color 0.12s, transform 0.12s;
}
.cat-card:hover { border-color: var(--amber); transform: translateY(-2px); }
.cat-icon { font-size: 2.8rem; display: grid; place-items: center; aspect-ratio: 16 / 9; }
/* Ratio 16:9 = celui des visuels de categories: l'image entiere reste visible,
   textes compris, sans recadrage. */
.cat-img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: contain;
  background: #f7f8f9; border-radius: 8px;
}

/* --- product cards --- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.product-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--ink); display: flex; flex-direction: column;
  transition: transform 0.12s, box-shadow 0.12s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-img { position: relative; aspect-ratio: 4/3; background: #eef0f3; display: grid; place-items: center; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.no-img { font-size: 2rem; opacity: 0.4; }
.no-img.big { font-size: 4rem; }
.product-body {
  padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1;
  background: #f7f9fb; border-top: 1px solid var(--line);
}
.product-name { font-weight: 700; font-size: 0.95rem; line-height: 1.4;
  overflow-wrap: anywhere; word-break: break-word;
  direction: ltr; text-align: left; }
.product-footer {
  margin-top: auto; display: flex; flex-direction: column; gap: 7px;
  padding-top: 8px;
}
.carte-note { padding-bottom: 6px; }
.footer-prix-ligne { display: flex; justify-content: space-between; align-items: center;
  border-top: 1px dashed #d9dee4; padding-top: 8px; }
.price {
  font-weight: 800; color: var(--amber); font-size: 1.15rem;
}
.price.big { font-size: 1.7rem; margin: 14px 0; color: var(--amber); }
.dispo.ok { color: var(--ok); font-size: 0.8rem; font-weight: 700; }
.dispo.off { color: var(--danger); font-size: 0.8rem; font-weight: 700; }

/* --- marque / designation (texte latin : aligne a gauche) --- */
.spec-line { font-size: 0.82rem; color: var(--muted); direction: ltr; text-align: left; }
.p-marque { color: var(--oil); font-weight: 800; }
.specs { list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 8px; margin: 12px 0; padding: 4px 14px; }
.specs li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 0.92rem; }
.specs li:last-child { border-bottom: none; }
.specs span { color: var(--muted); }

/* --- plaque de référence (signature) --- */
.ref-chip {
  font-family: "Consolas", "Courier New", monospace; direction: ltr; display: inline-block;
  background: #eef0f3; border: 1px solid #d5d9de; border-radius: 5px;
  padding: 1px 8px; font-size: 0.78rem; letter-spacing: 1px; color: #3b434d;
  width: fit-content;
}
.ref-chip.big { font-size: 0.95rem; padding: 4px 12px; }

/* --- badges --- */
.badge { border-radius: 6px; padding: 2px 9px; font-size: 0.75rem; font-weight: 700; }
.badge-etat { position: absolute; top: 8px; inset-inline-start: 8px; }
.etat-origine { background: #dff3ea; color: #14724c; }
.etat-adaptable { background: #e4ecf6; color: #2c4a63; }
.etat-occasion { background: #f6ecd9; color: #8a6413; }

/* --- catalog layout --- */
.catalog { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.filters {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; position: sticky; top: 78px;
}
.filters h3 { margin-bottom: 10px; }
.filters label { font-size: 0.85rem; font-weight: 700; margin: 10px 0 4px; display: block; }
.filters select, .filters input {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 0.9rem; background: #fff;
}
.catalog-head { display: flex; justify-content: space-between; align-items: baseline; }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 26px; }
.pagination a, .pagination span {
  padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-weight: 700;
}
.pagination a.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* --- product page --- */
.product-page { display: grid; grid-template-columns: 1fr 1.1fr; gap: 34px; align-items: start; }
.gallery-main {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  aspect-ratio: 4/3; display: grid; place-items: center; overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumbs img {
  width: 70px; height: 70px; object-fit: cover; border-radius: 8px;
  border: 2px solid var(--line); cursor: pointer;
}
.gallery-thumbs img:hover { border-color: var(--amber); }
.product-info h1 { font-size: 1.5rem; margin-bottom: 10px; }
.info-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.info-row .badge-etat { position: static; }
.delai-note {
  background: #fdf4e0; border: 1px solid #f0dcae; border-radius: 8px;
  padding: 10px 14px; margin-bottom: 16px; font-size: 0.92rem;
}
.add-form { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; flex-wrap: wrap; }
.qty-box { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.qty-box input { width: 56px; border: none; text-align: center; font-family: inherit; font-size: 1rem; }
.qty-btn { background: #eef0f3; border: none; width: 38px; font-size: 1.1rem; cursor: pointer; }
.compat-table { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 18px; }
.compat-table ul { list-style: none; margin: 8px 0; }
.compat-table li { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.compat-table li:last-child { border-bottom: none; }
.description { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }

/* --- panier / checkout --- */
.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.cart-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; display: flex; gap: 14px; align-items: center; margin-bottom: 10px;
}
.cart-thumb { width: 74px; height: 74px; border-radius: 8px; overflow: hidden; background: #eef0f3; display: grid; place-items: center; flex-shrink: 0; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cart-info a { font-weight: 700; color: var(--ink); }
.cart-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.qty-form input { width: 62px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; text-align: center; font-family: inherit; }
.link-danger { background: none; border: none; color: var(--danger); cursor: pointer; font-family: inherit; font-size: 0.85rem; }
.cart-summary {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; position: sticky; top: 78px;
}
.sum-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 0.95rem; }
.sum-row.total { font-weight: 800; font-size: 1.1rem; border-bottom: none; color: var(--oil); }
.checkout-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.checkout-form h3 { margin: 14px 0 8px; }
.checkout-form h3:first-child { margin-top: 0; }
.checkout-form label { display: block; font-weight: 700; font-size: 0.88rem; margin: 12px 0 4px; }
.checkout-form input, .checkout-form select, .checkout-form textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 0.95rem;
}
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay-option {
  border: 2px solid var(--amber); background: #fdf4e0; border-radius: 8px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 2px;
}

/* --- confirmation / suivi --- */
.confirm-page { display: grid; place-items: center; }
.confirm-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; text-align: center; max-width: 560px; width: 100%;
}
.confirm-icon { font-size: 2.6rem; }
.order-code {
  font-family: "Consolas", monospace; direction: ltr; background: var(--ink); color: var(--amber);
  display: inline-block; border-radius: 8px; padding: 8px 18px; font-size: 1.2rem;
  letter-spacing: 2px; margin: 8px 0 14px;
}
.confirm-summary { text-align: start; margin: 18px 0; }
.confirm-card .btn { margin: 6px 4px 0; }
.suivi-page { max-width: 640px; }
.suivi-form { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 10px; margin-bottom: 22px; }
.suivi-form input { padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; }
.suivi-result { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.suivi-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.timeline { list-style: none; margin: 20px 0; display: flex; justify-content: space-between; position: relative; }
.timeline::before { content: ""; position: absolute; top: 8px; right: 10%; left: 10%; height: 3px; background: var(--line); }
.timeline li { position: relative; z-index: 1; text-align: center; font-size: 0.82rem; font-weight: 700; color: var(--muted); flex: 1; }
.timeline .dot { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--line); margin: 0 auto 6px; border: 3px solid var(--bg); }
.timeline li.done { color: var(--ink); }
.timeline li.done .dot { background: var(--ok); }
.statut-en_attente { background: #fdf4e0; color: #8a6413; }
.statut-confirmee { background: #e4ecf6; color: #2c4a63; }
.statut-expediee { background: #e8e4f6; color: #4a3a8c; }
.statut-livree { background: #dff3ea; color: #14724c; }
.statut-annulee { background: #f8e3de; color: #a13721; }

/* --- flash --- */
.flashes { padding-top: 12px; }
.flash { border-radius: 8px; padding: 11px 15px; margin-bottom: 8px; font-weight: 600; font-size: 0.92rem; }
.flash-success { background: #dff3ea; color: #14724c; }
.flash-warning { background: #fdf4e0; color: #8a6413; }
.flash-danger { background: #f8e3de; color: #a13721; }

/* --- footer --- */
.site-footer { background: var(--ink); color: #c6ccd4; margin-top: 40px; border-top: 6px solid var(--amber); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; padding: 26px 16px; flex-wrap: wrap; }
.footer-cats { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-cats a { color: #e7eaee; font-size: 0.9rem; }

/* --- responsive --- */
@media (max-width: 900px) {
  .catalog, .product-page, .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .filters, .cart-summary { position: static; }
  .compat-fields { grid-template-columns: 1fr 1fr; }
  .compat-fields .btn { grid-column: 1 / -1; }
  .suivi-form { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-rail .cat-card { flex: 0 0 232px; }
  .header-inner { gap: 10px; }
  .header-search { order: 3; width: 100%; }
  .two-cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ============ v3: identite, rail categories, comptes, WhatsApp ============ */

/* --- topbar contact --- */
.topbar { background: #10141a; color: #9aa3ad; font-size: 0.82rem; }
.topbar-inner { display: flex; justify-content: space-between; gap: 12px; padding: 6px 16px; flex-wrap: wrap; }
.topbar a { color: #c6ccd4; }
.topbar-tels { display: flex; gap: 14px; }

/* --- rail categories horizontal --- */
.cat-rail-wrap { position: relative; }
.cat-rail {
  display: flex; gap: 12px; overflow-x: auto; scroll-behavior: smooth;
  padding: 4px 2px 10px; scroll-snap-type: x proximity;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.cat-rail::-webkit-scrollbar { height: 6px; }
.cat-rail::-webkit-scrollbar-thumb { background: #cfd4da; border-radius: 999px; }
.cat-rail .cat-card { flex: 0 0 265px; scroll-snap-align: start; }
.cat-rail.dragging { cursor: grabbing; scroll-behavior: auto; }
.cat-rail.dragging a { pointer-events: none; }
.rail-arrow {
  position: absolute; top: 45%; transform: translateY(-50%); z-index: 5;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer;
  box-shadow: var(--shadow); display: grid; place-items: center;
}
.rail-arrow:hover { background: var(--amber); border-color: var(--amber); }
.rail-arrow[hidden] { display: none; }
.rail-prev { right: -8px; }
.rail-next { left: -8px; }

/* --- WhatsApp --- */
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1eb855; }
.wa-float {
  position: fixed; bottom: 18px; inset-inline-start: 18px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.wa-float:hover { background: #1eb855; }
.wa-float.glisse { cursor: grabbing; box-shadow: 0 8px 22px rgba(0,0,0,0.35); }
.wa-svg { display: block; }

/* --- pages compte --- */
.auth-page { display: grid; place-items: center; }
.auth-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; width: 100%; max-width: 440px;
}
.auth-card h1 { font-size: 1.4rem; margin-bottom: 4px; }
.auth-card label { display: block; font-weight: 700; font-size: 0.86rem; margin: 12px 0 4px; }
.auth-card input, .auth-card select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 0.95rem;
}
.auth-alt { margin-top: 14px; text-align: center; font-size: 0.9rem; }
.btn-google { background: #fff; border: 1px solid #d5d9de; color: #3c4043; margin-top: 14px; }
.btn-google:hover { background: #f6f7f8; }
.sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.82rem; margin: 14px 0 2px; }
.sep::before, .sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.profil-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.order-row {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; gap: 12px; flex-wrap: wrap;
}
.order-row-end { display: flex; align-items: center; gap: 12px; }
.order-code.small { font-size: 0.9rem; padding: 4px 10px; letter-spacing: 1px; }

.guest-note {
  background: #eef3f8; border: 1px solid #d6e0ea; border-radius: 8px;
  padding: 10px 14px; font-size: 0.9rem; margin-bottom: 12px;
}
.suggest-compte {
  background: #fdf4e0; border: 1px solid #f0dcae; border-radius: var(--radius);
  padding: 16px; margin: 18px 0; text-align: start;
}
.demande-page { max-width: 720px; }

/* --- affichage correct des nombres en contexte RTL --- */
.price, .kpi-num, .sum-row span:last-child, .order-row strong,
.totals-line, .specs strong {
  unicode-bidi: isolate;
}

/* ============ v5: logo, partage, copyright ============ */

/* --- logo --- */
.logo-img { height: 46px; width: auto; display: block; }
@media (max-width: 560px) { .logo-img { height: 38px; } }

/* --- boutons de partage --- */
.partage {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 18px;
}
.partage-titre { font-weight: 700; font-size: 0.9rem; display: block; margin-bottom: 10px; }
.partage-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pbtn {
  border: none; cursor: pointer; font-family: inherit; font-weight: 700;
  border-radius: 8px; padding: 8px 15px; font-size: 0.85rem; color: #fff;
  transition: transform 0.12s, filter 0.12s; text-decoration: none; display: inline-block;
}
.pbtn:hover { filter: brightness(1.08); color: #fff; }
.pbtn:active { transform: translateY(1px); }
.pbtn-wa { background: #25d366; }
.pbtn-fb { background: #1877f2; }
.pbtn-tg { background: #2aabee; }
.pbtn-copier { background: #4b5563; }
.pbtn-copier.ok { background: var(--ok); }
.pbtn-natif { background: var(--oil); }

/* --- copyright --- */
.copyright {
  background: #10141a; color: #8b939d; font-size: 0.82rem;
  padding: 12px 0; text-align: center; border-top: 1px solid #232a33;
}
.cr-sep { margin: 0 6px; opacity: 0.5; }
.muted-cr { color: #6b7280; }

/* ============ v6: groupes d'origine ============ */
.groupe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
.groupe-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 12px; text-align: center; color: var(--ink);
  display: flex; flex-direction: column; gap: 5px; font-weight: 700;
  transition: border-color 0.12s, transform 0.12s;
}
.groupe-card:hover { border-color: var(--amber); transform: translateY(-2px); }
.groupe-icone { font-size: 1.9rem; line-height: 1.2; }
.groupe-nom { font-size: 0.92rem; }
.groupe-nb { font-size: 0.78rem; color: var(--muted); font-weight: 600; }

.groupe-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.groupe-tabs a {
  padding: 7px 13px; border-radius: 999px; background: var(--card);
  border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: 0.85rem;
}
.groupe-tabs a:hover { border-color: var(--amber); }
.groupe-tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.groupe-tabs .tab-nb {
  background: #eef0f3; color: #4b5563; border-radius: 999px;
  padding: 0 6px; font-size: 0.72rem; margin-inline-start: 3px;
}
.groupe-tabs a.active .tab-nb { background: var(--amber); color: var(--ink); }
@media (max-width: 560px) {
  .groupe-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- fil d'ariane --- */
.fil-ariane {
  padding: 12px 16px 0; font-size: 0.85rem; color: var(--muted);
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.fil-ariane a { color: var(--oil); }
.fil-ariane a:hover { text-decoration: underline; }
.fil-ariane .courant { color: var(--ink); font-weight: 600; }

/* ============ v11: recherche assistee ============ */
.header-search { position: relative; }
.suggestions {
  position: fixed; z-index: 2000;
  background: #fff; border: 1px solid #e3e6ea; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.14); overflow: hidden; max-height: 60vh; overflow-y: auto;
}
.suggestions[hidden] { display: none; }
.sugg {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  text-decoration: none; color: #171b21; border-bottom: 1px solid #f1f3f5;
}
.sugg:last-child { border-bottom: 0; }
.sugg:hover, .sugg.actif { background: #fff6e5; }
.sugg-ico { flex: 0 0 auto; width: 34px; height: 34px; display: flex;
  align-items: center; justify-content: center; font-size: 1.1rem; }
.sugg-ico img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px;
  border: 1px solid #eef1f4; background: #fff; }
.sugg-txt { flex: 1 1 auto; font-weight: 600; font-size: 0.92rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sugg-det { flex: 0 0 auto; color: #6b7480; font-size: 0.78rem; direction: ltr; }
.note-recherche {
  background: #fff6e5; border-inline-start: 3px solid #f2a20c;
  padding: 9px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 0.9rem;
}
.bloc-suggestion { margin-top: 28px; padding-top: 18px; border-top: 1px solid #e9ecef; }
.bloc-suggestion h3 { margin-bottom: 12px; font-size: 1.05rem; }
.bloc-pour-vous {
  background: linear-gradient(180deg, #fffaf0, #fff); border: 1px solid #f3e2c0;
  border-radius: 12px; padding: 16px; margin-bottom: 26px;
}

/* ============ v15: icônes header + barre mobile ============ */

/* icônes inline dans les liens du header (ordinateur) — complètent le texte */
.header-links a { display: inline-flex; align-items: center; gap: 6px; }
.header-links .ico { flex: 0 0 auto; }

/* « اطلب قطعة » mis en évidence (couleur ambre) — fonction distinctive */
.lien-demande {
  background: var(--amber); color: var(--ink) !important;
  padding: 7px 14px; border-radius: 999px; font-weight: 800 !important;
  transition: filter 0.15s;
}
.lien-demande:hover { filter: brightness(1.08); }

/* ===== Barre inférieure mobile — cachée par défaut (ordinateur inchangé) ===== */
.barre-mobile { display: none; }

@media (max-width: 760px) {
  .barre-mobile {
    display: flex; position: fixed; bottom: 0; inset-inline: 0; z-index: 900;
    background: #fff; border-top: 1px solid #e3e6ea;
    box-shadow: 0 -3px 16px rgba(0,0,0,0.08);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around; align-items: flex-end;
  }
  .bm-item {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
    color: #6b7480; font-size: 0.68rem; font-weight: 600; text-decoration: none;
    padding: 2px 0; min-width: 0;
  }
  .bm-item.actif { color: var(--amber, #f2a20c); }
  .bm-item span:last-child {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  }

  /* bouton central « اطلب قطعة » surélevé et coloré */
  .bm-central { position: relative; }
  .bm-cercle {
    display: flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; margin-top: -22px; border-radius: 50%;
    background: var(--amber, #f2a20c); color: #171b21;
    box-shadow: 0 4px 12px rgba(242,162,12,0.45); border: 3px solid #fff;
  }
  .bm-central span:last-child { color: var(--amber, #f2a20c); font-weight: 800; margin-top: 2px; }

  /* pastille compteur panier */
  .bm-icone-badge { position: relative; display: inline-flex; }
  .bm-badge {
    position: absolute; top: -6px; inset-inline-end: -8px;
    background: #e4572e; color: #fff; font-size: 0.62rem; font-weight: 800;
    border-radius: 999px; padding: 0 5px; min-width: 16px; text-align: center;
  }

  /* laisser de la place pour que la barre ne cache pas le contenu / le bouton WhatsApp */
  body { padding-bottom: 68px; }
  /* remonter le bouton WhatsApp flottant au-dessus de la barre inférieure */
  .wa-float { bottom: 80px; }
}

/* ============ v16: titres de sections + badges ============ */

/* En-tête de section façon "étiquette + titre + description" */
.titre-section { margin-bottom: 18px; }
.ts-etiquette {
  display: inline-block; background: rgba(242,162,12,0.14); color: #9a6a05;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.5px;
  padding: 3px 10px; border-radius: 999px; margin-bottom: 8px;
}
.titre-section h2 {
  font-size: 1.35rem; font-weight: 800; color: var(--ink, #171b21); margin: 0 0 4px;
}
.titre-section p { color: #6b7480; font-size: 0.9rem; margin: 0; }

/* Badges d'angle sur la carte produit (j-adid / top) */
.product-img { position: relative; }
.badge-coin {
  position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2;
  font-size: 0.68rem; font-weight: 800; padding: 3px 9px; border-radius: 999px;
  color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.badge-new { background: #1f8a4c; }
.badge-top { background: #e4572e; }

@media (max-width: 560px) {
  .titre-section h2 { font-size: 1.15rem; }
}

/* ============ v17: header épuré mobile + page explorer ============ */

/* masquer certains liens du header sur mobile (présents dans la barre du bas) */
@media (max-width: 760px) {
  .masquer-mobile { display: none !important; }
}

/* onglets de la page explorer (الكل / الأكثر طلباً / جديد) */
.onglets-explorer {
  display: flex; gap: 6px; border-bottom: 2px solid #eef1f4; margin-bottom: 14px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.onglets-explorer a {
  padding: 10px 16px; font-weight: 700; color: #6b7480; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.onglets-explorer a.actif { color: var(--ink, #171b21); border-bottom-color: var(--amber, #f2a20c); }

/* puces de catégories (filtre horizontal) */
.puces-categories {
  display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.puce {
  flex: 0 0 auto; padding: 6px 14px; border-radius: 999px;
  background: #f1f3f5; color: #46505a; font-size: 0.85rem; font-weight: 600;
  white-space: nowrap;
}
.puce.actif { background: var(--amber, #f2a20c); color: #171b21; }

/* bas de page explorer: compteur + pagination */
.explorer-pied { margin-top: 24px; text-align: center; }
.explorer-compte { color: #6b7480; font-weight: 700; margin-bottom: 12px; }

/* titre simple page explorer */
.titre-explorer { font-size: 1.4rem; font-weight: 800; margin-bottom: 18px; }
.product-grid > * { min-width: 0; }

/* ============ v21: filet de sécurité anti-débordement horizontal ============
   Le header sticky est en dehors de <main>, donc limiter main ne casse pas
   son comportement collant. Cela empêche toute page de « glisser » sur le côté. */
main { overflow-x: hidden; }
main > * { max-width: 100%; }

/* pagination compacte sur petit écran (35+ pages tenaient sur une seule ligne) */
@media (max-width: 560px) {
  .pagination { gap: 5px; }
  .pagination a, .pagination span { padding: 5px 9px; font-size: 0.85rem; }
}

/* grille: autoriser les colonnes à rétrécir sous la largeur du contenu */
@media (max-width: 560px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* v22: bandes horizontales propres (onglets + puces) — sans barre de défilement visible */
.onglets-explorer, .puces-categories { scrollbar-width: none; }
.onglets-explorer::-webkit-scrollbar,
.puces-categories::-webkit-scrollbar { display: none; }

/* ============ v25: page vitrine Gestion Fournisseur ============ */

/* --- Reveal au defilement (reutilisable partout sur la plateforme) --- */
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.reveal.vu { opacity: 1; transform: none; }
/* si le visiteur a demande moins d'animations, tout reste visible */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* --- En-tete --- */
.gf-hero { background: var(--ink); color: #f2f4f6; padding: 46px 0 40px; }
.gf-hero-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  flex-wrap: wrap;
}
.gf-hero-txt { flex: 1 1 340px; min-width: 0; }
.gf-eyebrow {
  display: inline-block; background: rgba(242,162,12,0.18); color: var(--amber);
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.6px;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 12px;
}
.gf-eyebrow-clair { background: rgba(242,162,12,0.16); }
.gf-hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.9rem); font-weight: 800; margin: 0 0 10px;
  letter-spacing: -0.5px;
}
.gf-accroche { font-size: 1.12rem; font-weight: 700; color: var(--amber); margin: 0 0 10px; }
.gf-sous { color: #c3c9d1; margin: 0 0 20px; max-width: 46ch; }
.gf-hero-visuel { flex: 1 1 380px; min-width: 0; }
.gf-hero-visuel img {
  width: 100%; height: auto; border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
}

/* --- Boutons --- */
.gf-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.gf-actions-centre { justify-content: center; }
.gf-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 20px; border-radius: 10px; font-weight: 800; font-size: 0.95rem;
  transition: filter 0.15s, transform 0.15s;
}
.gf-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.gf-btn-play { background: var(--amber); color: #171b21; }
.gf-btn-site { background: transparent; color: #e7eaee; border: 1px solid #4a535f; }
.gf-btn-wa { background: #25d366; color: #fff; }

/* --- Grille de fonctions --- */
.gf-grille {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px;
}
.gf-grille > * { min-width: 0; }
.gf-carte {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px; transition: box-shadow 0.2s, transform 0.2s;
}
.gf-carte:hover { box-shadow: 0 8px 22px rgba(0,0,0,0.08); transform: translateY(-2px); }
.gf-ico { font-size: 1.6rem; display: block; margin-bottom: 8px; }
.gf-carte h3 { font-size: 1.02rem; font-weight: 800; margin: 0 0 6px; }
.gf-carte p { color: #5c6570; font-size: 0.92rem; margin: 0; }
.gf-carte code {
  background: #eef0f3; border: 1px solid #d5d9de; border-radius: 4px;
  padding: 1px 6px; font-family: "Consolas", monospace; font-size: 0.85rem;
}

/* --- Section mobile --- */
.gf-mobile { background: var(--oil); color: #eef2f6; padding: 46px 0; margin-top: 8px; }
.gf-mobile-inner {
  display: flex; gap: 30px; align-items: center; flex-wrap: wrap;
}
.gf-mobile-txt { flex: 1 1 320px; min-width: 0; }
.gf-mobile h2 { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 800; margin: 0 0 10px; }
.gf-mobile-accroche { color: #dbe4ec; margin: 0 0 16px; max-width: 52ch; }
.gf-liste { list-style: none; padding: 0; margin: 0 0 20px; }
.gf-liste li {
  padding: 7px 0 7px 0; padding-inline-start: 26px; position: relative;
  color: #e7eef5; font-size: 0.94rem; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.gf-liste li:last-child { border-bottom: 0; }
.gf-liste li::before {
  content: "✓"; position: absolute; inset-inline-start: 0;
  color: var(--amber); font-weight: 800;
}
.gf-captures { flex: 1 1 280px; display: flex; gap: 10px; min-width: 0; }
.gf-captures img {
  flex: 1 1 0; min-width: 0; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* --- Pour qui --- */
.gf-pour-qui {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px;
}
.gf-qui {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; text-align: center; font-weight: 700;
}
.gf-qui span { display: block; font-size: 1.7rem; margin-bottom: 6px; }

/* --- Appel final --- */
.gf-final { background: var(--ink); color: #f2f4f6; padding: 44px 0; text-align: center; }
.gf-final h2 { font-size: clamp(1.3rem, 4vw, 1.9rem); font-weight: 800; margin: 0 0 8px; }
.gf-final p { color: #c3c9d1; margin: 0 0 18px; }

@media (max-width: 560px) {
  .gf-captures { gap: 8px; }
  .gf-hero { padding: 34px 0 30px; }
}

/* --- Bandeau logiciel sur l'accueil + lien pied de page --- */
.bandeau-gf {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, var(--ink) 0%, #23303d 100%);
  color: #eef2f6; border-radius: 14px; padding: 20px 22px;
  transition: transform 0.18s, box-shadow 0.18s;
}
.bandeau-gf:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,0.18); }
.bgf-ico { font-size: 2rem; flex: 0 0 auto; }
.bgf-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bgf-txt strong { color: var(--amber); font-size: 1.02rem; font-weight: 800; }
.bgf-txt span { color: #c3ccd6; font-size: 0.9rem; }
.bgf-fleche { margin-inline-start: auto; font-size: 1.4rem; color: var(--amber); flex: 0 0 auto; }
.footer-gf { margin-top: 8px; }
.footer-gf a { color: var(--amber); font-weight: 700; }

@media (max-width: 560px) {
  .bandeau-gf { padding: 16px; gap: 12px; }
  .bgf-fleche { display: none; }
}

/* --- Variante fine du bandeau (haut de page d'accueil) --- */
.bandeau-gf-fin { padding: 13px 18px; margin-top: 18px; }
.bandeau-gf-fin .bgf-ico { font-size: 1.5rem; }
.bandeau-gf-fin .bgf-txt strong { font-size: 0.95rem; }
.bandeau-gf-fin .bgf-txt span { font-size: 0.84rem; }

/* --- Lien logiciel dans le ruban d'onglets: se distingue des filtres produits --- */
.onglet-gf {
  color: var(--amber) !important; font-weight: 800;
  border-bottom-color: transparent !important;
  margin-inline-start: auto; padding-inline-start: 18px;
}
.onglet-gf:hover { filter: brightness(1.12); }

@media (max-width: 560px) {
  .bandeau-gf-fin { margin-top: 14px; }
  .bandeau-gf-fin .bgf-txt span { display: none; }
  .onglet-gf { margin-inline-start: 8px; }
}

/* --- Prix dans l'en-tete --- */
.gf-prix-ligne {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: 0 0 18px; padding: 10px 14px; border-radius: 10px;
  background: rgba(242,162,12,0.12); border: 1px solid rgba(242,162,12,0.3);
  width: fit-content; max-width: 100%;
}
.gf-prix { font-size: 1.5rem; font-weight: 800; color: var(--amber); }
.gf-prix-note { font-size: 0.84rem; color: #c3c9d1; }

/* --- Video --- */
.gf-video {
  position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden;
  background: #000; box-shadow: 0 10px 30px rgba(0,0,0,0.16);
}
.gf-video iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

/* --- Galerie de captures (poste de travail) --- */
.gf-captures-pc {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px;
}
.gf-captures-pc > * { min-width: 0; }
.gf-captures-pc figure { margin: 0; }
.gf-captures-pc img {
  width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0,0,0,0.09);
}
.gf-captures-pc figcaption {
  margin-top: 8px; font-size: 0.86rem; color: #6b7480; line-height: 1.5;
}

/* --- Captures telephone --- */
.gf-captures-tel { flex: 1 1 300px; display: flex; gap: 12px; min-width: 0; }
.gf-captures-tel img {
  flex: 1 1 0; min-width: 0; height: auto; border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.32);
}

/* --- Bloc prix --- */
.gf-offre {
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  flex-wrap: wrap; background: var(--card); border: 2px solid var(--amber);
  border-radius: 14px; padding: 26px 28px;
}
.gf-offre-txt h2 { font-size: 1.3rem; font-weight: 800; margin: 0 0 4px; }
.gf-offre-txt p { color: #6b7480; margin: 0; font-size: 0.92rem; }
.gf-offre-prix { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.gf-offre-montant { font-size: 2.1rem; font-weight: 800; color: var(--ink); }
.gf-offre-montant small { font-size: 1rem; color: #6b7480; font-weight: 700; }

@media (max-width: 560px) {
  .gf-captures-tel { gap: 8px; }
  .gf-offre { padding: 20px; }
  .gf-offre-prix { width: 100%; justify-content: space-between; }
}

/* ============ v28: grille de catégories façon websoog (ordinateur) ============ */
.cats-grille {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.cat-tuile {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 15px 16px; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.cat-tuile:hover {
  border-color: var(--amber); box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.cat-tuile-ico {
  font-size: 1.5rem; width: 44px; height: 44px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: rgba(242,162,12,0.12); border-radius: 10px;
}
.cat-tuile-img {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: 10px; object-fit: cover;
}
.cat-tuile-nom {
  font-weight: 700; color: var(--ink); font-size: 0.98rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-tuile-fleche {
  margin-inline-start: auto; color: var(--amber); font-size: 1.3rem;
  font-weight: 800; flex: 0 0 auto;
}

/* Cette grille est pensée pour l'ordinateur. Sur mobile, les catégories sont
   accessibles via le bouton « الفئات » de la barre du bas → on masque la grille. */
@media (max-width: 760px) {
  .cats-desktop { display: none; }
}

/* 2 colonnes sur les écrans intermédiaires */
@media (min-width: 761px) and (max-width: 980px) {
  .cats-grille { grid-template-columns: repeat(2, 1fr); }
}

/* ============ v29: vraies remises ============ */
/* étiquette de section promo */
.ts-promo { background: rgba(228,87,46,0.14); color: #c73e1d; }

/* badge pourcentage sur la carte (coin opposé au badge new/top) */
.badge-remise {
  position: absolute; top: 8px; inset-inline-end: 8px; z-index: 2;
  background: #e4572e; color: #fff; font-weight: 800; font-size: 0.8rem;
  padding: 3px 9px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
/* si la carte a déjà un badge état en haut à droite, on décale la remise dessous */

/* ancien prix barré */
.price-wrap { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-ancien {
  text-decoration: line-through; color: #9aa2ab; font-size: 0.85rem; font-weight: 600;
}

/* aide sous un champ admin */
.aide-champ { display: block; color: #6b7480; font-size: 0.8rem; margin-top: 3px; }

/* ============ v30: bandeau تخفيضات façon websoog ============ */
.promo-section { padding-top: 28px; padding-bottom: 28px; }
.promo-bande {
  display: flex; align-items: stretch; gap: 0;
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: var(--card);
}

/* Panneau rouge fixe */
.promo-panneau {
  flex: 0 0 150px; display: flex; flex-direction: column; justify-content: center;
  gap: 4px; padding: 18px 16px; color: #fff; text-align: center;
  background: linear-gradient(150deg, #e4572e 0%, #c73e1d 100%);
}
.promo-eclair {
  font-size: 1.6rem; width: 46px; height: 46px; margin: 0 auto 4px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.18); border-radius: 50%;
}
.promo-titre { font-size: 1.35rem; font-weight: 800; }
.promo-jusqua { font-size: 0.82rem; opacity: 0.95; }
.promo-note { font-size: 0.72rem; opacity: 0.85; margin-top: 2px; }

/* Piste défilante */
.promo-piste {
  flex: 1 1 0; min-width: 0; display: flex; gap: 12px; padding: 14px;
  overflow-x: auto; scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.promo-piste::-webkit-scrollbar { height: 6px; }
.promo-piste::-webkit-scrollbar-thumb { background: #d5d9de; border-radius: 3px; }

/* Cartes promo — plus petites que les cartes normales */
.promo-carte {
  flex: 0 0 158px; scroll-snap-align: start;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; transition: box-shadow 0.15s, transform 0.15s;
  display: flex; flex-direction: column;
}
.promo-lien { display: flex; flex-direction: column; color: var(--ink); flex: 1; }
.promo-carte:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }
.promo-img { position: relative; aspect-ratio: 1 / 1; background: #f4f6f8;
  display: flex; align-items: center; justify-content: center; }
.promo-img img { width: 100%; height: 100%; object-fit: cover; }
.promo-noimg { font-size: 2rem; opacity: 0.4; }
.promo-corps { padding: 8px 10px 10px; }
.promo-nom {
  display: block; font-size: 0.8rem; font-weight: 700; line-height: 1.35;
  color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 5px;
}
.promo-prix-ligne { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
/* etoiles sur les cartes promo : centrees, au-dessus du prix */
.promo-etoiles { justify-content: center; margin-bottom: 5px; }
.promo-etoiles .etoile { font-size: 0.92rem; }
.promo-etoiles .carte-note-nb { font-size: 0.72rem; }
.promo-prix { color: #e4572e; font-weight: 800; font-size: 0.98rem; }
.promo-prix-ancien {
  text-decoration: line-through; color: #9aa2ab; font-size: 0.76rem; font-weight: 600;
}

@media (max-width: 560px) {
  .promo-panneau { flex-basis: 108px; padding: 14px 8px; }
  .promo-titre { font-size: 1.1rem; }
  .promo-jusqua, .promo-note { display: none; }
  .promo-carte { flex-basis: 140px; }
}

/* ============ v30: bulles onglets accueil (ordinateur) ============ */
.bulles-accueil { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.bulle {
  padding: 9px 22px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: #46505a; font-weight: 700; font-size: 0.92rem;
  font-family: inherit; cursor: pointer; transition: all 0.15s;
}
.bulle:hover { border-color: var(--amber); }
.bulle.actif { background: var(--amber); color: #171b21; border-color: var(--amber); }
.panneau-accueil[hidden] { display: none; }

/* Les bulles sont pensées pour l'ordinateur; sous 760px on masque toute la
   section (le mobile a déjà les sections الأكثر طلباً / وصل حديثاً + le bouton
   الفئات de la barre du bas). */
@media (max-width: 760px) {
  .onglets-accueil-section { display: none; }
}
/* Inversement, les anciennes sections répétées sont réservées au mobile. */
@media (min-width: 761px) {
  .mobile-seulement { display: none; }
}

/* onglet تخفيضات dans le ruban explorer */
.onglet-promo { color: #e4572e !important; font-weight: 800; }
.onglet-promo.actif { border-bottom-color: #e4572e !important; }

/* ============ v32: section FAQ (questions fréquentes) ============ */
.faq-liste { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.faq-item {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden;
}
.faq-item summary {
  padding: 15px 18px; font-weight: 700; color: var(--ink); cursor: pointer;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; font-size: 0.98rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; color: var(--amber); font-size: 1.4rem; font-weight: 800;
  flex: 0 0 auto; transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--amber); }
.faq-reponse { padding: 0 18px 16px; }
.faq-reponse p { color: #5c6570; line-height: 1.7; margin: 0; }

/* ============ v33: page « من نحن » ============ */
.apropos-hero {
  background: var(--ink); color: #f2f4f6; padding: 44px 0 38px; text-align: center;
}
.apropos-hero h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; margin: 0 0 8px; }
.apropos-slogan { color: var(--amber); font-weight: 700; font-size: 1.05rem; margin: 0; }
.apropos-texte { max-width: 760px; margin: 0 auto; }
.apropos-texte h2 {
  font-size: 1.25rem; font-weight: 800; margin: 28px 0 10px; color: var(--ink);
}
.apropos-texte p { color: #46505a; line-height: 1.85; margin: 0 0 12px; }
.apropos-liste { list-style: none; padding: 0; margin: 6px 0 0; }
.apropos-liste li {
  padding: 9px 0 9px 28px; padding-inline-start: 28px; position: relative;
  border-bottom: 1px dashed var(--line); color: #46505a;
}
.apropos-liste li:last-child { border-bottom: 0; }
.apropos-liste li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; color: var(--amber); font-weight: 800;
}
.apropos-contact {
  margin-top: 30px; padding: 22px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px;
}
.apropos-contact p { line-height: 2; }
.apropos-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* --- Bouton « voir tout » sous l'onglet الكل --- */
.voir-plus-wrap { text-align: center; margin-top: 22px; }
.btn-voir-plus {
  display: inline-block; padding: 12px 28px; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 800; font-size: 0.95rem;
  transition: background 0.15s, transform 0.15s;
}
.btn-voir-plus:hover { background: var(--oil); transform: translateY(-2px); }

/* --- Panneau تخفيضات qui se réduit au défilement (mobile surtout) --- */
.promo-panneau { transition: flex-basis 0.25s ease, padding 0.25s ease; overflow: hidden; }
.promo-bande.reduit .promo-panneau {
  flex-basis: 26px; padding-inline: 0;
}
/* quand réduit: on masque les textes, on garde une fine bande rouge verticale */
.promo-bande.reduit .promo-eclair,
.promo-bande.reduit .promo-jusqua,
.promo-bande.reduit .promo-note { display: none; }
.promo-bande.reduit .promo-titre {
  writing-mode: vertical-rl; text-orientation: mixed; font-size: 0.8rem;
  white-space: nowrap; margin: 0 auto;
}

/* ============ v40: protection des images produit ============ */
/* empeche la selection et le glisser-deposer des images */
.product-card img, .promo-carte img, #main-img, .gallery-thumbs img,
.cart-item img, .lentille-cible {
  -webkit-user-select: none; -moz-user-select: none; user-select: none;
  -webkit-user-drag: none; -webkit-touch-callout: none;
  pointer-events: auto;
}
/* couche transparente au-dessus de l'image principale : capte le clic droit
   et le glissement pour qu'ils n'atteignent pas l'image elle-meme */
.gallery-main { position: relative; }
.gallery-main .garde-image {
  position: absolute; inset: 0; z-index: 3; cursor: default;
}

/* ============ v40: loupe (zoom au survol) sur l'image produit ============ */
.gallery-main { overflow: hidden; }
.lentille {
  position: absolute; z-index: 5; pointer-events: none;
  border: 2px solid var(--amber); border-radius: 50%;
  width: 160px; height: 160px; display: none;
  background-repeat: no-repeat; box-shadow: 0 4px 16px rgba(0,0,0,.3);
  background-color: #fff;
}
/* sur mobile la loupe suit le doigt ; on l'active au toucher */
@media (hover: none) {
  .lentille { width: 130px; height: 130px; }
}

/* ============ v42: bouton « اطلب عبر واتساب » sur les cartes ============ */
/* la carte est maintenant un conteneur ; le lien produit occupe tout le haut */
.product-lien {
  display: flex; flex-direction: column; color: var(--ink); flex: 1;
}

/* ============ v50: notation par etoiles (avis clients) ============ */
/* etoiles d'affichage : ambre pleine, grise vide */
.etoiles { display: inline-flex; direction: ltr; gap: 2px; }
.etoile { color: #d4d9de; font-size: 1.15rem; line-height: 1; }
.etoile.pleine { color: var(--amber); }

/* resume sous le titre produit */
.note-resume { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 2px;
  color: var(--ink); width: fit-content; }
.note-resume .etoile { font-size: 1.05rem; }
.note-chiffre { font-weight: 800; color: var(--amber); }
.note-nb { color: var(--muted); font-size: 0.85rem; }

/* etoiles sur la carte produit : centrees, au-dessus de la ligne prix */
.carte-note { display: flex; align-items: center; justify-content: center; gap: 5px;
  width: 100%; }
.carte-note .etoile { font-size: 1.05rem; }
.carte-note-nb { color: var(--muted); font-size: 0.8rem; }

/* section avis sur la fiche produit */
.avis-section { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.avis-section h3 { display: flex; align-items: center; gap: 10px; }
.avis-moy { color: var(--amber); font-weight: 800; font-size: 0.95rem; }
.avis-info { margin-top: 8px; }

/* formulaire : etoiles cliquables (ordre inverse pour le survol CSS) */
.avis-form { background: #f7f9fb; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin: 12px 0; }
.avis-form-titre { font-weight: 700; margin-bottom: 8px; }
.etoiles-choix { display: inline-flex; flex-direction: row-reverse;
  justify-content: flex-end; direction: ltr; gap: 3px; margin-bottom: 10px; }
.etoiles-choix input { display: none; }
.etoiles-choix label { font-size: 2.4rem; color: #d4d9de; cursor: pointer;
  transition: color 0.12s; line-height: 1; }
/* DOM en ordre 5..1 + row-reverse (visuel 1..5) : l'etoile cochee et toutes
   celles qui la suivent en DOM (= notes inferieures) passent en ambre */
.etoiles-choix label:hover, .etoiles-choix label:hover ~ label,
.etoiles-choix input:checked ~ label { color: var(--amber); }
.avis-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 11px; font-family: inherit; font-size: 0.9rem; resize: vertical;
  margin-bottom: 10px; }

/* liste des avis */
.avis-liste { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.avis-carte { border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px;
  background: #fff; }
.avis-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.avis-nom { color: var(--ink); }
.avis-verifie { color: var(--ok); font-size: 0.75rem; font-weight: 700;
  background: #e7f6ec; padding: 1px 8px; border-radius: 20px; }
.avis-texte { margin-top: 6px; color: #3b434d; line-height: 1.7; }
.avis-vide { margin-top: 10px; }

/* ============ Réseaux sociaux (footer) ============ */
.footer-social { margin-top: 14px; }
.social-titre { display: block; margin-bottom: 8px; font-size: 0.95rem; }
.social-liens { display: flex; gap: 10px; flex-wrap: wrap; }
.social-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: #fff; transition: transform 0.15s, opacity 0.15s;
}
.social-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.social-btn.fb { background: #1877f2; }               /* Facebook bleu */
.social-btn.ig { background: radial-gradient(circle at 30% 107%,
  #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); } /* Instagram dégradé */
.social-btn.tk { background: #010101; }               /* TikTok noir */
.social-btn.yt { background: #ff0000; }               /* YouTube rouge */

/* ====== Prix sur demande (via WhatsApp) ====== */
.prix-demande-box {
  display: flex; align-items: center; gap: 12px;
  background: #e8f8f5; border: 1px solid #a3e4d7;
  border-radius: 12px; padding: 14px 16px; margin: 14px 0;
}
.prix-demande-icone { font-size: 1.8rem; line-height: 1; }
.prix-demande-box strong { color: #0e6655; font-size: 1.05rem; }
.prix-demande-box p { margin: 3px 0 0; font-size: 0.85rem; color: #45726a; }
.btn-wa.btn-lg { font-size: 1.05rem; padding: 14px; }

/* ====== Bannieres fournisseurs mis en avant (sponsorises) ====== */
.bannieres-avant {
  display: grid;
  grid-template-columns: repeat(var(--n, 1), 1fr);
  gap: 12px; margin: 14px 0;
}
.banniere-avant {
  display: block; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.10); transition: transform 0.15s;
}
.banniere-avant:hover { transform: translateY(-2px); }
.banniere-avant img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  aspect-ratio: 2.34 / 1;
}
@media (max-width: 700px) {
  .bannieres-avant { grid-template-columns: 1fr; }
}

/* ====== En-tete page fournisseur + onglets de tri ====== */
.four-header {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #fff8ec, #fff);
  border: 1px solid #f2d492; border-radius: 14px;
  padding: 14px 18px; margin-bottom: 16px;
}
.four-banniere {
  max-width: 220px; width: 40%; border-radius: 10px; display: block;
}
.four-header-txt h2 { margin: 0 0 4px; font-size: 1.3rem; }
.four-header-txt p { margin: 0; font-size: 0.9rem; }
.tri-tabs {
  display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap;
}
.tri-tabs a {
  padding: 8px 18px; border-radius: 22px; font-weight: 600;
  font-size: 0.92rem; background: #f0f2f5; color: #3a4149;
  border: 1px solid transparent; transition: all 0.15s;
}
.tri-tabs a:hover { background: #e6e9ee; }
.tri-tabs a.active {
  background: var(--amber, #f2a20c); color: #fff;
}
@media (max-width: 700px) {
  .four-header { flex-direction: column; text-align: center; }
  .four-banniere { width: 100%; max-width: none; }
}

/* ====== Bandeau defilant des marques de voitures ====== */
.marques-bande {
  overflow: hidden; margin: 14px 0;
  background: #fff; border-radius: 12px;
  border: 1px solid #e6e9ee;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  padding: 12px 0; position: relative;
}
/* fondu sur les bords */
.marques-bande::before, .marques-bande::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 2;
  pointer-events: none;
}
.marques-bande::before { right: 0; background: linear-gradient(to left, #fff, transparent); }
.marques-bande::after  { left: 0;  background: linear-gradient(to right, #fff, transparent); }
.marques-piste {
  display: flex; align-items: center;
  width: max-content;
  animation: defiler-marques 60s linear infinite;
}
.marques-bande:hover .marques-piste { animation-play-state: paused; }
.marques-groupe {
  display: flex; align-items: center; flex: 0 0 auto;
}
.marque-item {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  /* l'espacement est porte par l'item (pas par un gap du conteneur) :
     ainsi la piste vaut exactement 2x une copie → boucle sans saut */
  padding: 0 22px;
}
.marque-item img {
  max-height: 44px; width: auto; object-fit: contain;
  filter: grayscale(35%); opacity: 0.9; transition: all 0.2s;
}
.marque-item img:hover { filter: none; opacity: 1; transform: scale(1.08); }
.marque-nom {
  font-size: 0.75rem; color: #111; white-space: nowrap; font-weight: 700;
}
/* Defilement vers la DROITE en RTL, plein des la 1re frame, boucle invisible.
   La piste contient 2 groupes identiques ; on la translate d'exactement la
   largeur d'UN groupe (--defile, mesuree en JS au pixel pres) : le 2e groupe
   vient prendre exactement la place du 1er → l'image finale est identique a
   l'image initiale, donc aucun saut au bouclage. 50% sert de repli. */
@keyframes defiler-marques {
  from { transform: translateX(0); }
  to   { transform: translateX(var(--defile, 50%)); }
}
@media (max-width: 700px) {
  .marques-piste { animation-duration: 45s; }
  .marque-item { padding: 0 15px; }
  .marque-item img { max-height: 34px; }
  .marque-nom { font-size: 0.65rem; }
  .marques-bande::before, .marques-bande::after { width: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .marques-piste { animation: none; flex-wrap: wrap; justify-content: center; }
}

/* ====== Disclaimer marques (footer) ====== */
.marques-disclaimer {
  background: #14181e; color: #8a929c;
  font-size: 0.76rem; line-height: 1.7;
  padding: 10px 0; text-align: center;
  border-top: 1px solid #232830;
}
.marques-disclaimer .container { max-width: 900px; }

/* ====== Pages legales (retour, confidentialite) ====== */
.page-legale { padding: 28px 0 50px; }
.legale-tete { margin-bottom: 24px; border-bottom: 2px solid var(--amber, #f2a20c); padding-bottom: 14px; }
.legale-tete h1 { margin: 0 0 6px; font-size: 1.7rem; }
.legale-corps { max-width: 820px; line-height: 1.9; }
.legale-corps h2 {
  font-size: 1.2rem; margin: 28px 0 10px; color: var(--oil-blue, #2c4a63);
  padding-right: 12px; border-right: 4px solid var(--amber, #f2a20c);
}
.legale-corps ul { padding-right: 22px; margin: 10px 0; }
.legale-corps li { margin: 7px 0; }
.legale-important {
  background: #e8f4fd; border: 1px solid #b8daf5; border-radius: 12px;
  padding: 16px 18px; margin-bottom: 22px; font-size: 1.02rem;
}
.legale-note {
  background: #fff8ec; border-right: 4px solid #f2a20c; border-radius: 8px;
  padding: 12px 15px; margin: 14px 0; font-size: 0.94rem; color: #6b5730;
}
.legale-contact {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 16px 0; padding: 16px; background: #f7f9fb; border-radius: 12px;
}
.legale-tel { font-weight: 600; }
.legale-pied {
  margin-top: 30px; padding-top: 16px; border-top: 1px solid #e6e9ee;
  font-size: 0.9rem; color: #6b7480; font-style: italic;
}
