/* ══════════════════════════════════════════════════════════════
   MINAC E-Services — Portail Citoyen v2.0
   Ministère des Arts et de la Culture · République du Cameroun
   Style : Mix dashboard moderne + identité gouvernementale
   ══════════════════════════════════════════════════════════════ */

/* ── 0. VARIABLES SPÉCIFIQUES E-SERVICES ── */
:root {
  --es-sidebar-w: 260px;
  --es-topbar-h: 60px;
  --es-radius: 10px;
  --es-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
  --es-shadow-hover: 0 4px 16px rgba(27,77,62,.1);
  --es-bg: #f4f6f8;
  --es-card: #fff;
  --es-border: #e8ecf0;
  --es-text: #1e293b;
  --es-text-muted: #64748b;
  --es-primary: #1B4D3E;
  --es-primary-light: #E8F2EE;
  --es-accent: #C8973A;
  --es-accent-light: #FDF6E8;
}

/* ── 1. LAYOUT PRINCIPAL (sidebar + contenu) ── */
.es-layout {
  min-height: 100vh;
  display: flex;
  background: var(--es-bg);
}

/* ── 2. SIDEBAR ── */
.es-sidebar {
  width: var(--es-sidebar-w);
  background: linear-gradient(180deg, #0c2e21 0%, var(--es-primary) 40%, #1a5e4a 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  overflow-y: auto;
  transition: transform .3s ease;
}

.es-sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: #fff;
}

.es-sidebar-brand .brand-emblem {
  width: 38px; height: 38px;
  background: var(--es-accent);
  color: #1a2a20;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 14px;
  font-family: var(--font-ui);
  flex-shrink: 0;
}

.es-sidebar-brand .brand-text {
  font-family: var(--font-ui);
}

.es-sidebar-brand .brand-title {
  font-size: 14px; font-weight: 700;
  letter-spacing: .02em;
}

.es-sidebar-brand .brand-sub {
  font-size: 10px; opacity: .5;
  letter-spacing: .06em; text-transform: uppercase;
  margin-top: 2px;
}

/* User card in sidebar */
.es-sidebar-user {
  padding: 16px 20px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
}

.es-sidebar-avatar {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--es-accent);
  color: #1a2a20;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
  font-family: var(--font-ui);
  flex-shrink: 0;
}

.es-sidebar-user-name {
  font-size: 13px; font-weight: 600;
  font-family: var(--font-ui);
}

.es-sidebar-user-type {
  font-size: 11px; opacity: .5;
  font-family: var(--font-ui);
}

/* Navigation */
.es-sidebar-nav {
  padding: 16px 12px; flex: 1;
}

.es-sidebar-section {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.35);
  padding: 12px 12px 6px;
  font-family: var(--font-ui);
}

.es-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 13.5px; font-weight: 500;
  transition: all .2s;
  margin-bottom: 2px;
}

.es-nav-item:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.es-nav-item.active {
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--es-accent);
}

.es-nav-item .nav-icon {
  font-size: 18px; width: 22px; text-align: center;
  flex-shrink: 0;
}

.es-nav-item .nav-badge {
  margin-left: auto;
  background: var(--es-accent);
  color: #1a2a20;
  font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 10px;
}

/* Sidebar footer */
.es-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.es-sidebar-footer a {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,.5); text-decoration: none;
  font-size: 12.5px; font-family: var(--font-ui);
  padding: 6px 0;
  transition: color .2s;
}

.es-sidebar-footer a:hover { color: rgba(255,255,255,.85) }

/* Mobile toggle */
.es-sidebar-toggle {
  display: none;
  position: fixed; top: 14px; left: 14px;
  z-index: 300;
  width: 40px; height: 40px;
  background: var(--es-primary); color: #fff;
  border: none; border-radius: 8px;
  font-size: 20px; cursor: pointer;
  align-items: center; justify-content: center;
  box-shadow: var(--es-shadow);
}

/* ── 3. ZONE PRINCIPALE ── */
.es-main {
  flex: 1;
  margin-left: var(--es-sidebar-w);
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* Topbar (à l'intérieur du main) */
.es-topbar {
  height: var(--es-topbar-h);
  background: var(--es-card);
  border-bottom: 1px solid var(--es-border);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky; top: 0;
  z-index: 100;
}

.es-topbar-title {
  font-family: var(--font-t);
  font-size: 18px; font-weight: 700;
  color: var(--es-text);
}

.es-topbar-right {
  display: flex; align-items: center; gap: 12px;
}

.es-topbar-btn {
  padding: 8px 18px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  transition: all .2s;
  display: inline-flex; align-items: center; gap: 6px;
}

.es-topbar-btn.primary {
  background: var(--es-primary); color: #fff;
}
.es-topbar-btn.primary:hover {
  background: #0f3326;
  box-shadow: 0 2px 8px rgba(27,77,62,.25);
}

/* ── 4. CONTENU ── */
.es-content {
  padding: 28px 32px 48px;
  flex: 1;
  max-width: 1200px;
  width: 100%;
}

/* ── 5. HERO / WELCOME BANNER ── */
.es-hero {
  background: linear-gradient(135deg, rgba(27,77,62,.92) 0%, rgba(46,125,82,.85) 100%),
    url('/assets/img/hero/masque-africain.jpg') center/cover no-repeat;
  border-radius: 14px;
  padding: 32px 36px;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.es-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0, rgba(255,255,255,.02) 1px, transparent 1px, transparent 20px);
  pointer-events: none;
}

.es-hero-title {
  font-family: var(--font-t);
  font-size: 26px; font-weight: 800;
  line-height: 1.2; letter-spacing: -.02em;
  margin-bottom: 6px;
  position: relative; z-index: 1;
}

.es-hero-sub {
  font-family: var(--font-s);
  font-size: 14px; opacity: .75;
  line-height: 1.6;
  position: relative; z-index: 1;
}

.es-hero-actions {
  display: flex; gap: 10px; margin-top: 16px;
  position: relative; z-index: 1;
}

.es-hero-btn {
  padding: 10px 22px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 700;
  text-decoration: none;
  transition: all .2s;
}

.es-hero-btn.primary { background: var(--es-accent); color: #1a2a20 }
.es-hero-btn.primary:hover { background: #d4a340; transform: translateY(-1px) }
.es-hero-btn.secondary { background: rgba(255,255,255,.15); color: #fff; backdrop-filter: blur(4px) }
.es-hero-btn.secondary:hover { background: rgba(255,255,255,.25) }

/* Stats dans le hero */
.es-hero-stats {
  display: flex; gap: 14px;
  position: relative; z-index: 1;
}

.es-stat-card {
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
  min-width: 110px;
  transition: transform .2s;
}

.es-stat-card:hover { transform: translateY(-2px) }

.es-stat-num {
  font-family: var(--font-t);
  font-size: 28px; font-weight: 800;
  line-height: 1;
}

.es-stat-label {
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 500;
  opacity: .7; margin-top: 4px;
  text-transform: uppercase; letter-spacing: .04em;
}

/* ── 6. CARDS ── */
.es-card {
  background: var(--es-card);
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius);
  box-shadow: var(--es-shadow);
  overflow: hidden;
  transition: box-shadow .2s;
}

.es-card:hover { box-shadow: var(--es-shadow-hover) }

.es-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--es-border);
  display: flex; align-items: center;
  justify-content: space-between;
}

.es-card-title {
  font-family: var(--font-ui);
  font-size: 15px; font-weight: 700;
  color: var(--es-text);
  display: flex; align-items: center; gap: 8px;
}

.es-card-body { padding: 20px 24px }
.es-card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--es-border);
  background: #fafbfc;
}

/* ── 7. GRID ── */
.es-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px }
.es-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px }
.es-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px }

/* ── 8. QUICK STATS (mini cards) ── */
.es-quick-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.es-qstat {
  background: var(--es-card);
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius);
  padding: 20px;
  display: flex; align-items: flex-start; gap: 14px;
  box-shadow: var(--es-shadow);
  transition: all .2s;
}

.es-qstat:hover {
  box-shadow: var(--es-shadow-hover);
  transform: translateY(-1px);
}

.es-qstat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}

.es-qstat-icon.green { background: var(--es-primary-light); color: var(--es-primary) }
.es-qstat-icon.gold { background: var(--es-accent-light); color: var(--es-accent) }
.es-qstat-icon.blue { background: #EBF5FF; color: #2563EB }
.es-qstat-icon.red { background: #FEF2F2; color: #DC2626 }

.es-qstat-num {
  font-family: var(--font-t);
  font-size: 24px; font-weight: 800;
  color: var(--es-text);
  line-height: 1;
}

.es-qstat-label {
  font-family: var(--font-ui);
  font-size: 12px; color: var(--es-text-muted);
  margin-top: 2px;
}

/* ── 9. TABLES ── */
.es-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.es-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 13.5px;
}

.es-table thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--es-text-muted);
  border-bottom: 2px solid var(--es-border);
  white-space: nowrap;
}

.es-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f3f5;
  color: var(--es-text);
  vertical-align: middle;
}

.es-table tbody tr:hover { background: #f8fafb }
.es-table tbody tr:last-child td { border-bottom: none }

.es-table .cell-ref {
  font-weight: 700; color: var(--es-primary);
  font-size: 13px;
}

.es-table .cell-date {
  color: var(--es-text-muted); font-size: 12.5px;
  white-space: nowrap;
}

.es-table .cell-action a {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px;
  background: var(--es-primary-light);
  color: var(--es-primary);
  border-radius: 6px;
  font-size: 12px; font-weight: 600;
  text-decoration: none;
  transition: all .2s;
}

.es-table .cell-action a:hover {
  background: var(--es-primary); color: #fff;
}

/* ── 10. BADGES STATUS ── */
.es-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--font-ui);
  font-size: 11.5px; font-weight: 600;
  white-space: nowrap;
}

.es-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.es-badge.soumise { background: #EBF5FF; color: #1D4ED8 }
.es-badge.soumise::before { background: #3B82F6 }

.es-badge.en_cours { background: #FFF7ED; color: #C2410C }
.es-badge.en_cours::before { background: #F97316 }

.es-badge.approuvee { background: var(--es-primary-light); color: var(--es-primary) }
.es-badge.approuvee::before { background: #22C55E }

.es-badge.rejetee { background: #FEF2F2; color: #DC2626 }
.es-badge.rejetee::before { background: #EF4444 }

.es-badge.information_requise { background: var(--es-accent-light); color: #92400E }
.es-badge.information_requise::before { background: var(--es-accent) }

.es-badge.classee { background: #F1F5F9; color: #475569 }
.es-badge.classee::before { background: #94A3B8 }

/* ── 11. BOUTONS ── */
.es-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 13.5px; font-weight: 600;
  text-decoration: none;
  border: none; cursor: pointer;
  transition: all .2s;
  line-height: 1.4;
}

.es-btn.primary { background: var(--es-primary); color: #fff }
.es-btn.primary:hover { background: #0f3326; box-shadow: 0 3px 10px rgba(27,77,62,.2); transform: translateY(-1px) }

.es-btn.secondary { background: var(--es-card); color: var(--es-primary); border: 1.5px solid var(--es-border) }
.es-btn.secondary:hover { border-color: var(--es-primary); background: var(--es-primary-light) }

.es-btn.accent { background: var(--es-accent); color: #1a2a20 }
.es-btn.accent:hover { background: #d4a340 }

.es-btn.danger { background: #DC2626; color: #fff }
.es-btn.danger:hover { background: #B91C1C }

.es-btn.sm { padding: 7px 14px; font-size: 12px; border-radius: 6px }
.es-btn.lg { padding: 14px 28px; font-size: 15px }
.es-btn:disabled { opacity: .5; cursor: not-allowed; transform: none!important }

/* ── 12. FORMULAIRES ── */
.es-form-group {
  margin-bottom: 20px;
}

.es-form-group label {
  display: block;
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 600;
  color: var(--es-text);
  margin-bottom: 6px;
}

.es-form-group label .required {
  color: #DC2626; margin-left: 2px;
}

.es-form-group .hint {
  font-size: 12px; color: var(--es-text-muted);
  margin-top: 4px;
}

.es-input, .es-select, .es-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--es-border);
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--es-text);
  background: var(--es-card);
  transition: all .2s;
  outline: none;
}

.es-input:focus, .es-select:focus, .es-textarea:focus {
  border-color: var(--es-primary);
  box-shadow: 0 0 0 3px rgba(27,77,62,.1);
}

.es-input.error, .es-select.error, .es-textarea.error {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

.es-textarea { resize: vertical; min-height: 120px; line-height: 1.6 }

.es-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.es-form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}

/* File upload zone */
.es-upload-zone {
  border: 2px dashed var(--es-border);
  border-radius: 10px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: #fafbfc;
}

.es-upload-zone:hover, .es-upload-zone.dragover {
  border-color: var(--es-primary);
  background: var(--es-primary-light);
}

.es-upload-zone .upload-icon {
  font-size: 36px; margin-bottom: 10px;
}

.es-upload-zone .upload-text {
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 600;
  color: var(--es-text);
}

.es-upload-zone .upload-hint {
  font-family: var(--font-ui);
  font-size: 12px; color: var(--es-text-muted);
  margin-top: 4px;
}

/* ── 13. STEPPER ── */
.es-stepper {
  display: flex; align-items: center;
  gap: 0; margin-bottom: 32px;
  background: var(--es-card);
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius);
  padding: 16px 24px;
  box-shadow: var(--es-shadow);
}

.es-step {
  display: flex; align-items: center; gap: 10px;
  flex: 1; position: relative;
  font-family: var(--font-ui);
}

.es-step::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--es-border);
  margin: 0 16px;
}

.es-step:last-child::after { display: none }

.es-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  background: #f1f3f5; color: var(--es-text-muted);
  flex-shrink: 0;
  transition: all .3s;
}

.es-step.active .es-step-num {
  background: var(--es-primary); color: #fff;
  box-shadow: 0 0 0 4px rgba(27,77,62,.15);
}

.es-step.done .es-step-num {
  background: #22C55E; color: #fff;
}

.es-step.done::after { background: #22C55E }

.es-step-label {
  font-size: 12.5px; font-weight: 500;
  color: var(--es-text-muted);
  white-space: nowrap;
}

.es-step.active .es-step-label { color: var(--es-primary); font-weight: 700 }
.es-step.done .es-step-label { color: #22C55E }

/* ── 14. TIMELINE ── */
.es-timeline {
  position: relative;
  padding-left: 32px;
}

.es-timeline::before {
  content: '';
  position: absolute; left: 11px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--es-border);
}

.es-timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.es-timeline-item:last-child { padding-bottom: 0 }

.es-timeline-dot {
  position: absolute; left: -27px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--es-border);
  border: 3px solid var(--es-bg);
}

.es-timeline-item.active .es-timeline-dot { background: var(--es-primary) }
.es-timeline-item.success .es-timeline-dot { background: #22C55E }
.es-timeline-item.warning .es-timeline-dot { background: var(--es-accent) }
.es-timeline-item.danger .es-timeline-dot { background: #DC2626 }

.es-timeline-date {
  font-family: var(--font-ui);
  font-size: 11.5px; font-weight: 600;
  color: var(--es-text-muted);
  margin-bottom: 4px;
}

.es-timeline-title {
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 600;
  color: var(--es-text);
}

.es-timeline-desc {
  font-family: var(--font-s);
  font-size: 13px; color: var(--es-text-muted);
  line-height: 1.6; margin-top: 4px;
}

/* ── 15. FLASH MESSAGES ── */
.es-flash {
  padding: 14px 20px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 13.5px; font-weight: 500;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
  animation: esFlashIn .3s ease;
  border-left: 4px solid;
}

@keyframes esFlashIn {
  from { opacity: 0; transform: translateY(-8px) }
  to { opacity: 1; transform: translateY(0) }
}

.es-flash.success { background: var(--es-primary-light); border-color: #22C55E; color: var(--es-primary) }
.es-flash.error { background: #FEF2F2; border-color: #DC2626; color: #991B1B }
.es-flash.info { background: #EBF5FF; border-color: #3B82F6; color: #1E40AF }
.es-flash.warning { background: var(--es-accent-light); border-color: var(--es-accent); color: #92400E }

/* ── 16. DEMARCHE CARDS (service tiles) ── */
.es-demarche-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.es-demarche-card {
  background: var(--es-card);
  border: 1.5px solid var(--es-border);
  border-radius: var(--es-radius);
  padding: 20px;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none; color: inherit;
  display: block;
}

.es-demarche-card:hover {
  border-color: var(--es-primary);
  box-shadow: var(--es-shadow-hover);
  transform: translateY(-2px);
}

.es-demarche-card.selected {
  border-color: var(--es-primary);
  background: var(--es-primary-light);
  box-shadow: 0 0 0 3px rgba(27,77,62,.1);
}

.es-demarche-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--es-primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}

.es-demarche-name {
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 700;
  color: var(--es-text);
  margin-bottom: 4px;
}

.es-demarche-desc {
  font-family: var(--font-ui);
  font-size: 12.5px; color: var(--es-text-muted);
  line-height: 1.5;
}

.es-demarche-meta {
  display: flex; gap: 16px; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--es-border);
  font-family: var(--font-ui);
  font-size: 11.5px; color: var(--es-text-muted);
}

.es-demarche-meta strong { color: var(--es-text); font-weight: 600 }

/* ── 17. PROFIL ── */
.es-profile-header {
  display: flex; align-items: center; gap: 20px;
  padding: 24px;
}

.es-profile-avatar {
  width: 72px; height: 72px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--es-primary), #2E7D52);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-t);
  font-size: 26px; font-weight: 800;
  flex-shrink: 0;
}

.es-profile-name {
  font-family: var(--font-t);
  font-size: 22px; font-weight: 700;
  color: var(--es-text);
}

.es-profile-type {
  font-family: var(--font-ui);
  font-size: 13px; color: var(--es-text-muted);
  display: flex; align-items: center; gap: 6px;
}

.es-profile-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--es-border);
}

.es-profile-stat {
  padding: 16px 24px;
  text-align: center;
  border-right: 1px solid var(--es-border);
}

.es-profile-stat:last-child { border-right: none }

.es-profile-stat-num {
  font-family: var(--font-t);
  font-size: 20px; font-weight: 800;
  color: var(--es-primary);
}

.es-profile-stat-label {
  font-family: var(--font-ui);
  font-size: 11px; color: var(--es-text-muted);
  text-transform: uppercase; letter-spacing: .04em;
  margin-top: 2px;
}

/* ── 18. LOGIN / REGISTER ── */
.es-auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.es-auth-visual {
  background: linear-gradient(135deg, rgba(10,42,30,.88) 0%, rgba(27,77,62,.82) 100%),
    url('/assets/img/hero/festival.jpg') center/cover no-repeat;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: 48px;
  color: #fff; text-align: center;
  position: relative;
}

.es-auth-visual::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0, rgba(255,255,255,.02) 1px, transparent 1px, transparent 30px);
  pointer-events: none;
}

.es-auth-visual .auth-logo {
  width: 60px; height: 60px;
  background: var(--es-accent);
  color: #1a2a20;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 22px;
  font-family: var(--font-ui);
  margin-bottom: 20px;
  position: relative; z-index: 1;
}

.es-auth-visual h2 {
  font-family: var(--font-t);
  font-size: 28px; font-weight: 800;
  line-height: 1.2; margin-bottom: 12px;
  position: relative; z-index: 1;
}

.es-auth-visual p {
  font-family: var(--font-s);
  font-size: 15px; opacity: .7;
  max-width: 360px; line-height: 1.7;
  position: relative; z-index: 1;
}

.es-auth-form-side {
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 48px;
  background: var(--es-bg);
}

.es-auth-card {
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
}

.es-auth-card h1 {
  font-family: var(--font-t);
  font-size: 24px; font-weight: 800;
  color: var(--es-text);
  margin-bottom: 6px;
}

.es-auth-card .auth-sub {
  font-family: var(--font-ui);
  font-size: 14px; color: var(--es-text-muted);
  margin-bottom: 28px;
}

.es-auth-card .auth-footer {
  margin-top: 24px;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 13px; color: var(--es-text-muted);
}

.es-auth-card .auth-footer a {
  color: var(--es-primary); font-weight: 600;
  text-decoration: none;
}

.es-auth-card .auth-footer a:hover { text-decoration: underline }

/* Séparateur avec les features */
.es-auth-features {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--es-border);
}

.es-auth-feature {
  display: flex; align-items: flex-start; gap: 10px;
  font-family: var(--font-ui);
  font-size: 12.5px; color: var(--es-text-muted);
  line-height: 1.5;
}

.es-auth-feature .feat-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--es-primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}

/* ── 19. SUIVI DÉTAIL ── */
.es-detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.es-detail-info {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--es-border);
  border-radius: 0 0 var(--es-radius) var(--es-radius);
  overflow: hidden;
}

.es-detail-info-item {
  padding: 14px 20px;
  background: var(--es-card);
}

.es-detail-info-label {
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--es-text-muted);
  margin-bottom: 4px;
}

.es-detail-info-value {
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 600;
  color: var(--es-text);
}

/* Pièces jointes */
.es-file-list { display: flex; flex-direction: column; gap: 8px }

.es-file-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: #fafbfc;
  border: 1px solid var(--es-border);
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  text-decoration: none; color: var(--es-text);
  transition: all .2s;
}

.es-file-item:hover {
  background: var(--es-primary-light);
  border-color: var(--es-primary);
}

.es-file-item .file-icon {
  font-size: 18px;
}

.es-file-item .file-name {
  flex: 1;
  font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── 20. FILTRES ── */
.es-filters {
  display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}

.es-filter-btn {
  padding: 7px 16px;
  border-radius: 20px;
  font-family: var(--font-ui);
  font-size: 12.5px; font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--es-border);
  color: var(--es-text-muted);
  background: var(--es-card);
  transition: all .2s;
  cursor: pointer;
}

.es-filter-btn:hover { border-color: var(--es-primary); color: var(--es-primary) }

.es-filter-btn.active {
  background: var(--es-primary);
  border-color: var(--es-primary);
  color: #fff;
}

/* ── 21. PAGINATION ── */
.es-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-top: 24px;
  font-family: var(--font-ui);
}

.es-page-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  color: var(--es-text-muted);
  background: var(--es-card);
  border: 1px solid var(--es-border);
  transition: all .2s;
}

.es-page-btn:hover { border-color: var(--es-primary); color: var(--es-primary) }
.es-page-btn.active { background: var(--es-primary); color: #fff; border-color: var(--es-primary) }
.es-page-btn.disabled { opacity: .4; cursor: default; pointer-events: none }

/* ── 22. EMPTY STATE ── */
.es-empty {
  text-align: center;
  padding: 48px 24px;
}

.es-empty-icon { font-size: 48px; margin-bottom: 12px }

.es-empty-title {
  font-family: var(--font-ui);
  font-size: 16px; font-weight: 700;
  color: var(--es-text);
  margin-bottom: 6px;
}

.es-empty-desc {
  font-family: var(--font-ui);
  font-size: 13px; color: var(--es-text-muted);
  max-width: 320px; margin: 0 auto 16px;
  line-height: 1.6;
}

/* ── 23. REVIEW CARD (step 4 recap) ── */
.es-review-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--es-border);
}

.es-review-section:last-child { border-bottom: none }

.es-review-label {
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--es-text-muted);
  margin-bottom: 6px;
}

.es-review-value {
  font-family: var(--font-s);
  font-size: 14px; color: var(--es-text);
  line-height: 1.6;
}

/* ── 24. DASHBOARD GRID ── */
.es-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-bottom: 28px;
}

.es-card-wide { grid-column: 1 }

.es-card-action {
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 600;
  color: var(--es-primary);
  text-decoration: none;
  transition: color .2s;
}
.es-card-action:hover { color: var(--es-accent) }

/* Boutons du dashboard */
.es-btn-primary { background: var(--es-primary); color: #fff }
.es-btn-primary:hover { background: #0f3326; box-shadow: 0 3px 10px rgba(27,77,62,.2); transform: translateY(-1px) }

.es-btn-outline { background: var(--es-card); color: var(--es-primary); border: 1.5px solid var(--es-border) }
.es-btn-outline:hover { border-color: var(--es-primary); background: var(--es-primary-light) }

.es-btn-light { background: var(--es-accent); color: #1a2a20; padding: 10px 22px; border-radius: 8px; font-family: var(--font-ui); font-size: 13px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: all .2s }
.es-btn-light:hover { background: #d4a340; transform: translateY(-1px) }

.es-btn-outline-light { background: rgba(255,255,255,.15); color: #fff; padding: 10px 22px; border-radius: 8px; font-family: var(--font-ui); font-size: 13px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; backdrop-filter: blur(4px); transition: all .2s }
.es-btn-outline-light:hover { background: rgba(255,255,255,.25) }

.es-btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 6px }
.es-btn-block { display: block; text-align: center; width: 100% }

/* Quick stat cards (dashboard) */
.es-quick-stat {
  background: var(--es-card);
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius);
  padding: 20px;
  display: flex; align-items: flex-start; gap: 14px;
  box-shadow: var(--es-shadow);
  transition: all .2s;
}

.es-quick-stat:hover {
  box-shadow: var(--es-shadow-hover);
  transform: translateY(-1px);
}

.es-quick-stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}

.es-quick-stat-number {
  font-family: var(--font-t);
  font-size: 24px; font-weight: 800;
  color: var(--es-text);
  line-height: 1;
}

.es-quick-stat-label {
  font-family: var(--font-ui);
  font-size: 12px; color: var(--es-text-muted);
  margin-top: 2px;
}

/* Hero content */
.es-hero h1 {
  font-family: var(--font-t);
  font-size: 26px; font-weight: 800;
  line-height: 1.2; letter-spacing: -.02em;
  margin-bottom: 6px;
  position: relative; z-index: 1;
}

.es-hero p {
  font-family: var(--font-s);
  font-size: 14px; opacity: .75;
  line-height: 1.6;
  position: relative; z-index: 1;
}

.es-hero-stat {
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
  min-width: 110px;
  transition: transform .2s;
}

.es-hero-stat:hover { transform: translateY(-2px) }

.es-hero-stat-number {
  font-family: var(--font-t);
  font-size: 28px; font-weight: 800;
  line-height: 1;
  display: block;
}

.es-hero-stat-label {
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 500;
  opacity: .7; margin-top: 4px;
  text-transform: uppercase; letter-spacing: .04em;
  display: block;
}

/* Empty state (dashboard) */
.es-empty-state {
  text-align: center;
  padding: 48px 24px;
}

.es-empty-state .es-empty-icon { font-size: 48px; margin-bottom: 12px }

.es-empty-state h3 {
  font-family: var(--font-ui);
  font-size: 16px; font-weight: 700;
  color: var(--es-text);
  margin-bottom: 6px;
}

.es-empty-state p {
  font-family: var(--font-ui);
  font-size: 13px; color: var(--es-text-muted);
  max-width: 320px; margin: 0 auto 16px;
  line-height: 1.6;
}

/* Table wrapper */
.es-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Badge with -- prefix */
.es-badge--soumise { background: #EBF5FF; color: #1D4ED8 }
.es-badge--soumise::before { background: #3B82F6 }
.es-badge--en_cours { background: #FFF7ED; color: #C2410C }
.es-badge--en_cours::before { background: #F97316 }
.es-badge--approuvee { background: var(--es-primary-light); color: var(--es-primary) }
.es-badge--approuvee::before { background: #22C55E }
.es-badge--rejetee { background: #FEF2F2; color: #DC2626 }
.es-badge--rejetee::before { background: #EF4444 }
.es-badge--information_requise { background: var(--es-accent-light); color: #92400E }
.es-badge--information_requise::before { background: var(--es-accent) }
.es-badge--classee { background: #F1F5F9; color: #475569 }
.es-badge--classee::before { background: #94A3B8 }

/* Démarche list (sidebar panel) */
.es-demarche-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.es-demarche-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  text-decoration: none; color: inherit;
  border: 1px solid var(--es-border);
  transition: all .2s;
}

.es-demarche-item:hover {
  border-color: var(--es-primary);
  background: var(--es-primary-light);
  transform: translateX(2px);
}

.es-demarche-item-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--es-primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.es-demarche-item-info { flex: 1; min-width: 0 }

.es-demarche-item-name {
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 600;
  color: var(--es-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.es-demarche-item-desc {
  font-family: var(--font-ui);
  font-size: 11px; color: var(--es-text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.es-demarche-item-arrow {
  color: var(--es-text-muted);
  font-size: 16px; font-weight: 600;
  flex-shrink: 0;
  transition: transform .2s;
}

.es-demarche-item:hover .es-demarche-item-arrow {
  transform: translateX(3px);
  color: var(--es-primary);
}

/* Help banner */
.es-help-banner {
  background: var(--es-card);
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius);
  padding: 24px 28px;
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--es-shadow);
}

.es-help-content h3 {
  font-family: var(--font-ui);
  font-size: 15px; font-weight: 700;
  color: var(--es-text);
  margin-bottom: 4px;
}

.es-help-content p {
  font-family: var(--font-ui);
  font-size: 13px; color: var(--es-text-muted);
  line-height: 1.5;
}

.es-help-actions {
  display: flex; gap: 10px;
  flex-shrink: 0;
}

.es-text-muted {
  font-family: var(--font-ui);
  font-size: 13px; color: var(--es-text-muted);
  line-height: 1.6;
}

/* ── 25. RESPONSIVE ── */
@media (max-width: 1024px) {
  .es-sidebar { transform: translateX(-100%) }
  .es-sidebar.open { transform: translateX(0) }
  .es-sidebar-toggle { display: flex }
  .es-main { margin-left: 0 }
  .es-quick-stats { grid-template-columns: repeat(2, 1fr) }
  .es-dashboard-grid { grid-template-columns: 1fr }
  .es-detail-grid { grid-template-columns: 1fr }
  .es-hero { grid-template-columns: 1fr }
  .es-hero-stats { margin-top: 16px }
  .es-auth-layout { grid-template-columns: 1fr }
  .es-auth-visual { display: none }
  .es-help-banner { flex-direction: column; text-align: center }
  .es-help-actions { justify-content: center }
}

@media (max-width: 640px) {
  .es-content { padding: 16px }
  .es-topbar { padding: 0 16px }
  .es-quick-stats { grid-template-columns: 1fr }
  .es-hero { padding: 24px }
  .es-hero-title { font-size: 20px }
  .es-hero-stats { flex-direction: column }
  .es-form-row { grid-template-columns: 1fr }
  .es-stepper { flex-direction: column; align-items: flex-start; gap: 12px }
  .es-step::after { display: none }
  .es-demarche-grid { grid-template-columns: 1fr }
  .es-auth-form-side { padding: 24px }
  .es-profile-stats { grid-template-columns: 1fr }
  .es-profile-stat { border-right: none; border-bottom: 1px solid var(--es-border) }
  .es-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px }
}

/* ── 25. PRINT ── */
@media print {
  .es-sidebar, .es-sidebar-toggle, .es-topbar-right { display: none!important }
  .es-main { margin-left: 0 }
  .es-card { box-shadow: none; border: 1px solid #ddd }
}
