:root {
  --pose-primary: #003087;
  --pose-success: #28a745;
  --pose-warning: #F7941D;
  --pose-danger: #dc3545;
  --pose-bg: #f8fafc;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--pose-bg);
  min-height: calc(100vh - 80px);
}

.kpi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.kpi-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
  border-left: 4px solid var(--pose-primary);
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a1a;
}

.kpi-label {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.filter-bar select,
.filter-bar input {
  padding: 0.5rem 0.8rem;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #fff;
  font-size: 0.9rem;
}

.filter-bar button {
  background: var(--pose-primary);
  color: white;
  border: none;
  padding: 0.6rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.filter-bar button:hover { background: #002266; }

.chart-card {
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.chart-card canvas {
  max-height: 220px;
}

.map-container {
  height: 350px;
  border-radius: 12px;
  overflow: hidden;
  background: #e9ecef;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th {
  background: #f8f9fa;
  padding: 0.8rem;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
}

.data-table td {
  padding: 0.8rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

.status-resolu {
  background: #d4edda;
  color: #155724;
}

.status-ouvert {
  background: #f8d7da;
  color: #721c24;
}

@media (max-width: 1024px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .map-container { height: 280px; }
}
/*Bouton de détection d'habitat*/
.btn-detect {
    background: linear-gradient(135deg, #6f42c1, #9b6fd4);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(111, 66, 193, 0.3);
}
.btn-detect:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(111, 66, 193, 0.45);
}
.btn-detect:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.btn-detect i { animation: sparkle 1.5s ease infinite; }
@keyframes sparkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,34,102,0.7); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 1rem;
}
.modal-content {
    background: white; border-radius: 20px; width: 100%; max-width: 520px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: modal-slide 0.3s ease;
}
@keyframes modal-slide { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }
.modal-header {
    padding: 1.2rem 1.5rem; border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { margin: 0; color: #1a1a1a; font-size: 1.2rem; }
.modal-close {
    background: none; border: none; font-size: 1.8rem;
    color: #6c757d; cursor: pointer; line-height: 1;
}
.modal-close:hover { color: #dc3545; }
.modal-body { padding: 1.5rem; }
.progress-bar {
    height: 8px; background: #e9ecef; border-radius: 4px;
    overflow: hidden; margin: 1rem 0;
}
.progress-fill {
    height: 100%; background: linear-gradient(90deg, #6f42c1, #9b6fd4);
    transition: width 0.3s ease; border-radius: 4px;
}
.result-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1rem;
}
.result-card {
    background: #f8f9fa; padding: 1rem; border-radius: 12px; text-align: center;
}
.result-value {
    display: block; font-size: 1.8rem; font-weight: 800; color: #002266;
}
.result-label {
    font-size: 0.8rem; color: #6c757d; text-transform: uppercase; letter-spacing: 0.5px;
}
.result-details {
    background: #fff8e6; padding: 1rem; border-radius: 10px;
    font-size: 0.9rem; color: #856404; border-left: 4px solid #ffc107;
}
.modal-footer {
    padding: 1rem 1.5rem; border-top: 1px solid #eee;
    display: flex; justify-content: flex-end; gap: 0.8rem;
}
.btn-secondary {
    background: #6c757d; color: white; border: none; padding: 10px 20px;
    border-radius: 10px; font-weight: 600; cursor: pointer;
}
.btn-primary {
    background: #003087; color: white; border: none; padding: 10px 20px;
    border-radius: 10px; font-weight: 600; cursor: pointer;
}