@import url('tokens.css');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

body {
  font-family: 'IBM Plex Sans', 'Source Sans 3', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: #1a1d21;
  background: #f0f4f8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dj-header {
  background: linear-gradient(135deg, #0a3654 0%, #0d4a6f 48%, #0a3654 100%);
  color: #fff;
  box-shadow: var(--shadow-header);
}
.dj-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 12px 8px;
  max-width: 1920px;
  margin: 0 auto;
  width: 100%;
}
@media (min-width: 1024px) {
  .dj-header-bar { padding: 6px 24px 6px; }
}
.dj-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}
.dj-header-logo {
  height: 30px;
  width: auto;
  
}
.dj-header-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.dj-header-title em {
  font-style: normal;
  opacity: 0.6;
  margin: 0 4px;
}
.dj-header-indicators {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  font-size: 0.8rem;
}
.dj-header-indicator {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dj-header-indicator-label {
  color: rgba(255,255,255,0.75);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dj-header-indicator-value {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}
.dj-header-indicator-value i {
  margin-right: 4px;
  font-size: 0.9em;
}
.dj-header-indicator-sub {
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  font-size: 0.85em;
}
.dj-header-indicator-alert {
  color: #fca5a5;
}
.dj-header-indicator-good {
  color: #86efac;
}
.dj-header-indicator-warning {
  color: #fde047;
}
.dj-header-date {
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  margin-left: 8px;
}
@media (max-width: 768px) {
  .dj-header-indicators { gap: 12px 16px; }
  .dj-header-indicator-value { font-size: 0.85rem; }
}
@media (max-width: 640px) {
  .dj-header-indicators { gap: 8px 12px; }
  .dj-header-indicator:nth-child(n+3) { display: none; }
  .dj-header-date { margin-left: 0; }
}

.dj-header {
  position: sticky;
  top: 0;
  z-index: 100;
}
.dj-nav {
  background: #fff;
  border-bottom: 1px solid #e5e9ef;
  padding: 0 8px 0 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-shadow: 0 1px 0 rgba(10, 54, 84, 0.04);
}
.dj-nav::-webkit-scrollbar {
  display: none;
}
@media (min-width: 1024px) {
  .dj-nav { padding: 0 12px; }
}
.dj-nav-list {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 0;
  list-style: none;
  margin-bottom: 0 !important;
}
@media (min-width: 768px) {
  .dj-nav-list { flex-wrap: nowrap; }
}
.dj-nav-list > li {
  display: flex;
  align-items: stretch;
}

.dj-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: var(--card-radius-xs);
  transition: color var(--transition), background var(--transition), transform 0.15s ease;
  border-bottom: none;
  margin: 6px 2px 6px 0;
  white-space: nowrap;
}
.dj-nav-link i {
  font-size: 1.05rem;
  opacity: 0.9;
  transition: opacity var(--transition);
}
.dj-nav-link.active i,
.dj-nav-link:hover i {
  opacity: 1;
}
.dj-nav-link-urgent i {
  color: #b91c1c;
}
.dj-nav-link:hover {
  color: var(--primary-dark);
  background: var(--primary-pale);
}
.dj-nav-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.dj-nav-link.active {
  color: #fff;
  background: var(--primary-dark);
  font-weight: 600;
  border-bottom: none;
}
.dj-nav-link.active:hover {
  background: #0c4a6e;
  color: #fff;
}
.dj-nav-link-urgent {
  color: #b91c1c;
  font-weight: 600;
}
.dj-nav-link-urgent:hover {
  color: #fff;
  background: #b91c1c;
}
.dj-nav-link-urgent:hover i {
  color: #fff;
}
.dj-nav-link-urgent:hover span {
  color: #fff;
}
.dj-nav-link-urgent.active {
  color: #fff;
  background: #b91c1c;
  border-bottom: none;
}
.dj-nav-link-urgent.active:hover {
  background: #991b1b;
  color: #fff;
}

.site-main {
  flex: 1;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 6px 4px 24px;
}
@media (min-width: 768px) {
  .site-main { padding: 5px 16px 48px; }
}
@media (min-width: 1024px) {
  .site-main { padding: 10px 24px 24px; max-width: 1920px; }
}
.site-main-valide {
  
}

.dj-dashboard {
  margin: 0 auto;
  padding: 0 4px;
  max-width: 1920px;
  width: 100%;
}
.dj-hero-strip {
  position: relative;
  border-radius: var(--card-radius);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.dj-hero-strip-bg {
  position: absolute;
  inset: 0;
  background: #0a3654 url('https://images.unsplash.com/photo-1763683826742-ef9a7729f58d?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') center/cover no-repeat;
}
.dj-hero-strip-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(10,54,84,0.92) 0%, rgba(10,54,84,0.86) 50%, rgba(5,38,60,0.9) 100%);
}
.dj-hero-strip-content {
  position: relative;
  z-index: 1;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
@media (min-width: 768px) {
  .dj-hero-strip-content { padding: 32px 28px; }
}
.dj-hero-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
  letter-spacing: -0.03em;
  line-height: 1.2;
}
@media (min-width: 768px) {
  .dj-hero-title { font-size: 1.85rem; letter-spacing: -0.02em; }
}
.dj-hero-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.92);
  margin: 0 0 24px;
  max-width: 640px;
  line-height: 1.5;
}
@media (min-width: 768px) {
  .dj-hero-desc { font-size: 1rem; margin-bottom: 28px; }
}
.dj-hero-indicators-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.85);
  margin: 0 0 14px;
}
.dj-hero-kpis {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px 28px;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.dj-hero-kpis-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}
@media (min-width: 640px) {
  .dj-hero-kpis-4 { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}
@media (min-width: 768px) {
  .dj-hero-kpis-4 { gap: 24px; }
}
@media (min-width: 640px) {
  .dj-hero-kpis { gap: 24px 32px; }
}
@media (min-width: 768px) {
  .dj-hero-kpis {
    gap: 28px 44px;
    overflow-x: visible;
  }
}
.dj-hero-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  padding: 10px 16px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--card-radius-sm);
  border: 1px solid rgba(255,255,255,0.22);
  transition: background var(--transition), transform 0.15s ease;
}
.dj-hero-kpi:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}
.dj-hero-kpi-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) {
  .dj-hero-kpi-val { font-size: 1.6rem; }
}
.dj-hero-kpi-lbl {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.88);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.dj-hero-kpi-alert {
  background: rgba(185,28,28,0.35);
  border-color: rgba(255,255,255,0.25);
}
.dj-hero-kpi-alert .dj-hero-kpi-val {
  color: #fecaca;
}

.dj-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
}
.dj-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
}
.dj-dashboard-grid .dj-widget-title {
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.dj-dashboard-grid .dj-widget-stat-value {
  font-size: 1.05rem;
  font-weight: 700;
}
.dj-dashboard-grid .dj-widget-stat-label {
  font-size: 0.72rem;
}
.dj-dashboard-grid .dj-widget-stat-meta {
  font-size: 0.78rem;
}
.dj-dashboard-grid .dj-widget-stat-mini {
  padding: 8px 12px;
}
.dj-dashboard-grid .dj-pbs-row {
  font-size: 0.74rem;
}
.dj-dashboard-grid .dj-pbs-bar {
  height: 3px;
  margin-bottom: 6px;
}
.dj-dashboard-grid .dj-widget {
  padding: 14px 16px;
}
.dj-dashboard-grid .dj-widget-actions {
  padding-top: 8px;
}
@media (min-width: 640px) {
  .dj-dashboard-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (min-width: 1024px) {
  .dj-dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}
@media (min-width: 640px) {
  .dj-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (min-width: 1024px) {
  .dj-cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}
@media (min-width: 1600px) {
  .dj-cards-grid {
    gap: 20px;
  }
}

.dj-widget-demographique .dj-demographique-block {
  background: #fffbeb;
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.dj-demographique-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dj-demog-geo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 4px;
}
.dj-region-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.dj-region-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(16,185,129,0.08) 0%, rgba(5,150,105,0.06) 100%);
  border: 1px solid rgba(16,185,129,0.2);
  font-size: 0.8rem;
  color: #0f172a;
}
.dj-region-chip .dj-region-name {
  font-weight: 600;
  color: #047857;
}
.dj-region-chip strong {
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  font-size: 0.85rem;
}
.dj-region-chip em {
  font-style: normal;
  font-size: 0.72rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.dj-residence-bar-item {
  margin-bottom: 12px;
}
.dj-residence-bar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.dj-residence-bar-track {
  height: 6px;
  background: rgba(16,185,129,0.2);
  border-radius: 999px;
  overflow: hidden;
}
.dj-residence-bar-fill {
  height: 100%;
  background: #10b981;
  border-radius: 999px;
  transition: width 0.3s ease;
}
.dj-residence-nb {
  font-size: 0.75rem;
  color: #64748b;
  margin: 2px 0 0;
}
.dj-widget-stat-row-2 {
  grid-template-columns: 1fr 1fr;
}
.dj-pbs-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 2px;
}
.dj-pbs-bar {
  height: 4px;
  background: rgba(10,54,84,0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.dj-pbs-bar-fill {
  height: 100%;
  background: #0a3654;
  border-radius: 999px;
}
.dj-origin-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.dj-origin-chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(10,54,84,0.08);
  border: 1px solid rgba(10,54,84,0.12);
  font-size: 0.72rem;
  color: #0a3654;
}
.dj-origin-chip strong { margin-right: 4px; font-size: 0.7rem; }
.dj-dashboard-grid .dj-origin-chips { gap: 6px; margin-top: 4px; }

/* Barres âge/genre superposées */
.dj-age-bars-wrap { display: flex; flex-direction: column; gap: 5px; }
.dj-age-legend { display: flex; gap: 10px; font-size: 0.65rem; margin-bottom: 4px; }
.dj-age-legend-h::before { content: ''; display: inline-block; width: 10px; height: 8px; background: linear-gradient(90deg,#0c4a6e,#1d4ed8); border-radius: 2px; margin-right: 3px; vertical-align: middle; }
.dj-age-legend-f::before { content: ''; display: inline-block; width: 10px; height: 8px; background: linear-gradient(90deg,#92400e,#b45309); border-radius: 2px; margin-right: 3px; vertical-align: middle; }
.dj-age-legend-h { color: #1d4ed8; font-weight: 600; }
.dj-age-legend-f { color: #b45309; font-weight: 600; }
.dj-age-group { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 6px; }
.dj-age-grp-lbl { font-size: 0.68rem; font-weight: 600; color: #475569; }
.dj-age-bars { display: flex; flex-direction: column; gap: 2px; }
.dj-age-track { height: 13px; background: rgba(10,54,84,0.06); border-radius: 4px; overflow: hidden; }
.dj-age-bar { height: 100%; border-radius: 4px; display: flex; align-items: center; justify-content: flex-end; padding-right: 5px; min-width: 22px; transition: width 0.4s ease; }
.dj-age-bar span { font-size: 0.59rem; color: #fff; font-weight: 700; white-space: nowrap; line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.dj-age-bar-h { background: linear-gradient(90deg, #0c4a6e, #2563eb); }
.dj-age-bar-f { background: linear-gradient(90deg, #92400e, #d97706); }

/* Tendance KPIs */
.dj-trend-kpis { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.dj-trend-kpi { display: flex; flex-direction: column; padding: 8px 12px; background: rgba(10,54,84,0.05); border-radius: 8px; min-width: 70px; }
.dj-trend-kpi-val { font-size: 1.1rem; font-weight: 700; color: #0a3654; }
.dj-trend-kpi-lbl { font-size: 0.68rem; color: #64748b; text-transform: uppercase; margin-top: 2px; }
.dj-dashboard-grid .dj-origin-chip { padding: 2px 6px; font-size: 0.68rem; }
.dj-dashboard-grid .dj-origin-chip strong { font-size: 0.66rem; }
.dj-widget-contact .dj-widget-stat-value { font-size: 1.1rem; }
.mt-2 { margin-top: 8px; }

.dj-widget {
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
  border-radius: var(--card-radius);
  background: #fff;
  border: 1px solid rgba(10,54,84,0.08);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-smooth), border-color var(--transition), transform var(--transition);
}
.dj-widget:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(10,54,84,0.12);
  transform: translateY(-2px);
}
.dj-widget-1,
.dj-widget-5 { background: #fff; }
.dj-widget-2 { background: #fff; }
.dj-widget-3 { background: #fff; }
.dj-widget-4 { background: #fff; }
.dj-widget-6 { background: #fff; }
.dj-widget-residence { background: #fff; }
.dj-widget-profil { background: #fff; }
.dj-widget-residence .dj-widget-title { color: #0369a1; }
.dj-widget-profil .dj-widget-title { color: #6d28d9; }
.dj-widget-4 .dj-widget-title { color: #4338ca; }
.dj-widget-4 .dj-widget-btn { background: #4f46e5; }
.dj-widget-4 .dj-widget-btn:hover { background: #4338ca; }
.dj-widget-residence .dj-widget-btn { background: #0369a1; }
.dj-widget-residence .dj-widget-btn:hover { background: #075985; }
.dj-widget-profil .dj-widget-btn { background: #7c3aed; }
.dj-widget-profil .dj-widget-btn:hover { background: #6d28d9; }

.dj-widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 12px;
  line-height: 1.3;
  flex-shrink: 0;
  letter-spacing: -0.02em;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(10,54,84,0.06);
}
.dj-widget-meta {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0 0 12px;
  line-height: 1.4;
}
.dj-widget-meta + .dj-widget-stats { margin-top: 0; }
.dj-widget-1 .dj-widget-title,
.dj-widget-5 .dj-widget-title { color: #0a3654; }
.dj-widget-2 .dj-widget-title { color: #047857; }
.dj-widget-3 .dj-widget-title,
.dj-widget-urgence .dj-widget-title { color: #b91c1c; }
.dj-widget-4 .dj-widget-title { color: #334155; }
.dj-widget-6 .dj-widget-title { color: #b45309; }

.dj-widget-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
}
.dj-widget-stat-block {
  background: #fff;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}
.dj-widget-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dj-widget-stat-subtitle {
  font-size: 0.7rem;
  font-weight: 600;
  color: #0B3C5D;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding-top: 6px;
  border-top: 1px solid rgba(10,54,84,0.1);
}
.dj-widget-stat-row:first-child .dj-widget-stat-subtitle {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.dj-widget-stat-row-3 {
  grid-template-columns: repeat(3, 1fr);
}
.dj-widget-stat-row-4 {
  grid-template-columns: repeat(2, 1fr);
}
.dj-widget-stat-mini {
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(10,54,84,0.06);
}
.dj-widget-stat-label {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0 0 4px;
  font-weight: 500;
}
.dj-widget-stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.02em;
}
.dj-widget-stat-alert {
  color: #b91c1c;
}
.dj-widget-stat-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.dj-widget-stat-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}
.dj-widget-stat-alert .dj-widget-stat-link {
  color: #b91c1c;
}
.dj-widget-stat-meta {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

.dj-widget-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(10,54,84,0.06);
  flex-shrink: 0;
  margin-top: auto;
  align-items: flex-end;
}
.dj-widget-btn {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: #0a3654;
  border-radius: var(--card-radius-xs);
  text-decoration: none;
  transition: background var(--transition), transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.dj-widget-btn:hover {
  background: #0c4a6e;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(10,54,84,0.2);
}
.dj-widget-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.dj-widget-1 .dj-widget-btn { background: #0c4a6e; }
.dj-widget-1 .dj-widget-btn:hover { background: #0e5a82; }
.dj-widget-2 .dj-widget-btn { background: #047857; }
.dj-widget-2 .dj-widget-btn:hover { background: #059669; }
.dj-widget-3 .dj-widget-btn { background: #b91c1c; }
.dj-widget-3 .dj-widget-btn:hover { background: #dc2626; }
.dj-widget-3 .dj-widget-btn-alert { background: #b91c1c; }

.dj-widget-urgence {
  background: linear-gradient(180deg, #fffbfb 0%, #fff5f5 100%) !important;
  border: 1px solid rgba(185,28,28,0.18) !important;
  border-left: 4px solid #b91c1c !important;
}
.dj-widget-urgence .dj-widget-title { color: #b91c1c !important; }
.dj-widget-urgence .dj-widget-stat-subtitle { color: #991b1b; }
.dj-widget-urgence .dj-widget-stat-value { color: #b91c1c; }
.dj-widget-urgence .dj-widget-stat-value a { color: #b91c1c; }
.dj-widget-urgence .dj-widget-stat-mini { border-color: rgba(185,28,28,0.15); background: #fefafa; }
.dj-widget-urgence .dj-widget-actions { border-top-color: rgba(185,28,28,0.12); }

/* Table urgence */
.dj-table-urgence {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.dj-table-urgence td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(185,28,28,0.1);
}
.dj-table-urgence td:first-child { color: #64748b; }
.dj-table-urgence td:last-child { font-weight: 600; text-align: right; }
.dj-table-urgence .dj-val-alert { color: #b91c1c; }

/* Progress list (régions, profil) */
.dj-progress-list { display: flex; flex-direction: column; gap: 8px; }
.dj-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(40px, 2fr) auto;
  gap: 8px 12px;
  align-items: center;
  font-size: 0.8rem;
}
.dj-progress-row .dj-progress-track { min-width: 0; }
.dj-progress-row .dj-progress-val { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.dj-progress-row .dj-progress-lbl { font-size: 0.78rem; color: #334155; }
.dj-progress-track {
  height: 6px;
  background: rgba(10,54,84,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.dj-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0c4a6e, #0ea5e9);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.dj-muted { font-size: 0.8rem; color: #94a3b8; }

/* Compact list (PBS par région) */
.dj-compact-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.dj-compact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(40px, 2fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 0.78rem;
}
.dj-compact-lbl { color: #334155; }
.dj-compact-row .dj-progress-track { height: 4px; }
.dj-compact-row .dj-progress-fill { background: #dc2626; }
.dj-compact-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.dj-widget-pbs .dj-compact-row .dj-progress-fill { background: #b91c1c; }

/* Chart wrap */
.dj-chart-wrap {
  position: relative;
  min-height: 120px;
}
.dj-chart-wrap canvas { min-height: 120px; max-height: 220px; }
.dj-chart-small { min-height: 100px; }
.dj-chart-small canvas { min-height: 100px; max-height: 180px; }

/* Profil block */
.dj-profil-block { margin-bottom: 14px; }
.dj-profil-block:last-child { margin-bottom: 0; }
.dj-profil-block-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.dj-tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.dj-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(180,83,9,0.12);
  border: 1px solid rgba(180,83,9,0.25);
  font-size: 0.72rem;
  color: #92400e;
}
.dj-widget-profil .dj-progress-fill { background: #1d4ed8; }
.dj-widget-profil .dj-profil-block:nth-child(2) .dj-progress-fill { background: #047857; }

/* Section graphique + stats */
.dj-section-chart {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 768px) {
  .dj-section-chart { flex-direction: column; }
}
.dj-widget-chart-full {
  background: #fff;
  border: 1px solid rgba(10,54,84,0.08);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow var(--transition-smooth), transform var(--transition);
}
.dj-widget-chart-full:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.dj-widget-chart-wrap {
  padding: 12px 16px;
}
.dj-widget-4 .dj-widget-btn { background: #475569; }
.dj-widget-4 .dj-widget-btn:hover { background: #64748b; }
.dj-widget-5 .dj-widget-btn { background: #1d4ed8; }
.dj-widget-5 .dj-widget-btn:hover { background: #2563eb; }
.dj-widget-6 .dj-widget-btn { background: #b45309; }
.dj-widget-6 .dj-widget-btn:hover { background: #d97706; }

.dj-btn {
  display: inline-block;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #0a3654;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s;
}
.dj-btn:hover {
  background: #0a3654;
  color: #fff;
  border-color: #0a3654;
}
.dj-btn-alert {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}
.dj-btn-alert:hover {
  background: #b91c1c;
  color: #fff;
  border-color: #b91c1c;
}

.dj-alert-urgent {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  margin-bottom: 16px;
  background: linear-gradient(90deg, #fffbfb 0%, #fef2f2 50%, #fff5f5 100%);
  border: 1px solid rgba(185,28,28,0.15);
  border-left: 4px solid #b91c1c;
  border-radius: var(--card-radius-sm);
  font-size: 0.9rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.dj-alert-urgent-badge {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  background: #b91c1c;
  padding: 4px 12px;
  border-radius: var(--card-radius-xs);
  flex-shrink: 0;
}
.dj-alert-urgent-scroll {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
}
.dj-alert-urgent-track {
  display: flex;
  gap: 32px;
  /* animation: dj-alert-scroll 25s linear infinite; */
  width: max-content;
}
.dj-alert-urgent-track:hover {
  animation-play-state: paused;
}
.dj-alert-urgent-item {
  color: #7f1d1d;
  white-space: nowrap;
  flex-shrink: 0;
}
.dj-alert-urgent-item strong {
  color: #b91c1c;
}
.dj-alert-urgent-item a {
  color: #b91c1c;
  font-weight: 600;
  text-decoration: underline;
}
.dj-alert-urgent-item a:hover {
  color: #991b1b;
}
.dj-alert-urgent-sep {
  color: #b91c1c;
  opacity: 0.7;
}
@keyframes dj-alert-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.dj-hero-band.hero-summary-band {
  background: #fff;
  border: 1px solid #e5e9ed;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  padding: 10px;
  margin-top: 10px;
  gap: 8px;
  grid-template-columns: repeat(5, 1fr);
}
.dj-hero-band .hero-summary-card {
  border: none;
  border-right: 1px solid #f1f5f9;
}
.dj-hero-band .hero-summary-card:last-child {
  border-right: none;
}
.dj-hero-band .hero-summary-card span {
  font-size: 0.95rem;
}
.dj-hero-band .hero-summary-card strong {
  font-size: 1.65rem;
}
.hero-summary-card-urgent {
  background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
  border-left: 3px solid #b91c1c;
}
.hero-summary-card-urgent strong {
  color: #b91c1c;
}

.it-health-alert-band {
  padding: 16px 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0a3654;
  border-radius: 4px;
  font-size: 0.9rem;
}

.at-glance-topline {
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}
.at-glance-topline .kicker {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0a3654;
}
.at-glance-topline h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 4px 0 0;
}

.it-health-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.it-health-section-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 24px;
  transition: box-shadow 0.2s;
}
.it-health-section-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.section-title-bar {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  padding-left: 12px;
  margin: 0 0 12px;
  border-left: 4px solid #0a3654;
}
.section-title-bar-teal { border-left-color: #0d9488; }
.it-health-section-card .at-glance-subtitle {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 16px;
}
.it-health-section-card .stat span {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}
.it-health-section-card .stat strong {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.it-health-section-card .stat .as-of {
  font-size: 0.7rem;
  color: #94a3b8;
  font-style: normal;
}
.it-health-section-card .action-buttons {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}
.btn-teal {
  padding: 10px 18px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: #0a3654;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}
.btn-teal:hover {
  background: #1565a3;
  color: #fff;
}
.btn-teal.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
}

.hero-summary-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.hero-summary-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}
.hero-summary-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  color: inherit;
}
.hero-summary-band span {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.hero-summary-band strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 4px;
}

.content-rich-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.content-rich-col {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 14px 16px;
}
.content-rich-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.content-rich-col p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #475569;
}
.regions-grid,
.dj-regions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) {
  .dj-regions-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .dj-regions-grid { grid-template-columns: repeat(4, 1fr); }
}
.region-chip {
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.8rem;
}
.region-chip strong { display: block; color: #0f172a; margin-bottom: 2px; }
.region-chip span { color: #64748b; }

.dj-section-residence {
  margin-bottom: 18px;
}
.dj-widget-residence {
  padding: 20px 18px;
}
.dj-widget-residence .dj-widget-meta {
  margin-bottom: 14px;
}
.dj-residence-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
@media (min-width: 500px) {
  .dj-residence-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .dj-residence-grid { grid-template-columns: repeat(4, 1fr); }
}
.dj-residence-item {
  background: #f8fafc;
  border: 1px solid rgba(10,54,84,0.08);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dj-residence-name {
  font-weight: 700;
  font-size: 1rem;
  color: #0a3654;
}
.dj-residence-pct {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0a3654;
  letter-spacing: -0.02em;
}
.dj-residence-nb {
  font-size: 0.8rem;
  color: #64748b;
}

.dj-section-regions {
  margin-bottom: 18px;
}
.dj-widget-regions {
  padding: 20px 18px;
}
.dj-widget-regions .dj-widget-meta {
  margin-bottom: 14px;
}
.dj-widget-regions .dj-regions-grid {
  margin-bottom: 14px;
}
.rich-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.rich-list li {
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
  color: #475569;
}
.rich-list li:last-child { border-bottom: none; }
.btn-sm { padding: 8px 14px; font-size: 0.8rem; margin-top: 4px; }

@media (max-width: 992px) {
  .it-health-grid { grid-template-columns: repeat(2, 1fr); }
  .dj-hero-band.hero-summary-band { grid-template-columns: repeat(2, 1fr); }
  .content-rich-row { grid-template-columns: 1fr; }
  .regions-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-header-context { display: none; }
  .it-health-grid { grid-template-columns: 1fr; }
  .dj-hero-band.hero-summary-band { grid-template-columns: 1fr; }
}

.site-footer-logo {
  height: 42px;
  width: auto;
  display: block;
  margin-bottom: 12px;
}

.kpi-card,
.atg-widget.kpi-card,
.atg-widget.section-card {
  display: block;
  min-height: 0;
  min-width: 0;
  box-sizing: border-box;
}
.kpi-card .kpi-value,
.atg-widget .kpi-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0a3654;
  line-height: 1.2;
}
.kpi-card .kpi-label,
.atg-widget .kpi-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.atg-widget {
  box-sizing: border-box;
}

.site-main:not(.site-main-valide) {
  background: transparent;
}

.dj-page-with-sidebar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}
.dj-sidebar-filters {
  flex: 0 0 auto;
  width: 240px;
  min-width: 220px;
  padding: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  position: sticky;
  top: 100px;
  box-shadow: 0 2px 12px rgba(10, 54, 84, 0.06);
}
.dj-sidebar-filters h3 {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0a3654;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #0a3654;
}
.dj-filter-sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.dj-filter-sidebar .dj-chip-group {
  flex-direction: column;
  gap: 10px;
}
.dj-filter-sidebar .dj-chip-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #0a3654;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.dj-filter-sidebar .dj-chips {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 8px;
}
.dj-filter-sidebar .dj-chip {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  padding: 10px 14px;
  font-size: 0.875rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  transition: all 0.2s ease;
}
.dj-filter-sidebar .dj-chip:hover {
  border-color: #0a3654;
  background: #f0f7fc;
  color: #0a3654;
}
.dj-filter-sidebar .dj-chip.active {
  background: linear-gradient(135deg, #0a3654 0%, #0c4a6e 100%);
  border-color: #0a3654;
  color: #fff;
  box-shadow: 0 2px 8px rgba(10, 54, 84, 0.25);
}
.dj-filter-selects .form-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #0a3654;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  display: block;
}
.dj-filter-selects .mb-3 { margin-bottom: 20px !important; }
.dj-filter-selects .choices {
  margin-bottom: 0;
}
.dj-filter-selects .choices__inner {
  min-height: 42px;
  font-size: 0.9rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 6px 12px;
  transition: all 0.2s ease;
}
.dj-filter-selects .choices__inner:hover,
.dj-filter-selects .choices.is-focused .choices__inner {
  border-color: #0a3654;
  box-shadow: 0 0 0 3px rgba(10, 54, 84, 0.08);
}
.dj-filter-selects .choices__input {
  font-size: 0.9rem;
  background: transparent;
}
.dj-filter-selects .choices__list--dropdown {
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(10, 54, 84, 0.12);
}
.dj-filter-selects .choices__list--dropdown .choices__item--selectable.is-highlighted {
  background: #f0f7fc;
  color: #0a3654;
}
.dj-filter-selects .choices__item--choice {
  padding: 10px 14px;
  font-size: 0.9rem;
}
@media (max-width: 767px) {
  .dj-page-with-sidebar { flex-direction: column; }
  .dj-sidebar-filters { width: 100%; position: static; }
  .dj-filter-sidebar .dj-chips { flex-direction: row; flex-wrap: wrap; }
  .dj-filter-sidebar .dj-chip { width: auto; }
}

.dj-page-content {
  margin: 0 auto;
  padding: 0 2px;
}
.dj-page-with-sidebar .dj-page-main {
  flex: 1;
  min-width: 0;
}

.dj-page-content .page-header {
  margin-bottom: 12px;
  padding-bottom: 12px;
}
.dj-page-content .page-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0 0 4px;
}
.dj-page-content .page-header .lead {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
}

.dj-page-content .section-card {
  display: flex;
  flex-direction: column;
  padding: 10px 16px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0a3654;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.dj-page-content .section-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.dj-page-content .section-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 10px;
  background: transparent;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 10px;
}
.dj-page-content .section-card-header h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.dj-page-content .section-card-body {
  padding: 0;
  flex: 1;
  min-height: 0;
}
.dj-page-content .atg-context-strip {
  background: #eef4f8;
  border-left: 4px solid #0c4a6e;
}

.dj-filter-chips-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  align-items: flex-start;
  padding: 18px 20px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
}

.atg-kpi-row,
.dj-page-content .atg-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.atg-kpi-row .kpi-card,
.dj-page-content .atg-kpi-row .kpi-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 16px;
  text-align: center;
  transition: all 0.2s;
  min-width: 0;
}
.atg-kpi-row .kpi-card:hover,
.dj-page-content .atg-kpi-row .kpi-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.atg-kpi-row .kpi-value,
.dj-page-content .atg-kpi-row .kpi-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0a3654;
}
.atg-kpi-row .kpi-label,
.dj-page-content .atg-kpi-row .kpi-label {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 4px;
}
.dj-page-content .kpi-card.kpi-danger .kpi-value { color: #b91c1c; }
.dj-page-content .kpi-card a { color: inherit; text-decoration: none; }

.dj-filter-bar { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: flex-start; padding: 16px 20px; }
.dj-chip-group { display: flex; flex-direction: column; gap: 10px; }
.dj-chip-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #0a3654;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.dj-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dj-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  /* white-space: nowrap; */
}
.dj-chip:hover {
  border-color: #0a3654;
  color: #0a3654;
  background: #f0f7fc;
  box-shadow: 0 2px 6px rgba(10, 54, 84, 0.08);
}
.dj-chip.active {
  background: linear-gradient(135deg, #0a3654 0%, #0c4a6e 100%);
  border-color: #0a3654;
  color: #fff;
  box-shadow: 0 2px 8px rgba(10, 54, 84, 0.25);
}
.dj-filter-bar .form-label { font-size: 0.75rem; font-weight: 600; color: #475569; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.dj-filter-bar .form-select { font-size: 0.875rem; min-width: 160px; border-radius: 8px; border: 1px solid #cbd5e1; padding: 8px 12px; }
.dj-filter-bar .btn-primary { background: #0a3654; border-color: #0a3654; }
.dj-filter-bar .btn-primary:hover { background: #0c4a6e; border-color: #0c4a6e; }
.dj-filter-bar .btn { font-size: 0.875rem; font-weight: 600; padding: 8px 18px; border-radius: 8px; }

#calendar .fc {
  font-family: inherit;
}
#calendar .fc-toolbar-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0a3654;
}
#calendar .fc-button {
  background: #0a3654 !important;
  border-color: #0a3654 !important;
}
#calendar .fc-button:hover {
  background: #0c4a6e !important;
  border-color: #0c4a6e !important;
}
#calendar .fc-button-active {
  background: #1565a3 !important;
}
#calendar .fc-daygrid-day-number {
  color: #64748b;
  font-size: 0.85rem;
}
#calendar .fc-event {
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.8rem;
}

.dj-page-content .table,
.site-main .table {
  font-size: 0.9rem;
  width: 100%;
  table-layout: fixed;
}
.dj-page-content .table thead th,
.site-main .table thead th {
  font-weight: 600;
  color: #0a3654;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  white-space: nowrap;
}

.dj-page-content .table th:not(:first-child):not(.text-center),
.dj-page-content .table td:not(:first-child):not(.text-center),
.site-main .table th:not(:first-child):not(.text-center),
.site-main .table td:not(:first-child):not(.text-center) {
  text-align: right;
  white-space: nowrap;
}
.dj-page-content .table th.text-center,
.dj-page-content .table td.text-center,
.site-main .table th.text-center,
.site-main .table td.text-center {
  text-align: center;
  white-space: nowrap;
}
.dj-page-content .table th:first-child,
.dj-page-content .table td:first-child,
.site-main .table th:first-child,
.site-main .table td:first-child {
  text-align: left;
}

.dj-page-content .table.table-rapportage-recent,
.site-main .table.table-rapportage-recent {
  table-layout: auto;
}
.dj-page-content .table.table-rapportage-recent th:not(:last-child),
.dj-page-content .table.table-rapportage-recent td:not(:last-child),
.site-main .table.table-rapportage-recent th:not(:last-child),
.site-main .table.table-rapportage-recent td:not(:last-child) {
  text-align: left !important;
  white-space: normal !important;
}
.dj-page-content .table.table-rapportage-recent thead th:nth-child(4),
.dj-page-content .table.table-rapportage-recent thead th:nth-child(5),
.dj-page-content .table.table-rapportage-recent td:nth-child(4),
.dj-page-content .table.table-rapportage-recent td:nth-child(5),
.site-main .table.table-rapportage-recent thead th:nth-child(4),
.site-main .table.table-rapportage-recent thead th:nth-child(5),
.site-main .table.table-rapportage-recent td:nth-child(4),
.site-main .table.table-rapportage-recent td:nth-child(5) {
  text-align: left !important;
  white-space: normal !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.dj-page-content .table.table-rapportage-recent th:last-child,
.dj-page-content .table.table-rapportage-recent td:last-child,
.site-main .table.table-rapportage-recent th:last-child,
.site-main .table.table-rapportage-recent td:last-child {
  text-align: right !important;
  white-space: nowrap !important;
}

.dj-page-content .table.table-synthese-cercle,
.site-main .table.table-synthese-cercle {
  table-layout: auto;
}
.dj-page-content .table.table-synthese-cercle th:nth-child(1),
.dj-page-content .table.table-synthese-cercle td:nth-child(1),
.dj-page-content .table.table-synthese-cercle th:nth-child(4),
.dj-page-content .table.table-synthese-cercle td:nth-child(4),
.dj-page-content .table.table-synthese-cercle th:nth-child(5),
.dj-page-content .table.table-synthese-cercle td:nth-child(5),
.site-main .table.table-synthese-cercle th:nth-child(1),
.site-main .table.table-synthese-cercle td:nth-child(1),
.site-main .table.table-synthese-cercle th:nth-child(4),
.site-main .table.table-synthese-cercle td:nth-child(4),
.site-main .table.table-synthese-cercle th:nth-child(5),
.site-main .table.table-synthese-cercle td:nth-child(5) {
  text-align: left !important;
  white-space: normal !important;
}
.dj-page-content .table.table-synthese-cercle thead th:nth-child(5),
.dj-page-content .table.table-synthese-cercle th:nth-child(5),
.dj-page-content .table.table-synthese-cercle td:nth-child(5),
.site-main .table.table-synthese-cercle thead th:nth-child(5),
.site-main .table.table-synthese-cercle th:nth-child(5),
.site-main .table.table-synthese-cercle td:nth-child(5) {
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal !important;
}
.dj-page-content .table.table-synthese-cercle th:nth-child(2),
.dj-page-content .table.table-synthese-cercle td:nth-child(2),
.dj-page-content .table.table-synthese-cercle th:nth-child(3),
.dj-page-content .table.table-synthese-cercle td:nth-child(3),
.site-main .table.table-synthese-cercle th:nth-child(2),
.site-main .table.table-synthese-cercle td:nth-child(2),
.site-main .table.table-synthese-cercle th:nth-child(3),
.site-main .table.table-synthese-cercle td:nth-child(3) {
  text-align: right !important;
  white-space: nowrap !important;
}

/* Tableau Détail par secteur (financement) — Secteur à gauche, chiffres à droite, Niveau centré */
.dj-page-content .table.table-detail-financement th:first-child,
.dj-page-content .table.table-detail-financement td:first-child,
.site-main .table.table-detail-financement th:first-child,
.site-main .table.table-detail-financement td:first-child {
  text-align: left !important;
}
.dj-page-content .table.table-detail-financement th:nth-child(2),
.dj-page-content .table.table-detail-financement td:nth-child(2),
.dj-page-content .table.table-detail-financement th:nth-child(3),
.dj-page-content .table.table-detail-financement td:nth-child(3),
.dj-page-content .table.table-detail-financement th:nth-child(4),
.dj-page-content .table.table-detail-financement td:nth-child(4),
.dj-page-content .table.table-detail-financement th:nth-child(5),
.dj-page-content .table.table-detail-financement td:nth-child(5),
.site-main .table.table-detail-financement th:nth-child(2),
.site-main .table.table-detail-financement td:nth-child(2),
.site-main .table.table-detail-financement th:nth-child(3),
.site-main .table.table-detail-financement td:nth-child(3),
.site-main .table.table-detail-financement th:nth-child(4),
.site-main .table.table-detail-financement td:nth-child(4),
.site-main .table.table-detail-financement th:nth-child(5),
.site-main .table.table-detail-financement td:nth-child(5) {
  text-align: right !important;
  white-space: nowrap !important;
}
.dj-page-content .table.table-detail-financement th:nth-child(6),
.dj-page-content .table.table-detail-financement td:nth-child(6),
.site-main .table.table-detail-financement th:nth-child(6),
.site-main .table.table-detail-financement td:nth-child(6) {
  text-align: center !important;
  white-space: nowrap !important;
}

/* Détails besoins par activité — colonnes sans chevauchement */
.dj-page-content .table.table-details-besoins,
.site-main .table.table-details-besoins {
  table-layout: fixed;
}
.dj-page-content .table.table-details-besoins th:nth-child(1),
.dj-page-content .table.table-details-besoins td:nth-child(1),
.dj-page-content .table.table-details-besoins th:nth-child(2),
.dj-page-content .table.table-details-besoins td:nth-child(2),
.site-main .table.table-details-besoins th:nth-child(1),
.site-main .table.table-details-besoins td:nth-child(1),
.site-main .table.table-details-besoins th:nth-child(2),
.site-main .table.table-details-besoins td:nth-child(2) {
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal !important;
  text-align: left !important;
}
.dj-page-content .table.table-details-besoins th:nth-child(3),
.dj-page-content .table.table-details-besoins td:nth-child(3),
.dj-page-content .table.table-details-besoins th:nth-child(4),
.dj-page-content .table.table-details-besoins td:nth-child(4),
.dj-page-content .table.table-details-besoins th:nth-child(5),
.dj-page-content .table.table-details-besoins td:nth-child(5),
.dj-page-content .table.table-details-besoins th:nth-child(6),
.dj-page-content .table.table-details-besoins td:nth-child(6),
.site-main .table.table-details-besoins th:nth-child(3),
.site-main .table.table-details-besoins td:nth-child(3),
.site-main .table.table-details-besoins th:nth-child(4),
.site-main .table.table-details-besoins td:nth-child(4),
.site-main .table.table-details-besoins th:nth-child(5),
.site-main .table.table-details-besoins td:nth-child(5),
.site-main .table.table-details-besoins th:nth-child(6),
.site-main .table.table-details-besoins td:nth-child(6) {
  text-align: right !important;
  white-space: nowrap !important;
}

/* Grille partenaires */
.dj-partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.dj-partner-card {
  background: #fff;
  border: 1px solid rgba(10, 54, 84, 0.12);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.dj-partner-card:hover {
  border-color: rgba(10, 54, 84, 0.25);
  box-shadow: 0 4px 12px rgba(10, 54, 84, 0.08);
}
.dj-partner-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-bottom: 1px solid rgba(10, 54, 84, 0.08);
}
.dj-partner-logo {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(10, 54, 84, 0.12);
  border-radius: 8px;
  overflow: hidden;
}
.dj-partner-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.dj-partner-logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: #0a3654;
  background: linear-gradient(180deg, #fff 0%, #f0f4f8 100%);
}
.dj-partner-card-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dj-partner-name {
  font-size: 1rem;
  color: #0a3654;
}
.dj-partner-type {
  font-size: 0.65rem;
  font-weight: 500;
  white-space: nowrap;
}
.dj-partner-card-body {
  padding: 12px;
}
.dj-partner-card-body p {
  color: #495057;
}
.dj-partner-card-body .bi {
  margin-right: 4px;
  opacity: 0.7;
}

.dj-sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.dj-site-card {
  background: #fff;
  border: 1px solid rgba(10, 54, 84, 0.12);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.dj-site-card:hover {
  border-color: rgba(10, 54, 84, 0.25);
  box-shadow: 0 4px 12px rgba(10, 54, 84, 0.08);
}
.dj-site-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-bottom: 1px solid rgba(10, 54, 84, 0.08);
}
.dj-site-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a3654;
  color: #fff;
  border-radius: 8px;
  font-size: 1.1rem;
}
.dj-site-card-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dj-site-name {
  font-size: 1rem;
  font-weight: 600;
  color: #0a3654;
  text-decoration: none;
}
.dj-site-name:hover {
  text-decoration: underline;
}
.dj-site-cercle {
  font-size: 0.65rem;
  font-weight: 500;
  align-self: flex-start;
}
.dj-site-card-body {
  padding: 12px;
}
.dj-site-card-body .bi {
  margin-right: 4px;
  opacity: 0.7;
}

.dj-rapportage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.dj-rapportage-card {
  background: #fff;
  border: 1px solid rgba(10, 54, 84, 0.12);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.dj-rapportage-card:hover {
  border-color: rgba(10, 54, 84, 0.25);
  box-shadow: 0 4px 12px rgba(10, 54, 84, 0.08);
}
.dj-rapportage-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  background: #f8f9fa;
  border-bottom: 1px solid rgba(10, 54, 84, 0.08);
}
.dj-rapportage-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0a3654;
  background: rgba(10, 54, 84, 0.08);
  padding: 4px 8px;
  border-radius: 6px;
}
.dj-rapportage-acteur {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0a3654;
}
.dj-rapportage-card-body {
  padding: 12px;
}
.dj-rapportage-card-body .bi {
  margin-right: 4px;
  opacity: 0.7;
}
.dj-rapportage-valeur {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0a3654;
}

.dj-page-with-sidebar .dj-page-main {
  padding: 4px 0;
}
.dj-page-content .page-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}
.dj-page-content .page-header h1 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
}
.dj-page-content .page-header .lead {
  font-size: 0.95rem;
  color: #64748b;
  margin-top: 6px;
}

.dj-page-content .section-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  padding: 20px;
  margin-bottom: 20px;
}
.dj-page-content .section-card:hover {
  box-shadow: 0 4px 16px rgba(10, 54, 84, 0.08);
}
.dj-page-content .section-card-header {
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.dj-page-content .section-card-body {
  padding: 0;
}

.atg-kpi-row .kpi-card,
.dj-page-content .atg-kpi-row .kpi-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s, transform 0.2s;
}
.atg-kpi-row .kpi-card:hover,
.dj-page-content .atg-kpi-row .kpi-card:hover {
  box-shadow: 0 4px 12px rgba(10, 54, 84, 0.1);
  transform: translateY(-1px);
}
.atg-kpi-row .kpi-value,
.dj-page-content .atg-kpi-row .kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dj-page-content .table {
  font-size: 0.9rem;
}
.dj-page-content .table thead th {
  font-weight: 700;
  color: #0a3654;
  padding: 14px 16px;
  border-bottom: 2px solid #0a3654;
}
.dj-page-content .table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
}
.dj-page-content .table tbody tr:hover {
  background: #f8fafc;
}
.dj-page-content .table.table-striped tbody tr:nth-of-type(odd) {
  background: #fafbfc;
}
.dj-page-content .table.table-striped tbody tr:nth-of-type(odd):hover {
  background: #f0f7fc;
}

.dj-page-content .section-card-body .border-top,
.dj-page-content .p-3.border-top {
  background: #f8fafc;
  padding: 14px 20px !important;
  font-size: 0.8rem;
  color: #64748b;
}

.dj-page-content .list-group-item {
  padding: 16px 20px;
  border-color: #e2e8f0;
  transition: background 0.2s;
}
.dj-page-content .list-group-item:hover {
  background: #f8fafc;
}
.dj-page-content .list-group-item:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.dj-page-content .section-card .row.align-items-center .col-lg-5 p {
  padding: 16px;
  background: #f8fafc;
  border-radius: 10px;
  border-left: 4px solid #0a3654;
  line-height: 1.6;
}

.dj-page-content .alert {
  border-radius: 10px;
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.dj-page-content .alert-danger {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}
.dj-page-content .alert-warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.dj-page-content .section-card .table thead {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.site-main .page-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}
.site-main .page-header h1 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
}
.site-main .page-header .lead {
  font-size: 0.95rem;
  color: #64748b;
  margin-top: 6px;
}

.home-section {
  margin-bottom: 32px;
}
.home-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}
.home-arrivees {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.home-arrivees .stat {
  flex: 1;
  min-width: 140px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}
.home-arrivees .stat:hover {
  box-shadow: 0 4px 12px rgba(10, 54, 84, 0.08);
}
.home-arrivees .stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0a3654;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.home-arrivees .stat-label {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.glance-context {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.dj-page-content .border.rounded {
  border-radius: 12px !important;
  border-color: #e2e8f0 !important;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.dj-page-content .border.rounded:hover {
  box-shadow: 0 4px 12px rgba(10, 54, 84, 0.08);
  border-color: #cbd5e1 !important;
}

/* Page d'accueil — tout visible sans scroll, grille 4×2, pleine largeur */
body.page-home { overflow: hidden; height: 100vh; }
.page-home .dj-header-bar { max-width: none; }
.page-home .site-main {
  flex: 1;
  min-height: 0;
  max-height: calc(100vh - 100px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 8px 16px 8px;
  max-width: none;
  width: 100%;
  zoom: var(--dashboard-scale, 1);
}
@media (min-width: 768px) {
  .page-home .site-main { padding: 10px 24px 10px; }
}
.page-home .dj-dashboard {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  max-width: none;
  width: 100%;
}
.page-home .dj-alert-urgent {
  padding: 5px 12px;
  margin-bottom: 6px;
  font-size: 0.75rem;
  border-radius: 8px;
  flex-shrink: 0;
}
.page-home .dj-alert-urgent-compact .dj-alert-urgent-badge { padding: 2px 8px; font-size: 0.75rem; }
.page-home .dj-hero-strip {
  margin-bottom: 8px;
  flex-shrink: 0;
}
/* Hero compact : titre à gauche, KPIs à droite */
.page-home .dj-hero-strip-compact {
  margin-bottom: 6px;
  border-radius: 10px;
  flex-shrink: 0;
}
.page-home .dj-hero-strip-compact .dj-hero-strip-content {
  padding: 10px 20px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.page-home .dj-hero-strip-compact .dj-hero-title {
  font-size: 0.95rem;
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
  padding-right: 16px;
  border-right: 1px solid rgba(255,255,255,0.2);
}
.page-home .dj-hero-kpi-rows {
  flex: 1;
  min-width: 0;
}
.page-home .dj-hero-kpis-inline {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
}
.page-home .dj-hero-kpis-inline .dj-hero-kpi {
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 10px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  min-width: 58px;
}
.page-home .dj-hero-kpis-inline .dj-hero-kpi-val {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
}
.page-home .dj-hero-kpis-inline .dj-hero-kpi-lbl {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
  line-height: 1.2;
  text-align: center;
}
@media (max-width: 900px) {
  .page-home .dj-hero-strip-compact .dj-hero-title { display: none; }
  .page-home .dj-hero-kpis-inline { flex-wrap: wrap; justify-content: center; }
}

/* Bandeau dynamique terrain */
.dj-hero-strip-mini {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 16px;
  font-size: 0.8rem;
  background: #fff;
  border: 1px solid rgba(10,54,84,0.08);
  border-radius: var(--card-radius-sm);
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
}
.dj-strip-label { color: #64748b; font-weight: 500; }
.dj-strip-val { font-weight: 700; color: #0a3654; font-variant-numeric: tabular-nums; }
.dj-strip-sep { color: #e2e8f0; font-weight: 300; }

/* Stats denses (lignes label + valeur) */
.dj-stats-dense { gap: 2px; }
.dj-stat-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  padding: 2px 0;
}
.dj-stat-lbl { color: #64748b; }
.dj-stat-num { font-weight: 700; color: #0f172a; font-variant-numeric: tabular-nums; }
.dj-stat-alert { color: #b91c1c; }
.dj-stat-meta { font-weight: 500; color: #64748b; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mt-1 { margin-top: 4px; }
.dj-table-compact {
  width: 100%;
  font-size: 0.65rem;
  border-collapse: collapse;
}
.dj-table-compact th,
.dj-table-compact td {
  padding: 2px 6px;
  text-align: left;
  border-bottom: 1px solid rgba(10,54,84,0.08);
}
.dj-table-compact td:nth-child(2),
.dj-table-compact td:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; }
.dj-age-genre-table-wrap { overflow: hidden; }
.dj-pbs-region-list .dj-stat-line { padding: 1px 0; }
.dj-profil-list .dj-stat-line { padding: 1px 0; font-size: 0.65rem; }
.dj-profil-list .dj-stat-lbl { max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Widgets variés : bar-list, doublebar, kpi-cards, segment-bars, badge-list, profil-panels */
.dj-bar-list { display: flex; flex-direction: column; gap: 3px; font-size: 0.65rem; }
.dj-bar-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 60px 28px;
  align-items: center;
  gap: 6px;
}
.dj-bar-label { color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dj-bar-track {
  height: 6px;
  background: rgba(10,54,84,0.1);
  border-radius: 3px;
  overflow: hidden;
}
.dj-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0a3654, #0c4a6e);
  border-radius: 3px;
  min-width: 2px;
  transition: width 0.2s ease;
}
.dj-bar-val { font-weight: 700; font-variant-numeric: tabular-nums; color: #0f172a; text-align: right; font-size: 0.62rem; }

.dj-doublebar-list { display: flex; flex-direction: column; gap: 2px; font-size: 0.62rem; }
.dj-doublebar-row {
  display: grid;
  grid-template-columns: 32px 1fr 42px;
  align-items: center;
  gap: 6px;
}
.dj-doublebar-label { color: #475569; font-variant-numeric: tabular-nums; }
.dj-doublebar-group {
  display: flex;
  gap: 4px;
  align-items: center;
  min-height: 5px;
}
.dj-doublebar {
  height: 5px;
  border-radius: 2px;
  min-width: 2px;
}
.dj-doublebar-h { background: #0c4a6e; }
.dj-doublebar-f { background: #b45309; }
.dj-doublebar-vals { font-size: 0.58rem; color: #64748b; font-variant-numeric: tabular-nums; }

.dj-kpi-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.dj-kpi-card {
  padding: 6px 8px;
  border-radius: var(--card-radius-xs);
  background: rgba(10,54,84,0.05);
  border: 1px solid rgba(10,54,84,0.06);
  font-size: 0.6rem;
  text-align: center;
  transition: background var(--transition), border-color var(--transition);
}
.dj-kpi-card:hover {
  background: rgba(10,54,84,0.08);
  border-color: rgba(10,54,84,0.1);
}
.dj-kpi-card .dj-kpi-card-lbl { color: #64748b; display: block; font-size: 0.55rem; }
.dj-kpi-card .dj-kpi-card-val { font-weight: 700; font-variant-numeric: tabular-nums; color: #0f172a; display: block; }
.dj-kpi-card.dj-kpi-card-alert { background: rgba(185,28,28,0.08); }
.dj-kpi-card.dj-kpi-card-alert .dj-kpi-card-val { color: #b91c1c; }
.dj-kpi-card.dj-kpi-card-muted .dj-kpi-card-val { color: #64748b; font-weight: 600; }

.dj-segment-bars { display: flex; flex-direction: column; gap: 2px; font-size: 0.62rem; }
.dj-segment-bar-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px 22px;
  align-items: center;
  gap: 4px;
}
.dj-segment-bar-label { color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dj-segment-bar-track {
  height: 5px;
  background: rgba(185,28,28,0.12);
  border-radius: 2px;
  overflow: hidden;
}
.dj-segment-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #b91c1c, #dc2626);
  border-radius: 2px;
  min-width: 2px;
}
.dj-segment-bar-val { font-weight: 700; font-variant-numeric: tabular-nums; color: #b91c1c; font-size: 0.6rem; text-align: right; }

.dj-badge-list { display: flex; flex-wrap: wrap; gap: 3px 4px; align-content: flex-start; }
.dj-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(10,54,84,0.08);
  font-size: 0.58rem;
  color: #334155;
}
.dj-badge strong { margin-left: 2px; font-variant-numeric: tabular-nums; }

.dj-profil-panels { display: flex; flex-direction: column; gap: 4px; }
.dj-profil-panel { padding: 2px 0; border-bottom: 1px solid rgba(10,54,84,0.06); }
.dj-profil-panel:last-child { border-bottom: none; }
.dj-profil-panel-title { font-size: 0.6rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 2px; }
.dj-profil-panel-content { font-size: 0.62rem; }
.dj-profil-panel-content .dj-stat-line { padding: 1px 0; }
.dj-tags { display: flex; flex-wrap: wrap; gap: 2px 4px; }
.dj-tag {
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(181,83,9,0.12);
  color: #92400e;
  font-size: 0.58rem;
}

.page-home .dj-dashboard-grid-4x2 .dj-bar-list,
.page-home .dj-dashboard-grid-4x2 .dj-doublebar-list,
.page-home .dj-dashboard-grid-4x2 .dj-segment-bars { flex: 1; min-height: 0; overflow: auto; }
.page-home .dj-dashboard-grid-4x2 .dj-bar-item { grid-template-columns: minmax(0, 1fr) 50px 24px; }
.page-home .dj-dashboard-grid-4x2 .dj-segment-bar-item { grid-template-columns: minmax(0, 1fr) 40px 20px; }

/* Financement sectoriel — tableau compact */
.dj-financement-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 6px;
  font-size: 0.7rem;
}
.dj-fkpi { font-variant-numeric: tabular-nums; }
.dj-fkpi-val { font-weight: 700; color: #0a3654; }
.dj-fkpi-alert .dj-fkpi-val { color: #b91c1c; }
.dj-sector-table-wrap { overflow: visible; }
.dj-sector-table { width: 100%; }
.dj-sector-table-inner {
  width: 100%;
  font-size: 0.62rem;
  border-collapse: collapse;
}
.dj-sector-table-inner th,
.dj-sector-table-inner td {
  padding: 2px 6px;
  text-align: left;
  border-bottom: 1px solid rgba(10,54,84,0.08);
}
.dj-sector-table-inner th {
  color: #64748b;
  font-weight: 600;
}
.dj-sector-table-inner td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.dj-sector-table-inner td:nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; }
.page-home .dj-dashboard-grid-4x2 .dj-sector-table-inner { font-size: 0.6rem; }
.page-home .dj-dashboard-grid-4x2 .dj-sector-table-inner th,
.page-home .dj-dashboard-grid-4x2 .dj-sector-table-inner td { padding: 1px 4px; }
@media (max-width: 900px) {
  .page-home .dj-hero-strip-compact .dj-hero-title { border-right: none; padding-right: 0; }
}

/* Grille 4×2 — 8 widgets, hauteur fixe */
.page-home .dj-dashboard-grid-4x2 {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  overflow: hidden;
}
.page-home .dj-dashboard-grid-4x2 .dj-widget {
  min-height: 0;
  overflow: hidden;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.page-home .dj-dashboard-grid-4x2 .dj-widget:hover {
  transform: translateY(-1px);
}
.page-home .dj-dashboard-grid-4x2 .dj-widget-stats,
.page-home .dj-dashboard-grid-4x2 .dj-region-chips,
.page-home .dj-dashboard-grid-4x2 .dj-origin-chips {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.page-home .dj-widget-residence .dj-region-chips,
.page-home .dj-widget-urgence .dj-widget-stats {
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
}
.page-home .dj-widget-residence .dj-region-chips { gap: 4px; }
.page-home .dj-dashboard-grid-4x2 .dj-region-chip { padding: 3px 6px; font-size: 0.6rem; }
.page-home .dj-dashboard-grid-4x2 .dj-region-chip .dj-region-name { font-size: 0.58rem; }
.page-home .dj-dashboard-grid-4x2 .dj-region-chip strong { font-size: 0.58rem; }
.page-home .dj-dashboard-grid-4x2 .dj-region-chip em { font-size: 0.55rem; }
.page-home .dj-dashboard-grid-4x2 .dj-origin-chips { gap: 4px; }
.page-home .dj-dashboard-grid-4x2 .dj-origin-chip { padding: 2px 5px; font-size: 0.58rem; }
.page-home .dj-dashboard-grid-4x2 .dj-origin-chip strong { font-size: 0.56rem; }
.page-home .dj-dashboard-grid-4x2 .dj-widget-title {
  font-size: 0.82rem;
  margin-bottom: 6px;
  flex-shrink: 0;
}
.page-home .dj-dashboard-grid-4x2 .dj-widget-actions {
  padding-top: 6px;
  margin-top: auto;
  flex-shrink: 0;
}

/* Contexte opérationnel — KPI compact 2×2 */
.dj-kpi-compact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.dj-kpi-compact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  background: rgba(10,54,84,0.05);
  border-radius: 6px;
  border: 1px solid rgba(10,54,84,0.08);
}
.dj-kpi-compact-val {
  font-size: 1rem;
  font-weight: 700;
  color: #0a3654;
  font-variant-numeric: tabular-nums;
}
.dj-kpi-compact-lbl {
  font-size: 0.65rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Chart compact dans la grille */
.page-home .dj-chart-compact {
  flex: 1;
  min-height: 80px;
  height: 100%;
}
.page-home .dj-dashboard-grid-4x2 .dj-widget-chart-full {
  min-height: 0;
}
.page-home .dj-dashboard-grid-4x2 .dj-widget-chart-wrap {
  flex: 1;
  min-height: 90px !important;
  height: auto !important;
}

/* Footer badge compact */
.page-home .dj-home-footer-badge {
  margin-top: 6px;
  padding: 6px 12px;
  flex-shrink: 0;
  border-radius: 8px;
}
.page-home .dj-home-footer-badge p {
  font-size: 0.72rem;
  line-height: 1.3;
}

@media (max-width: 1200px) {
  .page-home .dj-dashboard-grid-4x2 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }
}
@media (max-width: 768px) {
  .page-home .dj-dashboard-grid-4x2 {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .page-home .site-main { max-height: none; overflow: auto; }
  body.page-home { height: auto; overflow: auto; }
}

.page-home .dj-cards-grid {
  margin-bottom: 20px;
}
.page-home .dj-widget-5 .dj-widget-stat-row:first-of-type {
  grid-template-columns: repeat(3, 1fr);
}
.page-home .dj-section-chart {
  margin-top: 20px !important;
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: stretch;
}
.page-home .dj-chart-col {
  flex: 0 0 66.67%;
  min-width: 0;
}
.page-home .dj-section-chart .dj-widget-enreg-stats {
  flex: 0 0 calc(33.33% - 16px);
  min-width: 0;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
  border: 1px solid rgba(29,78,216,0.15);
  border-left: 4px solid #1d4ed8;
}
.page-home .dj-widget-stat-row-points {
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.page-home .dj-widget-stat-point .dj-widget-stat-value {
  font-size: 1rem;
}
.page-home .dj-widget-stat-point .dj-widget-stat-unit {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}
@media (max-width: 768px) {
  .page-home .dj-section-chart { flex-direction: column; }
  .page-home .dj-chart-col,
  .page-home .dj-section-chart .dj-widget-enreg-stats { flex: 1 1 auto; }
}
.page-home .dj-section-chart .dj-widget-chart-full {
  border: 1px solid rgba(10,54,84,0.1);
  background: #fff;
}
.page-home .dj-home-chart,
.page-home .dj-widget-chart-wrap {
  height: 280px !important;
  min-height: 280px !important;
}

/* Badge footer page d'accueil */
.dj-home-footer-badge {
  margin-top: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #0a3654 0%, #0d4a6f 50%, #0a3654 100%);
  border-radius: var(--card-radius);
  color: rgba(255,255,255,0.95);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.dj-home-footer-badge p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
}
.dj-home-footer-badge strong {
  color: #fff;
}

/* ── Améliorations visuelles dashboard ──────────────────────── */

/* Titres des widgets */
.page-home .dj-dashboard-grid-4x2 .dj-widget-title {
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(10,54,84,0.07);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.page-home .dj-dashboard-grid-4x2 .dj-widget-title i {
  opacity: 0.7;
  font-size: 0.85rem;
}

/* Barres de progression — valeur à l'intérieur */
.page-home .dj-progress-list { gap: 5px; }
.page-home .dj-progress-row {
  grid-template-columns: minmax(55px, 1.4fr) 1fr;
  gap: 0 8px;
  align-items: center;
}
.page-home .dj-progress-lbl {
  font-size: 0.7rem;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-home .dj-progress-track {
  height: 18px;
  background: rgba(10,54,84,0.07);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.page-home .dj-progress-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #0c4a6e, #0ea5e9);
  min-width: 32px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
}
.dj-bar-inline-val {
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
/* Couleurs spécifiques par widget */
.page-home .dj-widget-urgence .dj-progress-fill,
.page-home .dj-widget-pbs .dj-progress-fill { background: linear-gradient(90deg, #991b1b, #ef4444); }
.page-home .dj-widget-pbs .dj-compact-row .dj-progress-track { height: 14px; }

/* Barres âge/genre page home */
.page-home .dj-age-group { grid-template-columns: 32px 1fr; }
.page-home .dj-age-track { height: 12px; }
.page-home .dj-age-bar span { font-size: 0.58rem; }

/* Table âge/genre (pages secondaires) */
.page-home .dj-table-age { font-size: 0.75rem; }
.page-home .dj-table-age thead tr th {
  background: rgba(10,54,84,0.06);
  color: #334155;
  font-size: 0.65rem;
  padding: 4px 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.page-home .dj-table-age tbody td { padding: 4px 6px; font-size: 0.73rem; }
.page-home .dj-table-age tbody tr:hover td { background: rgba(10,54,84,0.03); }
.page-home .dj-table-age tbody td:nth-child(2) { color: #0c4a6e; font-weight: 600; }
.page-home .dj-table-age tbody td:nth-child(3) { color: #92400e; font-weight: 600; }
.page-home .dj-table-age tbody td:last-child { font-weight: 700; }

/* Table urgence */
.page-home .dj-table-urgence { font-size: 0.75rem; }
.page-home .dj-table-urgence td { padding: 5px 6px; font-size: 0.73rem; }
.page-home .dj-table-urgence td:last-child { font-size: 0.78rem; }

/* Tendance KPIs */
.page-home .dj-trend-kpis {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
}
.page-home .dj-trend-kpi {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(10,54,84,0.05);
  border: 1px solid rgba(10,54,84,0.1);
  border-radius: 8px;
  padding: 8px 6px;
  gap: 3px;
}
.page-home .dj-trend-kpi:first-child { border-color: rgba(29,78,216,0.2); background: rgba(29,78,216,0.05); }
.page-home .dj-trend-kpi:first-child .dj-trend-kpi-val { color: #1d4ed8; }
.page-home .dj-trend-kpi:last-child { border-color: rgba(4,120,87,0.2); background: rgba(4,120,87,0.05); }
.page-home .dj-trend-kpi:last-child .dj-trend-kpi-val { color: #047857; }
.page-home .dj-trend-kpi-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0a3654;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.page-home .dj-trend-kpi-lbl {
  font-size: 0.6rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Chips origine — plus colorées */
.page-home .dj-origin-chip {
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  background: linear-gradient(135deg, rgba(10,54,84,0.1), rgba(10,54,84,0.06));
  border: 1px solid rgba(10,54,84,0.14);
  font-weight: 500;
}
.page-home .dj-origin-chip strong {
  font-weight: 700;
  font-size: 0.72rem;
}

/* Tags ethnies */
.page-home .dj-tag {
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 500;
}

/* Compact list PBS */
.page-home .dj-compact-row {
  grid-template-columns: minmax(50px, 1.2fr) 1fr;
  font-size: 0.72rem;
  gap: 4px 8px;
}
.page-home .dj-compact-lbl { color: #475569; font-size: 0.7rem; }
.page-home .dj-compact-row .dj-progress-track { height: 14px; }
.page-home .dj-compact-row .dj-progress-fill { min-width: 28px; }

/* Boutons actions */
.page-home .dj-dashboard-grid-4x2 .dj-widget-actions { border-top: 1px solid rgba(10,54,84,0.06); margin-top: 6px; padding-top: 6px; }
.page-home .dj-dashboard-grid-4x2 .dj-widget-btn {
  padding: 4px 10px;
  font-size: 0.68rem;
  border-radius: 6px;
  font-weight: 600;
}

/* Footer badge compact */
.page-home .dj-home-footer-badge {
  margin-top: 6px;
  padding: 6px 16px;
  border-radius: 6px;
  flex-shrink: 0;
}
.page-home .dj-home-footer-badge p { font-size: 0.72rem; }

/* Stat meta */
.page-home .dj-widget-stat-meta {
  font-size: 0.7rem;
  color: #64748b;
  flex-shrink: 0;
}

/* Navigation responsive globale — hamburger <= 1024px */
@media (max-width: 1024px) {
  .dj-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    color: #fff;
    width: 34px;
    height: 28px;
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: auto;
  }

  .dj-nav {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.28s ease;
  }
  .dj-nav.dj-nav-open { max-height: 320px; }

  .dj-nav-list {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    padding: 6px;
    flex-wrap: unset !important;
    justify-content: unset !important;
  }
  .dj-nav-list > li { display: contents; }
  .dj-nav-link {
    flex-direction: column;
    font-size: 0.6rem;
    padding: 5px 2px;
    gap: 2px;
    text-align: center;
    border-radius: 6px;
  }
  .dj-nav-link i { font-size: 1rem; }
  .dj-nav-link span { font-size: 0.58rem; }
}
