/* ═══════════════════════════════════════════════════
   auronefiltres — style PS Facet natif
   ═══════════════════════════════════════════════════ */

/* ── Bloc global ────────────────────────────────────── */
.af-block {
  font-family: inherit;
  color: #333;
}
.af-not-ready {
  font-size: .8rem;
  color: #aaa;
  margin: 0;
}

/* ── Tags filtres actifs ────────────────────────────── */
.af-active-filters {
  margin-bottom: .75rem;
}
.af-active-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.af-active-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  color: #333;
  font-size: .75rem;
  padding: 3px 9px;
  border-radius: 2px;
  cursor: pointer;
  line-height: 1.4;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
  animation: af-pop-in .2s ease;
}
.af-active-tag:active { transform: scale(.94); }
.af-active-tag:hover {
  background: #333;
  color: #fff;
  border-color: #333;
}
.af-clear-all {
  background: none;
  border: none;
  color: #666;
  font-size: .75rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 3px 0;
}
.af-clear-all:hover { color: #000; }

/* ── Section filtre ─────────────────────────────────── */
.af-filter {
  padding-bottom: .25rem;
}

/* Titre identique à PS Facet : gras, taille normale, pas de séparateur visible */
.af-filter-title {
  font-size: .875rem;
  font-weight: 700;
  margin: 0 0 .5rem;
  color: #333;
  padding-top: 1rem;
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Icône d'information, cliquable, à côté du titre du filtre */
.af-tooltip-trigger {
  font-family: Arial, Helvetica, sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  background: none;
  border: none;
  border-radius: 50%;
  padding: 0;
  margin: 0;
  color: #41aba8;
  line-height: 1;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.af-tooltip-trigger svg {
  display: block;
  width: 17px;
  height: 17px;
  pointer-events: none;
}
.af-tooltip-trigger:hover,
.af-tooltip-trigger:focus {
  color: #338f8c;
  outline: none;
}
.af-tooltip-trigger:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}
.af-tooltip-trigger.af-tooltip-active {
  color: #338f8c;
}


/* Popover élégante */
.af-tooltip-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  width: 240px;
  max-width: calc(100vw - 40px);
  background: #fff;
  color: #333;
  font-size: .8125rem;
  font-weight: 400;
  line-height: 1.5;
  border-radius: 4px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0, 0, 0, .06);
  padding: 12px 30px 12px 14px;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.af-tooltip-popover.af-tooltip-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.af-tooltip-popover::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 12px;
  width: 9px;
  height: 9px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: -1px -1px 1px rgba(0, 0, 0, .04);
}
.af-tooltip-popover-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border: none;
  background: none;
  color: #aaa;
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: color .15s ease, background .15s ease;
}
.af-tooltip-popover-close:hover {
  color: #333;
  background: #f0f0f0;
}

/* ── Liste d'options ────────────────────────────────── */
.af-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.af-item {
  margin-bottom: .2rem;
}

/* Label = toute la ligne cliquable */
.af-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
  padding: 2px 0;
  font-size: .875rem;
  font-weight: 400;
  color: #333;
  line-height: 1.4;
  user-select: none;
  transition: color .15s ease;
  text-align: left;
}
.af-label:hover { color: #000; }

/* Checkbox / radio natifs — mêmes que PS Facet */
.af-input[type="checkbox"],
.af-input[type="radio"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: #333;
  border-radius: 2px;
  transition: transform .12s ease;
}
.af-input[type="checkbox"]:checked,
.af-input[type="radio"]:checked {
  animation: af-check-pop .18s ease;
}

.af-label-text {
  flex: 1;
}
.af-count {
  color: #999;
  font-size: .8125rem;
  font-weight: 400;
}

/* ── Couleurs ─────────────────────────────────────────
   Même style que PS Facet : pastille carrée + label
   ─────────────────────────────────────────────────── */
.af-list--color .af-item {
  margin-bottom: .3rem;
}
.af-label--color {
  gap: 8px;
}
.af-input--color {
  display: none; /* la pastille fait office de toggle */
}
.af-swatch {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 3px;
  border: 1px solid transparent;
  outline: 1px solid rgba(0,0,0,.15);
  box-sizing: border-box;
  cursor: pointer;
  transition: outline-color .15s, transform .12s;
}
.af-swatch--active,
.af-label--color:hover .af-swatch {
  outline-color: #333;
  transform: scale(1.08);
}
.af-swatch--active {
  border-color: #fff;
  outline-width: 2px;
}

/* ── Select ───────────────────────────────────────── */
.af-select-wrap {
  position: relative;
}
.af-select {
  width: 100%;
  padding: .375rem .5rem;
  border: 1px solid #d6d6d6;
  border-radius: 2px;
  font-size: .875rem;
  color: #333;
  background: #fff;
  appearance: none;
  cursor: pointer;
}

/* ── Saisie libre ─────────────────────────────────── */
.af-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.af-input--free {
  flex: 1;
  padding: .375rem .5rem;
  border: 1px solid #d6d6d6;
  border-radius: 2px;
  font-size: .875rem;
  color: #333;
}
.af-input-unit {
  font-size: .8rem;
  color: #999;
}
.af-input--free.af-input--invalid {
  border-color: #d9534f;
  background: #fdf2f2;
}

/* Bloc "Texte libre" : contenu HTML saisi via TinyMCE en back-office */
.af-freetext {
  font-size: .8125rem;
  line-height: 1.6;
  color: #555;
}
.af-freetext p {
  margin: 0 0 .6em;
}
.af-freetext p:last-child {
  margin-bottom: 0;
}
.af-freetext img {
  max-width: 100%;
  height: auto;
}
.af-freetext a {
  color: #333;
  text-decoration: underline;
}

/* ── Barre Filtres actifs (zone contenu, style PS natif) ─── */
.af-active-filters-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: .6rem .75rem;
  background: #f6f6f6;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  margin-bottom: 1rem;
  font-size: .875rem;
}
.af-active-filters-label {
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}
.af-active-filters-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.af-active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 2px;
  padding: 3px 10px;
  font-size: .8125rem;
  color: #333;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.af-active-filter-tag:hover {
  background: #333;
  color: #fff;
  border-color: #333;
  text-decoration: none;
}
.af-remove-icon {
  font-size: 14px;
  line-height: 1;
  margin-left: 2px;
}
.af-clear-all-link {
  font-size: .8rem;
  color: #888;
  text-decoration: underline;
  white-space: nowrap;
}
.af-clear-all-link:hover { color: #333; }

/* ── Animations d'apparition ─────────────────────────── */
@keyframes af-pop-in {
  0%   { opacity: 0; transform: translateY(-2px) scale(.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes af-check-pop {
  0%   { transform: scale(.75); }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
@keyframes af-spin {
  to { transform: rotate(360deg); }
}
@keyframes af-fade-in-up {
  0%   { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── Transitions de fondu au remplacement du contenu ─── */
#auronefiltres-block,
#js-product-list {
  transition: opacity .22s ease;
  opacity: 1;
}
#auronefiltres-block.af-fade-init,
#js-product-list.af-fade-init {
  opacity: 0;
}
#js-product-list .products.row {
  animation: af-fade-in-up .28s ease;
}

/* ── Loader élégant ───────────────────────────────────
   Overlay discret + spinner fin, pas de flash sur les
   réponses rapides (délai géré côté JS avant affichage).
   ─────────────────────────────────────────────────── */
.af-loading {
  position: relative;
  pointer-events: none;
}
.af-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  z-index: 20;
  border-radius: 3px;
  animation: af-loading-fade-in .15s ease;
}
@keyframes af-loading-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.af-spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.5px solid rgba(51, 51, 51, .15);
  border-top-color: #333;
  animation: af-spin .7s linear infinite;
}

/* ── Interrupteur global animations/loader (réglage module) ─── */
.af-no-anim,
.af-no-anim * {
  animation: none !important;
  transition: none !important;
}
.af-no-anim .af-loading-overlay {
  display: none !important;
}

/* ── Mode étapes ──────────────────────────────────────
   Chaque filtre devient une étape numérotée ; l'étape
   suivante n'apparaît qu'une fois la précédente validée.
   ─────────────────────────────────────────────────── */
.af-step-mode .af-step {
  border-left: 2px solid #eee;
  padding-left: 14px;
  margin-left: 2px;
  animation: af-fade-in-up .3s ease;
}
.af-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #333;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  margin-right: 6px;
  vertical-align: middle;
}
.af-step-done {
  color: #27ae60;
  font-weight: 700;
  margin-left: 6px;
}
#js-product-list-bottom {
  margin-bottom: 500px;
}