/* Impact territorial — graphiques et table localités */

.tie-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.tie-head h3 {
  margin: 0;
  margin-right: auto;
}

.tie-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(14, 165, 233, 0.18);
  color: #7dd3fc;
}

.tie-badge.is-soft {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}

.tie-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.4rem 0 0.8rem;
}

.tie-badge.is-data {
  background: rgba(14, 165, 233, 0.22);
  color: #7dd3fc;
}

.tie-badge.is-impact {
  background: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
}

.tie-table-wrap {
  overflow: auto;
  max-height: 280px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
}

.tie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.tie-table th,
.tie-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  text-align: left;
}

.tie-loc-row {
  cursor: pointer;
}

.tie-loc-row:hover,
.tie-loc-row.is-active {
  background: rgba(245, 158, 11, 0.12);
}

.tie-chart {
  width: 100%;
  max-width: 520px;
  height: auto;
  background: rgba(15, 23, 42, 0.35);
  border-radius: 10px;
}

.tie-bars {
  display: grid;
  gap: 6px;
}

.tie-bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 1.2fr) 2fr auto;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
}

.tie-bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.tie-bar-fill {
  display: block;
  height: 100%;
  background: #0ea5e9;
}

.tie-bar-row.is-ccn .tie-bar-fill {
  background: #8b5cf6;
}

.tie-compose {
  display: flex;
  gap: 4px;
  min-height: 48px;
  border-radius: 10px;
  overflow: hidden;
}

.tie-compose-seg {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 8px;
  font-size: 0.72rem;
  min-width: 0;
}

.tie-compose-seg.is-covered { background: rgba(34, 197, 94, 0.35); }
.tie-compose-seg.is-new { background: rgba(14, 165, 233, 0.4); }
.tie-compose-seg.is-remain { background: rgba(239, 68, 68, 0.35); }
.tie-compose-seg.is-unknown { background: rgba(148, 163, 184, 0.45); }

#dxl-section-territorial-impact.tie-pulse {
  outline: 2px solid #0ea5e9;
  outline-offset: 4px;
  transition: outline-color 0.3s ease;
}

.tie-loc-prog {
  margin-bottom: 0.5rem;
}

.tie-details {
  margin: 10px 0;
}

.tie-pre {
  max-height: 180px;
  overflow: auto;
  font-size: 0.72rem;
  background: rgba(2, 6, 23, 0.7);
  padding: 8px;
  border-radius: 8px;
}

.tie-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.tie-filters label {
  display: grid;
  gap: 4px;
  font-size: 0.75rem;
}

.tie-filters select {
  min-width: 140px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.6);
  color: inherit;
}

.tie-prog-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}

.tie-pilotage {
  margin-top: 12px;
}

@media (max-width: 720px) {
  .tie-bar-row {
    grid-template-columns: 1fr;
  }
}
