/*
 * Recherche ESC — CSS strictement fonctionnel (§7.8).
 * Positionnement, état actif, masquage. Aucune décoration : l'habillage
 * appartient au thème.
 */
.esc-search-form {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.25rem;
}

.esc-search-form__field {
  flex: 1 1 auto;
  min-width: 0;
}

.esc-search-panel {
  position: absolute;
  z-index: 9999;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 70vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid currentColor;
}

.esc-search-panel[hidden] {
  display: none;
}

.esc-search-panel__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.esc-search-panel__group {
  font-weight: 700;
  padding: 0.35rem 0.6rem;
}

.esc-search-panel__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}

.esc-search-panel__option.is-active,
.esc-search-panel__option:hover {
  background: rgba(0, 0, 0, 0.06);
}

.esc-search-panel__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.esc-search-panel__option img {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.esc-search-panel__empty,
.esc-search-panel__option--all {
  padding: 0.5rem 0.6rem;
}

.esc-search-popular {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.esc-search-results-header__categories ul,
.esc-search-articles__list,
.esc-search-empty__families ul,
.esc-search-posts__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.esc-search-results-header__categories ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.esc-search-articles__list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 782px) {
  .esc-search-panel {
    max-height: 60vh;
  }
}
