/* ================================================================
   Autocomplete dropdown — Loisirs.fr
   À intégrer dans ton fichier CSS principal ou en <style> dédié.
   ================================================================ */

/* Conteneur positionné (appliqué via JS sur .search-field) */
.search-field {
  position: relative;
}

/* Liste de suggestions */
.ac-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1000;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  max-height: 440px;  /* ~15 items × ~29px — scroll au-delà */
  overflow-y: auto;
}

/* Item */
.ac-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background .12s ease;
  font-size: .9rem;
  line-height: 1.3;
}

.ac-item:hover,
.ac-item.ac-active {
  background: #f5f5f5;
}

/* Icône à gauche */
.ac-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f0f0f0;
  color: #555;
  font-size: 1rem;
}

/* Corps texte */
.ac-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ac-label {
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Gras sur la portion correspondante */
.ac-label strong {
  font-weight: 700;
  color: #111;
}

/* Sous-titre (code postal, catégorie…) */
.ac-sub {
  font-size: .78rem;
  color: #888;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badge type à droite */
.ac-badge {
  flex-shrink: 0;
  font-size: .7rem;
  font-weight: 600;
  color: #fff;
  background: #ff6b35;       /* couleur primaire Loisirs.fr — adapter */
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* Séparateur visuel entre géo et entité si besoin (optionnel) */
.ac-dropdown hr.ac-sep {
  margin: 4px 0;
  border: none;
  border-top: 1px solid #eee;
}

/* Scrollbar discrète */
.ac-dropdown::-webkit-scrollbar        { width: 4px; }
.ac-dropdown::-webkit-scrollbar-track  { background: transparent; }
.ac-dropdown::-webkit-scrollbar-thumb  { background: #ccc; border-radius: 4px; }