/* ============================================================
   MARKETPLACE — Design system v3 (100% CSS vanilla, sans Tailwind)
   Sujet : quincaillerie/BTP/électronique gabonais.
   ============================================================ */

:root {
  /* Texte */
  --ink: #1f2937;
  --ink-soft: #667085;

  /* Surfaces */
  --paper: #f8fafc;
  --paper-raised: #ffffff;

  /* Bleu professionnel */
  --steel: #1e4b8f;
  --steel-dark: #102a56;

  /* Accent orange chantier */
  --signal: #d97706;
  --signal-dark: #b45309;
  --gold-light: #f59e0b;

  /* Accent secondaire */
  --volt: #84cc16;
  --volt-ink: #365314;

  /* Gris neutres */
  --concrete: #d1d5db;
  --concrete-line: #e5e7eb;

  /* Etats */
  --go: #16a34a;
  --go-bg: #dcfce7;

  --danger: #dc2626;
  --danger-bg: #fee2e2;


  /* Gradients */
  --gradient-hero:
    linear-gradient(
      135deg,
      #102a56 0%,
      #1e4b8f 55%,
      #2563a8 100%
    );

  --gradient-signal:
    linear-gradient(
      135deg,
      #d97706 0%,
      #f59e0b 100%
    );


  /* Fonts */
  --font-display: "Space Grotesk", ui-sans-serif, sans-serif;
  --font-body: "Inter", ui-sans-serif, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;


  /* UI */
  --radius: 10px;

  --shadow-card:
    0 1px 3px rgba(15,23,42,0.08),
    0 1px 2px rgba(15,23,42,0.04);

  --shadow-raised:
    0 12px 30px -8px rgba(15,23,42,0.15);

  --shadow-signal:
    0 10px 24px -6px rgba(217,119,6,0.30);

  --ease:
    cubic-bezier(0.22,1,0.36,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  margin: 0;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--ink);
}

p { margin: 0 0 1em; }

a { color: var(--steel); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: var(--signal); }

img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

/* ---- Layout de base ---- */

.container { width: 100%; margin: 0; padding: 0 clamp(16px, 4vw, 120px); }

/* ---- Boutons ---- */

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.2s var(--ease), border-color 0.15s var(--ease);
  line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0px) scale(0.98); }

.btn-primary { background: var(--gradient-signal); color: #fff; box-shadow: var(--shadow-signal); }
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 14px 28px -6px rgba(255, 77, 28, 0.45); color: #fff; }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--steel-dark); color: #fff; }

.btn-outline { background: var(--paper-raised); border-color: var(--concrete); color: var(--ink); }
.btn-outline:hover { border-color: var(--steel); color: var(--steel); box-shadow: var(--shadow-card); }

.btn-ghost { background: transparent; color: var(--ink-soft); border: none; }
.btn-ghost:hover { color: var(--signal); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a81d1d; color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---- Cartes ---- */

.card {
  background: var(--paper-raised);
  border: 1px solid var(--concrete-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s var(--ease);
}

.hover-lift { transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-raised); }

.product-card {
  background: var(--paper-raised);
  border: 1px solid var(--concrete-line);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease);
  display: flex;
  flex-direction: column;
  animation: card-in 0.5s var(--ease) both;
}
.product-card:hover {
  box-shadow: 0 18px 36px -12px rgba(184, 134, 47, 0.35), 0 4px 10px rgba(20, 23, 26, 0.08);
  transform: translateY(-5px);
  border-color: var(--signal);
}
.product-card:hover .product-card__media img { transform: scale(1.07); }

.product-card__media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--concrete-line), #f3f1e8);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s var(--ease); }
.product-card__media svg { opacity: 0.28; }

.product-card__body {
  padding: 13px 15px 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.product-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.product-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--ink-soft);
}
.product-card__rating svg { color: var(--signal-dark); flex-shrink: 0; }

.product-card__meta {
  font-size: 11.5px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.product-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 9px;
}
.product-card__footer .price { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.products-grid > .product-card:nth-child(1) { animation-delay: 0.02s; }
.products-grid > .product-card:nth-child(2) { animation-delay: 0.06s; }
.products-grid > .product-card:nth-child(3) { animation-delay: 0.10s; }
.products-grid > .product-card:nth-child(4) { animation-delay: 0.14s; }
.products-grid > .product-card:nth-child(5) { animation-delay: 0.18s; }
.products-grid > .product-card:nth-child(6) { animation-delay: 0.22s; }
.products-grid > .product-card:nth-child(7) { animation-delay: 0.26s; }
.products-grid > .product-card:nth-child(8) { animation-delay: 0.30s; }
.products-grid > .product-card:nth-child(n+9) { animation-delay: 0.34s; }

/* ---- spec-tag (étiquette prix/statut suspendue) ---- */

.spec-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 3px;
  transform: rotate(-1.5deg);
  white-space: nowrap;
}
.spec-tag--price {
  background: var(--ink);
  color: #fff;
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-card);
  z-index: 2;
}
.spec-tag--promo {
  background: var(--gradient-signal);
  color: #fff;
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: var(--shadow-signal);
  transform: rotate(2deg);
  z-index: 2;
}
.spec-tag--stock-ok { background: var(--go-bg); color: var(--go); }
.spec-tag--stock-low { background: #fff2da; color: var(--signal-dark); }
.spec-tag--stock-out { background: var(--danger-bg); color: var(--danger); }
.spec-tag--sku { background: var(--concrete-line); color: var(--ink-soft); transform: rotate(0); }
.spec-tag--volt { background: var(--volt); color: var(--volt-ink); }
.spec-tag--inline { display: inline-flex; gap: 5px; margin-bottom: 20px; }

/* ---- Badges (tables/admin) ---- */

.pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  display: inline-block;
  font-weight: 600;
}
.pill-pending { background: #fef3c7; color: #92610a; }
.pill-paid, .pill-approved, .pill-active { background: var(--go-bg); color: var(--go); }
.pill-preparing, .pill-shipped { background: #dbeafe; color: var(--steel); }
.pill-delivered { background: var(--go-bg); color: var(--go); }
.pill-cancelled, .pill-rejected, .pill-banned, .pill-failed { background: var(--danger-bg); color: var(--danger); }
.pill-suspended { background: #fff2da; color: var(--signal-dark); }
.pill-refunded { background: var(--concrete-line); color: var(--ink-soft); }

/* ---- Chips de filtre (catégories catalogue) ---- */

.chip {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--concrete-line);
  background: var(--paper-raised);
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s var(--ease);
}
.chip:hover {
  border-color: var(--steel);
  color: var(--steel);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}
.chip.is-active {
  background: var(--gradient-signal);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-signal);
}
.chip.is-active:hover { color: #fff; transform: translateY(-1px); }
.chip-count {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(20, 23, 26, 0.08);
  color: inherit;
  padding: 1px 7px;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
}
.chip.is-active .chip-count { background: rgba(255, 255, 255, 0.28); }

/* ---- Formulaires ---- */

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 6px;
}

.input, select.input, textarea.input {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 12px;
  border: 1.5px solid var(--concrete);
  border-radius: var(--radius);
  background: var(--paper-raised);
  color: var(--ink);
  width: 100%;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.input:focus { border-color: var(--steel); outline: none; box-shadow: 0 0 0 4px rgba(29, 111, 165, 0.14); }

/* ---- Toasts (JS vanilla) ---- */

#toast-container {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
}
.toast {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-raised);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.toast.toast--success { background: var(--go); }
.toast.toast--error { background: var(--danger); }

/* ---- Divers ---- */

.divider { border-top: 1px solid var(--concrete-line); }
.text-muted { color: var(--ink-soft); }
.text-signal { color: var(--signal); }
.price { font-family: var(--font-mono); font-weight: 700; }
.skeleton { background: linear-gradient(90deg, var(--concrete-line) 25%, #f5f3ea 37%, var(--concrete-line) 63%); background-size: 400% 100%; animation: skeleton-loading 1.4s ease infinite; border-radius: var(--radius); }
@keyframes skeleton-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   PANIER
   ============================================================ */

.cart-items { display: flex; flex-direction: column; gap: 12px; }

.cart-item {
  padding: 16px;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  grid-template-areas: "media info total" "media qty remove";
  align-items: center;
  gap: 8px 16px;
}
@media (min-width: 640px) {
  .cart-item {
    grid-template-columns: 64px 1fr auto auto auto;
    grid-template-areas: "media info qty total remove";
  }
}

.cart-item__media {
  grid-area: media;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  background: var(--concrete-line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--ink-soft);
}
.cart-item__media img { width: 100%; height: 100%; object-fit: cover; }

.cart-item__info { grid-area: info; min-width: 0; }
.cart-item__name {
  font-weight: 600;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item__qty { grid-area: qty; }
.cart-item__qty .input { width: 64px; padding: 6px; }

.cart-item__total { grid-area: total; font-weight: 600; text-align: right; white-space: nowrap; }

.cart-item form:last-child { grid-area: remove; justify-self: end; }

.cart-subtotal {
  padding: 20px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.order-row {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.order-item-list__row {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.order-item-list__row + .order-item-list__row { border-top: 1px solid var(--concrete-line); }

.order-summary-row { display: flex; justify-content: space-between; padding: 4px 0; }
.order-summary-row--total { font-size: 18px; padding-top: 12px; border-top: 1px solid var(--concrete-line); margin-top: 8px; }

/* ============================================================
   ADMIN — structure (sidebar + contenu)
   ============================================================ */

.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 220px;
  background: var(--ink);
  color: #e6e4dd;
  flex-shrink: 0;
  display: none;
  flex-direction: column;
}
@media (min-width: 768px) { .admin-sidebar { display: flex; } }

.admin-sidebar__brand { padding: 20px; }
.admin-sidebar__subtitle { font-size: 12px; margin-top: 4px; color: #8a8d89; }

.admin-nav { flex: 1; padding: 0 12px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.admin-nav__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  color: #e6e4dd;
}
.admin-nav__link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.admin-nav__link.is-active { background: var(--steel-dark); color: #fff; }
.admin-nav__link--muted { color: #8a8d89; font-size: 14px; }

.admin-sidebar__footer { padding: 12px; }

.admin-main { flex: 1; min-width: 0; }

.admin-topbar-mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--ink);
  color: #fff;
}
@media (min-width: 768px) { .admin-topbar-mobile { display: none; } }

.admin-content { padding: 24px; }
@media (min-width: 768px) { .admin-content { padding: 32px; } }

/* ---- Composants communs (tableaux, filtres, formulaires) ---- */

.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-header h1 { font-size: 24px; }

.admin-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 32px; }
@media (min-width: 640px) { .admin-stats { grid-template-columns: repeat(4, 1fr); } }
.admin-stat { padding: 20px; }
.admin-stat__label { font-size: 12.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 6px; }
.admin-stat__value { font-size: 26px; font-family: var(--font-display); font-weight: 700; }

.admin-table-wrap { overflow-x: auto; border: 1px solid var(--concrete-line); border-radius: var(--radius); background: var(--paper-raised); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--concrete-line);
  white-space: nowrap;
}
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--concrete-line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--paper); }

.admin-form { max-width: 640px; display: flex; flex-direction: column; gap: 16px; }
.admin-form-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .admin-form-row { grid-template-columns: 1fr 1fr; } }
.admin-form-actions { display: flex; gap: 12px; margin-top: 24px; }

.admin-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

.admin-empty { padding: 48px; text-align: center; color: var(--ink-soft); }

.admin-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--concrete-line); flex-shrink: 0; }

.admin-split-layout { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 1024px) { .admin-split-layout { grid-template-columns: 1fr 2fr; } }

.rayon-admin-card { padding: 18px 20px; }
.rayon-admin-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.rayon-admin-card__warning { font-size: 12.5px; color: var(--signal-dark); margin: 10px 0 0; display: flex; align-items: center; gap: 6px; }
.rayon-admin-card__children { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--concrete-line); display: flex; flex-direction: column; gap: 8px; }
.rayon-admin-child { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 4px 0 4px 8px; }
.rayon-admin-child__arrow { transform: rotate(180deg); opacity: 0.4; }
.rayon-admin-child form { margin-left: auto; }

.admin-form-layout { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 1024px) { .admin-form-layout { grid-template-columns: 2fr 1fr; } }

.admin-panel-stack { display: flex; flex-direction: column; gap: 24px; }

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

.admin-checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 14px; }

.admin-banner {
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-color: var(--go);
  background: var(--go-bg);
}

.admin-variant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--concrete-line);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 14px;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-variant-row + .admin-variant-row { margin-top: 8px; }
.admin-variant-row__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.admin-image-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.admin-image-grid__item { position: relative; }
.admin-image-grid__item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; }
.admin-image-grid__primary { position: absolute; top: 3px; left: 3px; background: var(--signal); color: #fff; border-radius: 4px; padding: 1px 5px; display: flex; align-items: center; }
.admin-image-grid__delete { position: absolute; bottom: 4px; right: 4px; }
.admin-image-grid__delete button { background: #fff; border: none; border-radius: 4px; padding: 3px 5px; display: flex; cursor: pointer; }

.admin-dropzone { text-align: center; padding: 24px; margin-bottom: 16px; border-radius: var(--radius); background: var(--paper); border: 1.5px dashed var(--concrete); color: var(--ink-soft); }

.admin-upload-form { display: flex; flex-direction: column; gap: 8px; }

.admin-stock-history { margin-top: 16px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; max-height: 192px; overflow-y: auto; }
.admin-stock-history__row { display: flex; justify-content: space-between; padding: 4px 0; border-top: 1px solid var(--concrete-line); }

/* ============================================================
   TOPBAR / NAVBAR
   ============================================================ */

.topbar { background: var(--steel-dark); color: #bcd7ea; font-size: 13px; }
.topbar__row { display: flex; align-items: center; justify-content: space-between; height: 36px; gap: 12px; flex-wrap: wrap; }
.topbar__item { display: flex; align-items: center; gap: 6px; }

.navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--concrete-line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.navbar__row { display: flex; align-items: center; gap: 24px; height: 64px; }

.brand { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--ink); letter-spacing: -0.02em; flex-shrink: 0; }
.brand span { color: var(--signal); }
.brand-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo__mark { height: 42px; width: 42px; object-fit: contain; flex-shrink: 0; }
.brand-logo__text { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; line-height: 1.1; }
.brand-logo__text small { display: block; font-family: var(--font-body); font-weight: 600; font-size: 10px; letter-spacing: 0.14em; color: var(--signal); }

.nav-search { flex: 1; display: none; }
@media (min-width: 768px) { .nav-search { display: flex; } }
.nav-search__field { position: relative; width: 100%; }
.nav-search__input { padding-right: 44px; }
.nav-search__submit { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
#search-results { position: absolute; left: 0; right: 0; margin-top: 4px; z-index: 50; }

.nav-links { display: flex; align-items: center; gap: 16px; font-size: 14px; font-weight: 500; flex-shrink: 0; }

.nav-links__catalogue { display: none; }
@media (min-width: 640px) { .nav-links__catalogue { display: inline; } }

.nav-links__favorites { display: none; align-items: center; gap: 6px; }
@media (min-width: 640px) { .nav-links__favorites { display: inline-flex; } }

.nav-links__cart { position: relative; display: flex; align-items: center; gap: 6px; }
.nav-cart__badge { position: absolute; top: -10px; right: -14px; background: var(--signal); color: #fff; padding: 1px 6px; font-size: 10px; border-radius: 3px; font-family: var(--font-mono); }

.nav-links__label { display: none; }
@media (min-width: 1024px) { .nav-links__label { display: inline; } }

.nav-hover { position: relative; }

.nav-hover__panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 14px;
  width: 300px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s var(--ease), visibility 0.16s;
  z-index: 60;
}

@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  .nav-hover:hover .nav-hover__panel,
  .nav-hover:focus-within .nav-hover__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

.nav-hover__panel-inner {
  position: relative;
  background: var(--paper-raised);
  border: 1px solid var(--concrete-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-raised);
  padding: 16px;
}
.nav-hover__panel-inner::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--paper-raised);
  border-left: 1px solid var(--concrete-line);
  border-top: 1px solid var(--concrete-line);
}

.nav-hover__header { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); margin-bottom: 12px; }
.nav-hover__empty { font-size: 13px; color: var(--ink-soft); margin: 0 0 4px; }

.nav-hover__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nav-hover__product { display: block; }
.nav-hover__thumb {
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  background: var(--concrete-line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.nav-hover__thumb img { width: 100%; height: 100%; object-fit: cover; }
.nav-hover__thumb--sm { width: 40px; height: 40px; aspect-ratio: auto; flex-shrink: 0; margin-bottom: 0; }
.nav-hover__product-name {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.nav-hover__list { display: flex; flex-direction: column; gap: 10px; }
.nav-hover__row { display: flex; align-items: center; gap: 10px; }
.nav-hover__row-info { min-width: 0; flex: 1; }
.nav-hover__row-info .nav-hover__product-name { -webkit-line-clamp: 1; }

.nav-hover__subtotal { display: flex; justify-content: space-between; font-size: 13px; padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--concrete-line); }

.nav-hover__cta { display: block; text-align: center; font-size: 13px; font-weight: 600; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--concrete-line); }
.nav-hover__grid + .nav-hover__cta,
.nav-hover__list + .nav-hover__subtotal + .nav-hover__cta { border-top: 1px solid var(--concrete-line); }

.account-menu { position: relative; }
.account-menu__panel {
  display: none;
  position: absolute;
  right: 0;
  margin-top: 8px;
  width: 200px;
  padding: 8px;
  font-size: 14px;
}
.account-menu__panel.is-open { display: block; }
.account-menu__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--ink);
}
.account-menu__link:hover { background: var(--paper); color: var(--ink); }
.account-menu__logout-form { border-top: 1px solid var(--concrete-line); margin-top: 4px; padding-top: 4px; }
.account-menu__logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}
.account-menu__logout-btn:hover { background: var(--paper); }

.legal-page { max-width: 720px; }

.auth-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  max-width: 960px;
  margin: 0 auto;
  align-items: center;
}
@media (min-width: 900px) {
  .auth-layout { grid-template-columns: 1.1fr 1fr; gap: 56px; }
}

.auth-layout__intro { }
.auth-layout__eyebrow { font-family: var(--font-mono); font-size: 13px; color: var(--signal-dark); margin-bottom: 12px; letter-spacing: 0.04em; }
.auth-layout__title { font-size: 30px; line-height: 1.15; margin-bottom: 16px; }
.auth-layout__title span { color: var(--signal); }
.auth-layout__subtitle { font-size: 15px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 28px; max-width: 440px; }

.auth-layout__features { display: flex; flex-direction: column; gap: 18px; }
.auth-layout__feature { display: flex; align-items: flex-start; gap: 14px; }
.auth-layout__feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gradient-signal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-signal);
}
.auth-layout__feature-text h3 { font-size: 14.5px; font-weight: 700; margin-bottom: 2px; }
.auth-layout__feature-text p { font-size: 13px; color: var(--ink-soft); margin: 0; line-height: 1.5; }

.auth-layout__form { width: 100%; }
.payment-method-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--concrete);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.payment-method-option:hover { border-color: var(--steel); background: var(--paper); }
.payment-method-option:has(input:checked) { border-color: var(--signal); background: #fdf6ea; }
.legal-page h2 { font-size: 18px; margin: 32px 0 10px; }
.legal-page h2:first-of-type { margin-top: 8px; }
.legal-page p { font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); }
.legal-page p strong { color: var(--ink); }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer { border-top: 1px solid var(--concrete-line); margin-top: 64px; padding: 40px 0; font-size: 14px; color: var(--ink-soft); }

.footer-top { display: flex; flex-direction: column; gap: 32px; }
@media (min-width: 768px) { .footer-top { flex-direction: row; justify-content: space-between; } }

.footer-brand { max-width: 280px; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.footer-social__link {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--concrete-line);
  color: var(--ink);
}
.footer-social__link:hover { border-color: var(--steel); color: var(--steel); }

.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer-col__title { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 4px; color: var(--ink); }
.footer-col a { color: var(--ink-soft); }
.footer-col a:hover { color: var(--steel); }

.footer-app-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-app-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--paper);
  border: 1px solid var(--concrete-line);
  color: var(--ink-soft);
  cursor: default;
}

.footer-bottom { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--concrete-line); }
.site-footer__row { display: flex; flex-direction: column; gap: 16px; justify-content: space-between; }
@media (min-width: 640px) { .site-footer__row { flex-direction: row; } }

/* ============================================================
   ACCUEIL
   ============================================================ */

.hero-slide__inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 32px;
}
@media (min-width: 900px) {
  .hero-slide__inner { grid-template-columns: 1.15fr 0.85fr; }
}

.hero-slide__visual { display: none; position: relative; align-items: center; justify-content: center; }
@media (min-width: 900px) { .hero-slide__visual { display: flex; } }

.hero-visual-rings {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-visual-rings::before,
.hero-visual-rings::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.hero-visual-rings::before { inset: -24px; }
.hero-visual-rings::after { inset: -56px; border-color: rgba(255, 255, 255, 0.1); }

.hero-visual-badge {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.hero-visual-badge svg { width: 95px; height: 95px; }

.hero-visual-stat {
  position: absolute;
  bottom: 8px;
  right: -8px;
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  padding: 10px 16px;
  box-shadow: var(--shadow-raised);
  font-size: 13px;
  line-height: 1.3;
}
.hero-visual-stat strong { display: block; font-size: 18px; font-family: var(--font-display); }

.hero-slider { position: relative; overflow: hidden; }
.hero-slide { display: none; padding: 36px 0 48px; }
.hero-slide.is-active { display: block; animation: hero-fade 0.5s var(--ease); }
@media (min-width: 768px) { .hero-slide { padding: 52px 0 64px; } }
@keyframes hero-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-slider__dots {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.hero-slider__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.2s var(--ease), width 0.2s var(--ease);
}
.hero-slider__dot.is-active { background: #fff; width: 22px; border-radius: 999px; }

.hero__eyebrow { font-family: var(--font-mono); font-size: 14px; margin-bottom: 12px; color: #9fb4c4; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.hero__title { color: #fff; font-size: clamp(1.8rem, 4.5vw, 3rem); max-width: 720px; line-height: 1.08; text-shadow: 0 2px 16px rgba(0,0,0,.4); }
.hero__subtitle { margin-top: 18px; font-size: 17px; color: #cfd9e0; max-width: 560px; text-shadow: 0 1px 10px rgba(0,0,0,.35); }
.hero__actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-slide .btn-outline { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.35); color: #fff; }


.section__header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.section__title { font-size: 28px; position: relative; padding-left: 16px; }
.section__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 2px;
  background: var(--gradient-signal);
}
.section__link { font-size: 14px; color: var(--ink-soft); }

.categories-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .categories-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .categories-grid { grid-template-columns: repeat(6, 1fr); } }

.category-card { padding: 16px; text-align: center; }
.category-card__icon { margin-bottom: 8px; display: flex; justify-content: center; color: var(--steel); }
.category-card__label { font-size: 14px; font-weight: 500; }

.rayons { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 768px) { .rayons { flex-direction: row; align-items: flex-start; } }

.rayons__list { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
@media (min-width: 768px) { .rayons__list { width: 260px; } }

.rayons__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.rayons__item:hover { background: var(--paper); }
.rayons__item.is-active { background: var(--paper-raised); border-color: var(--concrete-line); box-shadow: var(--shadow-card); color: var(--steel); }
.rayons__item span { flex: 1; }
.rayons__item-arrow { opacity: 0.25; transform: rotate(180deg); transition: opacity 0.15s var(--ease); flex-shrink: 0; }
.rayons__item.is-active .rayons__item-arrow { opacity: 1; color: var(--signal); }

.rayons__panel { flex: 1; min-width: 0; }
.rayons__products { display: none; }
.rayons__products.is-active { display: block; animation: hero-fade 0.3s var(--ease); }

.rayons__subcats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.rayons__subcat-products { display: none; }
.rayons__subcat-products.is-active { display: block; animation: hero-fade 0.25s var(--ease); }

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

.rayons__empty { padding: 32px; text-align: center; background: var(--paper); border-radius: var(--radius); }
.rayons__empty .btn { margin-top: 12px; }

.home-split { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 1100px) { .home-split { grid-template-columns: 2.2fr 1fr; } }

.top-ventes { padding: 20px; position: sticky; top: 80px; }
.top-ventes__title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.top-ventes__title svg { color: var(--signal); }
.top-ventes__list { display: flex; flex-direction: column; gap: 14px; max-height: 560px; overflow-y: auto; padding-right: 4px; }
.top-ventes__item { display: flex; align-items: center; gap: 12px; }
.top-ventes__rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gradient-signal);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-mono);
}
.top-ventes__thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--concrete-line);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
}
.top-ventes__thumb img { width: 100%; height: 100%; object-fit: cover; }
.top-ventes__info { min-width: 0; flex: 1; }
.top-ventes__name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.top-ventes__price { font-size: 12.5px; margin-top: 2px; }

.sale-section { background: linear-gradient(180deg, #fdf6ea 0%, var(--paper) 65%); padding: 40px 0; }
.sale-section .section__title { display: flex; align-items: center; gap: 8px; }
.sale-section .section__title svg { color: var(--signal); }

.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 768px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .products-grid { grid-template-columns: repeat(6, 1fr); } }

.empty-state { padding: 40px; text-align: center; color: var(--ink-soft); }

/* ============================================================
   CATALOGUE
   ============================================================ */

.catalog-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.catalog-filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 16px; scrollbar-width: thin; }
.catalog-filters--sub { margin-bottom: 32px; padding-top: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--concrete-line); }
.chip--sub { font-size: 12.5px; padding: 6px 12px; background: var(--paper); }
.catalog-search-mobile { margin-bottom: 32px; max-width: 420px; }
@media (min-width: 768px) { .catalog-search-mobile { display: none; } }

.catalog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 768px) { .catalog-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .catalog-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .catalog-grid { grid-template-columns: repeat(6, 1fr); } }

.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.pagination__ellipsis { color: var(--ink-soft); font-size: 14px; padding: 0 4px; }
.pagination__arrow.is-disabled { opacity: 0.35; pointer-events: none; }
.pagination__summary { text-align: center; font-size: 12.5px; margin-top: 10px; }

/* ============================================================
   FICHE PRODUIT
   ============================================================ */

.breadcrumb { font-size: 14px; color: var(--ink-soft); margin-bottom: 24px; }

.product-layout { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 768px) { .product-layout { grid-template-columns: 1fr 1fr; } }

.product-gallery__main {
  aspect-ratio: 1 / 1;
  max-width: 420px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--concrete-line), #f3f1e8);
}
.product-gallery__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.product-gallery__image.is-active { display: block; }
.product-gallery__placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); opacity: 0.35; }

.product-gallery__thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; max-width: 420px; }
.product-gallery__thumb {
  width: 56px;
  height: 56px;
  border: 2px solid var(--concrete-line);
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: none;
  flex-shrink: 0;
}
.product-gallery__thumb.is-active { border-color: var(--signal); }
.product-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.product-rating { font-size: 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.product-title { font-size: 30px; margin-bottom: 4px; }
.product-meta { font-size: 14px; color: var(--ink-soft); margin-bottom: 20px; }

.product-price { margin-bottom: 20px; }
.product-price__old { font-size: 18px; color: var(--ink-soft); text-decoration: line-through; }
.product-price__current { font-size: 30px; }

.product-desc-short { margin-top: 16px; font-size: 16px; }

.product-actions { display: flex; gap: 12px; margin-top: 24px; }

.qty-stepper { display: flex; align-items: center; border: 1px solid var(--concrete); border-radius: var(--radius); }
.qty-stepper button { background: none; border: none; cursor: pointer; padding: 8px 12px; color: var(--ink-soft); font-size: 16px; }
.qty-stepper button:hover { color: var(--signal); }
.qty-stepper input { width: 48px; text-align: center; border: none; font-family: var(--font-mono); background: none; }

.product-description { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--concrete-line); font-size: 14px; line-height: 1.7; }

.mobile-cart-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: var(--paper-raised);
  border-top: 1px solid var(--concrete-line);
  box-shadow: 0 -4px 16px rgba(20, 23, 26, 0.08);
}
.mobile-cart-bar__price { font-size: 18px; }
@media (max-width: 767px) {
  .mobile-cart-bar { display: flex; }
  .mobile-cart-bar-spacer { display: block; height: 76px; }
}

.reviews { margin-top: 64px; max-width: 640px; }
.reviews__title { font-size: 20px; margin-bottom: 16px; }
.review-form { padding: 16px; margin-bottom: 24px; }
.review-form select, .review-form textarea { margin-bottom: 12px; }
.review-error { margin-bottom: 16px; font-size: 14px; color: var(--danger); }
.review-own { padding: 16px; margin-bottom: 24px; font-size: 14px; }
.review-item { padding-top: 16px; border-top: 1px solid var(--concrete-line); }
.review-item + .review-item { margin-top: 16px; }
.review-item__head { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.review-item__stars { display: flex; }
.review-item__comment { font-size: 14px; margin-top: 4px; }
.review-item__reply { font-size: 12px; color: var(--ink-soft); margin-top: 8px; }
