/* ==========================================================================
   Localisation actuelle : carte stylisée de Genève
   ========================================================================== */

.location {
  position: relative;
  grid-column: span 8;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  min-height: 290px;
}

.location > div {
  position: relative;
  z-index: 1;
  max-width: 38%;
}

.location-eyebrow {
  color: var(--color-muted);
}

.location-title {
  margin: 12px 0 0;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.location .btn {
  margin-top: 18px;
  padding: 9px 16px;
  font-size: 12px;
}

/* ---- Carte ---- */
.map {
  --map-land: #f4f1ea;
  --map-water: #9ccdf0;
  --map-park: #b6e0a8;
  --map-road: #fff;
  --map-casing: #d9d2c2;
  --map-building: #e8e2d6;
  --map-text: #4a4a4a;

  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 64%;
  height: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%);
  mask-image: linear-gradient(90deg, transparent 0, #000 30%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .map {
    --map-land: #14161a;
    --map-water: #0e3a5e;
    --map-park: #143a1f;
    --map-road: #2c3038;
    --map-casing: #0b0c0e;
    --map-building: #1d2127;
    --map-text: #b5b5b5;
  }
}

:root[data-theme="dark"] .map {
  --map-land: #14161a;
  --map-water: #0e3a5e;
  --map-park: #143a1f;
  --map-road: #2c3038;
  --map-casing: #0b0c0e;
  --map-building: #1d2127;
  --map-text: #b5b5b5;
}

.map-land {
  fill: var(--map-land);
}

.map-buildings {
  fill: var(--map-building);
}

.map-park {
  fill: var(--map-park);
}

.map-water {
  fill: var(--map-water);
}

.map-river {
  fill: none;
  stroke: var(--map-water);
  stroke-linecap: round;
}

.map-road-casing,
.map-road,
.map-main-road {
  fill: none;
}

.map-road-casing {
  stroke: var(--map-casing);
}

.map-road {
  stroke: var(--map-road);
}

.map-main-road {
  stroke: #f6c445;
}

.map-labels {
  fill: var(--map-text);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.map-pin {
  fill: var(--color-rts-red);
  opacity: 0.25;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 1.8s infinite;
}

.map-pin-dot {
  fill: var(--color-rts-red);
  stroke: #fff;
}

.map-pin-label {
  fill: var(--map-text);
  font-size: 8px;
  font-weight: 700;
}

/* ---- Responsive : la carte passe sous le texte ---- */
@media (max-width: 820px) {
  .location {
    grid-column: span 12;
    padding-bottom: 236px;
  }

  .location > div {
    max-width: none;
  }

  .map {
    top: auto;
    bottom: 0;
    width: 100%;
    height: 214px;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30%);
    mask-image: linear-gradient(180deg, transparent 0, #000 30%);
  }
}
