:root {
  --ih-radius: 14px;
  --ih-shadow: 0 2px 10px rgba(15, 23, 42, .06);
}

body {
  background: #f4f6f9;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---------- Layout ---------- */
.topbar { position: sticky; top: 0; z-index: 1030; }

.app-shell { display: flex; min-height: calc(100vh - 56px); }

.sidebar {
  width: 230px;
  flex-shrink: 0;
  padding-top: .75rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem 1.25rem;
  color: #495057;
  text-decoration: none;
  font-size: .93rem;
  border-left: 3px solid transparent;
}
.sidebar-link:hover { background: #f1f3f8; color: #0d6efd; }
.sidebar-link.active {
  background: #eaf1ff;
  color: #0d6efd;
  font-weight: 600;
  border-left-color: #0d6efd;
}

.main-content { flex: 1; min-width: 0; }

.avatar-circle {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; text-transform: uppercase; color: #fff;
}

/* ---------- Cards ---------- */
.card {
  border: none;
  border-radius: var(--ih-radius);
  box-shadow: var(--ih-shadow);
}

.kpi-card {
  border-radius: var(--ih-radius);
  padding: 1.25rem 1.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.kpi-card i.bg-icon {
  position: absolute; right: -10px; bottom: -10px;
  font-size: 4.5rem; opacity: .18;
}
.kpi-card .kpi-value { font-size: 1.9rem; font-weight: 700; }

.action-tile {
  display: block; text-decoration: none; color: inherit;
  border-radius: var(--ih-radius); background: #fff;
  box-shadow: var(--ih-shadow);
  padding: 1.5rem 1rem; text-align: center;
  transition: transform .12s ease, box-shadow .12s ease;
}
.action-tile:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(15,23,42,.12); color: inherit; }
.action-tile i { font-size: 2rem; }

/* ---------- Timeline dossier ---------- */
.timeline { list-style: none; padding-left: 0; }
.timeline li {
  position: relative; padding: 0 0 1.5rem 2.2rem; border-left: 2px solid #e2e8f0;
  margin-left: .6rem;
}
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before {
  content: ''; position: absolute; left: -.55rem; top: 0;
  width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: #cbd5e1; border: 3px solid #fff; box-shadow: 0 0 0 2px #cbd5e1;
}
.timeline li.done::before { background: #198754; box-shadow: 0 0 0 2px #198754; }
.timeline li.current::before { background: #0d6efd; box-shadow: 0 0 0 2px #0d6efd; }

/* ---------- Mode technicien terrain : gros boutons, une main ---------- */
.btn-terrain {
  font-size: 1.15rem;
  padding: 1rem 1.25rem;
  border-radius: 16px;
}
.role-technicien .card { border-radius: 18px; }

/* ---------- Urgence visible sans ouvrir le dossier (§11) ---------- */
.list-panne { border-left: 5px solid #cbd5e1; }
.list-panne.urgence-critique { border-left-color: #dc3545; }
.list-panne.urgence-haute { border-left-color: #fd7e14; }
.list-panne.urgence-normale { border-left-color: #0dcaf0; }
.list-panne.urgence-faible { border-left-color: #adb5bd; }

/* ---------- Utilitaires ---------- */
.dropzone {
  border: 2px dashed #ced4da; border-radius: var(--ih-radius);
  padding: 2rem; text-align: center; color: #6c757d; cursor: pointer;
}
.dropzone:hover { background: #f8f9fa; }

.cursor-pointer { cursor: pointer; }

@media (max-width: 991.98px) {
  .sidebar { display: none; }
}
