/* ══════════════════════════════════════════════════════════════
   MODALES, TIROIRS & CARTE LEAFLET (LIGHT THEME)
══════════════════════════════════════════════════════════════ */

/* ═══ PANNEAU DÉTAIL PERSONNEL (BOTTOM SHEET) ═══ */
.detail-bg {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.detail-bg.on {
  display: flex;
}
.detail-sheet {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: var(--shadow-sheet);
}
.detail-handle {
  width: 44px;
  height: 5px;
  background: var(--border2);
  border-radius: 5px;
  margin: 14px auto 0;
}
.detail-header {
  padding: 16px 20px 14px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}
.detail-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 20px 24px;
  flex: 1;
  background: var(--bg);
}
.detail-scroll::-webkit-scrollbar {
  width: 6px;
}
.detail-scroll::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}

/* ═══ TIMELINE & CRÉNEAUX POINTAGE ═══ */
.timeline-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 8px 0;
}
.timeline-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  font-weight: 800;
  font-family: 'Rajdhani', sans-serif;
  box-shadow: var(--shadow-xs);
}
.timeline-line {
  width: 2px;
  background: var(--border2);
  margin: 0 auto;
  flex: 1;
  min-height: 12px;
}
.tranche-block {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-xs);
}

/* ═══ SURCHARGE DES TOOLTIPS LEAFLET ═══ */
.cp-label {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  white-space: nowrap;
}
.cp-label::before {
  display: none !important;
}
.leaflet-tooltip-top.cp-label {
  margin-top: 0 !important;
}

/* ═══ MODALE CARTE GPS (MAP MODAL) ═══ */
.map-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #ffffff;
  display: none;
  flex-direction: column;
  padding-top: var(--sat);
}
.map-modal.on {
  display: flex;
}
.map-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 11px;
  flex-shrink: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
#map-container {
  flex: 1;
  min-height: 0;
  position: relative;
  background: var(--bg);
}
#leaflet-map {
  width: 100%;
  height: 100%;
}
.map-legend {
  position: absolute;
  bottom: 20px;
  left: 16px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.map-leg-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.map-footer {
  padding: 10px 16px calc(10px + var(--sab));
  background: #ffffff;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--sub);
  text-align: center;
  box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.03);
}
