/* =============================================
   OZIKA GROUPE – Gestion Chantiers
   Design System: Modern SaaS / Dark Sidebar
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sidebar-w: 260px;
  --sidebar-bg: #111827;
  --sidebar-hover: #1f2937;
  --sidebar-active: #1d4ed8;
  --sidebar-text: #9ca3af;
  --sidebar-text-active: #ffffff;
  --topbar-h: 64px;
  --gold: #d97706;
  --gold-light: #fbbf24;
  --gold-bg: #fffbeb;
  --blue: #1d4ed8;
  --blue-light: #3b82f6;
  --blue-bg: #eff6ff;
  --green: #059669;
  --green-bg: #ecfdf5;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --orange: #ea580c;
  --orange-bg: #fff7ed;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --font: 'Inter', sans-serif;
  --transition: 0.2s ease;
}

html, body { height: 100%; font-family: var(--font); background: var(--gray-50); color: var(--gray-800); font-size: 14px; line-height: 1.5; }

/* ── Layout ── */
#app { display: flex; height: 100vh; overflow: hidden; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--transition);
  z-index: 100;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #374151; border-radius: 2px; }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #1f2937;
}
.sidebar-logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; font-weight: 800; flex-shrink: 0;
}
.sidebar-logo-text { line-height: 1.2; }
.sidebar-logo-name { font-size: 14px; font-weight: 700; color: #fff; letter-spacing: .3px; }
.sidebar-logo-sub { font-size: 10px; color: var(--gold-light); font-weight: 500; text-transform: uppercase; letter-spacing: .8px; }

.sidebar-section { padding: 16px 12px 4px; }
.sidebar-section-label { font-size: 10px; font-weight: 600; color: #4b5563; text-transform: uppercase; letter-spacing: 1px; padding: 0 8px; margin-bottom: 4px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius);
  cursor: pointer; transition: all var(--transition);
  color: var(--sidebar-text); font-size: 13.5px; font-weight: 500;
  margin-bottom: 2px; text-decoration: none;
  position: relative;
}
.nav-item:hover { background: var(--sidebar-hover); color: #e5e7eb; }
.nav-item.active { background: var(--sidebar-active); color: #fff; box-shadow: 0 2px 8px rgba(29,78,216,.4); }
.nav-item i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-item .badge { margin-left: auto; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 20px; }
.nav-item .badge.orange { background: var(--orange); }
.nav-item .badge.gold { background: var(--gold); }

.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid #1f2937;
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: var(--radius);
  cursor: pointer; transition: background var(--transition);
}
.sidebar-user:hover { background: var(--sidebar-hover); }
.sidebar-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.sidebar-user-name { font-size: 13px; font-weight: 600; color: #e5e7eb; }
.sidebar-user-role { font-size: 11px; color: var(--sidebar-text); }

/* ── Main content area ── */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ── Topbar ── */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-title { font-size: 18px; font-weight: 700; color: var(--gray-900); }
.topbar-sub { font-size: 12px; color: var(--gray-500); margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.topbar-date {
  font-size: 13px; color: var(--gray-500);
  background: var(--gray-100);
  padding: 6px 12px; border-radius: var(--radius);
  font-weight: 500;
}

.btn-icon {
  width: 36px; height: 36px; border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  background: var(--white); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-500); transition: all var(--transition);
  position: relative;
}
.btn-icon:hover { background: var(--gray-50); color: var(--gray-700); border-color: var(--gray-300); }
.btn-icon .notif-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; background: var(--red); border-radius: 50%; border: 1.5px solid #fff; }

/* ── Content ── */
.content { flex: 1; overflow-y: auto; padding: 24px; }
.content::-webkit-scrollbar { width: 6px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }

/* ── Page header ── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header-left {}
.page-header-title { font-size: 22px; font-weight: 700; color: var(--gray-900); }
.page-header-sub { font-size: 13px; color: var(--gray-500); margin-top: 2px; }
.page-header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; transition: all var(--transition);
  text-decoration: none; font-family: var(--font);
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1e40af; box-shadow: 0 4px 12px rgba(29,78,216,.3); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #b45309; box-shadow: 0 4px 12px rgba(217,119,6,.3); }
.btn-secondary { background: var(--white); color: var(--gray-700); border: 1px solid var(--gray-300); }
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #047857; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 9px; font-size: 11px; border-radius: 6px; }

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--gray-900); }
.card-sub { font-size: 12px; color: var(--gray-500); margin-top: 1px; }
.card-body { padding: 20px; }

/* ── Stat cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.stat-card.blue::before { background: linear-gradient(90deg, var(--blue), var(--blue-light)); }
.stat-card.gold::before { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.stat-card.green::before { background: linear-gradient(90deg, var(--green), #34d399); }
.stat-card.red::before { background: linear-gradient(90deg, var(--red), #f87171); }
.stat-card.orange::before { background: linear-gradient(90deg, var(--orange), #fb923c); }
.stat-card.purple::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); }

.stat-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 14px;
}
.stat-icon.blue { background: var(--blue-bg); color: var(--blue); }
.stat-icon.gold { background: var(--gold-bg); color: var(--gold); }
.stat-icon.green { background: var(--green-bg); color: var(--green); }
.stat-icon.red { background: var(--red-bg); color: var(--red); }
.stat-icon.orange { background: var(--orange-bg); color: var(--orange); }
.stat-icon.purple { background: #f5f3ff; color: #7c3aed; }

.stat-value { font-size: 22px; font-weight: 800; color: var(--gray-900); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--gray-500); font-weight: 500; }
.stat-change { font-size: 11px; font-weight: 600; margin-top: 8px; display: flex; align-items: center; gap: 3px; }
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red); }

/* ── Grid layouts ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-3-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 10px 14px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-size: 11px; font-weight: 700; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .6px;
  text-align: left; white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--gray-100); transition: background var(--transition); }
tbody tr:hover { background: var(--gray-50); }
tbody tr:last-child { border-bottom: none; }
tbody td { padding: 12px 14px; font-size: 13px; color: var(--gray-700); }
.td-bold { font-weight: 600; color: var(--gray-900); }
.td-mono { font-family: 'Courier New', monospace; font-weight: 600; }

/* ── Badges / Status ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-gold { background: var(--gold-bg); color: #92400e; }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-purple { background: #f5f3ff; color: #7c3aed; }

/* ── Progress bars ── */
.progress-wrap { width: 100%; }
.progress-bar { width: 100%; height: 6px; background: var(--gray-100); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 10px; transition: width 0.6s ease; }
.progress-fill.blue { background: linear-gradient(90deg, var(--blue), var(--blue-light)); }
.progress-fill.green { background: linear-gradient(90deg, var(--green), #34d399); }
.progress-fill.gold { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.progress-fill.red { background: linear-gradient(90deg, var(--red), #f87171); }
.progress-fill.orange { background: linear-gradient(90deg, var(--orange), #fb923c); }
.progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--gray-500); margin-bottom: 4px; }

/* ── Forms ── */
.form-grid { display: grid; gap: 16px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--gray-700); }
.form-control {
  width: 100%; padding: 9px 12px; border-radius: var(--radius);
  border: 1px solid var(--gray-300); background: var(--white);
  font-size: 13px; color: var(--gray-800); font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.form-control::placeholder { color: var(--gray-400); }
select.form-control { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ── Search bar ── */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid var(--gray-300);
  border-radius: var(--radius); background: var(--white);
  font-size: 13px; color: var(--gray-500);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar:focus-within { border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.search-bar input { border: none; outline: none; font-size: 13px; color: var(--gray-800); flex: 1; background: transparent; font-family: var(--font); }
.search-bar input::placeholder { color: var(--gray-400); }

/* ── Filter bar ── */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; flex-wrap: wrap;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 24px;
  backdrop-filter: blur(2px);
  animation: fadeIn .15s ease;
}
.modal {
  background: var(--white); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 640px;
  max-height: 90vh; overflow-y: auto;
  animation: slideUp .2s ease;
}
.modal-lg { max-width: 880px; }
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 17px; font-weight: 700; color: var(--gray-900); }
.modal-close { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--gray-200); background: var(--white); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--gray-500); transition: all var(--transition); font-size: 14px; }
.modal-close:hover { background: var(--gray-100); color: var(--gray-800); }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-100); display: flex; justify-content: flex-end; gap: 8px; }

/* ── Alert strip ── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius);
  font-size: 13px; margin-bottom: 12px; border-left: 4px solid;
}
.alert-red { background: var(--red-bg); color: #991b1b; border-color: var(--red); }
.alert-orange { background: var(--orange-bg); color: #9a3412; border-color: var(--orange); }
.alert-green { background: var(--green-bg); color: #065f46; border-color: var(--green); }
.alert-blue { background: var(--blue-bg); color: #1e40af; border-color: var(--blue); }

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--gray-200); margin-bottom: 20px; }
.tab-btn {
  padding: 10px 18px; border-radius: var(--radius) var(--radius) 0 0;
  font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--gray-500); border: none; background: transparent;
  transition: all var(--transition); border-bottom: 2px solid transparent;
  margin-bottom: -2px; font-family: var(--font);
}
.tab-btn:hover { color: var(--gray-700); background: var(--gray-100); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); background: var(--blue-bg); }

/* ── Chantier card ── */
.chantier-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.chantier-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.chantier-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; gap: 8px; }
.chantier-card-name { font-size: 15px; font-weight: 700; color: var(--gray-900); line-height: 1.3; }
.chantier-card-client { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.chantier-card-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.chantier-info-item { font-size: 11.5px; }
.chantier-info-label { color: var(--gray-400); font-weight: 500; }
.chantier-info-value { color: var(--gray-700); font-weight: 600; margin-top: 1px; }
.chantier-card-footer { margin-top: 14px; border-top: 1px solid var(--gray-100); padding-top: 12px; }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--gray-200); }
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item::before { content: ''; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); border: 2px solid var(--white); box-shadow: 0 0 0 2px var(--blue); }
.timeline-item.green::before { background: var(--green); box-shadow: 0 0 0 2px var(--green); }
.timeline-item.gold::before { background: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.timeline-item.red::before { background: var(--red); box-shadow: 0 0 0 2px var(--red); }
.timeline-date { font-size: 11px; color: var(--gray-400); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.timeline-text { font-size: 13px; color: var(--gray-700); font-weight: 500; }

/* ── KPI mini ── */
.kpi-row { display: flex; gap: 12px; flex-wrap: wrap; }
.kpi-mini { flex: 1; min-width: 140px; padding: 14px; background: var(--gray-50); border-radius: var(--radius); border: 1px solid var(--gray-200); }
.kpi-mini-val { font-size: 18px; font-weight: 800; color: var(--gray-900); }
.kpi-mini-label { font-size: 11px; color: var(--gray-500); font-weight: 500; margin-top: 3px; }

/* ── Situation item ── */
.sit-lot {
  display: grid;
  grid-template-columns: 2fr repeat(5, 1fr) 80px;
  gap: 0; align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
}
.sit-lot:hover { background: var(--gray-50); }
.sit-lot-header { background: var(--gray-50); font-weight: 700; font-size: 11px; color: var(--gray-500); text-transform: uppercase; letter-spacing: .6px; }
.sit-lot-name { font-weight: 600; color: var(--gray-900); }
.sit-lot input[type="number"] { width: 100%; padding: 4px 8px; border: 1px solid var(--gray-300); border-radius: 6px; font-size: 12px; outline: none; text-align: right; }

/* ── Doc card ── */
.doc-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--gray-200);
  border-radius: var(--radius); background: var(--white);
  transition: all var(--transition); cursor: pointer;
}
.doc-card:hover { border-color: var(--blue-light); background: var(--blue-bg); box-shadow: var(--shadow-sm); }
.doc-icon { width: 38px; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.doc-icon.pdf { background: #fef2f2; color: var(--red); }
.doc-icon.img { background: var(--green-bg); color: var(--green); }
.doc-icon.doc { background: var(--blue-bg); color: var(--blue); }
.doc-icon.xls { background: var(--green-bg); color: #065f46; }
.doc-name { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.doc-meta { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* ── Upload zone ── */
.upload-zone {
  border: 2px dashed var(--gray-300); border-radius: var(--radius-lg);
  padding: 32px; text-align: center; cursor: pointer;
  transition: all var(--transition);
  background: var(--gray-50);
}
.upload-zone:hover { border-color: var(--blue-light); background: var(--blue-bg); }
.upload-zone i { font-size: 32px; color: var(--gray-400); margin-bottom: 10px; display: block; }
.upload-zone-text { font-size: 14px; font-weight: 600; color: var(--gray-600); }
.upload-zone-sub { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state i { font-size: 40px; color: var(--gray-300); margin-bottom: 12px; display: block; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--gray-500); margin-bottom: 6px; }
.empty-state p { font-size: 13px; color: var(--gray-400); }

/* ── Tooltip ── */
.tooltip { position: relative; }
.tooltip::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--gray-800); color: #fff; font-size: 11px; font-weight: 500; padding: 4px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity var(--transition); z-index: 200; }
.tooltip:hover::after { opacity: 1; }

/* ── Animations ── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }

.page-section { animation: slideUp .25s ease; }

/* ── Notification dot / alerts ── */
.alert-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; }

/* ── Number formatting ── */
.num-positive { color: var(--green); font-weight: 700; }
.num-negative { color: var(--red); font-weight: 700; }
.num-neutral { color: var(--gray-700); font-weight: 600; }

/* ── Charts ── */
.chart-wrap { position: relative; }

/* ── Divider ── */
.divider { height: 1px; background: var(--gray-100); margin: 20px 0; }

/* ── Responsive ── */
@media (max-width: 900px) {
  :root { --sidebar-w: 220px; }
  .grid-2, .grid-3, .grid-3-1 { grid-template-columns: 1fr; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sidebar { position: fixed; left: -100%; }
  .content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Scrollable table ── */
.scroll-table { max-height: 400px; overflow-y: auto; }
.scroll-table::-webkit-scrollbar { width: 4px; }
.scroll-table::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }

/* ── Tag list ── */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; background: var(--gray-100); color: var(--gray-600); margin: 2px; }

/* ── Step indicator ── */
.steps { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.step { display: flex; align-items: center; gap: 6px; }
.step-num { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--gray-300); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--gray-400); }
.step-num.active { border-color: var(--blue); color: var(--blue); background: var(--blue-bg); }
.step-num.done { border-color: var(--green); color: var(--white); background: var(--green); }
.step-label { font-size: 12px; color: var(--gray-500); font-weight: 500; }
.step-sep { flex: 1; height: 2px; background: var(--gray-200); border-radius: 1px; min-width: 20px; }
.step-sep.done { background: var(--green); }

/* ══════════════════════════════════════════════
   CHANTIER DETAIL PAGE – New styles only
   Appended safely, zero impact on existing CSS
   ══════════════════════════════════════════════ */

/* ── Breadcrumb ── */
.breadcrumb { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--gray-400); margin-bottom:16px; }
.breadcrumb a, .breadcrumb span { font-weight:500; cursor:pointer; transition:color var(--transition); }
.breadcrumb a:hover { color:var(--blue); }
.breadcrumb .sep { color:var(--gray-300); }
.breadcrumb .current { color:var(--gray-700); font-weight:600; }

/* ── Chantier Detail Hero Banner ── */
.cd-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #1d4ed8 100%);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(29,78,216,.25);
}
.cd-hero::before {
  content:'';
  position:absolute; top:-60px; right:-60px;
  width:220px; height:220px;
  border-radius:50%;
  background: radial-gradient(circle, rgba(251,191,36,.15) 0%, transparent 70%);
  pointer-events:none;
}
.cd-hero::after {
  content:'';
  position:absolute; bottom:-40px; left:200px;
  width:160px; height:160px;
  border-radius:50%;
  background: radial-gradient(circle, rgba(59,130,246,.12) 0%, transparent 70%);
  pointer-events:none;
}
.cd-hero-top { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
.cd-hero-title { font-size:22px; font-weight:800; color:#fff; line-height:1.2; margin-bottom:6px; }
.cd-hero-client { font-size:13px; color:rgba(255,255,255,.65); display:flex; align-items:center; gap:6px; }
.cd-hero-actions { display:flex; gap:8px; flex-wrap:wrap; flex-shrink:0; }
.cd-hero-actions .btn { font-size:12px; padding:7px 14px; }
.btn-hero-white { background:rgba(255,255,255,.12); color:#fff; border:1px solid rgba(255,255,255,.25); backdrop-filter:blur(4px); }
.btn-hero-white:hover { background:rgba(255,255,255,.2); border-color:rgba(255,255,255,.4); color:#fff; }
.btn-hero-gold { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color:#fff; border:none; }
.btn-hero-gold:hover { box-shadow: 0 4px 16px rgba(217,119,6,.5); transform:translateY(-1px); }

/* ── Hero meta row ── */
.cd-hero-meta { display:flex; gap:20px; flex-wrap:wrap; margin-bottom:20px; }
.cd-meta-item { display:flex; align-items:center; gap:7px; }
.cd-meta-icon { width:28px; height:28px; border-radius:6px; background:rgba(255,255,255,.1); display:flex; align-items:center; justify-content:center; font-size:11px; color:rgba(255,255,255,.7); flex-shrink:0; }
.cd-meta-label { font-size:10px; color:rgba(255,255,255,.45); font-weight:600; text-transform:uppercase; letter-spacing:.5px; line-height:1; }
.cd-meta-val { font-size:13px; color:#fff; font-weight:600; line-height:1.2; }

/* ── Hero KPI strip ── */
.cd-hero-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; padding-top:16px; border-top:1px solid rgba(255,255,255,.1); }
.cd-hero-kpi { padding:12px 14px; background:rgba(255,255,255,.07); border-radius:var(--radius); border:1px solid rgba(255,255,255,.1); }
.cd-hero-kpi-val { font-size:16px; font-weight:800; color:#fff; line-height:1; margin-bottom:4px; }
.cd-hero-kpi-label { font-size:10px; color:rgba(255,255,255,.5); font-weight:500; text-transform:uppercase; letter-spacing:.5px; }
.cd-hero-kpi.positive .cd-hero-kpi-val { color:#4ade80; }
.cd-hero-kpi.negative .cd-hero-kpi-val { color:#f87171; }
.cd-hero-kpi.gold .cd-hero-kpi-val { color:var(--gold-light); }

/* ── Progress in hero ── */
.cd-progress-wrap { margin-top:4px; }
.cd-progress-bar { width:100%; height:5px; background:rgba(255,255,255,.15); border-radius:10px; overflow:hidden; margin-top:6px; }
.cd-progress-fill { height:100%; border-radius:10px; background:linear-gradient(90deg,var(--gold),var(--gold-light)); }

/* ── Detail tabs (inside chantier detail) ── */
.cd-tabs {
  display:flex; gap:2px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  padding: 6px;
  margin-bottom: 24px;
  overflow-x:auto;
  flex-wrap:nowrap;
}
.cd-tabs::-webkit-scrollbar { height:3px; }
.cd-tabs::-webkit-scrollbar-thumb { background:var(--gray-200); }
.cd-tab {
  display:flex; align-items:center; gap:7px;
  padding:8px 16px; border-radius:var(--radius);
  font-size:12.5px; font-weight:600; cursor:pointer;
  color:var(--gray-500); border:none; background:transparent;
  transition:all var(--transition); white-space:nowrap;
  font-family:var(--font);
}
.cd-tab:hover { color:var(--gray-700); background:var(--gray-50); }
.cd-tab.active { background:var(--blue); color:#fff; box-shadow:0 2px 8px rgba(29,78,216,.3); }
.cd-tab i { font-size:12px; }
.cd-tab .ct-badge { background:rgba(255,255,255,.25); color:#fff; font-size:10px; font-weight:700; padding:1px 5px; border-radius:10px; }
.cd-tab:not(.active) .ct-badge { background:var(--gray-200); color:var(--gray-600); }

/* ── Tab content area ── */
.cd-tab-content { animation: slideUp .2s ease; }

/* ── Section title (inside tabs) ── */
.cd-section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; flex-wrap:wrap; gap:8px; }
.cd-section-title { font-size:16px; font-weight:700; color:var(--gray-900); }
.cd-section-sub { font-size:12px; color:var(--gray-500); margin-top:2px; }

/* ── KPI grid for detail ── */
.cd-kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:14px; margin-bottom:20px; }
.cd-kpi-card {
  background:var(--white); border:1px solid var(--gray-200);
  border-radius:var(--radius-lg); padding:16px;
  box-shadow:var(--shadow-sm); position:relative; overflow:hidden;
  transition:box-shadow var(--transition), transform var(--transition);
}
.cd-kpi-card:hover { box-shadow:var(--shadow-md); transform:translateY(-1px); }
.cd-kpi-card::after { content:''; position:absolute; bottom:0; left:0; right:0; height:3px; }
.cd-kpi-card.blue::after { background:linear-gradient(90deg,var(--blue),var(--blue-light)); }
.cd-kpi-card.green::after { background:linear-gradient(90deg,var(--green),#34d399); }
.cd-kpi-card.gold::after { background:linear-gradient(90deg,var(--gold),var(--gold-light)); }
.cd-kpi-card.red::after { background:linear-gradient(90deg,var(--red),#f87171); }
.cd-kpi-card.orange::after { background:linear-gradient(90deg,var(--orange),#fb923c); }
.cd-kpi-card.purple::after { background:linear-gradient(90deg,#7c3aed,#a78bfa); }
.cd-kpi-icon { width:36px; height:36px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:15px; margin-bottom:12px; }
.cd-kpi-icon.blue { background:var(--blue-bg); color:var(--blue); }
.cd-kpi-icon.green { background:var(--green-bg); color:var(--green); }
.cd-kpi-icon.gold { background:var(--gold-bg); color:var(--gold); }
.cd-kpi-icon.red { background:var(--red-bg); color:var(--red); }
.cd-kpi-icon.orange { background:var(--orange-bg); color:var(--orange); }
.cd-kpi-icon.purple { background:#f5f3ff; color:#7c3aed; }
.cd-kpi-val { font-size:19px; font-weight:800; color:var(--gray-900); line-height:1; margin-bottom:3px; }
.cd-kpi-label { font-size:11px; color:var(--gray-500); font-weight:500; }
.cd-kpi-delta { font-size:11px; font-weight:600; margin-top:6px; display:flex; align-items:center; gap:3px; }
.cd-kpi-delta.up { color:var(--green); }
.cd-kpi-delta.down { color:var(--red); }
.cd-kpi-delta.neutral { color:var(--gray-400); }

/* ── Activity feed ── */
.activity-feed { display:flex; flex-direction:column; gap:0; }
.activity-item {
  display:flex; align-items:flex-start; gap:12px;
  padding:12px 0; border-bottom:1px solid var(--gray-100);
}
.activity-item:last-child { border-bottom:none; }
.activity-dot {
  width:32px; height:32px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-size:13px; margin-top:1px;
}
.activity-dot.blue { background:var(--blue-bg); color:var(--blue); }
.activity-dot.green { background:var(--green-bg); color:var(--green); }
.activity-dot.gold { background:var(--gold-bg); color:var(--gold); }
.activity-dot.red { background:var(--red-bg); color:var(--red); }
.activity-dot.orange { background:var(--orange-bg); color:var(--orange); }
.activity-dot.gray { background:var(--gray-100); color:var(--gray-500); }
.activity-body { flex:1; min-width:0; }
.activity-text { font-size:13px; color:var(--gray-700); font-weight:500; line-height:1.4; }
.activity-text strong { color:var(--gray-900); }
.activity-time { font-size:11px; color:var(--gray-400); margin-top:2px; }
.activity-amount { font-size:13px; font-weight:700; font-family:monospace; flex-shrink:0; }

/* ── Lot row (budget detail tab) ── */
.lot-group-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 16px; background:var(--gray-50);
  border:1px solid var(--gray-200); border-radius:var(--radius);
  cursor:pointer; margin-bottom:2px; transition:background var(--transition);
  user-select:none;
}
.lot-group-header:hover { background:var(--gray-100); }
.lot-group-title { font-size:13px; font-weight:700; color:var(--gray-800); display:flex; align-items:center; gap:8px; }
.lot-group-chevron { transition:transform var(--transition); color:var(--gray-400); font-size:11px; }
.lot-group-chevron.open { transform:rotate(90deg); }
.lot-group-stats { display:flex; gap:16px; align-items:center; }
.lot-group-stat { text-align:right; }
.lot-group-stat-val { font-size:13px; font-weight:700; color:var(--gray-800); font-family:monospace; }
.lot-group-stat-label { font-size:10px; color:var(--gray-400); font-weight:500; }
.lot-group-body { margin-bottom:8px; border:1px solid var(--gray-200); border-radius:0 0 var(--radius) var(--radius); border-top:none; overflow:hidden; }
.lot-group-body.hidden { display:none; }

/* ── Situation workflow badges ── */
.workflow-steps { display:flex; align-items:center; gap:0; margin-bottom:20px; overflow-x:auto; padding-bottom:4px; }
.wf-step { display:flex; align-items:center; }
.wf-node {
  display:flex; align-items:center; gap:6px;
  padding:7px 14px; border-radius:20px;
  font-size:12px; font-weight:600; white-space:nowrap;
  border:2px solid var(--gray-200); color:var(--gray-400);
  background:var(--white);
}
.wf-node.done { border-color:var(--green); color:var(--green); background:var(--green-bg); }
.wf-node.active { border-color:var(--blue); color:var(--blue); background:var(--blue-bg); box-shadow:0 0 0 3px rgba(29,78,216,.1); }
.wf-node.pending { border-color:var(--gray-200); color:var(--gray-300); }
.wf-arrow { width:32px; height:2px; background:var(--gray-200); flex-shrink:0; }
.wf-arrow.done { background:var(--green); }

/* ── Journal chantier ── */
.journal-entry {
  display:flex; gap:16px; padding:16px 0;
  border-bottom:1px solid var(--gray-100);
}
.journal-entry:last-child { border-bottom:none; }
.journal-date-col { width:80px; flex-shrink:0; text-align:center; }
.journal-day { font-size:26px; font-weight:800; color:var(--gray-900); line-height:1; }
.journal-month { font-size:11px; color:var(--gray-400); font-weight:600; text-transform:uppercase; }
.journal-weekday { font-size:10px; color:var(--gray-300); margin-top:2px; }
.journal-divider { width:1px; background:var(--gray-200); flex-shrink:0; border-radius:1px; }
.journal-body { flex:1; min-width:0; }
.journal-header { display:flex; align-items:center; gap:8px; margin-bottom:8px; flex-wrap:wrap; }
.journal-meteo { display:flex; align-items:center; gap:5px; padding:3px 10px; background:var(--blue-bg); color:var(--blue); border-radius:20px; font-size:11px; font-weight:600; }
.journal-text { font-size:13px; color:var(--gray-700); line-height:1.6; margin-bottom:10px; }
.journal-tags { display:flex; gap:6px; flex-wrap:wrap; }
.journal-tag { display:flex; align-items:center; gap:4px; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:600; border:1px solid; }
.journal-tag.workers { background:#f0fdf4; color:#065f46; border-color:#bbf7d0; }
.journal-tag.delivery { background:var(--blue-bg); color:#1e40af; border-color:#bfdbfe; }
.journal-tag.issue { background:var(--red-bg); color:#991b1b; border-color:#fecaca; }
.journal-tag.progress { background:var(--gold-bg); color:#92400e; border-color:#fde68a; }
.journal-photos { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.journal-photo { width:72px; height:56px; border-radius:6px; background:var(--gray-100); display:flex; align-items:center; justify-content:center; color:var(--gray-400); font-size:18px; border:1px solid var(--gray-200); cursor:pointer; overflow:hidden; transition:all var(--transition); }
.journal-photo:hover { border-color:var(--blue-light); transform:scale(1.05); }
.journal-photo.add-photo { border-style:dashed; cursor:pointer; }

/* ── Team grid ── */
.team-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:14px; }
.team-card {
  background:var(--white); border:1px solid var(--gray-200);
  border-radius:var(--radius-lg); padding:16px;
  box-shadow:var(--shadow-sm); display:flex; align-items:center; gap:12px;
  transition:box-shadow var(--transition), transform var(--transition);
}
.team-card:hover { box-shadow:var(--shadow-md); transform:translateY(-1px); }
.team-avatar {
  width:44px; height:44px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-size:15px; font-weight:700; color:#fff;
}
.team-avatar.blue { background:linear-gradient(135deg,var(--blue),var(--blue-light)); }
.team-avatar.gold { background:linear-gradient(135deg,var(--gold),var(--gold-light)); }
.team-avatar.green { background:linear-gradient(135deg,var(--green),#34d399); }
.team-avatar.orange { background:linear-gradient(135deg,var(--orange),#fb923c); }
.team-avatar.purple { background:linear-gradient(135deg,#7c3aed,#a78bfa); }
.team-avatar.gray { background:linear-gradient(135deg,var(--gray-500),var(--gray-400)); }
.team-name { font-size:13px; font-weight:700; color:var(--gray-900); }
.team-role { font-size:11px; color:var(--gray-500); margin-top:1px; }
.team-company { font-size:11px; color:var(--gray-400); margin-top:2px; }
.team-contact { display:flex; gap:6px; margin-top:8px; }
.team-contact-btn { display:flex; align-items:center; gap:4px; padding:3px 8px; border-radius:6px; background:var(--gray-100); color:var(--gray-600); font-size:11px; font-weight:500; cursor:pointer; border:none; font-family:var(--font); transition:all var(--transition); }
.team-contact-btn:hover { background:var(--blue-bg); color:var(--blue); }

/* ── Supply tracker ── */
.supply-row {
  display:grid; grid-template-columns:2fr 1fr 1fr 1fr 100px 80px 90px;
  gap:0; align-items:center;
  padding:11px 14px; border-bottom:1px solid var(--gray-100); font-size:13px;
}
.supply-row:hover { background:var(--gray-50); }
.supply-row-header { background:var(--gray-50); font-size:11px; font-weight:700; color:var(--gray-500); text-transform:uppercase; letter-spacing:.6px; }
.supply-progress-bar { width:100%; height:5px; background:var(--gray-100); border-radius:10px; overflow:hidden; }
.supply-progress-fill { height:100%; border-radius:10px; }
.supply-progress-fill.green { background:var(--green); }
.supply-progress-fill.blue { background:var(--blue); }
.supply-progress-fill.gold { background:var(--gold); }
.supply-progress-fill.red { background:var(--red); }

/* ── Doc GED ── */
.ged-sidebar { width:200px; flex-shrink:0; }
.ged-folder { display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:var(--radius); cursor:pointer; transition:all var(--transition); color:var(--gray-600); font-size:13px; font-weight:500; }
.ged-folder:hover { background:var(--gray-100); }
.ged-folder.active { background:var(--blue-bg); color:var(--blue); font-weight:600; }
.ged-folder i { width:16px; text-align:center; }
.ged-folder .ged-count { margin-left:auto; font-size:10px; font-weight:700; background:var(--gray-200); color:var(--gray-600); padding:1px 6px; border-radius:10px; }
.ged-folder.active .ged-count { background:rgba(29,78,216,.15); color:var(--blue); }

/* ── Photo masonry ── */
.photo-grid { columns:4 200px; gap:8px; }
.photo-item { break-inside:avoid; margin-bottom:8px; border-radius:var(--radius); overflow:hidden; background:var(--gray-100); position:relative; cursor:pointer; }
.photo-item:hover .photo-overlay { opacity:1; }
.photo-placeholder { display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,var(--gray-100),var(--gray-200)); min-height:120px; font-size:28px; color:var(--gray-400); }
.photo-overlay { position:absolute; inset:0; background:rgba(0,0,0,.45); display:flex; align-items:center; justify-content:center; opacity:0; transition:opacity var(--transition); }
.photo-overlay i { color:#fff; font-size:20px; }
.photo-caption { font-size:11px; color:var(--gray-500); padding:6px 8px; background:#fff; border-top:1px solid var(--gray-100); }

/* ── Add journal entry form ── */
.journal-form { background:var(--gray-50); border:1px solid var(--gray-200); border-radius:var(--radius-lg); padding:20px; margin-bottom:20px; }
.journal-form-title { font-size:14px; font-weight:700; color:var(--gray-800); margin-bottom:16px; display:flex; align-items:center; gap:8px; }

/* ── Sticky table header ── */
.sticky-thead thead th { position:sticky; top:0; z-index:10; background:var(--gray-50); }

/* ── Two-panel layout ── */
.cd-panel-layout { display:flex; gap:20px; }
.cd-panel-main { flex:1; min-width:0; }
.cd-panel-side { width:320px; flex-shrink:0; }

/* ── Responsive overrides for detail page ── */
@media (max-width:1100px) { .cd-panel-layout { flex-direction:column; } .cd-panel-side { width:100%; } }
@media (max-width:900px) { .cd-hero-kpis { grid-template-columns:repeat(3,1fr); } .supply-row { grid-template-columns:2fr 1fr 1fr 80px; } .supply-row > *:nth-child(3), .supply-row > *:nth-child(5) { display:none; } }
@media (max-width:640px) { .cd-hero { padding:18px; } .cd-hero-title { font-size:17px; } .cd-hero-kpis { grid-template-columns:repeat(2,1fr); } .photo-grid { columns:2 120px; } }

/* ══════════════════════════════════════════════
   CHANTIER DETAIL — Classes complémentaires
   ══════════════════════════════════════════════ */

/* Breadcrumb */
.bc-item { color:var(--gray-500); font-weight:500; font-size:12px; cursor:pointer; transition:color var(--transition); }
.bc-item:hover { color:var(--blue); }
.bc-sep { color:var(--gray-300); font-size:10px; }
.bc-active { color:var(--gray-800); font-weight:700; }

/* KPI sub-label */
.cd-kpi-sub { font-size:11px; color:var(--gray-400); margin-top:2px; }

/* Activity feed */
.activity-item { display:flex; align-items:flex-start; gap:10px; padding:10px 16px; border-bottom:1px solid var(--gray-100); }
.activity-item:last-child { border-bottom:none; }
.activity-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; margin-top:4px; }
.activity-content { flex:1; min-width:0; }

/* Workflow connector */
.wf-connector { flex:1; height:2px; min-width:20px; background:var(--gray-200); margin:0 4px; position:relative; top:-10px; }
.wf-step { display:flex; flex-direction:column; align-items:center; flex:1; position:relative; }
.wf-node {
  width:32px; height:32px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:700; flex-shrink:0;
  transition:all var(--transition);
}

/* Journal entries (classes utilisées dans renderCDJournal) */
.journal-entry { display:flex; gap:0; padding:16px 0; border-bottom:1px solid var(--gray-100); }
.journal-entry:last-child { border-bottom:none; }
.je-date {
  width:64px; flex-shrink:0; text-align:center;
  display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
  padding-top:2px; padding-right:16px;
}
.je-content { flex:1; min-width:0; }
.je-header { margin-bottom:8px; }
.je-body { font-size:13px; color:var(--gray-700); }

/* Team cards (version colonne) */
.team-card { display:flex; flex-direction:column; border:1px solid var(--gray-200); border-radius:var(--radius-lg); overflow:hidden; background:#fff; box-shadow:var(--shadow-sm); transition:box-shadow var(--transition),transform var(--transition); }
.team-card:hover { box-shadow:var(--shadow-md); transform:translateY(-2px); }
.team-card-header { display:flex; align-items:center; justify-content:space-between; padding:14px 16px 10px; }
.team-card-body { padding:0 16px 14px; flex:1; }
.team-name { font-size:14px; font-weight:700; color:var(--gray-900); margin-bottom:2px; }
.team-role { font-size:12px; color:var(--blue); font-weight:600; margin-bottom:2px; }
.team-company { font-size:11px; color:var(--gray-400); }
.team-avatar { width:42px; height:42px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:800; }

/* GED folder active */
.ged-folder-active { background:var(--blue-bg) !important; color:var(--blue) !important; font-weight:600; }

/* Responsive detail page */
@media (max-width:1024px) {
  .cd-hero-kpis { grid-template-columns:repeat(4,1fr); }
  .team-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:768px) {
  .cd-hero-kpis { grid-template-columns:repeat(2,1fr); }
  .cd-tabs { gap:4px; }
  .cd-tab { font-size:11px; padding:7px 10px; }
  .team-grid { grid-template-columns:1fr; }
  .cd-panel-layout { flex-direction:column; }
  .ged-sidebar { width:100%; }
}

/* ══════════════════════════════════════════════
   AUTH — Page de connexion
   ══════════════════════════════════════════════ */
.login-overlay {
  position:fixed; inset:0; background:linear-gradient(135deg,#0f172a 0%,#1e3a5f 50%,#0f172a 100%);
  display:flex; align-items:center; justify-content:center; z-index:9999; min-height:100vh;
}
.login-card {
  background:#fff; border-radius:16px; padding:48px 44px; width:100%; max-width:420px;
  box-shadow:0 25px 50px rgba(0,0,0,.4); position:relative; overflow:hidden;
}
.login-card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:4px;
  background:linear-gradient(90deg,#d97706,#fbbf24,#d97706);
}
.login-logo { text-align:center; margin-bottom:32px; }
.login-logo-icon {
  width:64px; height:64px; border-radius:14px;
  background:linear-gradient(135deg,#1e3a5f,#2563eb);
  display:flex; align-items:center; justify-content:center;
  font-size:22px; font-weight:900; color:#fbbf24; margin:0 auto 12px;
  box-shadow:0 8px 20px rgba(29,78,216,.3);
}
.login-logo-name { font-size:22px; font-weight:800; color:#111827; }
.login-logo-sub { font-size:12px; color:#6b7280; margin-top:2px; }
.login-title { font-size:16px; font-weight:700; color:#374151; margin-bottom:6px; }
.login-subtitle { font-size:12px; color:#9ca3af; margin-bottom:28px; }
.login-input-group { margin-bottom:16px; }
.login-label { display:block; font-size:12px; font-weight:600; color:#374151; margin-bottom:6px; }
.login-input {
  width:100%; padding:11px 14px; border:1.5px solid #e5e7eb; border-radius:8px;
  font-size:14px; font-family:var(--font); color:#111827; background:#f9fafb;
  transition:border-color .2s, box-shadow .2s; box-sizing:border-box;
}
.login-input:focus { outline:none; border-color:#2563eb; background:#fff; box-shadow:0 0 0 3px rgba(37,99,235,.1); }
.login-input.error { border-color:#ef4444; background:#fff5f5; }
.login-error-msg {
  display:none; background:#fef2f2; border:1px solid #fecaca; border-radius:8px;
  padding:10px 14px; font-size:12px; color:#dc2626; font-weight:500; margin-bottom:16px;
  align-items:center; gap:8px;
}
.login-error-msg.show { display:flex; }
.login-btn {
  width:100%; padding:12px; background:linear-gradient(135deg,#1e3a5f,#2563eb);
  color:#fff; border:none; border-radius:8px; font-size:14px; font-weight:700;
  font-family:var(--font); cursor:pointer; transition:opacity .2s, transform .1s;
  display:flex; align-items:center; justify-content:center; gap:8px; margin-top:4px;
}
.login-btn:hover { opacity:.92; }
.login-btn:active { transform:scale(.98); }
.login-btn:disabled { opacity:.6; cursor:not-allowed; }
.login-footer { text-align:center; margin-top:24px; font-size:11px; color:#9ca3af; }
.login-footer strong { color:#d97706; }

/* ══════════════════════════════════════════════
   TOAST — Notifications
   ══════════════════════════════════════════════ */
#toast-container {
  position:fixed; bottom:24px; right:24px; z-index:10000;
  display:flex; flex-direction:column; gap:10px; pointer-events:none;
}
.toast {
  display:flex; align-items:center; gap:10px;
  padding:12px 16px; border-radius:10px; min-width:280px; max-width:380px;
  font-size:13px; font-weight:500; font-family:var(--font);
  box-shadow:0 8px 24px rgba(0,0,0,.15); pointer-events:all;
  animation:toastIn .3s ease; border-left:4px solid;
}
.toast.success { background:#f0fdf4; color:#065f46; border-color:#059669; }
.toast.error   { background:#fef2f2; color:#991b1b; border-color:#ef4444; }
.toast.warning { background:#fffbeb; color:#92400e; border-color:#d97706; }
.toast.info    { background:#eff6ff; color:#1e40af; border-color:#3b82f6; }
.toast-icon    { font-size:16px; flex-shrink:0; }
.toast-close   { margin-left:auto; cursor:pointer; opacity:.5; font-size:14px; background:none; border:none; color:inherit; }
@keyframes toastIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
@keyframes toastOut { to { opacity:0; transform:translateX(20px); } }

/* ══════════════════════════════════════════════
   BADGES RÔLES
   ══════════════════════════════════════════════ */
.role-badge {
  display:inline-flex; align-items:center; gap:4px;
  padding:3px 9px; border-radius:20px; font-size:10px; font-weight:700;
  text-transform:uppercase; letter-spacing:.04em;
}
.role-admin        { background:#fef3c7; color:#92400e; border:1px solid #fcd34d; }
.role-secretaire   { background:#dbeafe; color:#1e40af; border:1px solid #93c5fd; }
.role-responsable  { background:#dcfce7; color:#14532d; border:1px solid #86efac; }
.role-comptable    { background:#f3e8ff; color:#4c1d95; border:1px solid #c4b5fd; }

/* ══════════════════════════════════════════════
   BADGE EN ATTENTE / VALIDATION
   ══════════════════════════════════════════════ */
.badge-pending { background:#fef9c3; color:#854d0e; border:1px solid #fde047; }
.validation-banner {
  background:linear-gradient(135deg,#fffbeb,#fef3c7);
  border:1px solid #fcd34d; border-radius:10px;
  padding:12px 16px; display:flex; align-items:center; gap:10px;
  font-size:13px; color:#92400e; margin-bottom:16px;
}
.pending-dot {
  width:8px; height:8px; border-radius:50%; background:#d97706;
  animation:pulse 1.5s infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.4; } }

/* ══════════════════════════════════════════════
   MODAL UTILISATEUR + Gestion
   ══════════════════════════════════════════════ */
.user-card {
  display:flex; align-items:center; gap:12px;
  padding:14px 20px; border-bottom:1px solid #f3f4f6;
  transition:background .15s;
}
.user-card:hover { background:#f9fafb; }
.user-card:last-child { border-bottom:none; }
.user-avatar-lg {
  width:42px; height:42px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-size:14px; font-weight:800; color:#fff;
  background:linear-gradient(135deg,#1e3a5f,#2563eb);
}
.user-info { flex:1; min-width:0; }
.user-name { font-size:13px; font-weight:700; color:#111827; }
.user-meta { font-size:11px; color:#6b7280; margin-top:1px; }
.user-actions { display:flex; gap:6px; align-items:center; }

/* ══════════════════════════════════════════════
   SIDEBAR DÉCONNEXION
   ══════════════════════════════════════════════ */
.sidebar-logout {
  display:flex; align-items:center; gap:8px;
  padding:8px 12px; border-radius:8px; cursor:pointer;
  color:#9ca3af; font-size:12px; font-weight:500;
  transition:all .2s; margin-top:6px;
  border:1px solid transparent;
}
.sidebar-logout:hover { background:#fef2f2; color:#dc2626; border-color:#fecaca; }
.sidebar-logout i { font-size:13px; }

/* ══════════════════════════════════════════════
   ACCÈS REFUSÉ / CONFIDENTIAL
   ══════════════════════════════════════════════ */
.confidential-block {
  display:flex; align-items:center; gap:8px;
  background:#f9fafb; border:1px dashed #d1d5db; border-radius:8px;
  padding:8px 12px; font-size:12px; color:#9ca3af; font-style:italic;
}
.access-denied-card {
  background:#f9fafb; border:1px solid #e5e7eb; border-radius:12px;
  padding:40px; text-align:center;
}
.access-denied-card i { font-size:40px; color:#d1d5db; margin-bottom:12px; display:block; }
.access-denied-card p { color:#6b7280; font-size:14px; margin:0; }

/* ══════════════════════════════════════════════
   TOPBAR USER BADGE
   ══════════════════════════════════════════════ */
.topbar-user-info {
  display:flex; align-items:center; gap:8px;
  padding:6px 12px; background:#f8fafc; border-radius:8px;
  border:1px solid #e5e7eb; cursor:pointer; transition:all .2s;
}
.topbar-user-info:hover { background:#eff6ff; border-color:#bfdbfe; }
.topbar-user-avatar {
  width:30px; height:30px; border-radius:50%;
  background:linear-gradient(135deg,#1e3a5f,#2563eb);
  display:flex; align-items:center; justify-content:center;
  font-size:11px; font-weight:800; color:#fff;
}

/* ══════════════════════════════════════════════
   CONFIDENTIAL INLINE
   ══════════════════════════════════════════════ */
.confidential-inline {
  display:flex; align-items:center; gap:8px;
  color:#d1d5db; font-size:18px; margin:4px 0;
}

/* ══════════════════════════════════════════════
   BADGE PENDING (En attente de validation)
   ══════════════════════════════════════════════ */
.badge-pending {
  display:inline-flex; align-items:center; gap:5px;
  background:#fffbeb; color:#92400e; border:1px solid #fbbf24;
  border-radius:6px; padding:3px 10px; font-size:11px; font-weight:700;
}
.pending-dot {
  width:7px; height:7px; border-radius:50%; background:#d97706;
  animation:pulse 1.5s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:.5; transform:scale(.7); }
}
