/* =====================================================================
   AQUAPISCINE - Search modal
   ---------------------------------------------------------------------
   Variables a override dans le theme principal du site si besoin.
   ---------------------------------------------------------------------
   CHANGELOG
   v1.11 (2026-04-30)
     - FIX .aps-state[hidden] { display: none !important } pour empecher
       display:flex de .aps-state-live d ecraser l attribut hidden.
   v1.10 (2026-04-30)
     - Grille produits forcee en 3 colonnes minimum (4 sur >=1100px,
       2 sur mobile). Avant en auto-fill min 170px ce qui pouvait
       donner 1 colonne sur petite largeur de modal.
   v1.9 (2026-04-30)
     - Layout fixe : modal en height:100vh, header (barre + recents)
       et sidebar fixes, SEUL .aps-live-products scrolle. Permet de
       garder visible la colonne categories/marques pendant le scroll
       de la grille produits.
     - Cleanup doublons CSS (.aps-live-products / -header / -prods-wrap
       / -side-wrap definis 2x).
   v1.8 (2026-04-30)
     - FIX scroll modal : remplace overflow:hidden par overflow-x:hidden
       (le scroll vertical etait bloque par le containment trop strict).
     - Recherches recentes deplaces hors du state empty -> affichees
       sous la barre dans tous les etats.
     - Pas de souligne sur les liens du modal (au repos ET hover).
     - Marques : 2 colonnes (au lieu de 3), fond #f5f5f5 (au lieu de efefef).
     - Produits : gap 20px (au lieu de 12px).
   v1.7 (2026-04-30)
     - FIX listing deborde du modal : overflow:hidden + max-width:100%
       + box-sizing:border-box * sur le modal-inner
     - Marques en aspect-ratio 4:3 (au lieu de min-height fixe)
   v1.6 (2026-04-30)
     - Marques : card centree avec UNIQUEMENT le logo (max-height 40px,
       mix-blend-mode multiply). Nom affiche en fallback si l image
       ne charge pas (via classe .aps-live-brand--noimg).
     - Sidebar : 260px -> 230px pour donner plus de place aux produits
     - Grille produits : min-width 170px au lieu de 190px,
       min-width:0 sur le grid pour eviter overflow
   v1.5 (2026-04-30)
     - Marques en grille 3 colonnes, fond #efefef, mix-blend-mode multiply
       sur logos pour absorber le blanc des PNG
     - Compteur en h3 18px gros (style "146 Produits")
   v1.4 (2026-04-30)
     - Layout inverse : grid 1fr 260px (produits gauche, sidebar droite)
     - Section .aps-live-brands-wrap avec logos marques mini
     - Header live avec compteur + lien Voir tous
     - Responsive < 900px : sidebar passe en bas en flex-row
   v1.3 (2026-04-30)
     - FIX : flèche ⇥ apparait derriere le texte meme quand pas de ghost.
       Conditionne le ::after par :not(:empty).
   v1.2 (2026-04-30)
     - FIX double croix native (::-webkit-search-cancel-button display:none)
     - FIX ghost decale 1 char (alignement font/box-sizing input vs ghost)
     - Classe aps-live-grid--no-cats : grille produit pleine largeur
       quand pas de categories matchees
   v1.1 (2026-04-30)
     - Styles pour etat "live" (frappe en cours) : sidebar categories
       + grille produits + bouton "Voir tous"
   v1.0 (2026-04-30) - Initial
   ===================================================================== */

:root {
  --aps-blue:        #0199cb;
  --aps-blue-dark:   #0a8e9d;
  --aps-text:        #1a1a1a;
  --aps-text-soft:   #555;
  --aps-border:      #e2e2e2;
  --aps-bg:          #fff;
  --aps-bg-soft:     #f7f7f7;
  --aps-promo:       #ff6f3c;
  --aps-radius:      8px;
  --aps-modal-z:     9999;
}

/* --- Modal --------------------------------------------------------- */
.aps-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: var(--aps-modal-z);
  display: flex; justify-content: center;
  overflow: hidden;
}
.aps-modal[hidden] { display: none; }
.aps-modal-inner {
  background: var(--aps-bg);
  width: min(1100px, 100%);
  max-width: 100%;
  margin: 0;
  height: 100vh;             /* hauteur fixe = viewport */
  display: flex; flex-direction: column;
  overflow: hidden;          /* clip global, scroll delegue aux enfants */
  box-sizing: border-box;
}
.aps-modal-inner *,
.aps-modal-inner *::before,
.aps-modal-inner *::after {
  box-sizing: border-box;
}
/* pas de souligne sur les liens du modal (au repos ET au hover) */
.aps-modal-inner a,
.aps-modal-inner a:hover,
.aps-modal-inner a:focus,
.aps-modal-inner a:visited {
  text-decoration: none;
}

/* Header (barre + suggestions + recents) : fixes en haut, ne scrollent pas */
.aps-bar          { flex-shrink: 0; }
.aps-suggestions  { flex-shrink: 0; }
.aps-recent       { flex-shrink: 0; }

/* Container etat : prend le reste de la hauteur, gere son scroll */
.aps-state {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
/* hidden doit toujours masquer, meme si display: flex est defini en dessous */
.aps-state[hidden] { display: none !important; }

.aps-state-empty,
.aps-state-results {
  overflow-y: auto;
  padding: 16px 24px 32px;
}
/* Etat live : pas de scroll global, on delegue aux enfants */
.aps-state-live {
  padding: 16px 24px 0;
  display: flex; flex-direction: column;
}

/* --- Barre de recherche -------------------------------------------- */
.aps-bar {
  position: sticky; top: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 18px 24px 8px 18px;
  background: var(--aps-bg);
  z-index: 2;
}
/* Trait sous la barre : pseudo-element parametrable.
   Tunables :
     width        : largeur du trait (100% = pleine barre, 80% centre, 600px fixe...)
     height       : epaisseur (1px, 2px, 3px...)
     bottom       : decalage vertical depuis le bas (0 = colle, -8px = en bas)
     left / transform : centrage horizontal (left:50% + translateX(-50%))
     background   : couleur (degrade possible)                                    */
.aps-bar::after {
  content: '';
  position: absolute;
  left: 24px;
  right: 70px;
  bottom: 0;
  height: 1px;
  background: #0199cb;
  border-radius: 1px;
}
.aps-icon-loupe { color: var(--aps-text); flex-shrink: 0; }

/* --- Input + ghost text overlay ----------------------------------- */
.aps-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.aps-ghost {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  font-size: 18px;
  color: transparent;
  white-space: pre;
  overflow: hidden;
  padding: 4px 0;
  margin: 0;
  /* meme font/letter-spacing que l input pour alignement parfait */
  font-family: inherit;
  letter-spacing: inherit;
  box-sizing: border-box;
}
.aps-ghost-typed {
  /* ce que l user a tape : invisible mais occupe la place exacte */
  visibility: hidden;
}
.aps-ghost-rest {
  color: #999;
  font-weight: 400;
}
.aps-ghost-rest:not(:empty)::after {
  content: '  ⇥';
  font-size: 12px;
  color: #bbb;
  margin-left: 4px;
  letter-spacing: 0;
}
@media (max-width: 720px) {
  .aps-ghost-rest:not(:empty)::after { content: ''; } /* pas de Tab sur mobile */
}

#aps-input {
  flex: 1;
  width: 100%;
  border: none; outline: none; background: transparent;
  font-size: 18px; color: var(--aps-text);
  padding: 4px 0;
  margin: 0;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  font-family: inherit;
  letter-spacing: inherit;
  /* desactive l UI native (croix de clear, etc.) qui creent un decalage */
  appearance: none;
  -webkit-appearance: none;
}
/* Supprime la croix native sur input[type=search] (Webkit/Chrome/Safari) */
#aps-input::-webkit-search-cancel-button,
#aps-input::-webkit-search-decoration,
#aps-input::-webkit-search-results-button,
#aps-input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}
/* idem Edge/IE legacy */
#aps-input::-ms-clear,
#aps-input::-ms-reveal {
  display: none;
  width: 0; height: 0;
}
#aps-input::placeholder { color: #999; }
.aps-close {
  background: none; border: none; cursor: pointer;
  padding: 4px; color: var(--aps-text);
}
.aps-close:hover { color: var(--aps-blue); }

/* --- Suggestions de completion (chips) ----------------------------- */
.aps-suggestions {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px 24px;
 }
.aps-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--aps-border);
  border-radius: 999px;
  font-size: 14px; color: var(--aps-text);
  background: var(--aps-bg);
  cursor: pointer;
  transition: background .15s;
}
.aps-chip:hover { background: var(--aps-bg-soft); }
.aps-chip b { color: var(--aps-text); font-weight: 700; }

/* --- Etat EMPTY ---------------------------------------------------- */

.aps-recent {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 24px;
  margin: 0;
}
.aps-recent[hidden] { display: none; }
.aps-recent-label { font-weight: 600; color: var(--aps-text); font-size:14px; color:#666; }
.aps-recent-list {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none; padding: 0; margin: 0;
}
.aps-recent-list li {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid #666;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
}
.aps-recent-list li:hover { background: var(--aps-bg-soft); }
.aps-recent-list .aps-recent-remove {
  border: none; background: none; cursor: pointer;
  color: var(--aps-text-soft);
  padding: 0; font-size: 14px; line-height: 1;
}
.aps-recent-clear {
  border: none; background: none; cursor: pointer;
  color: #0199cb; font-size: 13px; font-weight: 500;
}
.aps-recent-clear:hover {
text-decoration:underline;
}

.aps-empty-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  margin-top: 8px;
}
.aps-popular h3, .aps-recommended h3 {
  font-size: 18px; font-weight: 700; margin: 0 0 16px;
}
.aps-popular-list { list-style: none; padding: 0; margin: 0; }
.aps-popular-list li {
  padding: 8px 0;
  cursor: pointer;
  font-size: 14px; color: #666;
}
.aps-popular-list li:hover { color: #000; }

.aps-recommended-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* --- Etat LIVE (autocomplete pendant la frappe) -------------------- */
.aps-live-grid {
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 24px;
  flex: 1;
  min-height: 0;             /* permet au grid de retrecir et aux enfants de scroller */
  overflow: hidden;
}
.aps-live-grid--no-cats {
  grid-template-columns: 1fr;
}

/* Colonne gauche : header fixe en haut, produits scrollables */
.aps-live-prods-wrap {
  display: flex; flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.aps-live-header {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}
.aps-live-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  min-width: 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  padding-bottom: 32px;
  align-content: start;
}
@media (min-width: 1100px) {
  .aps-live-products { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 720px) {
  .aps-live-products { grid-template-columns: repeat(2, 1fr); }
}

/* Colonne droite : sidebar fixe, scrollable independamment si tres long */
.aps-live-side-wrap {
  display: flex; flex-direction: column;
  gap: 32px;
  border-left: 1px solid var(--aps-border);
  padding-left: 24px;
  min-height: 0;
  overflow-y: auto;
}
.aps-live-cats-wrap h3,
.aps-live-brands-wrap h3 {
  font-size: 18px; font-weight: 700; margin: 0 0 16px;
}

/* Categories */
.aps-live-categories {
  list-style: none; padding: 0; margin: 0;
}
.aps-live-categories li {
  padding: 8px 0;
  border-bottom: 1px solid var(--aps-border);
}
.aps-live-categories li:last-child { border-bottom: none; }
.aps-live-cat {
  text-decoration: none;
  color: var(--aps-text);
  font-size: 14px;
  display: block;
  transition: color .15s;
}
.aps-live-cat:hover { color: var(--aps-blue); }
.aps-live-cat b { color: var(--aps-blue); font-weight: 700; }

/* Marques : card avec UNIQUEMENT le logo (nom en fallback si image manque) */
.aps-live-brands {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.aps-live-brands li { padding: 0; }
.aps-live-brand {
  display: flex; align-items: center; justify-content: center;
  padding: 8px;
  border-radius: var(--aps-radius);
  text-decoration: none;
  color: var(--aps-text);
  background: #f5f5f5;
  transition: filter .15s;
}
.aps-live-brand:hover { filter: brightness(0.95); }
.aps-live-brand-logo {
  max-width: 100%;
  max-height: 40px;
  width: auto; height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}
/* Le nom est un fallback : visible uniquement si le logo n a pas charge */
.aps-live-brand-fallback-name {
  display: none;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: var(--aps-text);
}
.aps-live-brand--noimg .aps-live-brand-logo { display: none; }
.aps-live-brand--noimg .aps-live-brand-fallback-name { display: block; }

/* Compteur titre */
.aps-live-count {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--aps-text);
}
.aps-live-count-num {
  color: var(--aps-text);
}
.aps-live-seeall {
  text-decoration: none;
  color: var(--aps-blue);
  font-weight: 600;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: var(--aps-radius);
  transition: background .15s;
  white-space: nowrap;
}
.aps-live-seeall:hover { background: var(--aps-bg-soft); }

@media (max-width: 900px) {
  .aps-live-grid { grid-template-columns: 1fr; }
  .aps-live-side-wrap {
    border-left: none;
    border-top: 1px solid var(--aps-border);
    padding-left: 0;
    padding-top: 24px;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .aps-live-cats-wrap, .aps-live-brands-wrap { flex: 1; min-width: 220px; }
}

/* --- Card produit (style override #reco-prod-new "Les plus demandes") -- */
/* Reproduit fidelement l override CSS de la section "Les plus demandes"
   de la homepage : fond gris, pas de bordure, hauteur fixe, hover titre
   bleu marine + image en opacity 0.8, dispo cachee.
   Scope au modal pour ne pas dependre du site. */

.aps-recommended-list .pack-prod,
.aps-live-products    .pack-prod,
.aps-products         .pack-prod {
  display: block;
  position: relative;
  background: #F5F5F5;
  border-radius: 5px;
  padding: 10px;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  transition: background .15s;
}
/* Hover : on garde fidele a l override (titre bleu + image opacity).
   Pas d ombre ni translate, le fond gris fait office de "cadre". */
.aps-recommended-list .pack-prod:hover .nom,
.aps-live-products    .pack-prod:hover .nom,
.aps-products         .pack-prod:hover .nom {
  color: #0A3782;
}
.aps-recommended-list .pack-prod:hover img,
.aps-live-products    .pack-prod:hover img,
.aps-products         .pack-prod:hover img {
  opacity: 0.8;
}

/* Image : hauteur fixe coherente entre toutes les cards */
.aps-recommended-list .container-image,
.aps-live-products    .container-image,
.aps-products         .container-image {
  display: block;
  position: relative;
  margin-bottom: 8px;
  margin-top:10px;
  text-align: center;
}
.aps-recommended-list .container-image img,
.aps-live-products    .container-image img,
.aps-products         .container-image img {
  display: inline-block;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  vertical-align: middle;
  mix-blend-mode: multiply;
  transition: opacity .15s;
}
/* Astuce pour centrer verticalement l image dans le container hauteur fixe */
.aps-recommended-list .container-image::before,
.aps-live-products    .container-image::before,
.aps-products         .container-image::before {
  content: '';
  display: inline-block;
  height: 100%;
  vertical-align: middle;
}

/* Dispo : cachee comme dans l override #reco-prod-new */
.aps-recommended-list .container-available,
.aps-live-products    .container-available,
.aps-products         .container-available {
  display: none;
}

/* Sticker : aligne sur le CSS site (.pack-prod .product-sticker)
   - position : top 0, left 10px (decale du bord gauche)
   - padding 0 5px, font 10px Tahoma, z-index 100
   - pas de fond par defaut : c est .flash-sale qui apporte le rouge */
.aps-recommended-list .product-sticker,
.aps-live-products    .product-sticker,
.aps-products         .product-sticker {
  position: absolute;
  top: 0;
  left: 10px;
  display: block;
  padding: 0 5px;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 18px;
  font-size: 10px;
  color: #fff;
  border-radius: 1px;
  white-space: nowrap;
  text-align: center;
  z-index: 100;
  font-family: Tahoma, "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
}
.aps-recommended-list .product-sticker.flash-sale,
.aps-live-products    .product-sticker.flash-sale,
.aps-products         .product-sticker.flash-sale {
  background-color: rgba(230, 31, 31, .8);
}

/* Marque + note (clearfix layout, marque a gauche, note a droite) */
.aps-recommended-list .container-brand,
.aps-live-products    .container-brand,
.aps-products         .container-brand {
  display: block;
  margin: 8px 0 4px;
  min-height: 16px;
}
.aps-recommended-list .container-brand .marque,
.aps-live-products    .container-brand .marque,
.aps-products         .container-brand .marque {
  display: block;
  float: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--aps-text);
  letter-spacing: 0.3px;
}
.aps-recommended-list .container-brand .note,
.aps-live-products    .container-brand .note,
.aps-products         .container-brand .note {
  display: block;
  float: right;
}
.aps-recommended-list .note .rating_stars,
.aps-live-products    .note .rating_stars,
.aps-products         .note .rating_stars {
  display: block;
  float: left;
  width: 58px;
  height: 15px;
  position: relative;
}
.aps-recommended-list .note .rating_stars .svg_rating,
.aps-live-products    .note .rating_stars .svg_rating,
.aps-products         .note .rating_stars .svg_rating {
  position: absolute; left: 0; top: 0;
}
.aps-recommended-list .note .rating_stars .svg_rating svg,
.aps-live-products    .note .rating_stars .svg_rating svg,
.aps-products         .note .rating_stars .svg_rating svg {
  fill: #e8e8e8;
  width: 58px; height: 15px;
}
.aps-recommended-list .note .rating_stars .rate.svg_rating,
.aps-live-products    .note .rating_stars .rate.svg_rating,
.aps-products         .note .rating_stars .rate.svg_rating {
  overflow: hidden;
}
.aps-recommended-list .note .rating_stars .rate.svg_rating svg,
.aps-live-products    .note .rating_stars .rate.svg_rating svg,
.aps-products         .note .rating_stars .rate.svg_rating svg {
  fill: #fbc02d;
}

/* Titre */
.aps-recommended-list .pack-prod .nom,
.aps-live-products    .pack-prod .nom,
.aps-products         .pack-prod .nom {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  margin: 8px 0 0;
  max-height: 60px;
  min-height: 45px;
  font-size: 13px;
  line-height: 15px;
  font-weight: 600;
  color: var(--aps-text);
  text-decoration: none;
  transition: color .15s;
}

/* Bloc bas : prix */
.aps-recommended-list .buy,
.aps-live-products    .buy,
.aps-products         .buy {
  display: block;
  padding-top: 8px;
  text-align: left;
}

/* Prix : structure homepage
   - prix-origine : gros (22px), bloc, par defaut noir
   - prix-barre : 13px, line-through diagonale via :before (rotate -5deg)
   - .nxcb sur .prix-wrap => prix-origine en bleu marine (paiement 3x/4x)
   - .no-strike sur .prix-wrap => cache le .prix-barre  */
.aps-recommended-list .prix-wrap,
.aps-live-products    .prix-wrap,
.aps-products         .prix-wrap {
  display: block;
  text-align: left;
}
.aps-recommended-list .prix-origine,
.aps-live-products    .prix-origine,
.aps-products         .prix-origine {
  display: block;
  font-weight: 700;
  font-size: 22px;
  color: var(--aps-text);
  vertical-align: middle;
  box-sizing: border-box;
  line-height: 1.1;
}
.aps-recommended-list .prix-wrap.nxcb .prix-origine,
.aps-live-products    .prix-wrap.nxcb .prix-origine,
.aps-products         .prix-wrap.nxcb .prix-origine {
  color: #0A3782;
}
.aps-recommended-list .prix-barre,
.aps-live-products    .prix-barre,
.aps-products         .prix-barre {
  display: inline-block;
  position: relative;
  padding: 0 3px;
  margin-top: 2px;
  font-size: 13px;
  color: var(--aps-text-soft);
  font-weight: 400;
  text-align: left;
  box-sizing: border-box;
}
.aps-recommended-list .prix-barre:before,
.aps-live-products    .prix-barre:before,
.aps-products         .prix-barre:before {
  content: " ";
  position: absolute;
  top: 50%; left: 0;
  width: 100%;
  border-bottom: 1px solid #323232;
  transform: rotate(-5deg);
  -webkit-transform: rotate(-5deg);
}
.aps-recommended-list .prix-wrap.no-strike .prix-barre,
.aps-live-products    .prix-wrap.no-strike .prix-barre,
.aps-products         .prix-wrap.no-strike .prix-barre {
  display: none;
}

/* 3x / 4x sous le prix */
.aps-recommended-list .prix-nfois,
.aps-live-products    .prix-nfois,
.aps-products         .prix-nfois {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--aps-text-soft);
  font-weight: 500;
}
/* Cas vente privee / promo : prix-nfois passe a cote du prix-barre
   (la home ne l affiche pas mais le modal le garde pour eviter de perdre
   l info paiement fractionne sur les flash) */
.aps-recommended-list .prix-barre + .prix-nfois,
.aps-live-products    .prix-barre + .prix-nfois,
.aps-products         .prix-barre + .prix-nfois {
  display: inline-block;
  margin-top: 0;
  padding-left: 20px;
  vertical-align: baseline;
}

/* Centimes : exposant, plus petit */
.aps-recommended-list .pack-prod sup,
.aps-live-products    .pack-prod sup,
.aps-products         .pack-prod sup,
.aps-recommended-list .cent,
.aps-live-products    .cent,
.aps-products         .cent {
  top: -0.5em;
  position: relative;
  font-size: 60%;
  line-height: 0;
  vertical-align: baseline;
  font-weight: inherit;
}

/* Etats speciaux : rupture + "nous consulter" */
.aps-recommended-list .prix-rupture,
.aps-live-products    .prix-rupture,
.aps-products         .prix-rupture {
  color: #c22 !important;
  font-size: 16px !important;
}
.aps-recommended-list .prix-nc,
.aps-live-products    .prix-nc,
.aps-products         .prix-nc {
  color: var(--aps-text-soft) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

/* Etat rupture : grise le visuel */
.aps-recommended-list .pack-prod.not-available,
.aps-live-products    .pack-prod.not-available,
.aps-products         .pack-prod.not-available {
  opacity: 0.7;
}
.aps-recommended-list .pack-prod.not-available img,
.aps-live-products    .pack-prod.not-available img,
.aps-products         .pack-prod.not-available img {
  filter: grayscale(0.6);
}

.aps-recommended-list .clearfix,
.aps-live-products    .clearfix,
.aps-products         .clearfix { clear: both; }

/* --- Etat RESULTS -------------------------------------------------- */
.aps-results-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--aps-border);
}
.aps-results-count { font-size: 16px; }
.aps-results-count b { font-weight: 700; }
.aps-sort {
  border: 1px solid var(--aps-border);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 14px;
  background: var(--aps-bg);
  cursor: pointer;
}
.aps-results-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 24px;
}

/* Facettes */
.aps-facet {
  border-bottom: 1px solid var(--aps-border);
  padding: 12px 0;
}
.aps-facet h4 {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 16px; font-weight: 700; margin: 0;
  cursor: pointer;
}
.aps-facet-toggle { color: var(--aps-text-soft); transition: transform .15s; }
.aps-facet.is-collapsed .aps-facet-toggle { transform: rotate(-90deg); }
.aps-facet.is-collapsed .aps-facet-body { display: none; }
.aps-facet-body { padding-top: 12px; }

.aps-facet-list { list-style: none; padding: 0; margin: 0; max-height: 220px; overflow-y: auto; }
.aps-facet-list li {
  display: flex; align-items: center;
  padding: 4px 0; font-size: 14px;
  cursor: pointer;
}
.aps-facet-list label {
  flex: 1; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.aps-facet-list .aps-facet-count {
  color: var(--aps-text-soft);
  font-size: 13px;
}

.aps-price-slider {
  display: flex; gap: 8px; align-items: center;
}
.aps-price-slider input {
  flex: 1; min-width: 0;
  border: 1px solid var(--aps-border);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 14px;
}

/* Grille produits */
.aps-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-content: start;
}
@media (max-width: 1100px) { .aps-products { grid-template-columns: repeat(2, 1fr); } }

/* Pagination */
.aps-pagination {
  display: flex; justify-content: center; gap: 8px;
  padding: 16px;
}
.aps-pagination button {
  border: 1px solid var(--aps-border);
  background: var(--aps-bg);
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 4px;
  min-width: 36px;
}
.aps-pagination button.is-active {
  background: var(--aps-blue);
  border-color: var(--aps-blue);
  color: #fff;
}
.aps-pagination button:disabled { opacity: .4; cursor: default; }

/* Empty state */
.aps-empty-msg {
  text-align: center; padding: 40px 20px;
  color: var(--aps-text-soft);
}

/* Loading */
.aps-loading { opacity: .5; pointer-events: none; }

/* Mobile */
@media (max-width: 768px) {
  .aps-bar { padding: 12px 16px; }
  .aps-state { padding: 12px 16px 24px; }
  .aps-empty-grid { grid-template-columns: 1fr; gap: 24px; }
  .aps-results-body { grid-template-columns: 1fr; padding: 16px; }
  .aps-products { grid-template-columns: repeat(2, 1fr); }
  .aps-facets { order: 2; }
}
