/* Barre de filtres partagée (filterbar.js). Couleurs tirées des variables globales de style.css. */
.fb { display: grid; gap: 10px; min-width: 0; max-width: 100%; }
.fb > * { min-width: 0; }
.fb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fb-search { flex: 1 1 260px; min-width: 0; }
.fb-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-dd { position: relative; }
button.fb-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 14px; border-radius: 10px;
  background: var(--cx-card-2); border: 1px solid var(--cx-border); color: var(--cx-fg);
  font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; max-width: 280px;
  transition: border-color .15s, background .15s;
}
button.fb-btn > span { overflow: hidden; text-overflow: ellipsis; }
button.fb-btn svg { color: var(--cx-muted); flex: none; transition: transform .15s; }
button.fb-btn:hover { border-color: var(--cx-muted); }
button.fb-btn.on { border-color: var(--cx-accent); background: var(--cx-accent-soft); }
.fb-dd.open button.fb-btn svg { transform: rotate(180deg); }
.fb-val { color: var(--cx-accent); }
.fb-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--cx-accent); color: #07121d; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }

.fb-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: 260px; max-width: calc(100vw - 32px);
  background: var(--cx-card); border: 1px solid var(--cx-border); border-radius: 12px; padding: 6px;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
}
.fb-pop-r { left: auto; right: 0; }
.fb-pop.fb-anim { animation: fb-in .14s ease both; }
@keyframes fb-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.fb-pop-h { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 8px; font-size: 12px; color: var(--cx-muted); text-transform: uppercase; letter-spacing: .05em; }
.fb-pop-h b { font-weight: 600; }
.fb-opts { display: grid; gap: 2px; max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
button.fb-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px; border: 0; border-radius: 8px;
  background: none; color: var(--cx-fg); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer;
}
button.fb-opt:hover, button.fb-opt:focus-visible { background: var(--cx-card-2); }
.fb-opt.fb-zero { color: var(--cx-faint); }
.fb-ck { width: 18px; height: 18px; flex: none; border-radius: 5px; border: 1.5px solid var(--cx-muted); display: grid; place-items: center; color: transparent; }
.fb-opt[aria-pressed="true"] .fb-ck { background: var(--cx-accent); border-color: var(--cx-accent); color: #07121d; }
.fb-ol { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-opt i { font-style: normal; font-size: 12px; color: var(--cx-faint); }

.fb-active { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
button.fb-tag {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px;
  background: var(--cx-accent-soft); border: 1px solid var(--cx-accent); color: var(--cx-fg); font: inherit; font-size: 12.5px; cursor: pointer;
}
.fb-tag-g { color: var(--cx-muted); }
.fb-tag-g::after { content: " :"; }
button.fb-tag svg { color: var(--cx-muted); }
button.fb-tag:hover svg { color: var(--cx-fg); }
button.fb-mini { background: none; border: 0; padding: 4px 6px; color: var(--cx-accent); font: inherit; font-size: 12.5px; cursor: pointer; border-radius: 6px; height: auto; }
button.fb-mini:hover { text-decoration: underline; }
.fb button:focus-visible { outline: 2px solid var(--cx-accent); outline-offset: 2px; }

/* Téléphone : les boutons défilent sur une ligne, le menu s'ouvre en panneau bas. */
@media (max-width: 640px) {
  .fb-search { flex-basis: 100%; }
  .fb-btns { flex-wrap: nowrap; overflow-x: auto; width: 100%; min-width: 0; flex: 1 1 100%; padding-bottom: 2px; scrollbar-width: none; }
  .fb-btns::-webkit-scrollbar { display: none; }
  .fb-dd { position: static; }
  .fb-pop, .fb-pop-r { position: fixed; left: 12px; right: 12px; bottom: 12px; top: auto; width: auto; max-width: none; max-height: 70vh; display: flex; flex-direction: column; }
  .fb-opts { max-height: none; flex: 1; }
  button.fb-opt { min-height: 44px; }
}
