/* Filtres du catalogue : périmètre isolé du footer bkf-* et du thème historique. */
#booksted-catalog { scroll-margin-top: var(--bkf-scroll-offset, 190px); }
@media (max-width: 768px) {
  #booksted-catalog { scroll-margin-top: var(--bkf-scroll-offset, 320px); }
}
.bkf-root {
  --bkf-bg: #fbf7f2;
  --bkf-surface: #fff;
  --bkf-field: #fbf7f2;
  --bkf-text: #14100f;
  --bkf-muted: #71635b;
  --bkf-line: #e7daca;
  --bkf-accent: #6e1e30;
  --bkf-accent-soft: #f5e8e9;
  --bkf-accent-text: #6e1e30;
  --bkf-focus: #a87343;
  --bkf-on-accent: #fff;
  --bkf-shadow: 0 14px 40px rgba(20, 16, 15, .14);
  position: relative;
  z-index: 4;
  width: 100%;
  min-width: 0;
  margin: 0 0 24px;
  color: var(--bkf-text);
  font-family: inherit;
}
.bkf-root *, .bkf-root *::before, .bkf-root *::after { box-sizing: border-box; }
.bkf-root [hidden] { display: none !important; }
.bkf-root form { margin: 0; }
.bkf-root .bkf-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.bkf-root .bkf-count { color: var(--bkf-muted); font-size: 14px; line-height: 1.5; }
.bkf-root .bkf-count b, .bkf-root .bkf-count strong { color: var(--bkf-text); font-weight: 750; }
.bkf-root .bkf-count > span { display: block; margin-top: 3px; color: var(--bkf-muted); font-size: 12px; line-height: 1.5; }
.bkf-root .bkf-sort { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bkf-root label.bkf-sort { color: var(--bkf-muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.bkf-root .bkf-sort label { color: var(--bkf-muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.bkf-root :is(.bkf-sort select, .bkf-price-row input, .bkf-search-row input) {
  min-height: 44px;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--bkf-line) !important;
  border-radius: 11px;
  background-color: var(--bkf-surface) !important;
  color: var(--bkf-text) !important;
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
}
.bkf-root .bkf-sort select { cursor: pointer; max-width: 230px; }
.bkf-root .bkf-groups { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 9px; }
.bkf-root details.bkf-group { position: relative; min-width: 0; margin: 0; padding: 0; border: 0; scroll-margin-top: var(--bkf-scroll-offset, 190px); }
.bkf-root .bkf-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--bkf-line);
  border-radius: 12px;
  background: var(--bkf-surface);
  color: var(--bkf-text);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.bkf-root summary::-webkit-details-marker { display: none; }
.bkf-root summary::marker { content: ''; }
.bkf-root .bkf-group > summary::after {
  content: '';
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  margin: -3px 2px 0 3px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
}
.bkf-root .bkf-group[open] { z-index: 8; }
.bkf-root .bkf-group[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
.bkf-root .bkf-group > summary:hover, .bkf-root .bkf-group[open] > summary { border-color: var(--bkf-accent-text); }
.bkf-root .bkf-group[data-bkf-selected="true"] > summary { background: var(--bkf-accent-soft); color: var(--bkf-accent-text); border-color: var(--bkf-accent-text); }
.bkf-root .bkf-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 21px; min-height: 21px; padding: 1px 6px; border-radius: 20px; background: var(--bkf-accent); color: var(--bkf-on-accent); font-size: 11px; line-height: 1.2; font-weight: 750; }
.bkf-root .bkf-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: var(--bkf-pop-shift, 0px);
  width: 330px;
  max-width: calc(100vw - 32px);
  padding: 15px;
  background: var(--bkf-surface);
  border: 1px solid var(--bkf-line);
  border-radius: 15px;
  box-shadow: var(--bkf-shadow);
  color: var(--bkf-text);
}
.bkf-root:not([data-bkf-ready="true"]) .bkf-group[open] { flex: 1 1 100%; }
.bkf-root:not([data-bkf-ready="true"]) .bkf-pop { position: static; width: 100%; max-width: 100%; margin-top: 7px; box-shadow: none; }
.bkf-root .bkf-options { max-height: min(360px, 55vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--bkf-line) transparent; padding: 2px; }
.bkf-root .bkf-option { display: flex; align-items: flex-start; gap: 10px; min-height: 43px; padding: 10px 8px; border-radius: 8px; color: var(--bkf-text); font-size: 13px; line-height: 1.5; cursor: pointer; overflow-wrap: anywhere; }
.bkf-root .bkf-option:hover { background: var(--bkf-field); }
.bkf-root .bkf-option:has(input:checked) { background: var(--bkf-accent-soft); }
.bkf-root .bkf-option input[type="checkbox"] { appearance: auto; -webkit-appearance: checkbox; position: static; width: 17px; height: 17px; min-width: 17px; margin: 1px 0 0; opacity: 1; pointer-events: auto; accent-color: var(--bkf-accent-text); flex-shrink: 0; cursor: pointer; }
.bkf-root .bkf-option input:disabled { opacity: .45; cursor: not-allowed; }
.bkf-root .bkf-option:has(input:disabled) { color: var(--bkf-muted); }
.bkf-root .bkf-option small { color: var(--bkf-muted); margin-left: auto; white-space: nowrap; }
.bkf-root .bkf-subgroup { margin: 0; border-bottom: 1px solid var(--bkf-line); }
.bkf-root .bkf-subgroup:last-child { border-bottom: 0; }
.bkf-root .bkf-subgroup > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 10px 7px; font-size: 13px; line-height: 1.4; font-weight: 700; list-style: none; cursor: pointer; color: var(--bkf-text); }
.bkf-root .bkf-subgroup > summary::after { content: '+'; color: var(--bkf-accent-text); font-size: 19px; font-weight: 400; }
.bkf-root .bkf-subgroup[open] > summary::after { content: '−'; }
.bkf-root .bkf-subgroup .bkf-option { margin-left: 4px; }
.bkf-root .bkf-price-row { display: flex; gap: 12px; align-items: flex-end; }
.bkf-root .bkf-price-row > span { align-self: flex-end; padding-bottom: 12px; color: var(--bkf-muted); }
.bkf-root .bkf-price-row label { display: flex; flex: 1 1 0; flex-direction: column; gap: 7px; min-width: 0; color: var(--bkf-muted); font-size: 12px; font-weight: 600; }
.bkf-root .bkf-price-row input { width: 100%; min-width: 0; }
.bkf-root .bkf-search-row { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.bkf-root .bkf-search-row label { font-size: 13px; color: var(--bkf-muted); font-weight: 600; }
.bkf-root .bkf-search-row input { width: 100%; }
.bkf-root .bkf-context { margin: -3px 0 16px; color: var(--bkf-muted); font-size: 13px; line-height: 1.6; }
.bkf-root .bkf-context strong { color: var(--bkf-text); }
.bkf-root .bkf-context a { color: var(--bkf-accent-text) !important; text-decoration: underline; text-underline-offset: 3px; }
.bkf-root .bkf-hint { margin: 0 0 12px; color: var(--bkf-muted); font-size: 12px; line-height: 1.6; }
.bkf-root .bkf-notice { margin-top: 16px; padding: 12px 15px; border: 1px solid #ead9b7; border-radius: 12px; background: #fff6e5; color: #74521d; font-size: 13px; line-height: 1.6; }
.bkf-root .bkf-notice p { margin: 0; color: inherit; }
.bkf-root .bkf-notice p + p { margin-top: 5px; }
.bkf-root .bkf-search-row input::placeholder, .bkf-root .bkf-price-row input::placeholder { color: var(--bkf-muted) !important; opacity: .8; }
.bkf-root .bkf-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 16px; }
.bkf-root .bkf-apply { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 22px; border: 1px solid var(--bkf-accent) !important; border-radius: 11px; background: var(--bkf-accent) !important; color: var(--bkf-on-accent) !important; font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; }
.bkf-root .bkf-apply:hover { background: #4a1220 !important; border-color: #4a1220 !important; }
.bkf-root .bkf-reset { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0; color: var(--bkf-muted) !important; font-size: 13px; text-underline-offset: 3px; }
.bkf-root .bkf-reset:hover { color: var(--bkf-accent-text) !important; }
.bkf-root .bkf-active { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--bkf-line); }
.bkf-root .bkf-active:empty { display: none; }
.bkf-root .bkf-active-label { color: var(--bkf-muted); font-size: 11px; font-weight: 650; letter-spacing: .03em; margin-right: 4px; }
.bkf-root .bkf-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; max-width: 100%; padding: 7px 11px; border-radius: 20px; background: var(--bkf-accent-soft); border: 1px solid var(--bkf-line); color: var(--bkf-accent-text) !important; font-size: 12px; line-height: 1.4; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.bkf-root .bkf-chip:hover { border-color: var(--bkf-accent-text); }
.bkf-root .bkf-chip svg { width: 13px; height: 13px; flex: 0 0 13px; stroke: currentColor; }
.bkf-root :is(summary, a, button, input, select):focus-visible { outline: 2px solid var(--bkf-focus) !important; outline-offset: 3px; }
#booksted-catalog .bkf-seller-rating { display: inline-flex; align-items: center; gap: 3px; color: #8a6540; font-size: 11px; line-height: 1.4; font-weight: 650; white-space: nowrap; }
@media (max-width: 700px) {
  .bkf-root .bkf-top { gap: 12px; }
  .bkf-root .bkf-sort { width: 100%; justify-content: space-between; }
  .bkf-root .bkf-sort select { flex: 1 1 auto; width: 100%; max-width: 250px; font-size: 16px; }
  .bkf-root .bkf-groups { gap: 8px; }
  .bkf-root details.bkf-group { flex: 1 1 calc(50% - 8px); }
  .bkf-root details.bkf-group[open] { flex-basis: 100%; }
  .bkf-root .bkf-group > summary { width: 100%; min-height: 48px; padding: 11px 12px; }
  .bkf-root .bkf-pop { position: static; width: 100%; max-width: 100%; margin-top: 7px; padding: 12px; box-shadow: none; }
  .bkf-root .bkf-options { max-height: min(360px, 50vh); }
  .bkf-root .bkf-actions { gap: 12px; justify-content: flex-start; }
  .bkf-root .bkf-apply { flex: 1 1 auto; }
  .bkf-root :is(.bkf-price-row input, .bkf-search-row input) { font-size: 16px; }
  .bkf-root .bkf-chip { min-height: 40px; }
}
@media (max-width: 768px) {
  .bkf-root details.bkf-group { scroll-margin-top: var(--bkf-scroll-offset, 320px); }
}
@media screen {
  html[data-bk-theme="dark"] .bkf-root { --bkf-bg: #171416; --bkf-surface: #211d20; --bkf-field: #2b2529; --bkf-text: #f3ebe5; --bkf-muted: #c5b5bd; --bkf-line: #4a3c43; --bkf-accent: #6e1e30; --bkf-accent-soft: #39252e; --bkf-accent-text: #eea7b9; --bkf-focus: #e7cfaf; --bkf-shadow: 0 14px 40px rgba(0, 0, 0, .38); }
  html[data-bk-theme="dark"] .bkf-root :is(.bkf-sort select, .bkf-price-row input, .bkf-search-row input) { background-color: var(--bkf-field) !important; color: var(--bkf-text) !important; border-color: var(--bkf-line) !important; }
  html[data-bk-theme="dark"] .bkf-root .bkf-sort :is(option, optgroup) { background: var(--bkf-field) !important; color: var(--bkf-text) !important; }
  html[data-bk-theme="dark"] .bkf-root .bkf-notice { background: #392f20; border-color: #78623d; color: #edca8c; }
  html[data-bk-theme="dark"] #booksted-catalog .bkf-seller-rating { color: #e7cfaf !important; }
}
@media print {
  .bkf-root .bkf-pop { position: static; box-shadow: none; width: 100%; }
  .bkf-root .bkf-actions { display: none; }
}
