/* === App4 — Observatoire Carbone BTP === */

.obs-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* --- Filters --- */
.obs-filters {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg, #faf8f5);
  padding: 0.75rem 0;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  border-bottom: 1px solid #e5e0da;
  margin-bottom: 1.5rem;
}

.obs-filter-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.obs-filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #8a7e72;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.3rem;
}

.obs-btn {
  padding: 0.35rem 0.75rem;
  border: 1px solid #d4cdc4;
  border-radius: 6px;
  background: white;
  color: #5a5249;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
}

.obs-btn:hover {
  border-color: #b0a89e;
  background: #f5f0eb;
}

.obs-btn.active {
  background: #c4704b;
  color: white;
  border-color: #c4704b;
}

.obs-btn-close {
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.2rem 0.5rem;
  border: none;
  background: none;
  color: #8a7e72;
}

.obs-btn-close:hover {
  color: #c4704b;
}

/* --- KPI Cards --- */
.obs-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.obs-kpi-card {
  background: white;
  border: 1px solid #e5e0da;
  border-radius: 10px;
  padding: 1.2rem;
  text-align: center;
}

.obs-kpi-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #3a3530;
  line-height: 1.1;
}

.obs-kpi-label {
  display: block;
  font-size: 0.8rem;
  color: #8a7e72;
  margin-top: 0.3rem;
}

.obs-kpi-unit {
  display: block;
  font-size: 0.7rem;
  color: #b0a89e;
}

/* --- Sections --- */
.obs-section {
  margin-bottom: 2.5rem;
}

.obs-section-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #3a3530;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #e5e0da;
}

/* --- Empty state --- */
.obs-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #8a7e72;
  font-size: 1rem;
}

/* --- Detail panel --- */
.obs-detail {
  background: white;
  border: 1px solid #e5e0da;
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.obs-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.obs-detail-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #3a3530;
}

.obs-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.obs-detail-addr {
  color: #8a7e72;
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
}

.obs-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.obs-detail-table td {
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid #f0ebe5;
}

.obs-detail-table td:first-child {
  color: #8a7e72;
  width: 40%;
}

/* --- Responsive --- */
@media (max-width: 1280px) {
  .obs-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .obs-filters {
    flex-direction: column;
    gap: 0.8rem;
  }
  .obs-kpis {
    grid-template-columns: 1fr 1fr;
  }
}
