.gbaf-filters {background:#fff;border:1px solid #e7e7e7;padding:1rem;margin-bottom:1.5rem}
.gbaf-top{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.gbaf-top a{font-size:.85rem}.gbaf-facet{border-top:1px solid #eee;padding:1rem 0}.gbaf-facet .facet-title{font-weight:600;margin:0 0 .75rem}
.gbaf-values{padding:0;margin:0;list-style:none;max-height:300px;overflow:auto}.gbaf-values li{margin:.2rem 0}
.gbaf-option{display:flex;gap:.5rem;align-items:center;padding:.25rem;text-decoration:none!important;color:inherit!important}
.gbaf-option small{margin-left:auto;color:#666}.gbaf-check{height:17px;width:17px;border:1px solid #aaa;flex-shrink:0;text-align:center;line-height:15px;font-size:13px;border-radius:3px}
.gbaf-selected .gbaf-check{background:#242424;color:#fff;border-color:#242424}.gbaf-selected .gbaf-label{font-weight:700}
.gbaf-price-form{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}.gbaf-price-form label{font-size:.85rem}.gbaf-price-form input{width:100%;padding:.4rem;border:1px solid #ccc}
.gbaf-price-form button{grid-column:1 / -1}.gbaf-hint{color:#666;font-size:.73rem;margin:.5rem 0 0}

.gbaf-mount{display:block;max-width:100%;margin-bottom:1.25rem;clear:both}
.gbaf-diagnostic{background:#fff5d6;color:#453900;padding:.75rem;border:1px solid #c8ae50;font-size:13px;margin-bottom:.75rem}

/* v0.9.9 AJAX progressive enhancement */
.gbaf-loading { opacity: .55; pointer-events: none; transition: opacity .15s ease; }
@media (prefers-reduced-motion: reduce) { .gbaf-loading { transition: none; } }

/* v1.1 — controls and accessible collapsible groups */
.gbaf-details summary { cursor:pointer; list-style:revert; padding:.2rem 0; }
.gbaf-details summary:focus-visible,.gbaf-option:focus-visible {outline:2px solid #2563eb;outline-offset:2px}
.gbaf-details[open] summary {margin-bottom:.65rem}
.gbaf-buttons,.gbaf-colors {display:flex;flex-wrap:wrap;gap:.4rem;max-height:none}
.gbaf-buttons li,.gbaf-colors li {margin:0}
.gbaf-buttons .gbaf-option,.gbaf-colors .gbaf-option {padding:.35rem .55rem;border:1px solid #d0d0d0;border-radius:5px;min-height:34px}
.gbaf-buttons .gbaf-selected,.gbaf-colors .gbaf-selected {border-color:#242424;background:#f2f2f2}
.gbaf-buttons .gbaf-option small,.gbaf-colors .gbaf-option small {font-size:.65rem;margin-left:.2rem}
.gbaf-swatch {display:inline-block;height:18px;width:18px;border:1px solid #999;border-radius:50%;flex:none}
.gbaf-radio-dot{display:inline-block;height:17px;width:17px;border:1px solid #888;border-radius:50%;flex:none}
.gbaf-selected .gbaf-radio-dot{border:5px solid #242424}
@media (max-width:767px){.gbaf-filters{padding:.75rem}.gbaf-buttons .gbaf-option{min-height:40px}}

/* v1.5.4: the existing theme owns the mobile filter toggle. No duplicate trigger. */
.gbaf-native-wrapper { width:100%; }
#_mobile_search_filters .gbaf-native-mobile { display:block; width:100%; }
@media (max-width:767px) {
  #_mobile_search_filters .gbaf-native-wrapper { display:block; }
  #_mobile_search_filters .gbaf-filters { margin-bottom:0; }
}

/* v1.5.7: Chevron glued to title label using an inline pseudo-element.
   This avoids Optima's summary/layout overrides pushing the icon to a new line.
   Only facets configured "Replié par défaut" have the collapsible class. */
.gbaf-details > summary.facet-title {
  cursor:pointer;
  list-style:none;
}
.gbaf-details > summary.facet-title::-webkit-details-marker { display:none; }
.gbaf-details > summary.facet-title::marker { content:""; }
.gbaf-details > summary.gbaf-facet-collapsible .gbaf-facet-label {
  display:inline;
}
.gbaf-details > summary.gbaf-facet-collapsible .gbaf-facet-label::after {
  content:"";
  display:inline-block;
  box-sizing:border-box;
  width:6px;
  height:6px;
  margin-left:12px;
  margin-bottom:2px;
  border-right:1.5px solid #737373;
  border-bottom:1.5px solid #737373;
  transform:rotate(45deg);
  vertical-align:middle;
  transition:transform .16s ease;
}
.gbaf-details[open] > summary.gbaf-facet-collapsible .gbaf-facet-label::after {
  transform:rotate(225deg);
  margin-bottom:-1px;
}
@media (prefers-reduced-motion:reduce) {
  .gbaf-details > summary.gbaf-facet-collapsible .gbaf-facet-label::after { transition:none; }
}


/* v1.5.9 — discreet Optima-style selected filter chips.
   The extra specificity isolates the style from Optima's generic link/button rules. */
.gbaf-filters .gbaf-active-filters {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  margin:0 0 18px;
  padding:0 0 15px;
  border-bottom:1px solid #ededed;
}
.gbaf-filters .gbaf-active-filters .gbaf-chip {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  box-sizing:border-box;
  max-width:100%;
  min-height:31px;
  margin:0;
  padding:6px 11px 6px 13px;
  border:1px solid #ececec;
  border-radius:18px;
  background:#f3f3f3;
  box-shadow:none;
  color:#303030 !important;
  font:inherit;
  font-size:12px;
  font-weight:400;
  line-height:1.4;
  text-decoration:none !important;
  text-transform:none;
  transition:background-color .15s ease,border-color .15s ease;
}
.gbaf-filters .gbaf-active-filters .gbaf-chip-label {
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.gbaf-filters .gbaf-active-filters .gbaf-chip:hover {
  background:#e9e9e9;
  border-color:#dadada;
}
.gbaf-filters .gbaf-active-filters .gbaf-chip-remove {
  position:relative;
  display:inline-block;
  flex:0 0 10px;
  width:10px;
  height:10px;
  color:#777;
}
.gbaf-filters .gbaf-active-filters .gbaf-chip-remove::before,
.gbaf-filters .gbaf-active-filters .gbaf-chip-remove::after {
  content:'';
  position:absolute;
  top:4px;
  left:0;
  width:10px;
  height:1px;
  background:currentColor;
}
.gbaf-filters .gbaf-active-filters .gbaf-chip-remove::before {transform:rotate(45deg)}
.gbaf-filters .gbaf-active-filters .gbaf-chip-remove::after {transform:rotate(-45deg)}
.gbaf-filters .gbaf-active-filters .gbaf-chip:hover .gbaf-chip-remove {color:#292929}
.gbaf-filters .gbaf-active-filters .gbaf-chip-clear {
  display:inline-block;
  margin-left:3px;
  padding:5px 1px;
  color:#626262 !important;
  font-size:12px;
  line-height:1.5;
  text-decoration:underline !important;
  text-underline-offset:3px;
}
.gbaf-filters .gbaf-active-filters .gbaf-chip-clear:hover {color:#171717 !important}
.gbaf-filters .gbaf-active-filters a:focus-visible {outline:2px solid #555;outline-offset:3px}
@media (max-width:767px) {
  .gbaf-filters .gbaf-active-filters {gap:6px;margin-bottom:14px;padding-bottom:13px}
  .gbaf-filters .gbaf-active-filters .gbaf-chip {min-height:34px;padding:7px 12px;font-size:12px}
}
@media (prefers-reduced-motion:reduce) {
  .gbaf-filters .gbaf-active-filters .gbaf-chip {transition:none}
}

/* v1.5.11: keep original Optima appearance when replacing facet anchors with buttons. */
.gbaf-filters button.gbaf-option{width:100%;background:transparent;border:0;font:inherit;text-align:left;cursor:pointer;border-radius:0}
.gbaf-filters .gbaf-buttons button.gbaf-option,.gbaf-filters .gbaf-colors button.gbaf-option{border:1px solid #d0d0d0;border-radius:5px}
.gbaf-filters .gbaf-buttons button.gbaf-selected,.gbaf-filters .gbaf-colors button.gbaf-selected{border-color:#242424;background:#f2f2f2}
.gbaf-filters button.gbaf-chip{font-family:inherit;cursor:pointer}
.gbaf-filters button.gbaf-chip-clear,.gbaf-filters button.gbaf-nav-link{border:0;background:transparent;padding:0;font:inherit;cursor:pointer}
.gbaf-filters button.gbaf-nav-link{font-size:.85rem;color:inherit;text-decoration:underline}
.gbaf-filters button[data-gbaf-url]:focus-visible{outline:2px solid #2563eb;outline-offset:2px}


/* v1.5.12 — Fix button sizing in Optima without weakening bot protections.
   The theme's global button rules can overflow a narrow sidebar. */
.gbaf-filters,
.gbaf-filters .gbaf-facet,
.gbaf-filters .gbaf-details,
.gbaf-filters .gbaf-values { box-sizing:border-box; max-width:100%; min-width:0; }
.gbaf-filters .gbaf-values {
  width:100%;
  overflow-x:hidden;
  overflow-y:auto;
  scrollbar-width:thin;
}
.gbaf-filters .gbaf-values > li { box-sizing:border-box; max-width:100%; min-width:0; }
.gbaf-filters .gbaf-values button.gbaf-option {
  box-sizing:border-box;
  display:flex;
  width:100%;
  max-width:100%;
  min-width:0;
  min-height:28px;
  margin:0;
  padding:4px 3px;
  gap:7px;
  align-items:center;
  justify-content:flex-start;
  white-space:normal;
  box-shadow:none;
  text-transform:none;
  letter-spacing:normal;
  line-height:1.35;
  overflow:visible;
}
.gbaf-filters .gbaf-values button.gbaf-option .gbaf-label {
  flex:1 1 auto;
  min-width:0;
  text-align:left;
  overflow-wrap:anywhere;
}
.gbaf-filters .gbaf-values button.gbaf-option small {
  flex:0 0 auto;
  min-width:0;
  margin-left:auto;
  padding-left:5px;
  white-space:nowrap;
  text-align:right;
  font-size:11px;
  line-height:1.2;
}
.gbaf-filters .gbaf-values button.gbaf-option .gbaf-check,
.gbaf-filters .gbaf-values button.gbaf-option .gbaf-swatch,
.gbaf-filters .gbaf-values button.gbaf-option .gbaf-radio-dot { flex:0 0 auto; }
/* Button/color layouts must keep their compact pill appearance. */
.gbaf-filters .gbaf-buttons > li,
.gbaf-filters .gbaf-colors > li { max-width:100%; }
.gbaf-filters .gbaf-buttons button.gbaf-option,
.gbaf-filters .gbaf-colors button.gbaf-option {
  width:auto;
  max-width:100%;
  padding:6px 9px;
  min-height:34px;
}
