/* --- RESET SIMPLE --- */
* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* --- GRID PRINCIPALE --- */
.page {
  height: 100vh;
  display: grid;
  grid-template-areas:
    "zone1 zone1 zone1"
    "zone3 zone2 zone4";
  grid-template-columns: 260px 1fr 260px; /* aside gauche / carte / aside droit */
  grid-template-rows: auto 1fr;           /* header auto, contenu prend le reste */
  gap: 12px;
  padding: 12px;
}

/* --- ZONES --- */
.zone1 {
  grid-area: zone1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.zone1 .btns { display: flex; gap: 8px; flex-wrap: wrap; }

.zone2 { grid-area: zone2; }
.zone3 { grid-area: zone3; }
.zone4 { grid-area: zone4; overflow: auto; }

.zone3, .zone4 {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px;
}

/* --- TITRE + BOUTON --- */
h1 { margin: 0; }

#route-btn, #clear-route-btn, #center-btn {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background: #f7f7f7;
  cursor: pointer;
}
#route-btn:hover, #clear-route-btn:hover, #center-btn:hover { background: #eee; }
#clear-route-btn { border-color: #e0b5b5; background: #fdeaea; }
#clear-route-btn:hover { background: #f9dede; }

/* --- CARTE --- */
#map {
  height: 100%;          /* remplit la zone 2 */
  min-height: 300px;     /* garde une hauteur minimale */
  border-radius: 8px;
  overflow: hidden;
}

/* --- ICÔNE GRIMPEUR --- */
.climber-icon {
  font-size: 40px;       /* cohérent avec iconSize [40,40] */
  line-height: 40px;
  text-align: center;
}

/* cluster custom */
.climb-cluster {
  background: transparent;
  border: none;
}
.climb-cluster .cluster-badge {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid #7b3fe4;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  font-weight: 700;
  font-size: 14px;
}

/* --- RESPONSIVE (mobile : empiler 1 → 2 → 3 → 4) --- */
@media (max-width: 780px) {
  .page {
    grid-template-areas:
      "zone1"
      "zone2"
      "zone3"
      "zone4";
    grid-template-columns: 1fr;
    grid-template-rows: auto 50vh auto auto; /* la carte garde une bonne hauteur */
    height: auto; /* laisse la page grandir */
  }

  #map { min-height: 50vh; }
}
