/* ============================================================
   Fenêtre de détails des lieux sur les cartes (2.4.24)
   assets/js/mst-lieu-window.js — plan des pistes (/plan/) et carte des parcours.
   Fond clair comme les bulles de la carte (lisibilité des photos, webcam, liens).
   ============================================================ */
.mst-lw {
  position: absolute;
  z-index: 6;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  max-width: calc(100% - 16px);
  background: #fff;
  color: #1f2937;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(8, 17, 31, .35), 0 2px 6px rgba(8, 17, 31, .2);
  overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-align: left;
}

.mst-lw__bar {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px 8px 12px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  cursor: move;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.mst-lw__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: #1f2937;
  overflow-wrap: anywhere;
}

.mst-lw__title img {
  width: 20px;
  height: 20px;
  margin-right: 5px;
  vertical-align: middle;
}

.mst-lw__close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 8px;
  background: transparent !important;
  box-shadow: none !important;
  color: #6b7280 !important;
  font-size: 16px;
  line-height: 30px;
  text-align: center;
  cursor: pointer;
}

.mst-lw__close:hover,
.mst-lw__close:focus-visible {
  background: #e2e8f0 !important;
  color: #111827 !important;
}

.mst-lw__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  color: #374151;
}

.mst-lw__body img,
.mst-lw__body iframe {
  max-width: 100%;
}

.mst-lw__body p {
  margin: 0 0 6px;
}

/* Webcam en page : la hauteur suit la largeur de la fenêtre. */
.mst-lw__body .mst-lw-webcam-frame {
  display: block;
  width: 100%;
  height: auto !important; /* l'attribut style garde 160 px pour la bulle de repli */
  min-height: 150px;
  aspect-ratio: 16 / 10;
  margin-top: 2px;
  border: 0;
  border-radius: 6px;
}

/* Coin pour agrandir (ordinateur). */
.mst-lw__resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  touch-action: none;
  background:
    linear-gradient(135deg, transparent 0 55%, #94a3b8 55% 62%, transparent 62% 72%, #94a3b8 72% 79%, transparent 79%);
  border-bottom-right-radius: 14px;
}

.mst-lw.is-moving,
.mst-lw.is-moving * {
  user-select: none;
  -webkit-user-select: none;
}

.mst-lw.is-moving iframe {
  pointer-events: none; /* le glisser ne s'arrête pas au-dessus de la webcam */
}

.mst-lw__grip {
  display: none;
}

/* Téléphone : panneau en bas de la carte, hauteur réglée en tirant la barre. */
.mst-lw--sheet {
  left: 0;
  right: 0;
  bottom: 0;
  max-width: none;
  border-radius: 16px 16px 0 0;
}

.mst-lw--sheet .mst-lw__bar {
  padding-top: 16px;
  cursor: ns-resize;
}

.mst-lw--sheet .mst-lw__grip {
  display: block;
  position: absolute;
  top: 6px;
  left: 50%;
  width: 42px;
  height: 5px;
  margin-left: -21px;
  border-radius: 3px;
  background: #94a3b8;
}
