:root {
  --bleu: #2c5f8a;
  --bleu-fonce: #1e4460;
  --gris-bg: #f4f6f8;
  --texte: #24313d;
  --ombre: 0 2px 10px rgba(0, 0, 0, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texte);
  background: var(--gris-bg);
}

header {
  background: #fff;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .06);
}

.logo-admr {
  height: 180px;
  width: auto;
  max-width: 90%;
}

/* ===== RECHERCHE ===== */
#recherche-container {
  position: relative;
  max-width: 520px;
  margin: -1.1rem auto 0;
  padding: 0 1rem;
  z-index: 1100;
}

#barre-recherche {
  width: 100%;
  padding: .8rem 1rem;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  box-shadow: var(--ombre);
  outline: none;
}

#barre-recherche:focus {
  box-shadow: 0 0 0 3px rgba(44, 95, 138, .35), var(--ombre);
}

#resultats-recherche {
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: calc(100% + 6px);
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--ombre);
  overflow: hidden;
  display: none;
  max-height: 340px;
  overflow-y: auto;
}

#resultats-recherche.actif { display: block; }

.resultat {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .8rem;
  cursor: pointer;
  border-bottom: 1px solid #eef1f4;
}

.resultat:last-child { border-bottom: none; }
.resultat:hover,
.resultat.actif { background: #eef4fa; }

.pastille {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, .15);
}

.resultat .txt {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
}

.resultat .txt small {
  color: #6b7885;
  font-size: .8rem;
}

.badge {
  font-size: .7rem;
  padding: .12rem .45rem;
  border-radius: 20px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.badge-asso { background: #e4f0e6; color: #2e7d43; }
.badge-commune { background: #e9edf2; color: #4a5b6b; }

/* ===== CARTE ===== */
main { padding: 1rem; }

#map {
  height: 75vh;
  min-height: 420px;
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--ombre);
}

@media (max-width: 600px) {
  .logo-admr { height: 110px; }
  #map { height: 68vh; }
}

/* ===== MODE EMBED (iframe) : masque l'en-tête/logo ===== */
body.mode-embed #entete { display: none; }
body.mode-embed #recherche-container { margin-top: 1rem; }
body.mode-embed #map { height: 92vh; }
