/* BBF Complete Filter — Sidebar style v2.1 */
:root {
    --bbfc-accent:  #c9a96e;
    --bbfc-dark:    #b8924a;
    --bbfc-text:    #1a1a1a;
    --bbfc-muted:   #888;
    --bbfc-border:  #e8e8e8;
    --bbfc-bg:      #ffffff;
    --bbfc-hover:   #f9f9f9;
}

/* ---- Bouton trigger ---- */
.bbfc-trigger-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.bbfc-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: 1px solid var(--bbfc-text);
    color: var(--bbfc-text);
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .15s, color .15s;
    border-radius: 2px;
}
.bbfc-trigger-btn:hover { background: var(--bbfc-text); color: #fff; }
.bbfc-trigger-count {
    background: var(--bbfc-accent); color: #fff;
    border-radius: 50%; width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700;
}

/* Tags actifs */
.bbfc-active-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bbfc-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; background: #f0f0f0; border: 1px solid #ddd;
    color: var(--bbfc-text); border-radius: 20px; font-size: 12px;
    text-decoration: none; transition: background .15s;
}
.bbfc-tag:hover { background: #e0e0e0; text-decoration: none; color: var(--bbfc-text); }

/* ---- Overlay ---- */
.bbfc-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.45); z-index: 99998;
}
.bbfc-overlay.is-open { display: block; }

/* ---- Sidebar ---- */
.bbfc-sidebar {
    position: fixed;
    top: 0; right: 0;
    width: 360px; max-width: 95vw;
    height: 100vh;
    background: var(--bbfc-bg);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transform: translateX(110%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: -4px 0 30px rgba(0,0,0,.15);
    overflow: hidden; /* important */
}
.bbfc-sidebar.is-open { transform: translateX(0); }

/* Header */
.bbfc-sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--bbfc-border);
    flex-shrink: 0;
    background: var(--bbfc-bg);
}
.bbfc-sidebar-title { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.bbfc-sidebar-close {
    background: none; border: none; cursor: pointer;
    padding: 6px; color: var(--bbfc-text); display: flex;
    align-items: center; opacity: .55; transition: opacity .15s;
    border-radius: 2px;
}
.bbfc-sidebar-close:hover { opacity: 1; }

/* Body scrollable — clé : height explicite */
.bbfc-sidebar-body {
    flex: 1 1 auto;
    min-height: 0;        /* IMPORTANT pour que flex-child soit scrollable */
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.bbfc-sidebar-body::-webkit-scrollbar { width: 4px; }
.bbfc-sidebar-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

/* Accordéon */
.bbfc-accord { border-bottom: 1px solid var(--bbfc-border); }
.bbfc-accord-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px; cursor: pointer;
    font-size: 13px; font-weight: 500; letter-spacing: .04em;
    user-select: none; transition: background .15s;
    background: var(--bbfc-bg);
}
.bbfc-accord-head:hover { background: var(--bbfc-hover); }
.bbfc-accord-arrow { transition: transform .2s ease; flex-shrink: 0; }
.bbfc-accord.is-open .bbfc-accord-arrow { transform: rotate(45deg); }
.bbfc-accord-body { display: none; padding: 4px 24px 16px; }
.bbfc-accord.is-open .bbfc-accord-body { display: block; }

/* Items */
.bbfc-list { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; }
.bbfc-list::-webkit-scrollbar { width: 3px; }
.bbfc-list::-webkit-scrollbar-thumb { background: #eee; }
.bbfc-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 4px; cursor: pointer; font-size: 13px;
    border-bottom: 1px solid #f5f5f5; transition: color .15s;
}
.bbfc-item:last-child { border-bottom: none; }
.bbfc-item:hover { color: var(--bbfc-accent); }
.bbfc-item.is-checked { color: var(--bbfc-accent); font-weight: 600; }
.bbfc-item input[type=checkbox],
.bbfc-item input[type=radio] { accent-color: var(--bbfc-accent); width: 15px; height: 15px; flex-shrink: 0; cursor: pointer; }
.bbfc-item img { max-width: 44px; max-height: 20px; object-fit: contain; }
.bbfc-item span { flex: 1; }
.bbfc-item em { color: var(--bbfc-muted); font-style: normal; font-size: 11px; margin-left: auto; white-space: nowrap; }

/* Prix */
.bbfc-price-inputs { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 16px; }
.bbfc-dash { color: var(--bbfc-muted); padding-bottom: 8px; }
.bbfc-price-field label { display: block; font-size: 10px; color: var(--bbfc-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .06em; }
.bbfc-price-box { display: flex; align-items: center; border: 1px solid var(--bbfc-border); border-radius: 2px; overflow: hidden; background: #fff; }
.bbfc-price-box > span { padding: 0 8px; font-size: 12px; color: var(--bbfc-muted); background: #f5f5f5; border-right: 1px solid var(--bbfc-border); height: 34px; display: flex; align-items: center; }
.bbfc-price-box input[type=number] { border: none; outline: none; padding: 6px 8px; width: 65px; font-size: 13px; -moz-appearance: textfield; }
.bbfc-price-box input[type=number]::-webkit-inner-spin-button,
.bbfc-price-box input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Slider */
.bbfc-slider-wrap { position: relative; height: 28px; display: flex; align-items: center; margin-top: 4px; }
.bbfc-track { position: absolute; width: 100%; height: 3px; background: #e0e0e0; border-radius: 2px; }
.bbfc-fill { position: absolute; height: 100%; background: var(--bbfc-accent); border-radius: 2px; }
.bbfc-slider-wrap input[type=range] { position: absolute; width: 100%; height: 3px; appearance: none; -webkit-appearance: none; background: transparent; pointer-events: none; outline: none; }
.bbfc-slider-wrap input[type=range]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--bbfc-accent); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer; pointer-events: all; }
.bbfc-slider-wrap input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--bbfc-accent); border: 2px solid #fff; cursor: pointer; pointer-events: all; }

/* Notes */
.bbfc-ratings { display: flex; flex-direction: column; }
.bbfc-stars { display: inline-flex; gap: 1px; }
.bbfc-stars svg.on  { fill: #f5a623; stroke: #f5a623; }
.bbfc-stars svg.off { fill: none;    stroke: #ddd; }
.bbfc-clear-radio { font-size: 11px; color: var(--bbfc-muted); text-decoration: underline; margin-top: 6px; display: inline-block; cursor: pointer; background: none; border: none; padding: 0; }

/* Footer */
.bbfc-sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--bbfc-border);
    display: flex; gap: 10px;
    flex-shrink: 0;
    background: var(--bbfc-bg);
}
.bbfc-apply {
    flex: 1; padding: 12px;
    background: var(--bbfc-text); color: #fff;
    border: none; font-size: 13px; font-weight: 600;
    letter-spacing: .05em; text-transform: uppercase;
    cursor: pointer; transition: background .2s;
}
.bbfc-apply:hover { background: #333; }
.bbfc-reset {
    padding: 12px 18px; background: transparent;
    color: var(--bbfc-muted); border: 1px solid var(--bbfc-border);
    font-size: 12px; text-decoration: none;
    display: inline-flex; align-items: center;
    transition: all .2s; letter-spacing: .04em;
}
.bbfc-reset:hover { border-color: #999; color: var(--bbfc-text); text-decoration: none; }

@media (max-width: 480px) {
    .bbfc-sidebar { width: 100%; }
}
