/* =====================================================
   products.css — Comparatif produits — v3
   Toutes les règles scopées sous .products-page
   pour surpasser les styles globaux du site
   ===================================================== */

/* ── Tokens ───────────────────────────────────────── */
.products-page {
  --row:           #ffffff;
  --row-alt:       #f6f7f9;
  --row-hover:     #eaedf8;
  --col-sticky:    #f7f9ff;
  --border:        rgba(0, 0, 0, 0.06);
  --border-sep:    rgba(0, 0, 0, 0.10);
  --text:          #2c2c3e;
  --muted:         #9496b0;
  --accent:        #19a326;
  --accent-dark:   #147a1d;
  --danger:        #e03030;
  --head-bg:       #f0f1f5;
  --head-text:     #4a4a6a;
  --shadow-sticky: 8px 0 16px rgba(0, 0, 0, 0.07);
  --radius:        12px;
  --photo-w:       66px;
  --name-w:        155px;
  --brand-w:       120px;
  --cta-w:         110px;
}

/* ── Conteneur principal ──────────────────────────── */
.products-page {
  width: 100%;
  max-width: var(--max-width); /* 1280px défini dans style.css :root */
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding-left: 0;
  padding-right: 0;
  overflow-x: clip; /* bloque le débordement sans casser position:sticky */
}

@media (max-width: 1280px) {
  .products-page {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* ── Header page (fond blanc, texte site) ─────────── */
.products-page .products-header {
  padding: 2.5rem 0 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
}

.products-page .products-header h1 {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0;
  color: #161616;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.products-page .products-count {
  font-size: 0.78rem;
  color: #888;
  margin: 0;
}

/* ── Intro SEO ────────────────────────────────────── */
.products-page .products-intro {
  max-width: 780px;
  padding: 0 0 1.5rem;
}

.products-page .products-intro p {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.7;
  margin: 0 0 0.5rem;
}

.products-page .products-intro strong {
  color: #1a1a2e;
  font-weight: 600;
}


/* ── Wrapper scroll ───────────────────────────────── */
.products-page .products-table-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
  border-radius: var(--radius);
  border: 1px solid var(--border-sep);
}

.products-page .products-table-wrap::-webkit-scrollbar {
  height: 4px;
}
.products-page .products-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.products-page .products-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 99px;
}

/* ── Table ────────────────────────────────────────── */
.products-page .products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  min-width: 1180px;
  background: var(--row);
}

/* Supprime toutes les bordures verticales par défaut */
.products-page .products-table th,
.products-page .products-table td {
  border-right: none;
  border-left: none;
}

/* ── En-tête ──────────────────────────────────────── */
.products-page .products-table thead tr.thead-cols th {
  background: var(--head-bg);
  color: var(--head-text);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border-sep);
  white-space: nowrap;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 2;
  cursor: default;
}

/* Séparateurs de groupes dans le header */
.products-page .products-table thead tr.thead-cols th.group-start {
  border-left: 1px solid var(--border-sep);
}


/* Colonnes triables */
.products-page .products-table thead tr.thead-cols th[data-col] {
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
}

.products-page .products-table thead tr.thead-cols th[data-col]:hover {
  color: #1a1a2e;
  background: #e4e6ed;
}

.products-page .products-table thead tr.thead-cols th[data-active="1"] {
  color: var(--accent);
  background: rgba(25, 163, 38, 0.06);
}

/* ── Icône de tri ─────────────────────────────────── */
.products-page .sort-icon {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.45;
  font-size: 0.55rem;
  vertical-align: middle;
  line-height: 1;
  transition: opacity 0.12s;
}

.products-page th[data-col]:hover .sort-icon,
.products-page th[data-active="1"] .sort-icon {
  opacity: 1;
}

/* ── Colonnes sticky : photo + modèle + marque + découvrir ── */
.products-page .products-table th.col-product,
.products-page .products-table td.col-product,
.products-page .products-table th.col-name,
.products-page .products-table td.col-name,
.products-page .products-table th.col-brand,
.products-page .products-table td.col-brand,
.products-page .products-table th.col-cta,
.products-page .products-table td.col-cta {
  position: sticky;
  left: var(--sticky-left, 0px); /* calculé par JS */
  z-index: 3;
  background: var(--col-sticky); /* fond plus foncé pour les colonnes fixes */
}

/* Séparateur sur col-cta : box-shadow à droite (ne dépend pas de position:absolute) */
.products-page .products-table th.col-cta,
.products-page .products-table td.col-cta {
  box-shadow: 8px 0 12px rgba(0, 0, 0, 0.06), 1px 0 0 rgba(0, 0, 0, 0.18);
}

/* Séparateur après la dernière colonne sticky
   box-shadow à droite : plus fiable que ::after (évite les artefacts de rendu
   après filtrage et lors du scroll) */

/* Fond du header sticky — z-index 4 pour passer au-dessus du tbody sticky */
.products-page .products-table thead tr.thead-cols th.col-product,
.products-page .products-table thead tr.thead-cols th.col-name,
.products-page .products-table thead tr.thead-cols th.col-brand,
.products-page .products-table thead tr.thead-cols th.col-cta {
  background: var(--head-bg);
  z-index: 4;
}

/* Hover sur les colonnes sticky */
.products-page .products-table tbody tr:hover td.col-product,
.products-page .products-table tbody tr:hover td.col-name,
.products-page .products-table tbody tr:hover td.col-brand,
.products-page .products-table tbody tr:hover td.col-cta {
  background: var(--row-hover);
}

/* ── Cellules data ────────────────────────────────── */
.products-page .products-table td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: background 0.08s;
  background: var(--row);
  user-select: none;
  -webkit-user-select: none;
}

/* Séparateurs de groupes dans les données */
.products-page .products-table td.group-start {
  border-left: 1px solid var(--border-sep);
}

/* Hauteur fixe desktop */
.products-page .products-table tbody tr {
  height: 100px;
}

/* Pas de zébrage — fond uniforme */
.products-page .products-table tbody tr td {
  background: var(--row);
}

.products-page .products-table tbody tr:hover td {
  background: var(--row-hover);
}

.products-page .products-table tbody:last-child tr td {
  border-bottom: none;
}

/* Ligne filtrée — inline styles gèrent la hauteur (voir products.js) */

/* ── Colonne Photo ────────────────────────────────── */
.products-page .products-table .col-product {
  width: var(--photo-w);
  min-width: var(--photo-w);
  text-align: center;
  padding: 0.65rem 0.5rem;
}

.products-page .product-img {
  width: 48px;
  height: 48px;
  max-width: 48px;
  max-height: 48px;
  margin: 0 auto;
  background: #f0f1f5;
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.products-page .product-img picture,
.products-page .product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  max-width: unset;
}

/* ── Colonne Nom/Modèle ───────────────────────────── */
.products-page .products-table .col-name {
  min-width: var(--name-w);
  padding-left: 0.6rem;
  position: relative;
}

.products-page .products-table .col-name .price-badge {
  position: absolute;
  bottom: 0.55rem;
  left: 0.6rem;
  margin: 0;
}

.products-page .product-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #1a1a2e;
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: block;
}

/* ── Colonne Marque ───────────────────────────────── */
.products-page .products-table .col-brand {
  min-width: var(--brand-w);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Colonne Note ─────────────────────────────────── */
.products-page .products-table .col-rating {
  text-align: center;
  white-space: nowrap;
}

.products-page .rating-score {
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.products-page .rating-max {
  font-size: 0.65rem;
  color: var(--muted);
}

/* ── Colonne Avis ─────────────────────────────────── */
.products-page .products-table .col-reviews {
  text-align: center;
  white-space: nowrap;
}

.products-page .rating-reviews {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ── Badge Résistance ─────────────────────────────── */
.products-page .badge-resistance {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: 99px;
  font-size: 0.71rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.02em;
  /* défaut neutre */
  background: rgba(120, 120, 140, 0.09);
  border: 1px solid rgba(120, 120, 140, 0.22);
  color: #555570;
}

/* Mécanique — ambre/orange */
.products-page .badge-resistance--mecanic {
  background: rgba(217, 119, 6, 0.09);
  border-color: rgba(217, 119, 6, 0.28);
  color: #b45309;
}

/* Magnétique — bleu */
.products-page .badge-resistance--magnetic {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
  color: #1d4ed8;
}

/* Électromagnétique — violet */
.products-page .badge-resistance--electromagnetic {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.25);
  color: #6d28d9;
}

/* Air — cyan */
.products-page .badge-resistance--air {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.28);
  color: #0e7490;
}

/* ── Colonnes numériques ──────────────────────────── */
.products-page .products-table .col-levels,
.products-page .products-table .col-stride,
.products-page .products-table .col-length,
.products-page .products-table .col-width,
.products-page .products-table .col-height,
.products-page .products-table .col-weight,
.products-page .products-table .col-maxweight {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.products-page .unit {
  color: var(--text);
  font-size: 0.68rem;
  margin-left: 2px;
}

/* ── Colonne Inertie ──────────────────────────────── */
.products-page .products-table .col-flywheel {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ── Colonne Programmes ───────────────────────────── */
.products-page .products-table .col-programs {
  text-align: center;
  white-space: nowrap;
}

/* ── Badge Capteur FC ─────────────────────────────── */
.products-page .products-table .col-heartrate {
  text-align: center;
  white-space: nowrap;
}

.products-page .badge-yes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(25, 163, 38, 0.10);
  border: 1px solid rgba(25, 163, 38, 0.25);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

/* ── Colonne Apps ─────────────────────────────────── */
.products-page .products-table .col-apps {
  max-width: 130px;
  font-size: 0.73rem;
  color: var(--text);
  line-height: 1.5;
}

/* ── Colonne Prix ─────────────────────────────────── */
.products-page .products-table .col-price {
  white-space: nowrap;
  text-align: center;
  min-width: 95px;
}

.products-page .price {
  display: block;
  font-weight: 700;
  font-size: 0.94rem;
  color: #1a1a2e;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.products-page .price--promo {
  color: var(--accent-dark);
}

.products-page .price-original {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}


.products-page .price-badge {
  display: inline-block;
  margin-top: 3px;
  padding: 0.09rem 0.38rem;
  border-radius: 4px;
  background: rgba(25, 163, 38, 0.08);
  border: 1px solid rgba(25, 163, 38, 0.22);
  color: var(--accent-dark);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}


/* ── CTA ──────────────────────────────────────────── */
.products-page .products-table .col-cta {
  text-align: center;
  width: var(--cta-w);
  min-width: var(--cta-w);
  white-space: nowrap;
  padding: 0.75rem 1rem 0.75rem 0.85rem;
}

.products-page .btn-discover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  min-width: 100px;
  padding: 0.65rem 1.3rem;
  background: #f97316;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.35), 0 1px 2px rgba(0, 0, 0, 0.10);
  transition: background 0.13s, transform 0.10s, box-shadow 0.13s;
}

.products-page .btn-discover::after {
  content: '›';
  font-size: 1.1em;
  line-height: 1;
}

.products-page .btn-discover:hover {
  background: #ea6c00;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.40), 0 1px 2px rgba(0, 0, 0, 0.10);
}

.products-page .btn-discover:active {
  background: #c2540a;
  box-shadow: 0 1px 3px rgba(249, 115, 22, 0.25);
}


/* ── Valeur vide ──────────────────────────────────── */
.products-page .empty {
  color: #c8cad6;
  font-size: 0.85rem;
}

/* ── FAQ ──────────────────────────────────────────── */
/* ── FAQ (thème clair) ────────────────────────────── */
.products-page .products-faq {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.products-page .faq-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #161616;
  margin: 0 0 1.25rem;
  letter-spacing: -0.01em;
}

.products-page .faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.products-page .faq-item {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
}

.products-page .faq-question {
  display: block;
  padding: 0.9rem 1.1rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.4;
}

.products-page .faq-answer {
  padding: 0 1.1rem 1rem;
  border-top: 1px solid #ebebeb;
}

.products-page .faq-answer p {
  font-size: 0.84rem;
  color: #555;
  line-height: 1.65;
  margin: 0.65rem 0 0;
}

.products-page .faq-answer p + p {
  margin-top: 0.5rem;
}

.products-page .faq-answer strong {
  color: #222;
  font-weight: 600;
}

.products-page .faq-answer ul {
  margin: 0.65rem 0 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.products-page .faq-answer li {
  font-size: 0.84rem;
  color: #555;
  line-height: 1.5;
}

.products-page .faq-answer li strong {
  color: #222;
}

.products-page .faq-answer a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.products-page .faq-answer a:hover {
  color: var(--accent-dark);
}

/* ── Responsive : cards mobile ────────────────────── */
@media (max-width: 768px) {

  .products-page .products-header {
    padding: 1.75rem 0 1.25rem;
  }

  .products-page .products-intro {
    padding-bottom: 1.25rem;
  }

  /* Wrapper : pas de scroll horizontal */
  .products-page .products-table-wrap {
    overflow-x: visible;
    border: none;
    border-radius: 0;
  }

  .products-page .products-table {
    display: block;
    min-width: unset;
    border: none;
    border-radius: 0;
    background: transparent;
  }

  .products-page .products-table thead {
    display: none;
  }

  .products-page .products-table tbody {
    display: block;
  }

  /* ── Carte produit : grille 2 colonnes ──
     col 1 = 82px (image, s'étend sur 2 lignes header)
     col 2 = reste (modèle ligne 1, marque ligne 2)
     les autres cellules occupent les 2 colonnes (1/-1)      */
  .products-page .products-table tbody tr {
    height: auto !important;
    display: grid;
    grid-template-columns: 82px 1fr;
    position: relative;
    background: var(--row) !important;
    border: 1px solid var(--border-sep);
    border-radius: var(--radius);
    margin: 0 0 0.85rem;
    overflow: hidden;
    box-sizing: border-box;
  }

  /* ── Base toutes cellules ── */
  .products-page .products-table td {
    height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    position: static !important;
    border-bottom: 1px solid var(--border);
    border-right: none;
    border-left: none !important;
    padding: 0.55rem 1rem;
    background: transparent !important;
    box-shadow: none !important;
    box-sizing: border-box;
    grid-column: 1 / -1;   /* toutes les cellules data : pleine largeur */
    text-align: left !important;
    white-space: normal;
    min-height: 40px;
  }

  /* Label générique (::before) */
  .products-page .products-table td::before {
    content: attr(data-label);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    width: 90px;
    min-width: 90px;
    flex-shrink: 0;
    text-align: left;
  }

  /* Unités via data-unit (::after) */
  .products-page .products-table td[data-unit]::after {
    content: attr(data-unit);
    font-size: 0.72rem;
    color: var(--muted);
    flex-shrink: 0;
    margin-left: 2px;
  }

  /* ── Photo : colonne gauche, couvre les 2 lignes du header ── */
  .products-page .products-table td.col-product {
    grid-column: 1;
    grid-row: 1 / 3;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    min-height: unset;
  }

  /* ── Modèle : col droite, 1re ligne header ── */
  .products-page .products-table td.col-name {
    grid-column: 2;
    grid-row: 1;
    border-bottom: none;
    padding: 0.75rem 2.6rem 0.1rem 0.75rem;
    align-items: flex-start;
    min-height: unset;
  }

  /* ── Marque : col droite, 2e ligne header ── */
  .products-page .products-table td.col-brand {
    grid-column: 2;
    grid-row: 2;
    border-bottom: none;
    padding: 0 0.75rem 0.65rem;
    font-size: 0.72rem;
    min-height: unset;
    color: var(--text) !important;
  }

  /* Pas de label ni d'unité sur les 3 cellules du header */
  .products-page .products-table td.col-product::before,
  .products-page .products-table td.col-name::before,
  .products-page .products-table td.col-brand::before {
    display: none;
  }

  /* ── Séparateur header / données : pleine largeur garantie ──
     col-rating (grid-column 1/-1) fournit la ligne complète     */
  .products-page .products-table td.col-rating {
    border-top: 1px solid var(--border);
  }

  /* ── col-apps : annuler le max-width desktop (130px) ── */
  .products-page .products-table td.col-apps {
    max-width: unset;
    width: 100%;
  }

  /* ── Badge promo : coin haut droit de la carte ── */
  .products-page .products-table .col-name .price-badge {
    position: absolute !important;
    top: 0.55rem;
    right: 0.6rem;
    left: auto;
    bottom: auto;
    margin: 0;
  }

  /* ── Prix : avant-dernier (order 98) ── */
  .products-page .products-table td.col-price {
    order: 98;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
  }

  /* Prix promo sur deux lignes en mobile */
  .products-page .products-table td.col-price .price-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
  }

  .products-page .products-table td.col-price .price,
  .products-page .products-table td.col-price .price-original {
    display: block !important;
    text-align: left;
  }

  /* ── Bouton Voir : dernier (order 99) ── */
  .products-page .products-table td.col-cta {
    order: 99;
    display: block !important;
    border-bottom: none;
    padding: 0;
    width: 100%;
  }

  /* Pas de label ni de séparateur sur le bouton en mobile */
  .products-page .products-table td.col-cta::before {
    display: none !important;
  }

  /* Annuler le box-shadow séparateur en mobile (carte sans bord droit sticky) */
  .products-page .products-table td.col-cta {
    box-shadow: none !important;
  }

  .products-page .btn-discover {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 0.85rem;
    font-size: 0.9rem;
    border-radius: 0 0 var(--radius) var(--radius);
    box-sizing: border-box;
  }

  /* ── Image ── */
  .products-page .product-img {
    width: 62px;
    height: 62px;
    margin: 0 auto;
  }

  /* ── Nom du modèle ── */
  .products-page .product-name {
    font-size: 0.92rem;
    text-align: left;
    width: 100%;
    white-space: normal;
  }
}

/* =====================================================
   Filtres
   ===================================================== */

/* ── Barre filtres ────────────────────────────────── */
.products-page .products-filters {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0 1rem;
}

/* ── Séparateur générique / spécifiques ──────────── */
.products-page .filter-sep {
  display: block;
  width: 1px;
  height: 24px;
  background: var(--border-sep);
  align-self: center;
  flex-shrink: 0;
}

/* ── Chip déclencheur ─────────────────────────────── */
.products-page .filter-group {
  position: relative;
}

.products-page .filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.48rem 0.9rem;
  border: 1.5px solid var(--border-sep);
  border-radius: 99px;
  background: #fff;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.13s, background 0.13s, color 0.13s;
  user-select: none;
  white-space: nowrap;
}

.products-page .filter-chip:hover {
  border-color: #9496b0;
}

.products-page .filter-chip[aria-expanded="true"] {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

.products-page .filter-chip-arrow {
  transition: transform 0.2s;
  flex-shrink: 0;
  opacity: 0.6;
}

.products-page .filter-chip[aria-expanded="true"] .filter-chip-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

/* badge checkmark supprimé — le label du chip affiche directement la fourchette */

/* ── Chip actif (filtre appliqué, panel fermé) ────── */
.products-page .filter-chip.filter-chip--active:not([aria-expanded="true"]) {
  border-color: #1e3a8a;
  background: rgba(30, 58, 138, 0.06);
  color: #1e3a8a;
}

/* ── Panel dropdown ───────────────────────────────── */
.products-page .filter-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 200;
  width: 320px;
  background: #fff;
  border: 1px solid var(--border-sep);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  padding: 1.2rem;
  box-sizing: border-box;
}

.products-page .filter-panel-heading {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 1rem;
}

/* ── Panel note ──────────────────────────────────── */
.products-page .filter-panel--rating {
  width: 210px;
}

.products-page .rating-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.products-page .rating-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.5rem;
  border-radius: 7px;
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
}

.products-page .rating-item:hover {
  background: #f0f2fb;
}

/* Radio bouton stylé en "checkbox carrée" */
.products-page .rating-rb {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  min-width: 17px;
  border: 1.8px solid #b0b4cc;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: border-color 0.12s, background 0.12s;
  flex-shrink: 0;
}

.products-page .rating-rb:checked {
  background: #1e3a8a;
  border-color: #1e3a8a;
}

.products-page .rating-rb:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.products-page .rating-item-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.products-page .rating-item-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.products-page .rating-item-sub {
  font-size: 0.71rem;
  color: var(--muted);
  line-height: 1.2;
}

/* ── Panel marque (largeur réduite) ──────────────── */
.products-page .filter-panel--brand {
  width: 240px;
}

/* ── Liste des marques ────────────────────────────── */
.products-page .brand-list {
  display: flex;
  flex-direction: column;
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 0.6rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.12) transparent;
}

.products-page .brand-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.46rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
}

.products-page .brand-item:hover {
  background: #f0f2fb;
}

/* Checkbox native stylée avec accent-color */
.products-page .brand-cb {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  min-width: 17px;
  border: 1.8px solid #b0b4cc;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: border-color 0.12s, background 0.12s;
  flex-shrink: 0;
}

.products-page .brand-cb:checked {
  background: #1e3a8a;
  border-color: #1e3a8a;
}

.products-page .brand-cb:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.products-page .brand-item-name {
  flex: 1;
  font-size: 0.83rem;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.products-page .brand-item-count {
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  background: #f0f1f5;
  padding: 0.1rem 0.38rem;
  border-radius: 99px;
  min-width: 1.6rem;
  text-align: center;
}

/* ── Histogramme ──────────────────────────────────── */
.products-page .range-histogram {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 52px;
  margin-bottom: -2px; /* colle visuellement au slider */
}

.products-page .range-histogram .histo-bar {
  flex: 1;
  min-height: 3px;
  border-radius: 2px 2px 0 0;
  transition: background 0.15s;
}

.products-page .histo-bar.in-range  { background: #3b82f6; }
.products-page .histo-bar.out-range { background: #e2e8f8; }

/* ── Slider dual range ────────────────────────────── */
.products-page .range-slider-wrap {
  position: relative;
  height: 38px;
  margin: 0 0 1rem;
}

.products-page .range-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  transform: translateY(-50%);
  background: #dde2f0;
  border-radius: 99px;
  pointer-events: none;
  z-index: 0;
}

.products-page .range-fill {
  position: absolute;
  top: 0;
  height: 100%;
  background: #3b82f6;
  border-radius: 99px;
}

.products-page .range-thumb {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 4px;
  transform: translateY(-50%);
  background: transparent;
  pointer-events: none;
  outline: none;
  margin: 0;
  z-index: 1;
}

.products-page .range-thumb::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1e3a8a;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(30,58,138,0.35), 0 1px 3px rgba(0,0,0,0.15);
  pointer-events: auto;
  cursor: grab;
  transition: transform 0.1s, box-shadow 0.1s;
}

.products-page .range-thumb::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1e3a8a;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(30,58,138,0.35), 0 1px 3px rgba(0,0,0,0.15);
  pointer-events: auto;
  cursor: grab;
}

.products-page .range-thumb::-webkit-slider-thumb:active {
  transform: scale(1.15);
  box-shadow: 0 3px 12px rgba(0,0,0,0.32);
  cursor: grabbing;
}

/* ── Inputs prix ──────────────────────────────────── */
.products-page .filter-price-inputs {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.products-page .price-sep {
  color: var(--muted);
  font-size: 1rem;
  padding-bottom: 0.45rem;
  flex-shrink: 0;
}

.products-page .price-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.products-page .price-field-label {
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.products-page .price-field-inner {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-sep);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.12s;
  overflow: hidden;
}

.products-page .price-field-inner:focus-within {
  border-color: #2563eb;
}

.products-page .price-field-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.55rem 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  background: transparent;
  width: 0; /* let flex handle it */
  -moz-appearance: textfield;
}

.products-page .price-field-input::-webkit-outer-spin-button,
.products-page .price-field-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.products-page .price-field-unit {
  padding: 0 0.55rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  flex-shrink: 0;
}

/* ── Footer panel ─────────────────────────────────── */
.products-page .filter-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.products-page .btn-filter-reset {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.4rem 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.12s;
}

.products-page .btn-filter-reset:hover {
  color: var(--text);
}

.products-page .btn-filter-apply {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.4rem;
  background: #1e3a8a;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.13s;
}

.products-page .btn-filter-apply:hover {
  background: #1d4ed8;
}


/* ============================================================
   Mobile filter bar · sort bottom sheet · filter modal
   ============================================================ */

/* Hidden by default (desktop) */
.mobile-filter-bar,
.mobile-sort-sheet,
.mobile-filter-modal {
  display: none;
}

@media (max-width: 768px) {

  /* ── Hide desktop chip bar ─────────────────────────── */
  .products-page .products-filters {
    display: none;
  }

  /* ── Extra bottom padding so content clears the fixed bar */
  .products-page {
    padding-bottom: 76px;
  }

  /* ──────────────────────────────────────────────────── */
  /* Mobile bottom bar                                    */
  /* ──────────────────────────────────────────────────── */
  .mobile-filter-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.10);
    padding: 0.55rem 1rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    gap: 0.6rem;
  }

  .mobile-filter-bar__btn {
    flex: 1;
    height: 44px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: #1a1a2e;
    position: relative;
  }

  .mobile-filter-bar__btn--primary {
    background: #1a6ef5;
    color: #fff;
    border-color: #1a6ef5;
  }

  .mobile-filter-bar__badge {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #e53e3e;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-sizing: border-box;
    line-height: 1;
  }

  /* ──────────────────────────────────────────────────── */
  /* Sort bottom sheet                                    */
  /* ──────────────────────────────────────────────────── */
  .mobile-sort-sheet {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 400;
  }

  .mobile-sort-sheet[hidden] {
    display: none;
  }

  .mobile-sort-sheet__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
  }

  .mobile-sort-sheet__panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 1.1rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
    max-height: 80vh;
    overflow-y: auto;
  }

  .mobile-sort-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
  }

  .mobile-sort-sheet__title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
  }

  .mobile-sheet-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
  }

  .mobile-sort-options {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .mobile-sort-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 0.96rem;
    color: #1a1a2e;
    cursor: pointer;
    user-select: none;
  }

  .mobile-sort-option:last-child {
    border-bottom: none;
  }

  .mobile-sort-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #1a6ef5;
    flex-shrink: 0;
    cursor: pointer;
  }

  /* ──────────────────────────────────────────────────── */
  /* Full-screen filter modal                             */
  /* ──────────────────────────────────────────────────── */
  .mobile-filter-modal {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 400;
    background: #fff;
  }

  .mobile-filter-modal[hidden] {
    display: none;
  }

  .mobile-filter-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.09);
    flex-shrink: 0;
  }

  .mobile-filter-modal__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    min-width: 32px;
  }

  .mobile-filter-modal__title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
    flex: 1;
  }

  .mobile-filter-modal__reset {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: #555;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 4px;
    min-width: 80px;
    text-align: right;
  }

  .mobile-filter-modal__body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .mobile-filter-modal__footer {
    padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(0,0,0,0.09);
    flex-shrink: 0;
  }

  .mobile-filter-modal__cta {
    width: 100%;
    height: 50px;
    background: #1a6ef5;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
  }

  .mobile-filter-modal__cta:hover {
    background: #1559d4;
  }

  /* ── Filtres dans la modal : affichage plat (sans accordéon) ─
     Quand le JS ajoute .is-modal sur #products-filters,
     toutes les chips sont cachées et tous les panels sont visibles.
  ────────────────────────────────────────────────────────────── */

  /* Layout général */
  .products-filters.is-modal {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    gap: 0 !important;
    align-items: stretch !important;
  }

  /* Séparateur visuel générique/spécifiques — inutile ici */
  .products-filters.is-modal .filter-sep {
    display: none !important;
  }

  /* Filter-group : position static (pas de dropdown) */
  .products-filters.is-modal .filter-group {
    position: static !important;
  }

  /* Chips : totalement cachées */
  .products-filters.is-modal .filter-chip {
    display: none !important;
  }

  /* Panels : tous visibles, en bloc, même s'ils ont [hidden] */
  .products-filters.is-modal .filter-panel,
  .products-filters.is-modal .filter-panel[hidden] {
    display: block !important;
    position: static !important;
    width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 0 !important;
    padding: 1rem 1.1rem 1.1rem !important;
    background: #fff !important;
    z-index: auto !important;
    box-sizing: border-box !important;
  }

  .products-filters.is-modal .filter-panel--rating,
  .products-filters.is-modal .filter-panel--rating[hidden],
  .products-filters.is-modal .filter-panel--brand,
  .products-filters.is-modal .filter-panel--brand[hidden] {
    width: 100% !important;
  }

  .products-filters.is-modal .filter-group:last-child .filter-panel {
    border-bottom: none !important;
  }

  /* Heading = titre de section */
  .products-filters.is-modal .filter-panel-heading {
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    margin: 0 0 0.85rem !important;
  }

  /* Footer : seulement le bouton Réinitialiser */
  .products-filters.is-modal .filter-panel-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin-top: 0.75rem !important;
  }

  .products-filters.is-modal .btn-filter-reset {
    background: none;
    border: none;
    color: #999;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.3rem 0;
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  /* Appliquer : inutile en modal (filtres live) */
  .products-filters.is-modal .btn-filter-apply {
    display: none !important;
  }

  /* Sliders range */
  .products-filters.is-modal .range-slider-wrap {
    position: relative;
    height: 36px;
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
  }

  /* Inputs de plage de valeurs */
  .products-filters.is-modal .filter-price-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
  }

  .products-filters.is-modal .price-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .products-filters.is-modal .price-field-label {
    font-size: 0.74rem;
    color: #888;
    font-weight: 500;
  }

  .products-filters.is-modal .price-field-inner {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
  }

  .products-filters.is-modal .price-field-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.45rem 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
    background: transparent;
    width: 0;
    -moz-appearance: textfield;
    text-align: center;
  }

  .products-filters.is-modal .price-field-input::-webkit-outer-spin-button,
  .products-filters.is-modal .price-field-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
  }

  .products-filters.is-modal .price-field-unit {
    padding: 0 0.4rem 0 0;
    font-size: 0.78rem;
    color: #888;
    flex-shrink: 0;
  }

  .products-filters.is-modal .price-sep {
    color: #aaa;
    font-weight: 600;
    flex-shrink: 0;
  }

  /* Listes de cases à cocher */
  .products-filters.is-modal .brand-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 200px;
    overflow-y: auto;
  }

  .products-filters.is-modal .brand-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #1a1a2e;
  }

  .products-filters.is-modal .brand-cb {
    width: 17px;
    height: 17px;
    accent-color: #1a6ef5;
    flex-shrink: 0;
    cursor: pointer;
  }

  .products-filters.is-modal .brand-item-name { flex: 1; }
  .products-filters.is-modal .brand-item-count { font-size: 0.8rem; color: #999; }

  /* Rating list */
  .products-filters.is-modal .rating-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  /* Histogramme prix — masqué en modal pour compacité */
  .products-filters.is-modal .range-histogram {
    display: none !important;
  }


} /* end @media (max-width: 768px) */
