/* Objet Filters Sidebar */
.objet-filters {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-section__header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  background: var(--ev-secondary-light);
  border: 1px solid var(--ev-secondary-border-color);
  overflow: hidden;
  padding: 0;
}

.filter-section__header:focus {
  outline: none;
}

.filter-section__header .material-symbols-outlined:not(.filter-section__chevron) {
  font-size: 18px;
  padding: .5rem;
  background: var(--ev-secondary);
  color: white;
}

.filter-section__label {
  margin-left: 4px;
}

.filter-section__header span:nth-child(2) {
  flex: 1;
}

.filter-section__chevron {
  transition: transform 0.3s ease;
  margin-right: 4px;
}

.filter-section__header[aria-expanded="true"] .filter-section__chevron {
  transform: rotate(180deg);
}

.filter-section__body {
  padding: 8px 4px;
  background: var(--ev-body-bg);
}

.filter-section__body .form-group {
  margin-bottom: 12px;
}

.filter-section__body .form-group:last-child {
  margin-bottom: 0;
}

.filter-section__body .form-label {
  display: block;
  font-weight: 600;
  color: var(--ev-body-color);
  margin-bottom: 4px;
}

.filter-section__body .form-control {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--ev-border-radius);
}

.filter-section .form-control {
  min-height: 28px;
}

.filter-section__body .form-control::placeholder {
  color: var(--ev-muted-color);
  opacity: 0.7;
}

.filter-section__body .d-flex {
  display: flex;
}

.filter-section__body .gap-2 {
  gap: 8px;
}

.filter-section__body .text-muted {
  font-size: 10px;
  white-space: nowrap;
}

/* Filter card container */
.card--filters {
  overflow: hidden;
  border: 1px solid var(--ev-border-color);
  border-radius: 10px;
}

/* Filter header with search */
.filter-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--ev-tabs-bg);
  border-bottom: 1px solid var(--ev-border-color);
}

.filter-header__label {
  font-weight: 600;
  font-size: 13px;
  color: var(--ev-body-color);
}

.filter-header__search {
  flex: 1;
}

.filter-header__search .form-control {
  font-size: 12px;
  padding: 6px 10px;
}

.filter-header__btn {
  padding: 6px 12px;
  font-size: 12px;
}

/* Mobile filter toggle button */
.btn-filter-mobile-toggle {
  padding: 4px;
  line-height: 1;
  border-color: var(--ev-border-color);
  color: var(--ev-body-color);
}

.btn-filter-mobile-toggle .material-symbols-outlined {
  font-size: 18px;
}

.btn-filter-mobile-toggle.active {
  background: var(--ev-primary);
  border-color: var(--ev-primary);
  color: white;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .btn-filter-mobile-toggle {
    margin-left: auto;
  }

  .filters-open .btn-filter-mobile-toggle {
    margin-left: 0;
  }

  .filter-actions__lim,
  .filter-actions .btn-filter-apply {
    display: none;
  }

  .filters-open .filter-actions__lim {
    display: inline-flex;
  }

  .filters-open .filter-actions .btn-filter-apply {
    display: inline-block;
  }

  .filters-sidebar__cards {
    display: none;
  }

  .filters-open .filters-sidebar__cards {
    display: block;
  }

  .filter-section__body {
    padding: 12px;
  }
}

/* Filter actions — barre d'action unique, AU-DESSUS de la carte de filtres (maquette 01). */
.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin-bottom: 8px;
  background: var(--ev-card-bg, #fff);
  border: 1px solid var(--ev-border-color);
  border-radius: 10px;
}

.filter-actions__lim {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--ev-muted-color, #6c757d);
  font-size: 12px;
  white-space: nowrap;
}

.filter-actions .filter-limit-input {
  width: 60px;
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid var(--ev-border-color);
  border-radius: var(--ev-border-radius);
  text-align: center;
}

.filter-actions .btn-filter-apply {
  font-size: 13px;
  padding: 6px 16px;
  font-weight: 500;
}

.filter-actions .btn-filter-mobile-toggle {
  padding: 4px;
  line-height: 1;
  border-color: var(--ev-border-color);
  color: var(--ev-body-color);
}

.filter-actions .btn-filter-mobile-toggle .material-symbols-outlined {
  font-size: 18px;
}

/* Select2 in filters */
.objet-filters .select2-container {
  width: 100% !important;
}

.objet-filters .select2-container--default .select2-selection--single {
  height: 30px;
  font-size: 12px;
  border-radius: var(--ev-border-radius);
}

.objet-filters .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 28px;
  padding-left: 10px;
}

.objet-filters .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 28px;
}

.objet-filters .select2-container--default .select2-selection--multiple {
  min-height: 30px;
  font-size: 12px;
  border-radius: var(--ev-border-radius);
}

.objet-filters .select2-container .select2-search--inline .select2-search__field {
  margin-top: 2px;
}

.objet-filters .select2-container--default .select2-selection--multiple {
  padding: 0 4px !important;
}

.filter-date-range__separator {
  display: block;
  height: fit-content;
  margin-block: auto;
  color: var(--ev-body-color);
}

/* Dark theme adjustments */
[data-theme="dark"] .filter-section__body {
  background: var(--ev-card-bg);
}

[data-theme="dark"] .filter-actions {
  background: var(--ev-card-bg);
}
/* ============================================================================
 * Colonne de filtres — contrat de la maquette validée
 * (docs/design/maquettes-modes-affichage/). Onglets, section principale,
 * options une par ligne, compteurs de critères.
 * ========================================================================== */

/* ── Onglets ───────────────────────────────────────────────────────────────── */
.ov-ftabs {
  display: flex;
  gap: 2px;
  padding: 6px 6px 0;
  border-bottom: 1px solid var(--ev-border-color, #e9ecef);
  background: var(--ev-card-bg, #fff);
}

.ov-ftab {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
  padding: 7px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ev-muted, #6c757d);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.ov-ftab:hover { background: var(--ev-hover-bg, #f7f9fb); }

.ov-ftab.is-on {
  color: var(--ev-heading-color, #1f2933);
  border-bottom-color: var(--dom, #6d28d9);
}

.ov-ftab .material-symbols-outlined { font-size: 16px; flex: 0 0 auto; }

.ov-ftab__l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ov-ftab__c,
.filter-section__count {
  flex: 0 0 auto;
  min-width: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--dom, #6d28d9);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

.ov-fpane[hidden] { display: none; }

/* ── Section « Filtres principaux » ────────────────────────────────────────── */
.filter-section--main {
  border-bottom: 2px solid var(--ev-border-color, #e9ecef);
  background: linear-gradient(var(--ev-card-bg, #fff), var(--ev-hover-bg, #fbfdfc));
}

.filter-section--main .filter-section__label { font-weight: 700; }

.filter-main__note {
  margin: 0 0 8px;
  color: var(--ev-muted, #6c757d);
  font-size: 11px;
  line-height: 1.45;
}

.filter-main__row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 5px 0;
  border-top: 1px solid var(--ev-border-color, #f1f3f5);
}

.filter-main__row:first-of-type { border-top: 0; }

.filter-main__k {
  padding-top: 5px;
  color: var(--ev-heading-color, #1f2933);
  font-size: 11px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.filter-main__v { min-width: 0; }

/* ── Options : une par ligne ───────────────────────────────────────────────── */
.filter-optlist { display: block; }

.filter-optlist__q { margin-bottom: 5px; }

.filter-optlist--scroll .filter-optlist__b {
  max-height: 188px;
  overflow-y: auto;
  padding-right: 2px;
}

.filter-opt {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 3px 5px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.3;
}

.filter-opt:hover { background: var(--ev-hover-bg, #f7f9fb); }

.filter-opt[hidden] { display: none; }

.filter-opt input { flex: 0 0 auto; margin: 0; }

.filter-opt__dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border: 1px solid transparent;
  border-radius: 50%;
}

.filter-opt__l {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ── Barre d'action : critères modifiés non appliqués ──────────────────────── */
/* Placée APRÈS les règles de thème sombre pour primer à spécificité égale : la barre
   « modifiée » reste orange dans les deux thèmes (maquette `01`). */
.filter-actions.is-dirty {
  background: var(--ev-warning-light, #fef5e6);
  border-color: var(--ev-warning, #f59f00);
}
