/* =============================================================================
   CARTE ATE CÔTES — Feuille de style nettoyée
   ============================================================================= */

/* ─────────────────────────────────────────
   Reset de base
───────────────────────────────────────── */

/* Reset ciblé — sans toucher à Bootstrap */
.map, #map, .legend, #boutons-proche {
  box-sizing: border-box;
}

/* ─────────────────────────────────────────
   Carte Mapbox
───────────────────────────────────────── */

.map {
  height: 700px;
}

#map {
  min-height: 700px;
  height: 100%;
  width: 100%;
  position: relative;
}

.mapboxgl-map {
  position: relative;
  left: 0;
  top: 0;
  z-index: 3;
  display: block;
  width: 100%;
}

/* ─────────────────────────────────────────
   Légende
───────────────────────────────────────── */

.legend {
  background-color: transparent;
  width: 290px;
  border-radius: 3px;
  bottom: 30px;
  font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif;
  padding: 10px;
  margin: 20px;
  position: absolute;
  right: 10px;
  z-index: 10;
}

/* ─────────────────────────────────────────
   Accordéon
───────────────────────────────────────── */

.accordion-button {
  padding: 3px 10px !important;
}

.accordion-item {
  border: 0 !important;
  background: transparent !important;
}

.accordion-body {
  background-color: #ffffff;
  margin-bottom: 20px;
}

.accordion-item:nth-child(1) .accordion-button {
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  background-color: #3fcfd5;
  color: white;
}

.accordion-item:nth-child(2) .accordion-button {
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  background-color: #c9dd03;
  color: white;
}

#accordionFlushExample .accordion-button {
  font-size: 13px;
  padding: 8px 12px;
}

#accordionFlushExample .accordion-body {
  font-size: 13px;
  padding: 8px 12px;
}

#accordionFlushExample .accordion-body div {
  padding: 3px 0;
}

/* ─────────────────────────────────────────
   Catégories — Petite Enfance
───────────────────────────────────────── */

.petite_enfance {
  background-color: #3fcfd5 !important;
  border-radius: 5px !important;
  margin: 0 0 10px;
  color: #082e30 !important;
  font-weight: 500;
  font-family: "Dosis", Arial, Helvetica, sans-serif !important;
  font-size: 0.5em !important;
}

span.petite_enfance {
  border-radius: 50% !important;
  display: inline-block;
  height: 20px;
  margin-right: 10px;
  margin-bottom: 5px;
  width: 20px;
  color: #1e1e1e !important;
  text-align: center;
  background-color: #3fcfd5;
  font-size: 1em !important;
}

/* ─────────────────────────────────────────
   Catégories — Vie de quartier
───────────────────────────────────────── */

.vie_de_quartier {
  background-color: #c9dd03 !important;
  border-radius: 5px !important;
  margin: 0 0 10px;
  color: #292d06 !important;
  font-weight: 500;
  font-family: "Dosis", Arial, Helvetica, sans-serif !important;
  font-size: 0.5em !important;
}

span.vie_de_quartier {
  border-radius: 50% !important;
  display: inline-block;
  height: 20px;
  margin-right: 10px;
  margin-bottom: 5px;
  width: 20px;
  color: #1e1e1e !important;
  text-align: center;
  background-color: #c9dd03 !important;
  font-size: 1em !important;
}

/* ─────────────────────────────────────────
   Marqueurs SVG — remplace tous les PNG
───────────────────────────────────────── */

.marqueur-svg {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.marqueur-svg:hover {
  transform: scale(1.15);
}

/* ─────────────────────────────────────────
   Mise en évidence des marqueurs proches
───────────────────────────────────────── */

.marker-proche {
  outline: 3px solid #1E1E1E !important;
  outline-offset: 2px;
  border-radius: 50%;
}

.marker-proche-1 {
  outline: 3px solid #D23161 !important;
  outline-offset: 3px;
  border-radius: 50%;
  transform: scale(1.15);
}

/* ─────────────────────────────────────────
   Boutons "près de moi"
───────────────────────────────────────── */

#boutons-proche {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-proche {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 160px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 0.5px solid #d4d1c6;
  background: #F0EEE6;
  color: #1E1E1E;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  box-sizing: border-box;
}

.btn-proche:hover {
  background: #e4e1d8;
  border-color: #b8b5ab;
}

.btn-proche svg {
  flex-shrink: 0;
}

.btn-proche.btn-loading {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

@keyframes ellipsis {
  0%   { content: "…"; }
  33%  { content: "."; }
  66%  { content: ".."; }
  100% { content: "…"; }
}

.btn-proche.btn-loading::after {
  content: "…";
  animation: ellipsis 1.2s infinite;
}

/* ─────────────────────────────────────────
   Popup Mapbox — ATE Côtes
   Palette : fond #F0EEE6 / texte #1E1E1E
───────────────────────────────────────── */

.mapboxgl-popup-content {
  padding: 0 !important;
  border-radius: 12px !important;
  overflow: hidden;
  width: 280px;
 background: #F0EEE6 !important;  /* → transparent !important */ 
  border: 0.5px solid #d4d1c6;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
}

.mapboxgl-popup-close-button {
  color: #1E1E1E;
  font-size: 18px;
  padding: 6px 10px;
  background: transparent;
}

.mapboxgl-popup-close-button:hover {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 4px;
}

.popup-header {

  padding: 14px 16px;
}

.popup-nom {
  font-size: 15px;
  font-weight: 500;
  color: #1E1E1E;
  line-height: 1.3;
}

.popup-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;

}

.popup-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.popup-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.popup-txt {
  margin: 0;
  font-size: 13px;
  color: #1E1E1E;
  line-height: 1.5;
}

.popup-muted {
  color: #888;
}

.popup-divider {
  height: 0.5px;
  background: #d4d1c6;
}

.popup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: filter 0.15s ease;
}

.popup-btn:hover {
  filter: brightness(0.9);
}

.popup-distance {
  display: flex;
  align-items: center;
  gap: 10px;
}

.popup-aussi {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 500;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.popup-autre {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 0.5px solid #d4d1c6;
}

.popup-autre:last-child {
  border-bottom: none;
}

.popup-autre-nom {
  font-size: 12px;
  color: #1E1E1E;
}

.popup-autre-dist {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  margin-left: 8px;
}

/* ===== Masquer éléments sur mobile ===== */
@media (max-width: 768px) {

  /* Boutons "près de moi" */
  #boutons-proche {
    display: none !important;
  }

  /* Légende (accordéon) */
  #state-legend {
    display: none !important;
  }

}