/* ============================================================
   AUTO-ÉCOLE MANAGER — Design Bleu Moderne 2026
   Palette : Bleu profond, bleu électrique, bleu glacier
   ============================================================ */

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

:root {
  /* ===== PALETTE BLEUE 2026 ===== */
  --primary:       #2563EB;
  --primary-dark:  #1D4ED8;
  --primary-light: #DBEAFE;
  --primary-50:    #EFF6FF;
  
  --secondary:     #06B6D4;
  --secondary-light: #CFFAFE;
  --secondary-dark: #0891B2;
  
  --tertiary:      #60A5FA;
  --tertiary-light: #EFF6FF;
  
  --accent:        #1E3A5F;
  --accent-light:  #E8EDF5;
  
  --cyan:          #22D3EE;
  --cyan-light:    #E0F7FA;
  
  --blue-purple:   #6366F1;
  --blue-purple-light: #EEF2FF;
  
  --ocean:         #0EA5E9;
  --ocean-light:   #E0F2FE;
  
  --pastel-blue:   #93C5FD;
  --pastel-blue-light: #EFF6FF;
  
  /* Couleurs fonctionnelles */
  --success:       #10B981;
  --success-light: #D1FAE5;
  --success-dark:  #059669;
  
  --danger:        #EF4444;
  --danger-light:  #FEE2E2;
  --danger-dark:   #DC2626;
  
  --warning:       #F59E0B;
  --warning-light: #FEF3C7;
  --warning-dark:  #D97706;
  
  --info:          #3B82F6;
  --info-light:    #DBEAFE;
  --info-dark:     #2563EB;
  
  /* Neutres modernes */
  --bg:            #F0F4FF;
  --surface:       #FFFFFF;
  --surface-2:     #F8FAFF;
  --surface-3:     #E8EEF8;
  --border:        #DDE6F0;
  --text:          #0A1628;
  --text-2:        #1A2A4A;
  --text-3:        #4A5A7A;
  --text-4:        #8A9AB0;
  
  /* Dégradés bleus */
  --gradient-primary: linear-gradient(135deg, #1E3A5F 0%, #2563EB 50%, #06B6D4 100%);
  --gradient-secondary: linear-gradient(135deg, #2563EB 0%, #6366F1 100%);
  --gradient-accent: linear-gradient(135deg, #06B6D4 0%, #22D3EE 100%);
  --gradient-ocean: linear-gradient(135deg, #0EA5E9 0%, #2563EB 100%);
  --gradient-deep: linear-gradient(135deg, #1E3A5F 0%, #0EA5E9 100%);
  --gradient-glacier: linear-gradient(135deg, #93C5FD 0%, #60A5FA 50%, #2563EB 100%);
  
  /* Ombres bleues */
  --shadow-sm:     0 2px 12px rgba(37, 99, 235, 0.08);
  --shadow:        0 4px 32px rgba(37, 99, 235, 0.12);
  --shadow-lg:     0 8px 56px rgba(37, 99, 235, 0.18);
  --shadow-xl:     0 16px 80px rgba(37, 99, 235, 0.25);
  --shadow-glow:   0 0 60px rgba(37, 99, 235, 0.12);
  --shadow-blue:   0 8px 40px rgba(37, 99, 235, 0.20);
  
  /* Dimensions */
  --sidebar-w:     280px;
  --topbar-h:      72px;
  --radius:        16px;
  --radius-sm:     10px;
  --radius-lg:     24px;
  --radius-xl:     32px;
  --transition:    0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { 
  background: var(--gradient-secondary);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { 
  background: var(--gradient-ocean);
}

/* ── BASE ── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── SIDEBAR BLEUE ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform var(--transition), width var(--transition);
  box-shadow: var(--shadow-sm);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  min-height: 72px;
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
}

.sidebar-brand::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 70%;
  height: 200%;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  animation: float 15s ease-in-out infinite;
}

.sidebar-brand::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 50%;
  height: 150%;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.1); }
}

.sidebar-brand .brand-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.brand-text {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.brand-name span {
  background: linear-gradient(135deg, #22D3EE, #93C5FD);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-school {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 400;
  line-height: 1.3;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.75);
}

.nav-menu {
  list-style: none;
  padding: 20px 14px;
  flex: 1;
}

.nav-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-4);
  padding: 20px 14px 8px;
  font-weight: 700;
  position: relative;
}

.nav-section::after {
  content: '';
  position: absolute;
  left: 14px;
  bottom: 0;
  width: 30px;
  height: 2px;
  background: var(--gradient-secondary);
  border-radius: 2px;
}

/* ============================================================
   COULEURS DES ICÔNES DU MENU LATÉRAL
   ============================================================ */

/* Couleur par défaut des icônes */
.nav-link i {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
  color: var(--text-4);
  transition: all var(--transition);
}

/* Aligner les icônes .ni/.si comme les <i> classiques */
.nav-link .ni,
.nav-link .si,
.nav-link-parent .ni,
.nav-link-parent .si {
  width: 20px !important;
  min-width: 20px !important;
  flex-shrink: 0;
}

/* Supprimer translateX sur hover qui cause un décalage visuel */
.nav-link:hover {
  transform: none !important;
}

/* Couleurs spécifiques pour chaque icône - Palette 2026 */
.nav-link .fa-gauge-high { color: #2563eb; }
.nav-link .fa-user-plus { color: #10b981; }
.nav-link .fa-money-bill-wave { color: #f59e0b; }
.nav-link .fa-clipboard-check { color: #8b5cf6; }
.nav-link .fa-book-open { color: #06b6d4; }
.nav-link .fa-road { color: #f97316; }
.nav-link .fa-chalkboard-user { color: #ec4899; }
.nav-link .fa-car { color: #14b8a6; }
.nav-link .fa-gas-pump { color: #ef4444; }
.nav-link .fa-arrow-trend-up { color: #22c55e; }
.nav-link .fa-arrow-trend-down { color: #ef4444; }

/* Au survol, les icônes s'agrandissent */
.nav-link:hover i {
  transform: scale(1.15);
}

/* Effet de brillance au survol */
.nav-link:hover .fa-gauge-high { color: #2563eb; text-shadow: 0 0 20px rgba(37, 99, 235, 0.3); }
.nav-link:hover .fa-user-plus { color: #10b981; text-shadow: 0 0 20px rgba(16, 185, 129, 0.3); }
.nav-link:hover .fa-money-bill-wave { color: #f59e0b; text-shadow: 0 0 20px rgba(245, 158, 11, 0.3); }
.nav-link:hover .fa-clipboard-check { color: #8b5cf6; text-shadow: 0 0 20px rgba(139, 92, 246, 0.3); }
.nav-link:hover .fa-book-open { color: #06b6d4; text-shadow: 0 0 20px rgba(6, 182, 212, 0.3); }
.nav-link:hover .fa-road { color: #f97316; text-shadow: 0 0 20px rgba(249, 115, 22, 0.3); }
.nav-link:hover .fa-chalkboard-user { color: #ec4899; text-shadow: 0 0 20px rgba(236, 72, 153, 0.3); }
.nav-link:hover .fa-car { color: #14b8a6; text-shadow: 0 0 20px rgba(20, 184, 166, 0.3); }
.nav-link:hover .fa-gas-pump { color: #ef4444; text-shadow: 0 0 20px rgba(239, 68, 68, 0.3); }
.nav-link:hover .fa-arrow-trend-up { color: #22c55e; text-shadow: 0 0 20px rgba(34, 197, 94, 0.3); }
.nav-link:hover .fa-arrow-trend-down { color: #ef4444; text-shadow: 0 0 20px rgba(239, 68, 68, 0.3); }

/* Quand l'élément est actif, les icônes deviennent blanches */
.nav-link.active i {
  color: #ffffff !important;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  color: var(--text-3);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
}

.nav-link:hover {
  background: var(--primary-50);
  color: var(--primary);
  transform: none;
}

.nav-link.active {
  background: var(--gradient-secondary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
}

.nav-link .badge-nav {
  margin-left: auto;
  background: var(--gradient-deep);
  color: #fff;
  font-size: 10px;
  padding: 1px 10px;
  border-radius: 20px;
  font-weight: 600;
}

/* ── Sidebar Footer ── */
.sidebar-footer {
  padding: 16px 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-2);
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gradient-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
  border: 2px solid var(--surface);
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.user-role {
  display: block;
  font-size: 11px;
  color: var(--text-4);
  font-weight: 500;
}

.btn-logout {
  color: var(--text-4);
  background: none;
  border: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 18px;
}

.btn-logout:hover {
  background: var(--danger-light);
  color: var(--danger);
  transform: rotate(10deg);
}

/* ── MAIN WRAPPER ── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── TOPBAR BLEUE ── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.92);
}

.sidebar-toggle {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-4);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: none;
}

.sidebar-toggle:hover {
  background: var(--primary-50);
  color: var(--primary);
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  flex: 1;
  background: var(--gradient-ocean);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

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

.badge-school {
  font-size: 12px;
  background: var(--gradient-secondary);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}

.badge-school i {
  font-size: 12px;
}

.topbar-date {
  font-size: 13px;
  color: var(--text-4);
  font-weight: 500;
}

.content {
  padding: 32px 36px;
  flex: 1;
}

/* ── STATS CARDS BLEUES ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  cursor: default;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-secondary);
  opacity: 0;
  transition: opacity var(--transition);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 60%;
  height: 150%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.05), transparent);
  border-radius: 50%;
  pointer-events: none;
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.stat-icon.primary { 
  background: var(--gradient-ocean);
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}
.stat-icon.secondary { 
  background: var(--gradient-secondary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
}
.stat-icon.success { 
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}
.stat-icon.danger { 
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: #fff;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}
.stat-icon.warning { 
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}
.stat-icon.accent { 
  background: var(--gradient-deep);
  color: #fff;
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.3);
}
.stat-icon.info { 
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: #fff;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}
.stat-icon.cyan { 
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(34, 211, 238, 0.3);
}
.stat-icon.blue-purple { 
  background: linear-gradient(135deg, #6366F1, #4F46E5);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-4);
  font-weight: 500;
  margin-top: 2px;
}

/* ── CARD ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  transition: all var(--transition);
  overflow: hidden;
  position: relative;
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.card-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-header h2 i {
  font-size: 18px;
  background: var(--gradient-ocean);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-body {
  padding: 26px;
}

/* ── TABLE ── */
.table-wrapper {
  overflow-x: auto;
  padding: 0 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  padding: 14px 18px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-4);
  font-weight: 700;
  background: var(--surface-2);
  border-bottom: 2px solid var(--border);
}

tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-2);
}

tbody tr {
  transition: all var(--transition);
}

tbody tr:hover {
  background: var(--primary-50);
  transform: none;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ── BADGES BLEUS ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--transition);
}

.badge-success { 
  background: var(--success-light); 
  color: var(--success-dark);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.badge-danger  { 
  background: var(--danger-light);  
  color: var(--danger-dark);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.badge-warning { 
  background: var(--warning-light); 
  color: var(--warning-dark);
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.badge-info    { 
  background: var(--info-light);    
  color: var(--info-dark);
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.badge-muted   { 
  background: var(--surface-2);     
  color: var(--text-4);
  border: 1px solid var(--border);
}
.badge-primary { 
  background: var(--primary-light); 
  color: var(--primary-dark);
  border: 1px solid rgba(37, 99, 235, 0.2);
}
.badge-secondary { 
  background: var(--secondary-light); 
  color: var(--secondary-dark);
  border: 1px solid rgba(6, 182, 212, 0.2);
}
.badge-cyan    { 
  background: var(--cyan-light);    
  color: #0891B2;
  border: 1px solid rgba(34, 211, 238, 0.2);
}
.badge-blue-purple { 
  background: var(--blue-purple-light);    
  color: #4F46E5;
  border: 1px solid rgba(99, 102, 241, 0.2);
}
.badge-ocean { 
  background: var(--ocean-light);    
  color: #0EA5E9;
  border: 1px solid rgba(14, 165, 233, 0.2);
}
.badge-pastel { 
  background: var(--pastel-blue-light);    
  color: #2563EB;
  border: 1px solid rgba(147, 197, 253, 0.3);
}

/* ── BOUTONS BLEUS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: width 0.6s, height 0.6s, top 0.6s, left 0.6s;
}

.btn:active::after {
  width: 300px;
  height: 300px;
  top: -100px;
  left: -100px;
}

.btn:active { }

.btn-primary {
  background: var(--gradient-ocean);
  color: #fff;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 32px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.35);
}

.btn-secondary:hover {
  box-shadow: 0 6px 32px rgba(6, 182, 212, 0.45);
}

.btn-success {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
  box-shadow: 0 6px 32px rgba(16, 185, 129, 0.45);
}

.btn-danger {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: #fff;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
  box-shadow: 0 6px 32px rgba(239, 68, 68, 0.45);
}

.btn-accent {
  background: var(--gradient-deep);
  color: #fff;
  box-shadow: 0 4px 20px rgba(30, 58, 95, 0.35);
}

.btn-accent:hover {
  box-shadow: 0 6px 32px rgba(30, 58, 95, 0.45);
}

.btn-info {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: #fff;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
}

.btn-info:hover {
  box-shadow: 0 6px 32px rgba(59, 130, 246, 0.45);
}

.btn-cyan {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(34, 211, 238, 0.35);
}

.btn-cyan:hover {
  box-shadow: 0 6px 32px rgba(34, 211, 238, 0.45);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-2);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}

.btn-sm {
  padding: 6px 16px;
  font-size: 12px;
}

.btn-icon {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.btn-icon i {
  font-size: 15px;
}

/* ── FORMULAIRES ── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.form-group label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  padding: 11px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: all var(--transition);
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
  color: var(--text-4);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234A5A7A' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 2px solid var(--border);
}

/* ── ALERTES BLEUES ── */
.alert {
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 5px solid transparent;
  animation: slideDown 0.4s ease;
}

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

.alert-success {
  background: var(--success-light);
  color: var(--success-dark);
  border-left-color: var(--success);
}

.alert-danger {
  background: var(--danger-light);
  color: var(--danger-dark);
  border-left-color: var(--danger);
}

.alert-warning {
  background: var(--warning-light);
  color: var(--warning-dark);
  border-left-color: var(--warning);
}

.alert-info {
  background: var(--info-light);
  color: var(--info-dark);
  border-left-color: var(--info);
}

.alert i {
  font-size: 20px;
}

/* ── FILTRES ── */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
  padding: 18px 24px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.filters-bar .form-control {
  width: auto;
  min-width: 160px;
  background: var(--surface);
}

/* ── PAGINATION ── */
.pagination {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  justify-content: center;
}

.page-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
}

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

.page-btn.active {
  background: var(--gradient-ocean);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}

/* ── AUTH PAGES BLEUES ── */
.auth-page {
  min-height: 100vh;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 60%;
  height: 150%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent);
  border-radius: 50%;
  animation: floatAuth 25s ease-in-out infinite;
}

.auth-page::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 50%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05), transparent);
  border-radius: 50%;
  animation: floatAuth 20s ease-in-out infinite reverse;
}

@keyframes floatAuth {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.1); }
  66% { transform: translate(-20px, 30px) scale(0.9); }
}

.auth-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 52px 44px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.6s ease;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-logo {
  text-align: center;
  margin-bottom: 36px;
}

.auth-logo .brand-icon {
  width: 72px;
  height: 72px;
  background: var(--gradient-ocean);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  margin-bottom: 16px;
  box-shadow: 0 8px 40px rgba(37, 99, 235, 0.35);
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 8px 40px rgba(37, 99, 235, 0.35); }
  50% { box-shadow: 0 8px 60px rgba(37, 99, 235, 0.55); }
}

.auth-logo h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  background: var(--gradient-ocean);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-logo p {
  font-size: 14px;
  color: var(--text-4);
  margin-top: 4px;
}

.auth-card .form-group {
  margin-bottom: 18px;
}

.auth-card .btn {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 15px;
}

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

.auth-card a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.7);
  backdrop-filter: blur(12px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.4s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  color: var(--text-4);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.modal-body { padding: 28px; }
.modal-footer {
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  background: var(--surface-2);
}

/* ── RESPONSIVE ── */
@media (max-width: 992px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  
  .main-wrapper { margin-left: 0; }
  .sidebar-toggle { display: block; }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  
  .content { padding: 18px; }
  .topbar { padding: 0 16px; }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .filters-bar .form-control {
    width: 100%;
    min-width: unset;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .auth-card { padding: 36px 24px; }
  
  .topbar-right .badge-school span { display: none; }
  .topbar-date { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 16px; }
  .stat-card { padding: 16px 18px; }
}

/* ── ANIMATIONS SUPPLÉMENTAIRES ── */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

.glow-effect {
  transition: all var(--transition);
}

.glow-effect:hover {
  filter: drop-shadow(0 0 20px rgba(37, 99, 235, 0.3));
}
/* ============================================================
   PAGINATION (liste paginée : élèves, paiements, etc.)
   ============================================================ */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.pagination-info {
  font-size: 13px;
  color: var(--text-4);
}
.pagination-info strong {
  color: var(--text-2, #334155);
  font-weight: 700;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-3, #475569);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
}

.page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}

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

.page-btn.page-nav {
  font-weight: 600;
  padding: 0 14px;
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 34px;
  color: var(--text-4);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .pagination-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
  .page-btn.page-nav span,
  .page-btn.page-nav {
    font-size: 12px;
    padding: 0 8px;
  }
}
