/* ExoMatch — Exploreur / filtres. V3 (2026-11-16)
   Reprend la grille directement au niveau de son conteneur.
   N'utilise pas les marges négatives/positionnements absolus historiques. */

/* === Cadre de page : rien ne doit pousser ni superposer les filtres === */
body .page-hero--compact { margin-bottom: 0 !important; }
body section.shell.explorer-layout {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr) !important;
  align-items: start !important;
  align-content: start !important;
  gap: 22px !important;
  position: static !important;
  float: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 24px 0 44px !important;
}
body section.shell.explorer-layout > aside.filter-panel.exo-filter-card {
  grid-column: 1 !important;
  grid-row: 1 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  position: static !important;
  float: none !important;
  clear: none !important;
  inset: auto !important;
  top: auto !important;
  transform: none !important;
  order: 0 !important;
  align-self: start !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #dce7f4 !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 8px 28px rgba(10,35,70,.065) !important;
  overflow: visible !important;
}
body section.shell.explorer-layout > .results-panel {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  box-sizing: border-box !important;
  display: block !important;
  position: static !important;
  float: none !important;
  clear: none !important;
  inset: auto !important;
  top: auto !important;
  transform: none !important;
  align-self: start !important;
  order: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body section.shell.explorer-layout > .results-panel .results-head {
  position: static !important;
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 10px !important;
  min-height: 0 !important;
  margin: 0 0 12px !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid #dce7f4;
}
body section.shell.explorer-layout > .results-panel .exercise-grid { min-width: 0; margin-top: 0 !important; }

/* === Carte de filtres === */
.explorer-layout .exo-filter-card, .explorer-layout .exo-filter-card * { box-sizing: border-box; }
.exo-filter-card__top { width: 100%; border-radius: 17px 17px 0 0; overflow: hidden; }
.explorer-layout .exo-filter-card__toggle {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 74px !important;
  gap: 11px !important;
  padding: 14px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 17px 17px 0 0 !important;
  background: #fff !important;
  color: #091e35 !important;
  text-align: left !important;
  font: inherit !important;
  line-height: 1.3 !important;
  box-shadow: none !important;
  cursor: default;
}
.explorer-layout .exo-filter-card__toggle:focus-visible { outline: 3px solid #1687fa; outline-offset: -4px; }
.exo-filter-card__symbol {
  flex: 0 0 39px !important;
  display: grid !important;
  place-items: center !important;
  width: 39px !important;
  height: 39px !important;
  border-radius: 12px;
  color: #087bf4;
  background: #eaf4ff;
}
.exo-filter-card__symbol svg { width: 21px; height: 21px; }
.exo-filter-card__headings { min-width: 0 !important; flex: 1 1 auto !important; display: flex !important; flex-direction: column !important; gap: 3px !important; }
.exo-filter-card__headings strong { display: block; font-size: 17px !important; font-weight: 800; line-height: 1.2; color: #081b30; letter-spacing: -.018em; }
.exo-filter-card__headings small { display: block; font-size: 11px !important; line-height: 1.3 !important; font-weight: 500; color: #647991; overflow-wrap: anywhere; }
.exo-filter-card__results-count {
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  border-radius: 99px;
  background: #eaf3ff;
  color: #116bd0;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}
.exo-filter-card__chevron {
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid #dce7f4;
  background: #f6f9fd;
  color: #19374f;
}
.exo-filter-card__chevron::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px,-2px);
  transition: transform .18s ease;
}
.exo-filter-card.is-open .exo-filter-card__chevron::before { transform: rotate(225deg) translate(-1px,-1px); }
.explorer-layout .exo-filter-card__body { position: static !important; min-width: 0 !important; border-top: 1px solid #e5edf6; overflow: visible !important; }
.explorer-layout .exo-filter-card .exo-filter-form {
  display: block !important;
  margin: 0 !important;
  padding: 16px !important;
  background: transparent !important;
  box-shadow: none !important;
}
.exo-filter-form__intro { display: flex; gap: 8px; justify-content: space-between; align-items: start; margin-bottom: 15px; font-size: 12px; color: #61758b; line-height: 1.45; }
.exo-filter-form__clear { flex: 0 0 auto; color: #0676e9; text-decoration: none; font-weight: 800; }
.exo-filter-form__clear:hover { text-decoration: underline; }
.exo-filter-fields { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 14px !important; }
.explorer-layout .exo-filter-card label.exo-filter-field {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  color: #344a61 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
}
.explorer-layout .exo-filter-card label.exo-filter-field select {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 44px !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
  padding: 0 11px !important;
  margin: 0 !important;
  border: 1px solid #d7e3f1 !important;
  border-radius: 10px !important;
  outline: 0 !important;
  background-color: #f8fafd !important;
  box-shadow: none !important;
  color: #152c43 !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer;
}
.explorer-layout .exo-filter-card label.exo-filter-field select:focus-visible { outline: 3px solid #a0d1ff !important; border-color: #087dfe !important; }
.exo-filter-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }
.explorer-layout .exo-filter-card .exo-filter-actions__submit,
.explorer-layout .exo-filter-card .exo-filter-actions__reset {
  flex: 0 0 auto !important;
  width: 100% !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border-radius: 10px !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
}
.explorer-layout .exo-filter-card .exo-filter-actions__submit { border: 1px solid #087dfe !important; background: #087dfe !important; color: #fff !important; cursor: pointer; }
.explorer-layout .exo-filter-card .exo-filter-actions__submit:hover { background: #006bd7 !important; }
.explorer-layout .exo-filter-card .exo-filter-actions__reset { border: 1px solid #d7e3f1 !important; background: #f6f9fc !important; color: #344f6b !important; }
.explorer-layout .exo-filter-card .exo-filter-actions__reset:hover { background: #eaf1f9 !important; }
.exo-filter-actions__submit svg { width: 17px; height: 17px; }

/* Sur PC la colonne de résultats indique déjà le total : on ne surcharge pas le titre du filtre. */
@media (min-width: 901px) {
  .exo-filter-card__results-count, .exo-filter-card__chevron { display: none !important; }
  .explorer-layout .exo-filter-card__body { display: block !important; }
  .explorer-layout .exo-filter-card__toggle { cursor: default; }
}

/* Mobile : disposition linéaire stricte, sans calculs de marge négative. */
@media (max-width: 900px) {
  body section.shell.explorer-layout {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 14px !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    margin: 0 auto !important;
    padding: 16px 0 36px !important;
  }
  body section.shell.explorer-layout > aside.filter-panel.exo-filter-card,
  body section.shell.explorer-layout > .results-panel {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    align-self: stretch !important;
    position: static !important;
    transform: none !important;
    float: none !important;
    clear: both !important;
  }
  body section.shell.explorer-layout > aside.filter-panel.exo-filter-card { order: 0 !important; }
  body section.shell.explorer-layout > .results-panel { order: 1 !important; }
  .explorer-layout .exo-filter-card__toggle { cursor: pointer !important; min-height: 68px !important; padding: 11px 13px !important; }
  .exo-filter-card__symbol { width: 38px !important; height: 38px !important; flex-basis: 38px !important; }
  .exo-filter-card__headings strong { font-size: 15px !important; }
  .exo-filter-card__headings small { font-size: 11px !important; }
  .exo-filter-card.exo-filters-ready:not(.is-open) .exo-filter-card__body { display: none !important; }
  .explorer-layout .exo-filter-card .exo-filter-form { padding: 15px !important; }
  .exo-filter-fields { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 12px !important; }
  .explorer-layout .exo-filter-card label.exo-filter-field select { font-size: 16px !important; }
  .exo-filter-actions { flex-direction: row; }
  .explorer-layout .exo-filter-card .exo-filter-actions__submit { flex: 1 1 60% !important; width: auto !important; }
  .explorer-layout .exo-filter-card .exo-filter-actions__reset { flex: 1 1 30% !important; width: auto !important; }
  body section.shell.explorer-layout > .results-panel .results-head { display: flex !important; margin: 0 0 12px !important; padding: 0 0 10px !important; }
  body section.shell.explorer-layout > .results-panel .results-head .data-note { display: none !important; }
}
@media (max-width: 520px) {
  .exo-filter-card__results-count { padding: 6px 8px; font-size: 10px; }
  .exo-filter-card__headings small { font-size: 10px !important; }
  .exo-filter-fields { grid-template-columns: minmax(0,1fr) !important; }
}
@media (max-width: 355px) {
  .exo-filter-card__symbol { width: 35px !important; height: 35px !important; flex-basis: 35px !important; }
  .exo-filter-card__results-count { font-size: 9px; padding-inline: 6px; }
  .exo-filter-card__chevron { width: 26px; flex-basis: 26px; }
}
@media (prefers-reduced-motion: reduce) { .exo-filter-card__chevron::before { transition: none; } }
