/**
 * Page /recherche — style aligné maquette ADERIM slide 11.
 * Header bleu sombre + 2 colonnes (filtres / résultats) + cards minimalistes.
 */

.aderim-search {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2937;
}

/* ───────────────── Hero — style maquette home (fond photo + overlay) ───────────────── */
.aderim-search__hero {
  background:
    linear-gradient(rgba(3, 32, 64, 0.85), rgba(3, 32, 64, 0.85)),
    url('https://images.unsplash.com/photo-1559757175-0eb30cd8c063?q=80&w=1600&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 2.5em 2em 2em;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2em;
}
.aderim-search__hero h1 {
  margin: 0;
  font-size: 1.5em;
  font-weight: 700;
  color: #fff;
  font-family: 'Lato', sans-serif;
}
.aderim-search__sub {
  margin: -1.2em 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95em;
  font-family: 'Lato', sans-serif;
}
.aderim-search__form {
  display: flex;
  align-items: center;
  gap: 1em;
  flex-wrap: wrap;
  width: 100%;
  max-width: 720px;
  justify-content: center;
}
.aderim-search__bar {
  flex: 1;
  min-width: 300px;
  background: #fff;
  border-radius: 30px;
  padding: 0 1em;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 0.6em;
  border: 1px solid #dfdfdf;
}
.aderim-search__icon {
  flex-shrink: 0;
  color: #646464;
  pointer-events: none;
  font-size: 1em;
  display: flex;
  align-items: center;
}
.aderim-search__bar input[type="text"] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 0;
  font-size: 0.95em;
  background: transparent;
  color: #414141;
  cursor: text;
  font-family: 'Lato', sans-serif;
}
.aderim-search__bar input[type="text"]::placeholder { color: #646464; }

/* Sélecteur Adulte/Enfant */
.aderim-search__age {
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 22px;
  padding: 0.5em 1.1em;
  font-size: 0.92em;
  color: #fff;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
  font-family: 'Lato', sans-serif;
}
.aderim-search__age option { color: #1f2937; }
.aderim-search__age:focus {
  outline: none;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}
.aderim-search__age--flash {
  animation: aderim-flash 0.8s ease;
}
@keyframes aderim-flash {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.6); }
  50%      { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(211, 47, 47, 0.6); border-color: #d32f2f; }
}

/* État global "âge non choisi" : applique sur le body par le JS. */
.aderim-no-age .aderim-search__card {
  opacity: 0.55;
  filter: grayscale(0.2);
}
.aderim-no-age .aderim-search__card-link {
  cursor: not-allowed;
}
.aderim-no-age .aderim-search__card:hover {
  border-color: #e5e7eb;
  box-shadow: none;
}

/* Bandeau d'avertissement */
.aderim-search__age-required {
  background: #fff3c4;
  border: 1px solid #f4d35e;
  color: #6a4d00;
  padding: 0.6em 1em;
  border-radius: 5px;
  font-size: 0.9em;
  font-weight: 500;
  margin-bottom: 1em;
}

/* ───────────────── Corps 2 colonnes ───────────────── */
.aderim-search__body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  background: #f5f7fa;
  min-height: 60vh;
}
@media (max-width: 768px) {
  .aderim-search__body {
    grid-template-columns: 1fr;
  }
}

/* ───────────────── Panneau filtres gauche ───────────────── */
.aderim-search__filters {
  background: #fff;
  border-right: 1px solid #e5e7eb;
  padding: 1.2em 1em;
}
.aderim-search__filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85em;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.04em;
  margin-bottom: 1em;
  padding-bottom: 0.6em;
  border-bottom: 1px solid #e5e7eb;
}
.aderim-search__reset {
  font-weight: normal;
  color: #1976d2;
  text-decoration: none;
  font-size: 0.85em;
}
.aderim-search__reset:hover { text-decoration: underline; }

.aderim-search__filter-group {
  margin-bottom: 1.4em;
}
.aderim-search__filter-group h3 {
  font-size: 0.9em;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.5em;
  display: flex;
  align-items: center;
  gap: 0.4em;
}
.aderim-search__filter-badge {
  background: #1976d2;
  color: #fff;
  font-size: 0.7em;
  padding: 0.1em 0.5em;
  border-radius: 10px;
  font-weight: 600;
}
.aderim-search__filter-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.aderim-search__filter-list li {
  margin: 0;
}
.aderim-search__filter-list label {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.35em 0.4em;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.88em;
  transition: background 0.15s;
}
.aderim-search__filter-list label:hover {
  background: #f3f4f6;
}
.aderim-search__filter-list input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}
.aderim-search__filter-item--checked {
  background: #e3f2fd !important;
  font-weight: 600;
  color: #0d47a1;
}
.aderim-search__filter-name { flex: 1; }
.aderim-search__filter-count { color: #9ca3af; font-size: 0.85em; }
.aderim-search__filter-empty {
  font-size: 0.85em;
  color: #9ca3af;
  font-style: italic;
  margin: 0;
}

/* ───────────────── Colonne droite : résultats ───────────────── */
.aderim-search__results-pane {
  padding: 1.2em 1.5em;
}

/* Chips actifs */
.aderim-search__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-bottom: 1em;
}
.aderim-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: #fff;
  border: 1px solid #c5cdd6;
  border-radius: 16px;
  padding: 0.25em 0.7em 0.25em 0.9em;
  font-size: 0.85em;
  color: #1f2937;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.aderim-chip:hover {
  border-color: #d32f2f;
  background: #fff5f5;
}
.aderim-chip__x {
  color: #6b7280;
  font-weight: bold;
  margin-left: 0.2em;
}
.aderim-chip:hover .aderim-chip__x { color: #d32f2f; }

/* Chip Adulte/Enfant — visuellement distinct (couleur âge dédiée) */
.aderim-chip--age {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #075985;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85em;
}
.aderim-chip--age:hover {
  background: #f0f9ff;
  border-color: #0284c7;
}
.aderim-chip--age:hover .aderim-chip__x { color: #0284c7; }

/* Onglets */
.aderim-search__tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 1em;
}
.aderim-search__tab {
  padding: 0.6em 1.2em;
  text-decoration: none;
  color: #6b7280;
  font-size: 0.9em;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.aderim-search__tab:hover {
  color: #1976d2;
}
.aderim-search__tab--active {
  color: #0d47a1;
  border-bottom-color: #1976d2;
  font-weight: 600;
}

/* Empty state */
.aderim-search__empty {
  text-align: center;
  padding: 3em 1em;
  color: #6b7280;
}
.aderim-search__empty p:first-child {
  font-size: 1.1em;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.4em;
}
.aderim-search__empty-hint {
  font-size: 0.9em;
  margin: 0;
}

/* Liste de cards résultats */
.aderim-search__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.aderim-search__card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 0.5em;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.aderim-search__card:hover {
  border-color: #1976d2;
  box-shadow: 0 1px 4px rgba(25, 118, 210, 0.1);
}
.aderim-search__card--urgence {
  border-left: 4px solid #d32f2f;
}
.aderim-search__card-link {
  display: flex;
  align-items: center;
  gap: 0.8em;
  padding: 0.85em 1em;
  text-decoration: none;
  color: #1f2937;
}
.aderim-search__card-axe {
  font-size: 0.7em;
  padding: 0.18em 0.55em;
  border-radius: 3px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.aderim-search__card-axe--pathologie { background: #e3f2fd; color: #0d47a1; }
.aderim-search__card-axe--symptome   { background: #fff3e0; color: #6a4500; }

.aderim-search__card-title {
  flex: 1;
  font-size: 0.95em;
  font-weight: 500;
}
.aderim-search__card-count {
  color: #6b7280;
  font-size: 0.82em;
}
.aderim-search__card-chevron {
  color: #1976d2;
  font-size: 1.4em;
  line-height: 1;
}
.aderim-search__card-tag {
  font-size: 0.72em;
  padding: 0.18em 0.55em;
  border-radius: 3px;
  font-weight: 600;
}
.aderim-search__card-tag--urg { background: #ffcdd2; color: #b71c1c; }

/* ───────────────── Autocomplete dropdown ───────────────── */
.aderim-suggest-box {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.13);
  z-index: 999;
  overflow: hidden;
}
.aderim-suggest-row {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.6em 1em;
  text-decoration: none;
  color: #1f2937;
  font-size: 0.92em;
  transition: background 0.12s;
  cursor: pointer;
}
.aderim-suggest-row:hover { background: #f0f7ff; }
.aderim-suggest-label { flex: 1; font-family: 'Lato', sans-serif; }
.aderim-suggest-urgence { font-size: 0.9em; }
.aderim-suggest-badge {
  font-size: 0.68em;
  padding: 0.15em 0.5em;
  border-radius: 3px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.aderim-suggest-badge--pathologie { background: #e3f2fd; color: #0d47a1; }
.aderim-suggest-badge--symptome   { background: #fff3e0; color: #6a4500; }
.aderim-suggest-all {
  display: block;
  padding: 0.55em 1em;
  font-size: 0.85em;
  color: #1976d2;
  text-decoration: none;
  border-top: 1px solid #f3f4f6;
  font-family: 'Lato', sans-serif;
  text-align: right;
  font-weight: 600;
}
.aderim-suggest-all:hover { background: #f3f4f6; }
