/* [vd-split] hub — extracted verbatim from videos/css/video.css. Tokens (--vd-*) come from .vd in video.css. */
/* =========================================================================
   Videos hub (index + per-pest) and video cards
   ========================================================================= */
.vd-hubshell { max-width: 1180px; margin: 0 auto; padding: 28px 16px 48px; }
.vd-hubhead { margin-bottom: 22px; }
.vd-hubtitle { margin: 4px 0 6px; font-size: 2rem; font-weight: 800; color: var(--vd-ink); }
.vd-hubsub { margin: 0 0 10px; color: var(--vd-body); font-size: 16px; }
.vd-hubstats { margin: 0 0 16px; color: var(--vd-muted); font-size: 14.5px; }
.vd-hubstats strong { color: var(--vd-ink); }
.vd-hub-reassure { margin: 18px 0 28px; }
@media (min-width: 760px) { .vd-hub-reassure { grid-template-columns: repeat(4, 1fr); } }

.vd-facets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* visible group labels so the three filter rows read clearly (Nuisible / Trier / Type) */
.vd-facets-label { font-weight: 700; font-size: 13px; color: var(--vd-muted); margin-right: 2px; }
.vd-control-group { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.vd-facet {
  display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--vd-line); background: #fff; color: var(--vd-body);
  font-weight: 700; font-size: 13.5px; text-decoration: none; transition: all .15s ease;
}
.vd-facet:hover { border-color: var(--vd-primary); color: var(--vd-primary-dark); }
.vd-facet.is-active { background: var(--vd-primary); border-color: var(--vd-primary); color: #fff; }
.vd-facet-sm { padding: 6px 12px; font-size: 12.5px; }

/* hub controls: sort toggle + type filter */
.vd-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.vd-sort { display: inline-flex; border: 1px solid var(--vd-line); border-radius: 999px; background: #fff; overflow: hidden; }
.vd-sort-btn { padding: 8px 16px; font-weight: 700; font-size: 13.5px; text-decoration: none; color: var(--vd-body); transition: all .15s ease; }
.vd-sort-btn:hover { color: var(--vd-primary-dark); }
.vd-sort-btn.is-active { background: var(--vd-primary); color: #fff; }
.vd-facets-type { justify-content: flex-end; }
.vd-empty { color: var(--vd-muted); padding: 30px 0; }

/* pagination */
.vd-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 32px 0 8px; }
.vd-page {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px;
  padding: 0 10px; border: 1px solid var(--vd-line); border-radius: 10px; background: #fff;
  color: var(--vd-body); font-weight: 700; font-size: 14px; text-decoration: none; transition: all .15s ease;
}
.vd-page:hover { border-color: var(--vd-primary); color: var(--vd-primary-dark); }
.vd-page.is-active { background: var(--vd-primary); border-color: var(--vd-primary); color: #fff; cursor: default; }
.vd-page-nav .vd-icon { font-size: 20px; }
.vd-page-gap { display: inline-flex; align-items: flex-end; padding: 0 4px; color: var(--vd-muted); }

/* =========================================================================
   Mobile filter drawer — under 760px the inline pills collapse behind a
   "Filtres" trigger that opens a CSS-only bottom-sheet (checkbox+label, no JS).
   Desktop keeps the inline layout: trigger/overlay/sheet-head stay hidden and
   .vd-facets-panel is a plain wrapper.
   ========================================================================= */
.vd-filters-toggle,
.vd-filters-trigger,
.vd-filters-overlay,
.vd-facets-panel-head { display: none; }

@media (max-width: 759px) {
  .vd-filters-trigger {
    display: inline-flex; align-items: center; gap: 8px; width: 100%;
    padding: 11px 16px; border: 1px solid var(--vd-line); border-radius: 12px;
    background: #fff; color: var(--vd-ink); font-weight: 700; font-size: 14px;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .vd-filters-trigger-ico { flex: none; color: var(--vd-muted); }
  .vd-filters-trigger-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .vd-filters-overlay {
    position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .45);
    opacity: 0; visibility: hidden; transition: opacity .25s ease;
  }

  .vd-facets-panel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001;
    max-height: 85vh; overflow-y: auto; background: #fff;
    border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .2);
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    transform: translateY(100%); transition: transform .25s ease;
  }
  .vd-facets-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
  .vd-facets-panel-title { font-size: 17px; font-weight: 800; color: var(--vd-ink); }
  .vd-filters-close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 999px; cursor: pointer;
    color: var(--vd-body); background: #f4f4f4;
  }
  .vd-filters-close .vd-icon,
  .vd-filters-close svg { width: 18px; height: 18px; }

  /* Open state (label toggles the hidden checkbox) */
  .vd-filters-toggle:checked ~ .vd-filters-overlay { opacity: 1; visibility: visible; }
  .vd-filters-toggle:checked ~ .vd-facets-panel { transform: translateY(0); }

  /* Inside the sheet: each group is a full-width stacked row */
  .vd-facets-panel .vd-controls { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 16px; margin-top: 16px; }
  .vd-facets-panel .vd-control-group { align-items: flex-start; }
  .vd-facets-panel .vd-facets-label { display: block; width: 100%; margin: 0 0 8px; }
  .vd-facets-panel .vd-facets-type { justify-content: flex-start; }
}
