#fondation-gps-map {
  display: flex;
  flex-direction: column;
  width: 100%;
  aspect-ratio: 16/9;
  margin: 0 0 50px 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
  border: 1px solid #1e1e2e;
  background-color: #f5f5f5;
}

#fondation-gps-map #bar {
  padding: 10px 16px; background: #1e1e2e; color: #cdd6f4;
  display: flex; align-items: center; gap: 12px; font-size: 13px;
}
#fondation-gps-map #bar h1 { font-size: 15px; font-weight: 600; }

#fondation-gps-map #status {
  margin-left: auto; padding: 3px 10px; border-radius: 12px; font-size: 12px;
}
#fondation-gps-map #status.on  { background: #a6e3a1; color: #1e1e2e; }
#fondation-gps-map #status.off { background: #f38ba8; color: #1e1e2e; }

#fondation-gps-map #map { flex: 1; /*width: 100%; aspect-ratio: 16/9;*/ }

#fondation-gps-map #loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

#fondation-gps-map .spinner {
  width: 90px;
  height: 90px;
  border: 8px solid rgba(255,255,255,0.3);
  border-top-color: #2db9cc;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#fondation-gps-map .wpt-icon-inner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #8B0000;
  color: #8B0000;
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#fondation-gps-map .wpt-tooltip {
  padding: 10px;
  font-size: 15px;
}

#fondation-gps-map .wpt-tooltip h5 {
  font-size: 20px;
}

/* Légende */
#fondation-gps-map .map-legend {
  background: #fff;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.8;
  box-shadow: 0 1px 5px rgba(0,0,0,0.3);
  min-width: 350px;
}
#fondation-gps-map .legend-row {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
#fondation-gps-map .legend-color {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  margin-bottom: 3px;
  vertical-align: middle;
}
#fondation-gps-map .legend-km-hidden {
  display: none;
}

#fondation-gps-map .leaflet-bottom.leaflet-right {
  left: 50%;
  transform: translateX(-50%);
  right: auto;
}

@media (max-width: 675px) {
  #fondation-gps-map .leaflet-bottom.leaflet-right {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    transform: none;
  }
  #fondation-gps-map .leaflet-bottom.leaflet-right .leaflet-control {
    width: 100%;
    margin: 0;
    border-radius: 0;
    box-sizing: border-box;
  }
}
