/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #eef2ff;
  --green: #10b981;
  --green-light: #d1fae5;
  --orange: #f59e0b;
  --orange-light: #fef3c7;
  --red: #ef4444;
  --red-light: #fee2e2;
  --purple: #8b5cf6;
  --purple-light: #ede9fe;
  --blue: #3b82f6;
  --blue-light: #dbeafe;
  --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;
  --sidebar-width: 250px;
  --topbar-height: 64px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
}

html, body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--gray-700);
  background: var(--gray-50);
  min-height: 100vh;
  display: flex;
}

/* ─── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  box-shadow: 4px 0 20px rgba(0,0,0,.15);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,.1);
  letter-spacing: .5px;
}
.sidebar-brand i { font-size: 1.4rem; color: #a5b4fc; }

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  border-radius: 8px;
  transition: all .2s;
  font-size: .9rem;
  font-weight: 500;
}
.nav-item i { font-size: 1rem; width: 18px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,.1); color: white; }
.nav-item.active { background: rgba(165,180,252,.2); color: #a5b4fc; font-weight: 600; }
.nav-item.active i { color: #a5b4fc; }

/* Sous-item de navigation (indenté sous Stagiaires) */
.nav-item.nav-sub {
  padding-left: 44px;
  font-size: .82rem;
  color: rgba(255,255,255,.5);
  margin-top: -2px;
  position: relative;
}
.nav-item.nav-sub::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-left: 1px solid rgba(255,255,255,.25);
  border-bottom: 1px solid rgba(255,255,255,.25);
  border-radius: 0 0 0 3px;
}
.nav-item.nav-sub i { font-size: .85rem; }
.nav-item.nav-sub:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.9); }
.nav-item.nav-sub.active { background: rgba(165,180,252,.15); color: #a5b4fc; }

.sidebar-footer {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.6);
  font-size: .85rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.sidebar-footer i { font-size: 1.4rem; }

/* ─── Main Content ─────────────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--topbar-height);
  background: white;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-800);
}

.badge-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 6px 12px;
  border-radius: 20px;
}
.badge-date i { color: var(--primary); }

.content-area {
  padding: 28px 32px;
  flex: 1;
}

/* ─── Stats Grid ───────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-card.blue .stat-icon { background: var(--blue-light); color: var(--blue); }
.stat-card.green .stat-icon { background: var(--green-light); color: var(--green); }
.stat-card.orange .stat-icon { background: var(--orange-light); color: var(--orange); }
.stat-card.purple .stat-icon { background: var(--purple-light); color: var(--purple); }

.stat-info { display: flex; flex-direction: column; gap: 4px; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--gray-900); line-height: 1; }
.stat-label { font-size: .8rem; color: var(--gray-500); font-weight: 500; }

/* ─── Dashboard Grid ───────────────────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ─── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h2, .card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-header h2 i, .card-header h3 i { color: var(--primary); }

.btn-link {
  font-size: .8rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn-link:hover { text-decoration: underline; }

/* ─── Formations List (dashboard) ─────────────────────────────────────────── */
.formations-list, .stagiaires-list, .checklist-preview {
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.formation-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}
.formation-item:last-child { border-bottom: none; }
.formation-info { flex: 1; }
.formation-info strong { display: block; font-size: .9rem; color: var(--gray-800); }
.formation-meta { font-size: .78rem; color: var(--gray-500); }
.formation-progress { flex: 1; display: flex; align-items: center; gap: 8px; }
.progress-text { font-size: .78rem; color: var(--gray-500); white-space: nowrap; }

/* ─── Progress Bar ─────────────────────────────────────────────────────────── */
.progress-bar {
  flex: 1; height: 6px;
  background: var(--gray-200);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar.sm { height: 4px; }
.progress-bar.lg { height: 10px; }
.progress-bar.xl { height: 14px; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  border-radius: 99px;
  transition: width .6s ease;
}
.progress-fill.complete { background: linear-gradient(90deg, var(--green), #059669); }

/* ─── Badges ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}
.badge-lg { padding: 6px 16px; font-size: .85rem; }
.badge-active { background: var(--green-light); color: #047857; }
.badge-complet { background: var(--orange-light); color: #92400e; }
.badge-upcoming { background: var(--blue-light); color: #1d4ed8; }
.badge-inscrit { background: var(--blue-light); color: #1d4ed8; }
.badge-actif { background: var(--green-light); color: #047857; }
.badge-certifié { background: var(--purple-light); color: #5b21b6; }
.badge-abandon { background: var(--red-light); color: #b91c1c; }

/* ─── Avatar ───────────────────────────────────────────────────────────────── */
.avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
}
.avatar.sm { width: 30px; height: 30px; font-size: .72rem; }

.profile-avatar-lg {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.stagiaire-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}
.stagiaire-item:last-child { border-bottom: none; }
.stagiaire-info { flex: 1; }
.stagiaire-info strong { display: block; font-size: .88rem; color: var(--gray-800); }
.stagiaire-info span { font-size: .78rem; color: var(--gray-500); }

/* ─── Quick Actions ────────────────────────────────────────────────────────── */
.quick-actions {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--gray-700);
  transition: all .2s;
  font-size: .82rem;
  font-weight: 600;
  text-align: center;
}
.quick-action-btn i { font-size: 1.3rem; color: var(--primary); }
.quick-action-btn:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

/* ─── Checklist preview ────────────────────────────────────────────────────── */
.checklist-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-info { flex: 1; }
.checklist-info strong { display: block; font-size: .85rem; }
.pct-badge {
  font-size: .8rem; font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px; border-radius: 20px;
}

/* ─── Page Actions ─────────────────────────────────────────────────────────── */
.page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}

/* ─── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all .2s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(79,70,229,.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,.4); }
.btn-outline {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-sm { padding: 6px 12px; font-size: .78rem; }
.btn-full { width: 100%; justify-content: center; }

/* ─── Cards Grid ───────────────────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* ─── Formation Card ───────────────────────────────────────────────────────── */
.formation-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .2s, box-shadow .2s;
}
.formation-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.formation-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.formation-code {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  letter-spacing: .5px;
}
.formation-card-header h3 { font-size: 1rem; color: var(--gray-800); font-weight: 700; }
.formation-desc { font-size: .82rem; color: var(--gray-500); line-height: 1.5; }

.formation-details { display: flex; flex-direction: column; gap: 6px; }
.detail-item { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--gray-600); }
.detail-item i { color: var(--gray-400); width: 14px; }

.formation-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}
.formation-actions { display: flex; gap: 6px; }

/* ─── Search ───────────────────────────────────────────────────────────────── */
.search-form { flex: 1; max-width: 360px; }
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.search-input-wrapper i {
  position: absolute;
  left: 12px;
  color: var(--gray-400);
}
.search-input-wrapper input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: .88rem;
  background: white;
  outline: none;
  transition: border-color .2s;
}
.search-input-wrapper input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }

/* ─── Table ────────────────────────────────────────────────────────────────── */
.table-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  overflow: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: .78rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .5px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  font-size: .85rem;
  color: var(--gray-700);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-50); }
.table-avatar { display: flex; align-items: center; gap: 10px; }
.table-actions { display: flex; gap: 6px; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--gray-100);
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--gray-600);
}

/* ─── Detail Page ──────────────────────────────────────────────────────────── */
.detail-page { display: flex; flex-direction: column; gap: 24px; }

.detail-header {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow);
}
.detail-header h2 { font-size: 1.4rem; color: var(--gray-900); margin: 8px 0; }
.detail-header p { color: var(--gray-500); font-size: .9rem; max-width: 600px; }

.profile-header {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow);
}
.profile-info { flex: 1; }
.profile-info h2 { font-size: 1.5rem; font-weight: 800; color: var(--gray-900); }
.profile-info p { color: var(--gray-500); margin: 4px 0 10px; }
.profile-actions { display: flex; gap: 10px; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.detail-grid.three-col { grid-template-columns: repeat(3, 1fr); }

.detail-list { padding: 16px 20px; display: flex; flex-direction: column; gap: 0; }
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: .88rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-row span { color: var(--gray-500); }
.detail-row strong { color: var(--gray-800); text-align: right; }

.empty-state { padding: 24px; text-align: center; color: var(--gray-400); font-style: italic; }

.checklist-progress-summary {
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.big-pct { font-size: 3rem; font-weight: 900; color: var(--primary); }
.checklist-progress-summary p { font-size: .85rem; color: var(--gray-500); }

/* ─── Form ─────────────────────────────────────────────────────────────────── */
.form-container { max-width: 860px; margin: 0 auto; }

.form-intro {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}
.form-intro i { font-size: 2rem; opacity: .85; margin-top: 4px; }
.form-intro h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.form-intro p { font-size: .88rem; opacity: .85; }

.form-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-section {
  padding: 28px;
  border-bottom: 1px solid var(--gray-100);
}
.form-section:last-of-type { border-bottom: none; }

.form-section-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
}
.form-section-title i { color: var(--primary); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.span-2 { grid-column: span 2; }

.form-group label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-600);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: .88rem;
  color: var(--gray-700);
  background: white;
  outline: none;
  transition: all .2s;
  font-family: inherit;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group select { cursor: pointer; }

.checkbox-group { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: .85rem;
  color: var(--gray-600);
  line-height: 1.5;
}
.checkbox-label input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.form-actions {
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

/* ─── Checklist Card ───────────────────────────────────────────────────────── */
.checklist-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.checklist-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.checklist-card-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--gray-100);
}
.checklist-card-header h3 { font-size: .95rem; font-weight: 700; color: var(--gray-800); }
.checklist-card-header span { font-size: .8rem; color: var(--gray-500); }

.checklist-card-body { padding: 16px 20px; flex: 1; }
.checklist-phases { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.phase-row { display: flex; align-items: center; gap: 10px; }
.phase-label { font-size: .78rem; color: var(--gray-600); width: 140px; flex-shrink: 0; }
.phase-count { font-size: .75rem; color: var(--gray-500); white-space: nowrap; }

.overall-progress { display: flex; align-items: center; gap: 10px; }
.overall-progress strong { font-size: .9rem; color: var(--primary); white-space: nowrap; }

.checklist-card > .btn-full { margin: 0; border-radius: 0; padding: 14px; }

/* ─── Checklist Page ───────────────────────────────────────────────────────── */
.checklist-page { display: flex; flex-direction: column; gap: 24px; }

.checklist-hero {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow);
}
.checklist-hero-info { flex: 1; }
.checklist-hero-info h2 { font-size: 1.4rem; font-weight: 800; color: var(--gray-900); }
.checklist-hero-info p { color: var(--gray-500); margin: 4px 0 12px; font-size: .88rem; }
.checklist-hero-info .overall-progress { gap: 14px; }
.checklist-hero-info .overall-progress strong { font-size: 1rem; color: var(--primary); }

.checklist-sections { display: flex; flex-direction: column; gap: 16px; }

.checklist-section {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.checklist-section-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.section-title-block { display: flex; align-items: center; gap: 14px; }
.section-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.section-icon.done { background: var(--green-light); color: var(--green); }
.section-title-block h3 { font-size: .95rem; font-weight: 700; color: var(--gray-800); }
.section-title-block span { font-size: .78rem; color: var(--gray-500); }
.section-progress { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.section-progress strong { font-size: .85rem; color: var(--primary); }

.checklist-items { padding: 8px 0; }
.checklist-item-form { display: block; }
.check-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--gray-100);
  transition: background .15s;
}
.check-item:last-child { border-bottom: none; }
.check-item:hover { background: var(--gray-50); }
.check-item.done { background: #f0fdf4; }
.check-item.done:hover { background: #dcfce7; }

.check-box {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 2px solid var(--gray-300);
  background: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
  color: var(--gray-400);
  font-size: .85rem;
}
.check-box.checked {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.check-box:hover { border-color: var(--primary); transform: scale(1.05); }

.check-label {
  flex: 1;
  font-size: .88rem;
  color: var(--gray-700);
}
.check-item.done .check-label {
  text-decoration: line-through;
  color: var(--gray-400);
}

.check-date {
  font-size: .75rem;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--green-light);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.check-pending {
  font-size: .72rem;
  color: var(--gray-400);
  font-style: italic;
}

/* ─── Rapports ─────────────────────────────────────────────────────────────── */
.rapports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.rapport-list { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.rapport-row { display: flex; align-items: center; gap: 12px; }
.rapport-bar {
  flex: 1; height: 8px;
  background: var(--gray-200);
  border-radius: 99px;
  overflow: hidden;
}
.rapport-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  border-radius: 99px;
  transition: width .8s ease;
  min-width: 4px;
}
.rapport-fill.full { background: linear-gradient(90deg, var(--green), #059669); }

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .detail-grid.three-col { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .rapports-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.span-2 { grid-column: span 1; }
  .cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 60px; }
  .sidebar-brand span,
  .nav-item span,
  .sidebar-footer span { display: none; }
  .sidebar-brand { padding: 20px; justify-content: center; }
  .nav-item { justify-content: center; padding: 12px; }
  .sidebar-footer { justify-content: center; }
  .content-area { padding: 16px; }
  .topbar { padding: 0 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-header { flex-direction: column; align-items: flex-start; }
  .checklist-hero { flex-direction: column; align-items: flex-start; }
}

/* ─── Animations ───────────────────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.content-area { animation: fadeIn .3s ease; }

/* ─── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ═══════════════════════════════════════════════════════════════════════════════
   MODULE FORMATEURS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── Grille des cartes formateurs ─────────────────────────────────────────── */
.formateurs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* ─── Carte Formateur (liste) ───────────────────────────────────────────────── */
.formateur-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .2s, box-shadow .2s;
}
.formateur-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.formateur-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.formateur-avatar {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 1.1rem;
  flex-shrink: 0;
}
.formateur-avatar.sm {
  width: 36px; height: 36px;
  border-radius: 9px;
  font-size: .85rem;
}
.formateur-identity { flex: 1; }
.formateur-identity h3 { font-size: 1rem; font-weight: 700; color: var(--gray-900); }
.formateur-contract {
  display: inline-block;
  font-size: .72rem; font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px; border-radius: 4px;
  margin-right: 6px; margin-top: 4px;
}

/* ─── Spécialités / Skills tags ─────────────────────────────────────────────── */
.formateur-specialites {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-skill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 600;
  color: #0369a1;
  white-space: nowrap;
}
.tag-skill.more {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--gray-500);
}

/* ─── Formation associée (carte formateur) ─────────────────────────────────── */
.formateur-formation {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--gray-600);
  padding: 8px 12px;
  background: var(--gray-50);
  border-radius: 8px;
}
.formateur-formation i { color: var(--primary); }

/* ─── Barre de progression (carte) ─────────────────────────────────────────── */
.formateur-progress { display: flex; flex-direction: column; gap: 4px; }
.prog-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .78rem;
  color: var(--gray-500);
}
.prog-label strong { font-size: .82rem; color: var(--primary); }
.prog-detail { font-size: .72rem; color: var(--gray-400); }

/* ─── Séance du jour (carte) ───────────────────────────────────────────────── */
.formateur-today {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--green);
  background: var(--green-light);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
}
.formateur-today i { flex-shrink: 0; }

/* ─── Actions carte formateur ───────────────────────────────────────────────── */
.formateur-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--gray-100);
}
.formateur-card-actions .btn { flex: 1; justify-content: center; }

/* ─── Profil formateur (page détail) ────────────────────────────────────────── */
.formateur-profile-header {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  box-shadow: var(--shadow);
}
.formateur-avatar-lg {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 900; font-size: 1.8rem;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(99,102,241,.3);
}
.formateur-profile-info { flex: 1; }
.formateur-profile-name {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.formateur-profile-name h2 { font-size: 1.6rem; font-weight: 800; color: var(--gray-900); }
.formateur-bio {
  font-size: .88rem;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 12px;
  max-width: 600px;
}

/* ─── Stats pédagogiques (fiche formateur) ──────────────────────────────────── */
.pedago-stats { padding: 16px 20px; display: flex; flex-direction: column; gap: 16px; }
.pedago-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.pedago-stat {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 8px;
  border-radius: 10px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  gap: 4px;
}
.pedago-stat.blue { background: var(--blue-light); border-color: #93c5fd; }
.pedago-stat.green { background: var(--green-light); border-color: #6ee7b7; }
.pedago-stat.orange { background: var(--orange-light); border-color: #fcd34d; }
.pedago-stat.purple { background: var(--purple-light); border-color: #c4b5fd; }
.pstat-val { font-size: 1.4rem; font-weight: 800; color: var(--gray-900); }
.pstat-lbl { font-size: .7rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.pedago-progress-block { display: flex; flex-direction: column; gap: 6px; }

/* ─── Séances prochaines (fiche formateur) ──────────────────────────────────── */
.seances-list { padding: 10px 20px; display: flex; flex-direction: column; gap: 0; }
.seance-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}
.seance-item:last-child { border-bottom: none; }
.seance-type-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.type-cours { background: var(--primary); }
.type-atelier { background: var(--orange); }
.type-evaluation { background: var(--green); }

.seance-info { flex: 1; }
.seance-info strong { display: block; font-size: .85rem; color: var(--gray-800); }
.seance-info span { font-size: .75rem; color: var(--gray-500); }

.badge-planning-realise { background: var(--green-light); color: #047857; }
.badge-planning-planifie { background: var(--blue-light); color: #1d4ed8; }

/* ─── Synthèse modules (fiche formateur) ────────────────────────────────────── */
.modules-synthese { padding: 8px 20px; display: flex; flex-direction: column; gap: 0; }
.module-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.module-row:last-child { border-bottom: none; }
.module-num {
  width: 32px; height: 32px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800;
  flex-shrink: 0;
}
.module-info { flex: 2; }
.module-info strong { display: block; font-size: .88rem; color: var(--gray-800); }
.module-info span { font-size: .75rem; color: var(--gray-500); }
.module-prog { flex: 1.5; }
.module-pct { font-size: .8rem; font-weight: 700; color: var(--gray-500); white-space: nowrap; min-width: 36px; text-align: right; }

/* ─── Mini formateur (planning / programme) ─────────────────────────────────── */
.formateur-mini {
  display: flex;
  align-items: center;
  gap: 12px;
}
.formateur-mini strong { display: block; font-size: .92rem; color: var(--gray-800); font-weight: 700; }
.formateur-mini span { font-size: .78rem; color: var(--gray-500); }

/* ═══════════════════════════════════════════════════════════════════════════════
   PLANNING HEBDOMADAIRE
   ═══════════════════════════════════════════════════════════════════════════════ */

.planning-page { display: flex; flex-direction: column; gap: 20px; }

/* ─── En-tête planning ──────────────────────────────────────────────────────── */
.planning-header {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.planning-header-left { display: flex; align-items: center; gap: 14px; }

.week-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: center;
}
.week-label {
  font-size: .9rem;
  font-weight: 700;
  color: var(--gray-700);
  white-space: nowrap;
  padding: 0 8px;
}

.planning-week-stats {
  display: flex;
  gap: 14px;
}
.week-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  min-width: 60px;
}
.week-stat span { font-size: 1.3rem; font-weight: 800; color: var(--gray-800); }
.week-stat small { font-size: .7rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: .3px; }
.week-stat.green span { color: var(--green); }
.week-stat.green { background: var(--green-light); border-color: #6ee7b7; }
.week-stat.orange span { color: var(--orange); }
.week-stat.orange { background: var(--orange-light); border-color: #fcd34d; }

/* ─── Grille calendrier ─────────────────────────────────────────────────────── */
.planning-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  align-items: start;
}

.planning-col {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 180px;
}
.planning-col.today {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(79,70,229,.15), var(--shadow);
}

.planning-col-header {
  padding: 12px 14px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.planning-col.today .planning-col-header {
  background: var(--primary-light);
  border-bottom-color: rgba(79,70,229,.2);
}
.day-name { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-500); }
.planning-col.today .day-name { color: var(--primary); }
.day-num {
  font-size: 1.4rem; font-weight: 900; color: var(--gray-800);
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.day-num.today { background: var(--primary); color: white; }
.day-month { font-size: .7rem; color: var(--gray-400); }

.planning-col-body {
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}

/* ─── Événement planning ────────────────────────────────────────────────────── */
.planning-event {
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 4px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform .15s;
  cursor: default;
}
.planning-event:hover { transform: translateY(-1px); }

.planning-event.type-cours { background: #eef2ff; border-left-color: var(--primary); }
.planning-event.type-atelier { background: #fef3c7; border-left-color: var(--orange); }
.planning-event.type-evaluation { background: var(--green-light); border-left-color: var(--green); }
.planning-event.statut-realise { opacity: .75; }

.event-time { font-size: .72rem; font-weight: 700; color: var(--gray-500); }
.event-title { font-size: .82rem; font-weight: 700; color: var(--gray-800); line-height: 1.3; }
.event-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}
.event-meta span { font-size: .7rem; color: var(--gray-500); display: flex; align-items: center; gap: 3px; }

.event-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.event-badge.type-cours { background: var(--primary-light); color: var(--primary); }
.event-badge.type-atelier { background: var(--orange-light); color: #92400e; }
.event-badge.type-evaluation { background: var(--green-light); color: #047857; }

.event-done {
  font-size: .7rem;
  color: var(--green);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
.event-notes {
  font-size: .7rem;
  color: var(--gray-500);
  font-style: italic;
  margin-top: 2px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  line-height: 1.4;
}
.planning-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 8px;
  color: var(--gray-300);
  font-size: .78rem;
}
.planning-empty i { font-size: 1.2rem; }

/* ─── Formulaire inline planning ────────────────────────────────────────────── */
.form-inline-planning {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 20px 22px;
  align-items: flex-end;
}
.form-inline-planning .form-group { min-width: 140px; }
.form-inline-planning .btn { align-self: flex-end; }

/* ═══════════════════════════════════════════════════════════════════════════════
   PROGRAMME PÉDAGOGIQUE
   ═══════════════════════════════════════════════════════════════════════════════ */

.programme-page { display: flex; flex-direction: column; gap: 20px; }

/* ─── En-tête programme ─────────────────────────────────────────────────────── */
.programme-header {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.programme-header-left { display: flex; align-items: center; gap: 14px; }

.programme-global-progress {
  flex: 1;
  max-width: 520px;
}
.prog-kpis {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
  margin-bottom: 6px;
}
.prog-kpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.prog-kpi span { font-size: 1.3rem; font-weight: 800; color: var(--gray-900); }
.prog-kpi small { font-size: .68rem; text-transform: uppercase; letter-spacing: .4px; color: var(--gray-400); }

/* ─── Carte Module ───────────────────────────────────────────────────────────── */
.module-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.module-card-header {
  padding: 18px 24px;
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}
.module-num-badge {
  min-width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: white;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(79,70,229,.25);
}
.module-title-block { flex: 1; }
.module-title-block h3 { font-size: 1.05rem; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.module-objectifs { font-size: .82rem; color: var(--gray-500); display: flex; align-items: flex-start; gap: 6px; line-height: 1.4; }
.module-objectifs i { color: var(--primary); margin-top: 2px; flex-shrink: 0; }

.module-header-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 200px;
}
.module-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--gray-500);
}
.module-stat i { color: var(--gray-400); }

/* ─── Tableau des séances ───────────────────────────────────────────────────── */
.seances-table-wrap { overflow-x: auto; }
.seances-table {
  width: 100%;
  border-collapse: collapse;
}
.seances-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .4px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.seances-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  font-size: .85rem;
  color: var(--gray-700);
  vertical-align: middle;
}
.seances-table tr:last-child td { border-bottom: none; }
.seances-table tr.seance-done td { background: #f0fdf4; }
.seances-table tr:hover td { background: var(--gray-50); }
.seances-table tr.seance-done:hover td { background: #dcfce7; }

.seance-num { color: var(--gray-400); font-weight: 700; font-size: .8rem; text-align: center; }
.center { text-align: center; }
.text-muted { color: var(--gray-400); font-style: italic; font-size: .78rem; }

/* ─── Badges évaluation ─────────────────────────────────────────────────────── */
.eval-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.eval-excellent { background: #dcfce7; color: #166534; }
.eval-très.bien, .eval-très-bien { background: #dbeafe; color: #1e40af; }
.eval-bien { background: var(--primary-light); color: var(--primary-dark); }
.eval-satisfaisant { background: var(--orange-light); color: #92400e; }
.eval-insuffisant { background: var(--red-light); color: #b91c1c; }

/* ─── Notes séance ──────────────────────────────────────────────────────────── */
.notes-cell { max-width: 200px; }
.seance-notes-text {
  font-size: .78rem;
  color: var(--gray-500);
  font-style: italic;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  line-height: 1.4;
}
.seance-notes-text i { color: var(--primary); margin-top: 2px; flex-shrink: 0; }

/* ─── Responsive formateurs ─────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .planning-grid { grid-template-columns: repeat(3, 1fr); }
  .pedago-stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .planning-grid { grid-template-columns: repeat(2, 1fr); }
  .formateurs-grid { grid-template-columns: 1fr; }
  .formateur-profile-header { flex-direction: column; align-items: flex-start; }
  .programme-header { flex-direction: column; align-items: flex-start; }
  .planning-header { flex-direction: column; align-items: flex-start; }
  .module-card-header { flex-direction: column; }
  .module-header-stats { align-items: flex-start; min-width: unset; }
  .prog-kpis { justify-content: flex-start; }
  .planning-week-stats { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .planning-grid { grid-template-columns: 1fr; }
  .form-inline-planning { flex-direction: column; }
  .formateur-card-actions { flex-wrap: wrap; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RÉFÉRENTIEL RNCP
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Séparateur + lien sidebar référentiel */
.nav-separator {
  height: 1px;
  background: rgba(255,255,255,.12);
  margin: 10px 16px;
}
.nav-referentiel {
  background: rgba(245,158,11,.08) !important;
  border-left: 3px solid var(--orange) !important;
  color: #fde68a !important;
  font-size: .8rem !important;
}
.nav-referentiel i { color: var(--orange) !important; }
.nav-referentiel:hover, .nav-referentiel.active {
  background: rgba(245,158,11,.18) !important;
}

/* ─── Page référentiel ──────────────────────────────────────────────────────── */
.referentiel-page { display: flex; flex-direction: column; gap: 24px; }

/* Héro */
.ref-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #4f46e5 60%, #7c3aed 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.ref-hero-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 260px;
}
.ref-hero-badge > i {
  font-size: 2.8rem;
  color: #fde68a;
  flex-shrink: 0;
}
.ref-code {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.ref-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.ref-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 240px;
}
.ref-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: rgba(255,255,255,.85);
}
.ref-meta-item i { color: #a5b4fc; width: 16px; }

/* KPIs */
.ref-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.ref-kpi-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid transparent;
}
.ref-kpi-card.blue  { border-color: var(--blue); }
.ref-kpi-card.green { border-color: var(--green); }
.ref-kpi-card.orange { border-color: var(--orange); }
.ref-kpi-card.purple { border-color: var(--purple); }
.ref-kpi-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.ref-kpi-card.blue   .ref-kpi-icon { background: var(--blue-light); color: var(--blue); }
.ref-kpi-card.green  .ref-kpi-icon { background: var(--green-light); color: var(--green); }
.ref-kpi-card.orange .ref-kpi-icon { background: var(--orange-light); color: var(--orange); }
.ref-kpi-card.purple .ref-kpi-icon { background: var(--purple-light); color: var(--purple); }
.ref-kpi-card > div { display: flex; flex-direction: column; gap: 2px; }
.ref-kpi-card strong { font-size: 1.6rem; font-weight: 800; color: var(--gray-800); }
.ref-kpi-card small  { font-size: .72rem; color: var(--gray-500); }

/* Grille principale */
.ref-main-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}
.ref-left, .ref-right { display: flex; flex-direction: column; gap: 20px; }

.ref-card { padding: 0; }
.ref-card .card-header { padding: 18px 20px 14px; border-bottom: 1px solid var(--gray-100); }
.ref-card .card-header h2 { font-size: 1rem; font-weight: 700; color: var(--gray-800); display: flex; align-items: center; gap: 8px; }
.ref-card .card-header h2 i { color: var(--primary); }
.ref-text {
  padding: 16px 20px;
  font-size: .875rem;
  line-height: 1.7;
  color: var(--gray-600);
}
.ref-list {
  list-style: none;
  padding: 12px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ref-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .82rem;
  color: var(--gray-600);
  line-height: 1.4;
}
.ref-list li i { margin-top: 2px; flex-shrink: 0; }
.ref-list.compact li { font-size: .78rem; gap: 6px; }
.text-green { color: var(--green) !important; }
.text-blue  { color: var(--blue) !important; }
.text-muted { color: var(--gray-400) !important; }

/* Modalités éval */
.ref-eval-box { padding: 16px 20px; display: flex; flex-direction: column; gap: 16px; }
.ref-eval-item { display: flex; align-items: flex-start; gap: 12px; }
.ref-eval-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 6px;
  font-size: .7rem; font-weight: 700; white-space: nowrap;
  flex-shrink: 0;
}
.ref-eval-badge.orange { background: var(--orange-light); color: #92400e; }
.ref-eval-badge.blue   { background: var(--blue-light); color: #1e40af; }
.ref-eval-badge.purple { background: var(--purple-light); color: #5b21b6; }
.ref-eval-item > div strong { font-size: .85rem; color: var(--gray-800); display: block; margin-bottom: 3px; }
.ref-eval-item > div p { font-size: .78rem; color: var(--gray-500); line-height: 1.4; }
.ref-eval-total {
  border-top: 1px solid var(--gray-100);
  padding-top: 12px;
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; color: var(--gray-700);
}
.ref-eval-total i { color: var(--primary); }

/* Formation info */
.ref-formation-info { padding: 0 20px 4px; }
.ref-formateur-mini {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--gray-100);
  margin-top: 8px;
}
.ref-formateur-mini > div { flex: 1; }
.ref-formateur-mini strong { display: block; font-size: .875rem; color: var(--gray-800); }
.ref-formateur-mini span  { font-size: .75rem; color: var(--gray-500); }

/* Progression globale */
.ref-prog-global { padding: 16px 20px; }

/* Barres par bloc */
.ref-bloc-bar { padding: 10px 20px; border-top: 1px solid var(--gray-50); }
.ref-bloc-bar:first-child { border-top: none; }
.ref-bloc-bar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; flex-wrap: wrap; gap: 8px; }
.ref-bloc-label { font-size: .78rem; color: var(--gray-600); max-width: 65%; }
.ref-bloc-label strong { color: var(--primary); margin-right: 6px; }

/* Tags */
.ref-tags { padding: 12px 20px; display: flex; flex-wrap: wrap; gap: 6px; }

/* ─── Section blocs compétences ─────────────────────────────────────────────── */
.ref-section-title {
  font-size: 1.2rem; font-weight: 800; color: var(--gray-800);
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-200);
}
.ref-section-title i { color: var(--primary); }
.ref-blocs-section { display: flex; flex-direction: column; gap: 20px; }
.ref-blocs-grid { display: flex; flex-direction: column; gap: 20px; }

.ref-bloc-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-top: 4px solid transparent;
}
.ref-bloc-blue   { border-top-color: var(--blue); }
.ref-bloc-green  { border-top-color: var(--green); }
.ref-bloc-orange { border-top-color: var(--orange); }

.ref-bloc-card-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  flex-wrap: wrap;
}
.ref-bloc-num {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 900; flex-shrink: 0;
  color: #fff;
}
.ref-bloc-blue   .ref-bloc-num { background: var(--blue); }
.ref-bloc-green  .ref-bloc-num { background: var(--green); }
.ref-bloc-orange .ref-bloc-num { background: var(--orange); }

.ref-bloc-card-title { flex: 1; min-width: 200px; }
.ref-bloc-card-title h3 { font-size: 1rem; font-weight: 700; color: var(--gray-800); margin-bottom: 6px; }
.ref-bloc-eval-info { display: flex; gap: 16px; flex-wrap: wrap; }
.ref-bloc-eval-info span { font-size: .75rem; color: var(--gray-500); display: flex; align-items: center; gap: 5px; }
.ref-bloc-eval-info i { color: var(--primary); }
.ref-bloc-progress { display: flex; align-items: center; gap: 8px; }

.ref-bloc-body {
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 24px;
}
.ref-competences h4, .ref-modalite h4, .ref-seances-preview h4 {
  font-size: .78rem; font-weight: 700; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.ref-competences h4 i { color: var(--green); }
.ref-modalite h4 i    { color: var(--orange); }
.ref-seances-preview h4 i { color: var(--primary); }

.ref-competences ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ref-competences li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: .82rem; color: var(--gray-600); line-height: 1.4;
}
.comp-bullet {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); flex-shrink: 0; margin-top: 5px;
}
.ref-modalite p { font-size: .82rem; color: var(--gray-600); line-height: 1.5; }

.ref-seances-list { display: flex; flex-direction: column; gap: 6px; }
.ref-seance-item {
  display: flex; align-items: center; gap: 8px;
  font-size: .8rem; color: var(--gray-600);
  padding: 5px 8px; border-radius: 6px;
  background: var(--gray-50);
  transition: background .15s;
}
.ref-seance-item.done { background: #f0fdf4; color: var(--gray-700); }
.ref-seance-item span:first-of-type { flex: 1; }
.seance-h { font-size: .72rem; color: var(--gray-400); white-space: nowrap; }
.ref-seances-more { padding: 4px 8px; }
.ref-seances-more .btn-link { font-size: .78rem; }
.btn-link { color: var(--primary); text-decoration: none; font-weight: 600; }
.btn-link:hover { text-decoration: underline; }
.btn-primary.btn-full { width: 100%; justify-content: center; }

/* ─── Responsive référentiel ─────────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .ref-main-grid { grid-template-columns: 1fr; }
  .ref-right { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (max-width: 1024px) {
  .ref-kpis { grid-template-columns: repeat(2, 1fr); }
  .ref-bloc-body { grid-template-columns: 1fr 1fr; }
  .ref-seances-preview { grid-column: span 2; }
}
@media (max-width: 768px) {
  .ref-hero { flex-direction: column; align-items: flex-start; }
  .ref-kpis { grid-template-columns: 1fr 1fr; }
  .ref-right { grid-template-columns: 1fr; }
  .ref-bloc-body { grid-template-columns: 1fr; }
  .ref-bloc-card-header { flex-direction: column; align-items: flex-start; }
  .ref-seances-preview { grid-column: span 1; }
}
@media (max-width: 480px) {
  .ref-kpis { grid-template-columns: 1fr; }
}

/* ─── Référentiel GCF sidebar link ─────────────────────────────────────────── */
.nav-referentiel-gcf {
  background: rgba(16,185,129,.08) !important;
  border-left: 3px solid var(--green) !important;
  color: #a7f3d0 !important;
  font-size: .8rem !important;
}
.nav-referentiel-gcf i { color: var(--green) !important; }
.nav-referentiel-gcf:hover, .nav-referentiel-gcf.active {
  background: rgba(16,185,129,.18) !important;
}

/* ─── GCF Hero override (dégradé vert/émeraude) ─────────────────────────────── */
.gcf-hero {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 40%, #047857 70%, #10b981 100%) !important;
}

/* ═══════════════════════════════════════════════════════════════
   RYTHME 4j CENTRE + 1j ENTREPRISE
   ═══════════════════════════════════════════════════════════════ */

/* Bandeau rythme */
.rythme-banner {
  display: flex;
  align-items: center;
  gap: 0;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}
.rythme-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  flex: 1;
}
.rythme-badge.centre {
  background: linear-gradient(135deg, var(--primary-light), #e0e7ff);
}
.rythme-badge.entreprise {
  background: linear-gradient(135deg, #f3e8ff, #ede9fe);
}
.rythme-badge i {
  font-size: 1.6rem;
  color: var(--primary);
}
.rythme-badge.entreprise i { color: #7c3aed; }
.rythme-badge span { font-size: .9rem; color: var(--gray-700); display: block; }
.rythme-badge small { font-size: .75rem; color: var(--gray-500); }
.rythme-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  font-size: 1.2rem;
  color: var(--gray-400);
  background: var(--gray-50);
  align-self: stretch;
}

/* Colonne vendredi entreprise */
.entreprise-col {
  background: linear-gradient(180deg, #f5f3ff 0%, #faf8ff 100%) !important;
  border: 2px solid #c4b5fd !important;
  border-radius: var(--radius) !important;
}
.entreprise-header {
  background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
  color: white !important;
}
.entreprise-header .day-name,
.entreprise-header .day-num,
.entreprise-header .day-month { color: white !important; }
.entreprise-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .65rem;
  font-weight: 700;
  background: rgba(255,255,255,.25);
  padding: 2px 6px;
  border-radius: 20px;
  margin-top: 4px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Header icône colonne */
.col-icon {
  font-size: .85rem;
  opacity: .7;
  margin-bottom: 2px;
}

/* Créneaux horaires (ancienne version — conservé pour compatibilité) */
.creneaux-labels {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 8px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
}
.creneau-label {
  font-size: .68rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 4px;
}
.creneau-label.matin { color: #0369a1; }
.creneau-label.aprem { color: #d97706; }

/* ── Conteneur créneaux matin / après-midi ───────────────────────────────── */
.creneaux-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

/* Bloc créneau (matin ou après-midi) */
.creneau-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100px;
}
.creneau-block + .creneau-block {
  border-top: 2px dashed var(--gray-200);
}

/* En-tête du créneau */
.creneau-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.creneau-header.matin {
  background: #e0f2fe;
  color: #0369a1;
  border-bottom: 1px solid #bae6fd;
}
.creneau-header.aprem {
  background: #fef3c7;
  color: #d97706;
  border-bottom: 1px solid #fde68a;
}
.creneau-header small {
  margin-left: auto;
  font-weight: 400;
  font-size: .68rem;
  opacity: .85;
}

/* Corps du créneau (événements) */
.creneau-events {
  flex: 1;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* État vide compact */
.planning-empty.compact {
  padding: 10px 6px;
  font-size: .72rem;
  opacity: .45;
}

/* ── Journée entreprise enrichie ─────────────────────────────────────────── */
.ent-checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  text-align: left;
}
.ent-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: #5b21b6;
  padding: 3px 0;
}
.ent-item i {
  width: 14px;
  text-align: center;
  color: #7c3aed;
  font-size: .75rem;
}
.ent-note {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(124,58,237,.1);
  border-radius: 6px;
  font-size: .78rem;
  color: #4c1d95;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

/* Event entreprise (grand) */
.planning-event-entreprise {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border-radius: var(--radius);
  border-left: 4px solid #7c3aed;
  margin-bottom: 8px;
}
.planning-event-entreprise.full {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 12px;
}
.planning-event-entreprise.compact {
  padding: 8px 10px;
  align-items: center;
}
.entreprise-icon {
  width: 36px;
  height: 36px;
  background: #7c3aed;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: .95rem;
  flex-shrink: 0;
}
.entreprise-icon.sm {
  width: 26px;
  height: 26px;
  font-size: .7rem;
}
.entreprise-content { flex: 1; }
.entreprise-content strong { font-size: .88rem; color: #4c1d95; }
.event-meta-ent { margin-top: 6px; }

/* Event vide entreprise */
.planning-entreprise-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 12px;
  color: #7c3aed;
  opacity: .7;
  text-align: center;
  font-size: .8rem;
}
.planning-entreprise-empty i { font-size: 1.8rem; }

/* Badge entreprise */
.event-badge.type-entreprise {
  background: #ede9fe;
  color: #7c3aed;
}

/* Ligne tableau entreprise */
.row-entreprise {
  background: #faf5ff !important;
}
.row-entreprise td { color: #6d28d9; }

/* Stat card purple */
.week-stat.purple span { color: #7c3aed; }
.week-stat.blue span { color: var(--primary); }

/* Planning global — grille plus dense */
.planning-grid .planning-event {
  font-size: .78rem;
}

@media (max-width: 900px) {
  .rythme-banner { flex-direction: column; }
  .rythme-sep { width: 100%; height: 32px; }
}
