/* Libertie — Infinite scroll bidirectionnel */

/* On masque la pagination native uniquement quand le JS a pris la main
   (classe ajoutée par infinite.js), pour conserver un fallback sans JS. */
#js-product-list.lis-active nav.pagination {
  display: none;
}

/* CRUCIAL : on désactive le "scroll anchoring" natif du navigateur sur la liste
   produit. Sinon, quand on insère des produits au-dessus de la vue (scroll haut /
   préchargement x-1, x-2), le navigateur compense tout seul EN PLUS de notre
   compensation manuelle -> double compensation -> l'écran saute. Ici, seule notre
   compensation par élément d'ancrage s'applique. */
#js-product-list.lis-active {
  overflow-anchor: none;
}
#js-product-list.lis-active * {
  overflow-anchor: none;
}

.lis-sentinel {
  width: 100%;
  height: 1px;
  pointer-events: none;
}

/* Spacer de la fenêtre DOM (réserve la hauteur des pages retirées du DOM). */
.lis-spacer {
  pointer-events: none;
}

/* GIF de chargement personnalisé. */
.lis-spinner-img {
  display: inline-block;
  max-height: 60px;
  width: auto;
}

.lis-spinner {
  display: none;
  text-align: center;
  padding: 18px 0;
  line-height: 0;
}

.lis-spinner-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 4px;
  border-radius: 50%;
  background: #111;
  opacity: 0.25;
  animation: lis-bounce 1s infinite ease-in-out both;
}

.lis-spinner-dot:nth-child(1) { animation-delay: -0.32s; }
.lis-spinner-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes lis-bounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.25; }
  40% { transform: scale(1); opacity: 0.9; }
}

/* Spinner du haut : bande de hauteur fixe réservée AU-DESSUS de la grille tant qu'il reste des pages à
   charger au-dessus (affichage géré en JS par visibility, pour ne rien décaler). */
.lis-spinner.lis-spinner-top {
  height: 96px;
  box-sizing: border-box;
}
