/* ══════════════════════════════════════════════════════
   DISRUPTIONS — UI alignée avec l'app
══════════════════════════════════════════════════════ */

.btn-disruptions {
  display: block;
  width: 100%;
  padding: 10px 0;
  margin: 8px 0;
  background: var(--bg-subtle);
  color: var(--ink);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .16s var(--ease);
}

.btn-disruptions:hover {
  background: var(--bg-hover);
  border-color: var(--border-dark);
}

.disruptions-empty {
  padding: 24px 8px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}

.disruptions-list {
  display: grid;
  gap: 10px;
  border: none;
  border-radius: 0;
  background: transparent;
}

.disruption-card {
  background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(249,250,251,.98) 100%);
  border: 1.5px solid var(--border);
  border-left: 3px solid rgba(255, 204, 0, 0.65);
  border-radius: 10px;
  padding: 12px 13px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform .15s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}

.disruption-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-s);
  border-color: var(--border-dark);
  background: linear-gradient(180deg, #fff 0%, rgba(249,250,251,1) 100%);
}

.disruption-card-recent {
  border-left-color: #f59e0b;
  background: linear-gradient(180deg, rgba(255, 252, 235, .96) 0%, rgba(255, 247, 214, .95) 100%);
}

.disruption-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.disruption-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}

.disruption-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: #6a5200;
  border: 1px solid rgba(255, 204, 0, 0.55);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.disruption-date {
  margin: 0 0 6px;
  font-size: 10px;
  color: var(--ink-3);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.disruption-date-main {
  margin-bottom: 8px;
}

.disruption-description {
  margin: 0;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
}

.affected-stops-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.disruption-headline {
  margin: 0;
  padding: 12px 14px;
  background: var(--bg-card);
  /* border: 1.5px solid var(--border); */
  border-radius: 6px;
}

.disruption-desc {
  margin: 8px 0 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
}

.disruption-headline.is-recent .disruption-desc {
  background: transparent;
}

.disruption-date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.disruption-date-label {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.disruption-date-value {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.disruption-detail-note {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
}

.disruption-detail-note p {
  margin: 0;
}

.disruption-detail-note p + p {
  margin-top: 4px;
}

.stops-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  border: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.stop-card {
  background: var(--bg-card);
  /* border: 1.5px solid var(--border); */
  /* border-radius: 5px; */
  padding: 11px 12px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
  border-left: 3px solid rgba(255, 204, 0, 0.45);
}

.stop-card:hover {
  background: var(--bg-card);
  border-color: #d0d5de;
  box-shadow: var(--shadow-xs);
  border-left-color: #ffca00;
}

.stop-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.stop-alert-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
}

.stop-name-wrap {
  min-width: 0;
}

.stop-name {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.stop-directions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.dir-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 700;
}

.stop-direction {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--ink-3);
}

.stop-match-ok,
.stop-match-ko {
  margin: 0 0 8px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--ink-2);
  border: 1px solid var(--border);
}

.stop-match-ok {
  background: var(--bg-subtle);
  color: var(--ink-2);
  border: 1px solid var(--border);
}

.stop-match-ko {
  background: var(--bg-subtle);
  color: var(--ink-3);
  border: 1px dashed var(--border-dark);
}

.replacement-badge {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-left: 2px solid var(--border-dark);
  border-radius: 4px;
  padding: 7px 10px;
  margin: 8px 0;
}

.replacement-label {
  display: block;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: 3px;
}

.replacement-text {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.replacement-comment {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--ink-3);
}

.stops-empty {
  padding: 20px 6px;
  text-align: center;
  color: var(--ink-3);
  font-size: 12px;
}

.btn-locate-stop {
  width: 100%;
  margin-top: 8px;
  padding: 8px 0;
  border-radius: 5px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}

.btn-locate-stop:hover {
  background: var(--bg-subtle);
  color: var(--ink);
  border-color: var(--border-dark);
}

.btn-locate-stop:active {
  transform: translateY(1px);
}

.btn-locate-stop:disabled {
  cursor: not-allowed;
  opacity: .52;
}

.maplibregl-popup.disruption-locate-popup {
  z-index: 12 !important;
}

.maplibregl-popup.disruption-locate-popup .maplibregl-popup-content {
  border: 1.5px solid #ef4444;
  background: #fff;
  border-radius: 10px !important;
  box-shadow: 0 10px 24px rgba(185, 28, 28, 0.24);
  padding: 8px 10px !important;
}

.maplibregl-popup.disruption-locate-popup .dlp-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #7f1d1d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .01em;
}

.maplibregl-popup.disruption-locate-popup .dlp-name::before {
  content: '!';
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  flex: 0 0 18px;
}

.error-panel {
  padding: 14px;
  background: var(--red-soft);
  border: 1.5px solid #f3b8b8;
  border-radius: var(--r-s);
  color: #8a1f1f;
  text-align: center;
  font-size: 12px;
}

.error-panel p {
  margin: 0;
}

@media (max-width: 768px) {
  .disruption-card {
    padding: 10px 11px;
  }

  .disruption-header h3 {
    font-size: 13px;
  }

  .disruption-description,
  .disruption-desc,
  .stop-name,
  .btn-locate-stop {
    font-size: 12px;
  }

  .stop-card {
    padding: 9px 10px;
  }
}
