/* ============================================================
   MAQUETTE : la vue carte plein écran, sur le modèle d'Airbnb
   (maquette/_map.php, assets/js/carte.js).
   S'appuie sur assets/style/socle.css (variables --rf-*).
   Classes propres à ce fichier : bd-map-*, bd-pin, bd-amas, bd-moi.
   Formes : ce qui se clique en pilule, ce qui contient à 16 px.
   ============================================================ */

/* 1. Bouton flottant « Afficher la carte » : en bas au centre, comme Airbnb. Il remonte quand la barre Comparer occupe le bas. */

.bd-map-toggle {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--rf-encre);
  color: #fff;
  font-family: inherit;
  font-size: var(--rf-t-petit);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 12px 32px -12px rgba(11, 18, 32, 0.55);
  transform: translateX(-50%);
  transition: transform 0.2s var(--rf-sortie), bottom 0.2s var(--rf-sortie);
}

.bd-map-toggle:hover {
  transform: translateX(-50%) scale(1.04);
}

.bd-map-toggle:focus-visible {
  outline: 3px solid var(--rf-accent);
  outline-offset: 2px;
}

.bd-map-toggle svg {
  width: 18px;
  height: 18px;
}

.bd-map-toggle[hidden] {
  display: none;
}

body:has(.bd-comparer:not([hidden])) .bd-map-toggle {
  bottom: 88px;
}

/* 2. La vue : en-tête (recherche, filtres) puis corps (liste, carte) */

body.bd-map-ouverte {
  overflow: hidden;
}

.bd-map-vue {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  /* Colonne bornée à l'écran : sans elle, la bande de filtres qui défile
     sur téléphone impose sa largeur à toute la vue. */
  grid-template-columns: minmax(0, 1fr);
  background: var(--rf-blanc);
  color: var(--rf-encre);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--rf-t-petit);
  line-height: 1.5;
}

/* Beaucoup d'éléments de la vue sont en flex ou en grille : l'attribut
   hidden doit gagner partout. */
.bd-map-vue[hidden],
.bd-map-vue [hidden] {
  display: none !important;
}

.bd-map-cache {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Barre Comparer : au-dessus de la vue quand elle est ouverte. */
body.bd-map-ouverte .bd-comparer {
  z-index: 1300;
}

.bd-map-tete {
  padding: 12px 24px 0;
  border-bottom: 1px solid var(--rf-ligne);
  background: var(--rf-blanc);
}

.bd-map-tete__ligne {
  display: grid;
  grid-template-columns: 1fr minmax(0, 520px) 1fr;
  align-items: center;
  gap: 16px;
  padding-bottom: 12px;
}

.bd-map-retour {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--rf-ligne);
  border-radius: 999px;
  background: var(--rf-blanc);
  color: var(--rf-encre);
  font-family: inherit;
  font-size: var(--rf-t-petit);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.bd-map-retour:hover {
  border-color: var(--rf-encre);
}

.bd-map-retour svg {
  width: 18px;
  height: 18px;
}

/* 3. Le champ « Où ? », en pilule */

.bd-map-ou {
  position: relative;
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding: 0 8px 0 28px;
  border: 1px solid var(--rf-ligne);
  border-radius: 999px;
  background: var(--rf-blanc);
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.06), 0 8px 24px -12px rgba(11, 18, 32, 0.22);
  transition: box-shadow 0.2s ease;
}

.bd-map-ou:focus-within {
  box-shadow: 0 0 0 2px var(--rf-encre), 0 8px 24px -12px rgba(11, 18, 32, 0.22);
}

.bd-map-ou__champ {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  cursor: text;
}

.bd-map-ou__etiquette {
  font-weight: 600;
  line-height: 1.3;
}

.bd-map-ou__champ input {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--rf-encre);
  font-family: inherit;
  font-size: var(--rf-t-petit);
  line-height: 1.4;
}

.bd-map-ou__champ input::placeholder {
  color: var(--rf-gris-clair);
}

/* Le focus se voit sur toute la pilule (:focus-within) : ni cadre du site
   sur le champ lui-même, ni croix native de Chrome. */
.bd-map-vue .bd-map-ou__champ input:focus {
  border: 0;
  outline: none;
  box-shadow: none;
}

.bd-map-ou__champ input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.bd-map-ou__loupe {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--rf-encre);
  color: #fff;
  cursor: pointer;
}

.bd-map-ou__loupe svg {
  width: 18px;
  height: 18px;
}

.bd-map-ou__liste {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 360px;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--rf-ligne);
  border-radius: var(--rf-rayon);
  background: var(--rf-blanc);
  box-shadow: 0 24px 48px -20px rgba(11, 18, 32, 0.35);
}

.bd-map-ou__option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
}

.bd-map-ou__option:hover,
.bd-map-ou__option[aria-selected="true"] {
  background: #F1F5F9;
}

.bd-map-ou__option svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.bd-map-ou__nom {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bd-map-ou__nb {
  flex: 0 0 auto;
  color: var(--rf-gris-clair);
}

.bd-map-ou__rien {
  padding: 10px 14px;
  color: var(--rf-gris);
}

/* 4. Les filtres en pastilles */

.bd-map-filtres {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 2px 0 14px;
}

.bd-map-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--rf-ligne);
  border-radius: 999px;
  background: var(--rf-blanc);
  color: var(--rf-encre);
  font-family: inherit;
  font-size: var(--rf-t-petit);
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.bd-map-chip:hover {
  border-color: var(--rf-encre);
}

.bd-map-chip[aria-pressed="true"],
.bd-map-chip.is-actif {
  border-color: var(--rf-encre);
  background: var(--rf-encre);
  color: #fff;
}

.bd-map-chip:focus-visible,
.bd-map-effacer:focus-visible,
.bd-map-retour:focus-visible,
.bd-map-plus:focus-visible,
.bd-map-rond:focus-visible,
.bd-map-agrandir:focus-visible {
  outline: 3px solid var(--rf-accent);
  outline-offset: 2px;
}

.bd-map-chip svg {
  width: 16px;
  height: 16px;
}

.bd-map-filtres__sep {
  flex: 0 0 auto;
  width: 1px;
  height: 24px;
  background: var(--rf-ligne);
}

.bd-map-effacer {
  flex: 0 0 auto;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--rf-encre);
  font-family: inherit;
  font-size: var(--rf-t-petit);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  cursor: pointer;
}

/* Panneau du prix : histogramme des prix de la zone, curseur du maximum. */
.bd-map-prix {
  position: relative;
  flex: 0 0 auto;
}

.bd-map-prix__panneau {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  width: 360px;
  padding: 24px;
  border: 1px solid var(--rf-ligne);
  border-radius: var(--rf-rayon);
  background: var(--rf-blanc);
  box-shadow: 0 24px 48px -20px rgba(11, 18, 32, 0.35);
  text-align: left;
}

.bd-map-prix__titre {
  margin: 0;
  font-size: var(--rf-t-corps);
  font-weight: 600;
}

.bd-map-prix__aide,
.bd-map-prix__note {
  margin: 4px 0 0;
  color: var(--rf-gris);
}

.bd-map-prix__note {
  margin-top: 12px;
  color: var(--rf-gris-clair);
}

.bd-map-prix__histo {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 72px;
  margin: 20px 0 0;
  padding: 0 8px;
}

.bd-map-prix__histo span {
  flex: 1 1 0;
  border-radius: 2px 2px 0 0;
  background: var(--rf-encre);
  transition: background-color 0.15s ease;
}

.bd-map-prix__histo span.is-hors {
  background: var(--rf-ligne);
}

.bd-map-prix__curseur {
  display: block;
  width: 100%;
  margin: 0;
  accent-color: var(--rf-encre);
  cursor: pointer;
}

.bd-map-prix__bornes {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--rf-gris);
}

.bd-map-prix__bornes strong {
  color: var(--rf-encre);
  font-weight: 600;
}

.bd-map-prix__effacer {
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--rf-encre);
  font-family: inherit;
  font-size: var(--rf-t-petit);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* 5. Corps : la liste à gauche, la carte à droite */

.bd-map-corps {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
}

.bd-map-vue.is-large .bd-map-corps {
  grid-template-columns: minmax(0, 1fr);
}

.bd-map-vue.is-large .bd-map-liste {
  display: none;
}

.bd-map-liste {
  min-height: 0;
  overflow-y: auto;
  padding: 24px 24px 48px;
  overscroll-behavior: contain;
}

.bd-map-liste__tete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 24px;
}

.bd-map-liste__compte {
  margin: 0;
  font-size: var(--rf-t-inter);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.bd-map-tri {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--rf-gris);
}

.bd-map-tri select {
  appearance: none;
  height: 40px;
  padding: 0 36px 0 16px;
  border: 1px solid var(--rf-ligne);
  border-radius: 999px;
  background: var(--rf-blanc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B1220' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  color: var(--rf-encre);
  font-family: inherit;
  font-size: var(--rf-t-petit);
  font-weight: 600;
  cursor: pointer;
}

.bd-map-tri select:focus-visible {
  outline: 3px solid var(--rf-accent);
  outline-offset: 2px;
}

.bd-map-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 36px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Annonces de la liste (emplacements de _vue-carte.php, rangés par
   placerAnnonces() dans assets/js/carte.js) : une rangée entière, jamais une
   case parmi les fiches. Aucune annonce ne passe pour une école. Depuis le
   25/09/2026, la liste finit toujours par une annonce : le bandeau sous la
   liste (.bd-map-annonce-bas) est retiré, il se serait empilé sous elle. */
.bd-map-annonce {
  grid-column: 1 / -1;
}

.bd-map-plus {
  display: block;
  margin: 40px auto 0;
  padding: 12px 24px;
  border: 1px solid var(--rf-encre);
  border-radius: 999px;
  background: var(--rf-blanc);
  color: var(--rf-encre);
  font-family: inherit;
  font-size: var(--rf-t-petit);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.bd-map-plus:hover {
  background: #F1F5F9;
}

.bd-map-vide {
  padding: 48px 16px;
  text-align: center;
}

.bd-map-vide__titre {
  margin: 0;
  font-size: var(--rf-t-inter);
  font-weight: 600;
}

.bd-map-vide__texte {
  margin: 8px 0 0;
  color: var(--rf-gris);
}

.bd-map-vide__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

/* 6. La carte d'une école dans la liste : grande photo, texte dessous, sans cadre (comme Airbnb) */

.bd-map-carte {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bd-map-carte__photo,
.bd-map-mini__photo {
  position: relative;
  overflow: hidden;
  background: #EEF2F6;
  color: var(--rf-neutre);
}

.bd-map-carte__photo {
  aspect-ratio: 4 / 3;
  margin-bottom: 10px;
  border-radius: var(--rf-rayon);
}

.bd-map-carte__photo img,
.bd-map-mini__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bd-map-carte__photo img {
  transition: transform 0.6s var(--rf-sortie);
}

.bd-map-carte:hover .bd-map-carte__photo img {
  transform: scale(1.04);
}

.bd-map-carte__photo.is-vide,
.bd-map-mini__photo.is-vide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bd-map-carte__photo.is-vide svg,
.bd-map-mini__photo.is-vide svg {
  width: 56px;
  height: 56px;
}

/* Pastilles posées sur la photo : fond plein presque opaque, lisibles sur
   n'importe quelle image. */
.bd-map-carte__badge,
.bd-map-carte__comparer,
.bd-map-mini__badge,
.bd-map-mini__comparer {
  position: absolute;
  top: 12px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--rf-encre);
  font-family: inherit;
  font-size: var(--rf-t-petit);
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 0 2px 8px -2px rgba(11, 18, 32, 0.25);
}

.bd-map-carte__badge,
.bd-map-mini__badge {
  left: 12px;
}

.bd-map-carte__comparer,
.bd-map-mini__comparer {
  right: 12px;
  z-index: 2;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.bd-map-carte__comparer:hover,
.bd-map-mini__comparer:hover {
  background: #fff;
}

.bd-map-carte__comparer[aria-pressed="true"],
.bd-map-mini__comparer[aria-pressed="true"] {
  background: var(--rf-encre);
  color: #fff;
}

.bd-map-carte__comparer:focus-visible,
.bd-map-mini__comparer:focus-visible,
.bd-map-mini__fermer:focus-visible {
  outline: 3px solid var(--rf-accent);
  outline-offset: 2px;
}

.bd-map-carte__tete,
.bd-map-mini__tete {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.bd-map-carte__nom {
  min-width: 0;
  margin: 0;
  font-size: var(--rf-t-corps);
  font-weight: 600;
  line-height: 1.35;
}

.bd-map-carte__nom a {
  display: block;
  overflow: hidden;
  color: var(--rf-encre);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Le nom est le lien, étendu à toute la carte ; Comparer passe au-dessus. */
.bd-map-carte__nom a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--rf-rayon);
}

.bd-map-carte__nom a:focus-visible {
  outline: none;
}

.bd-map-carte__nom a:focus-visible::after {
  outline: 3px solid var(--rf-accent);
  outline-offset: 4px;
}

.bd-map-note {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.bd-map-note svg {
  width: 14px;
  height: 14px;
  transform: translateY(-1px);
}

.bd-map-note__avis {
  font-weight: 400;
  color: var(--rf-gris);
}

.bd-map-carte__lieu,
.bd-map-carte__tags,
.bd-map-mini__lieu {
  margin: 0;
  overflow: hidden;
  color: var(--rf-gris);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bd-map-carte__tags {
  color: var(--rf-gris-clair);
}

.bd-map-carte__prix,
.bd-map-mini__prix {
  overflow: hidden;
  color: var(--rf-gris);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bd-map-carte__prix {
  margin-top: 6px;
}

.bd-map-carte__prix strong,
.bd-map-mini__prix strong {
  color: var(--rf-encre);
  font-size: var(--rf-t-corps);
  font-weight: 700;
}

.bd-map-carte__prix s,
.bd-map-mini__prix s {
  color: var(--rf-gris-clair);
}

/* 7. Le panneau de la carte : coins arrondis, commandes en pilules */

.bd-map-panneau {
  position: relative;
  min-height: 0;
}

.bd-map-conteneur {
  position: absolute;
  inset: 16px 16px 16px 0;
  /* Pile propre : les volets Leaflet (z-index jusqu'à 1000) restent dans
     la carte, les boutons posés dessus passent devant. */
  z-index: 0;
  overflow: hidden;
  border-radius: var(--rf-rayon);
  background: #E8ECEF;
}

.bd-map-vue.is-large .bd-map-conteneur {
  left: 16px;
}

/* Fond de carte adouci : les tuiles OpenStreetMap de l'original, moins
   saturées, pour que les pastilles de prix ressortent. */
.bd-map-tuiles {
  filter: saturate(0.45) brightness(1.04) contrast(0.92);
}

.bd-map-vue .leaflet-container {
  font-family: inherit;
  font-size: var(--rf-t-petit);
  background: #E8ECEF;
}

/* leaflet.css est ajouté après cette feuille, à l'ouverture : les
   sélecteurs du zoom doivent peser plus que les siens
   (.leaflet-touch .leaflet-bar a). */
.bd-map-vue .leaflet-container .leaflet-control-zoom.leaflet-bar {
  margin: 12px 12px 0 0;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(11, 18, 32, 0.18);
}

.bd-map-vue .leaflet-container .leaflet-control-zoom.leaflet-bar a {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 0;
  color: var(--rf-encre);
  font: 400 22px/40px 'Inter', sans-serif;
}

.bd-map-vue .leaflet-container .leaflet-control-zoom.leaflet-bar a + a {
  border-top: 1px solid var(--rf-ligne);
}

.bd-map-vue .leaflet-control-attribution {
  border-top-left-radius: 8px;
}

.bd-map-rond,
.bd-map-agrandir {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--rf-blanc);
  color: var(--rf-encre);
  font-family: inherit;
  font-size: var(--rf-t-petit);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(11, 18, 32, 0.18);
  cursor: pointer;
}

.bd-map-rond svg,
.bd-map-agrandir svg {
  width: 18px;
  height: 18px;
}

/* Sous les boutons de zoom : bord de la carte (16) + marge (12) + zoom (80) + 10. */
.bd-map-localiser {
  top: 118px;
  right: 28px;
  width: 40px;
}

.bd-map-localiser.is-attente svg {
  animation: bd-map-pulse 1s ease-in-out infinite;
}

@keyframes bd-map-pulse {
  50% { opacity: 0.3; }
}

/* Agrandir : un rond (icône) ; carte agrandie : une pilule « Afficher la liste ». */
.bd-map-agrandir {
  top: 28px;
  left: 12px;
  width: 40px;
}

.bd-map-vue.is-large .bd-map-agrandir {
  left: 28px;
  width: auto;
  padding: 0 18px 0 12px;
}

.bd-map-agrandir__ico {
  display: inline-flex;
}

.bd-map-agrandir__ico--fermer,
.bd-map-vue.is-large .bd-map-agrandir__ico--ouvrir {
  display: none;
}

.bd-map-vue.is-large .bd-map-agrandir__ico--fermer {
  display: inline-flex;
}

.bd-map-agrandir__texte {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.bd-map-vue.is-large .bd-map-agrandir__texte {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
}

.bd-map-toast {
  position: absolute;
  top: 28px;
  left: 50%;
  z-index: 3;
  max-width: min(420px, 80%);
  margin: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--rf-encre);
  color: #fff;
  text-align: center;
  transform: translateX(-50%);
}

/* 8. Pastilles de prix, points sans prix, amas */

/* Ancre de taille nulle posée sur la coordonnée : la pastille se centre
   dessus, quelle que soit sa largeur (« 990 € » ou « 1 790 € »). */
.bd-pin-ancre {
  background: none;
  border: 0;
}

.bd-pin-ancre:focus {
  outline: none;
}

.bd-pin,
.bd-amas {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font: 700 14px/1 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'tnum';
  white-space: nowrap;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.15s var(--rf-sortie), background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.bd-pin {
  height: 28px;
  padding: 0 10px;
  background: var(--rf-blanc);
  color: var(--rf-encre);
  box-shadow: 0 0 0 1px rgba(11, 18, 32, 0.08), 0 2px 6px rgba(11, 18, 32, 0.2);
}

/* Les écoles de la zone qui ne sont pas dans la page de liste : un simple
   point, plus discret. */
.bd-pin--point {
  width: 12px;
  height: 12px;
  padding: 0;
  box-shadow: 0 0 0 1.5px rgba(11, 18, 32, 0.4), 0 1px 3px rgba(11, 18, 32, 0.25);
}

.bd-pin--point.is-vu {
  background: var(--rf-neutre);
}

/* Pastille couverte par une mieux classée : petit ovale, dépliée au
   survol de sa carte dans la liste ou à l'ouverture. */
.bd-pin.is-reduite {
  width: 22px;
  height: 14px;
  padding: 0;
  overflow: hidden;
  color: transparent;
}

.bd-pin-ancre:hover .bd-pin.is-reduite,
.is-survol .bd-pin.is-reduite,
.bd-pin.is-reduite.is-actif {
  width: auto;
  height: 28px;
  padding: 0 10px;
  overflow: visible;
  color: var(--rf-encre);
}

.is-survol .bd-pin.is-reduite,
.bd-pin.is-reduite.is-actif {
  color: #fff;
}

/* Déjà ouverte : grisée, comme les annonces vues sur Airbnb. */
.bd-pin.is-vu {
  background: var(--rf-ligne);
}

.bd-pin-ancre:hover .bd-pin,
.bd-pin-ancre:focus-visible .bd-pin {
  transform: translate(-50%, -50%) scale(1.08);
}

.bd-pin-ancre:focus-visible .bd-pin,
.bd-pin-ancre:focus-visible .bd-amas {
  outline: 3px solid var(--rf-accent);
  outline-offset: 2px;
}

/* Survolée depuis la liste, ou ouverte : à l'encre. */
.is-survol .bd-pin,
.bd-pin.is-actif {
  background: var(--rf-encre);
  color: #fff;
  transform: translate(-50%, -50%) scale(1.1);
}

.is-survol .bd-pin--point,
.bd-pin--point.is-actif {
  transform: translate(-50%, -50%) scale(1.4);
}

/* Pastille sans prix : la note (étoile) ou une petite voiture. */
.bd-pin__etoile,
.bd-pin__voiture {
  display: inline-flex;
  margin-right: 3px;
}

.bd-pin__voiture {
  margin-right: 0;
}

.bd-pin__etoile svg {
  width: 12px;
  height: 12px;
}

.bd-pin__voiture svg {
  width: 18px;
  height: 18px;
}

/* Amas : blancs, comme les pastilles, pour que la carte reste claire ;
   la taille dit le nombre. */
.bd-amas {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  background: var(--rf-blanc);
  color: var(--rf-encre);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.55), 0 0 0 5px rgba(11, 18, 32, 0.1), 0 3px 10px rgba(11, 18, 32, 0.22);
}

.bd-amas--m {
  min-width: 36px;
  height: 36px;
}

.bd-amas--l {
  min-width: 44px;
  height: 44px;
  padding: 0 11px;
}

.bd-pin-ancre:hover .bd-amas {
  background: var(--rf-encre);
  color: #fff;
  transform: translate(-50%, -50%) scale(1.06);
}

/* Un amas qui contient l'école survolée dans la liste. */
.is-survol .bd-amas {
  background: var(--rf-encre);
  color: #fff;
  transform: translate(-50%, -50%) scale(1.1);
}

/* Position de l'élève (bouton « Me localiser »). */
.bd-moi {
  position: absolute;
  left: 0;
  top: 0;
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--rf-lien);
  box-shadow: 0 0 0 8px rgba(3, 105, 161, 0.18), 0 2px 6px rgba(11, 18, 32, 0.3);
  transform: translate(-50%, -50%);
}

/* 9. La petite carte d'un point : bulle (bureau), bas d'écran (téléphone) */

.bd-map-vue .bd-map-bulle .leaflet-popup-content-wrapper {
  padding: 0;
  overflow: hidden;
  border-radius: var(--rf-rayon);
  box-shadow: 0 20px 48px -16px rgba(11, 18, 32, 0.45);
}

.bd-map-vue .bd-map-bulle .leaflet-popup-content {
  margin: 0;
  line-height: 1.5;
}

.bd-map-vue .bd-map-bulle .leaflet-popup-tip-container {
  display: none;
}

.bd-map-mini {
  position: relative;
  font-size: var(--rf-t-petit);
}

.bd-map-vue .bd-map-mini__lien {
  display: block;
  color: var(--rf-encre);
  text-decoration: none;
}

.bd-map-mini__photo {
  aspect-ratio: 16 / 10;
}

.bd-map-mini__corps {
  display: grid;
  gap: 2px;
  padding: 12px 16px 14px;
}

.bd-map-mini__nom {
  min-width: 0;
  overflow: hidden;
  font-size: var(--rf-t-corps);
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bd-map-mini__fermer {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--rf-encre);
  box-shadow: 0 2px 8px -2px rgba(11, 18, 32, 0.25);
  cursor: pointer;
}

.bd-map-mini__fermer svg {
  width: 14px;
  height: 14px;
}

/* Dans la petite carte, Comparer va à gauche (la croix est à droite). */
.bd-map-mini__comparer {
  right: auto;
  left: 12px;
}

/* Comparer et la croix occupent le haut de la photo : le badge descend. */
.bd-map-mini__badge {
  top: auto;
  bottom: 12px;
}

.bd-map-fiche {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 84px;
  z-index: 5;
  overflow: hidden;
  border-radius: var(--rf-rayon);
  background: var(--rf-blanc);
  box-shadow: 0 24px 48px -16px rgba(11, 18, 32, 0.45);
  /* Couche de composition propre : les volets Leaflet ne repeignent pas
     par-dessus (repéré au clic sur un point en vue téléphone). */
  transform: translateZ(0);
}

.bd-map-fiche .bd-map-mini__photo {
  aspect-ratio: 2 / 1;
}

/* 10. Téléphone : le panneau de liste, la poignée, le bouton « Carte » */

.bd-map-poignee,
.bd-map-voir-carte {
  display: none;
}

@media (max-width: 1100px) {
  .bd-map-corps {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .bd-map-toggle {
    bottom: 76px;
  }

  body:has(.bd-comparer:not([hidden])) .bd-map-toggle {
    bottom: 136px;
  }

  body.bd-map-ouverte .bd-comparer {
    bottom: 80px;
  }

  .bd-map-tete {
    padding: 10px 12px 0;
  }

  .bd-map-tete__ligne {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    padding-bottom: 10px;
  }

  .bd-map-retour {
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
  }

  .bd-map-retour span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .bd-map-ou {
    grid-column: 2;
    height: 48px;
    padding-left: 18px;
    gap: 8px;
  }

  .bd-map-ou__etiquette {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .bd-map-ou__loupe {
    width: 36px;
    height: 36px;
  }

  .bd-map-ou__liste {
    left: -56px;
  }

  .bd-map-filtres {
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin: 0 -12px;
    padding: 2px 12px 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .bd-map-filtres::-webkit-scrollbar {
    display: none;
  }

  .bd-map-chip {
    height: 36px;
    padding: 0 14px;
  }

  /* Hors de la bande qui défile, sinon il serait rogné : un panneau en bas
     de l'écran, comme les réglages d'une appli. */
  .bd-map-prix__panneau {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1400;
    width: auto;
    padding: 24px 20px 32px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -24px 48px -16px rgba(11, 18, 32, 0.35);
  }

  .bd-map-corps {
    grid-template-columns: minmax(0, 1fr);
  }

  .bd-map-panneau {
    grid-column: 1;
    grid-row: 1;
  }

  .bd-map-conteneur {
    inset: 0;
    border-radius: 0;
  }

  .bd-map-vue .leaflet-control-zoom,
  .bd-map-agrandir {
    display: none;
  }

  .bd-map-localiser {
    top: 12px;
    right: 12px;
  }

  .bd-map-toast {
    top: 12px;
  }

  /* La liste monte depuis le bas et couvre la carte. */
  .bd-map-liste {
    grid-column: 1;
    grid-row: 1;
    z-index: 7;
    padding: 20px 16px 104px;
    background: var(--rf-blanc);
    visibility: hidden;
    transform: translateY(100%);
    transition: transform 0.35s var(--rf-sortie), visibility 0s linear 0.35s;
  }

  .bd-map-vue.is-liste .bd-map-liste {
    visibility: visible;
    transform: none;
    transition: transform 0.35s var(--rf-sortie), visibility 0s linear 0s;
  }

  .bd-map-liste__compte {
    font-size: var(--rf-t-corps);
  }

  .bd-map-grille {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .bd-map-carte__photo {
    aspect-ratio: 16 / 10;
  }

  .bd-map-poignee {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 72px;
    padding: 10px 16px 0;
    border: 0;
    border-radius: 20px 20px 0 0;
    background: var(--rf-blanc);
    color: var(--rf-encre);
    font-family: inherit;
    font-size: var(--rf-t-petit);
    font-weight: 600;
    box-shadow: 0 -8px 24px -12px rgba(11, 18, 32, 0.35);
    cursor: pointer;
  }

  .bd-map-poignee__barre {
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: var(--rf-neutre);
  }

  .bd-map-vue.is-liste .bd-map-poignee {
    display: none;
  }

  .bd-map-vue.is-liste .bd-map-voir-carte {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 8;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--rf-encre);
    color: #fff;
    font-family: inherit;
    font-size: var(--rf-t-petit);
    font-weight: 600;
    box-shadow: 0 12px 32px -12px rgba(11, 18, 32, 0.55);
    transform: translateX(-50%);
    cursor: pointer;
  }

  .bd-map-voir-carte svg {
    width: 18px;
    height: 18px;
  }
}

/* En dessous de 480 px, la barre Comparer passe sur deux lignes (socle.css,
   même correction) : plus haute, elle recouvrait le bouton flottant malgré
   le remontée déjà prévue (136 px, encore 8 px de recouvrement mesurés avant
   correction). Remonté à 216 px : dégagement vérifié à 360/390/430 px avec
   deux écoles sélectionnées (correction du 25/09/2026, vérificateur
   adversarial de l'étape 21, point 1). */
@media (max-width: 480px) {
  body:has(.bd-comparer:not([hidden])) .bd-map-toggle {
    bottom: 216px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bd-map-toggle,
  .bd-map-liste,
  .bd-map-carte__photo img,
  .bd-pin,
  .bd-amas {
    transition: none;
  }

  .bd-map-localiser.is-attente svg {
    animation: none;
  }
}
