/* ===================================================================
   SYSTÈME D'INSCRIPTION — GROUPE SCOLAIRE BIDAYA PRIVÉ
   Design Premium avec couleurs Bidaya
   =================================================================== */

/* ─── Global overflow fix ─── */
html, body { overflow-x: hidden; }

/* ─── Variables ─── */
:root {
    --primary: #1a3a5c;
    --primary-light: #2a5a8c;
    --primary-dark: #0f2540;
    --secondary: #2bbcb3;
    --secondary-light: #3dd6cc;
    --accent: #d4a843;
    --accent-light: #e8c56a;
    
    --success: #27ae60;
    --success-bg: #e8f5e9;
    --warning: #f39c12;
    --warning-bg: #fff8e1;
    --danger: #e74c3c;
    --danger-bg: #fce4ec;
    --info: #3498db;
    --info-bg: #e3f2fd;
    
    --bg: #f0f2f5;
    --bg-card: #ffffff;
    --text: #1a1a2e;
    --text-light: #6c757d;
    --text-muted: #adb5bd;
    --border: #e2e8f0;
    
    --sidebar-width: 270px;
    --topbar-height: 65px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ===================================================================
   AUTH PAGE
   =================================================================== */
.auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.auth-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

/* Animated circles */
.auth-bg-decoration { position: fixed; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; overflow: hidden; }
.auth-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    background: white;
    animation: floatCircle 20s infinite ease-in-out;
}
.circle-1 { width: 400px; height: 400px; top: -100px; left: -100px; animation-delay: 0s; }
.circle-2 { width: 300px; height: 300px; bottom: -50px; right: -50px; animation-delay: 7s; }
.circle-3 { width: 200px; height: 200px; top: 50%; left: 60%; animation-delay: 14s; }

@keyframes floatCircle {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 15px) scale(1.02); }
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: cardSlideUp 0.6s ease-out;
    position: relative;
    z-index: 10;
}

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

.auth-card-header { text-align: center; margin-bottom: 2rem; }

.auth-logo img {
    height: 120px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    object-fit: contain;
}
.auth-logo-fallback {
    width: 80px; height: 80px; margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 36px;
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.3;
}

.auth-subtitle {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.auth-form .form-group { margin-bottom: 1.25rem; }

.auth-form label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.auth-form label i { color: var(--secondary); }

.auth-form input[type="text"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--bg);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(43, 188, 179, 0.15);
    background: white;
}

.password-input-wrapper {
    position: relative;
}
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}
.password-toggle:hover { color: var(--primary); }

.auth-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}
.auth-footer p {
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0.3rem 0;
}
.auth-footer i { color: var(--secondary); margin-right: 0.4rem; }

/* ===================================================================
   LAYOUT (Sidebar + Main)
   =================================================================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ─── Sidebar ─── */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo {
    height: 55px;
    width: auto;
    border-radius: 10px;
    object-fit: contain;
}

.logo-text h2 {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.2;
    color: white;
}
.logo-subtitle {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
    font-weight: 400;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-nav ul { list-style: none; }

.nav-section-title {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.4);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.nav-link.active {
    background: rgba(255,255,255,0.12);
    color: white;
    border-left-color: var(--secondary);
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
}
.user-role {
    display: block;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
}

/* ─── Main Content ─── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
    width: calc(100% - var(--sidebar-width));
    transition: var(--transition);
}

/* ─── Topbar ─── */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: none;
}
.sidebar-toggle:hover {
    background: var(--bg);
    color: var(--primary);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text);
}
.breadcrumb i { color: var(--secondary); }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.school-year-badge {
    background: var(--bg);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.school-year-badge i { color: var(--secondary); }

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}
.btn-logout:hover {
    background: var(--danger-bg);
}

/* ─── Page Content ─── */
.page-content {
    padding: 2rem;
    width: 100%;
    animation: fadeInUp 0.4s ease-out;
}

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

/* ===================================================================
   COMPONENTS
   =================================================================== */

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }

.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; }
.btn-primary:hover { box-shadow: 0 4px 15px rgba(26,58,92,0.3); }

.btn-success { background: linear-gradient(135deg, var(--success), #2ecc71); color: white; }
.btn-success:hover { box-shadow: 0 4px 15px rgba(39,174,96,0.3); }

.btn-warning { background: linear-gradient(135deg, var(--warning), #f1c40f); color: white; }
.btn-danger { background: linear-gradient(135deg, var(--danger), #e74c3c); color: white; }

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(26,58,92,0.03);
}

.btn-sm { padding: 0.45rem 1rem; font-size: 0.8rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: var(--transition);
    color: var(--text-light);
    background: var(--bg);
}
.btn-icon:hover { transform: translateY(-2px); }
.btn-icon-info:hover { background: var(--info-bg); color: var(--info); }
.btn-icon-warning:hover { background: var(--warning-bg); color: var(--warning); }
.btn-icon-danger:hover { background: var(--danger-bg); color: var(--danger); }

.action-btns { display: flex; gap: 0.35rem; }

/* ─── Alerts ─── */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
    position: relative;
}

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

.alert-success { background: var(--success-bg); color: var(--success); border-left: 4px solid var(--success); }
.alert-error { background: var(--danger-bg); color: var(--danger); border-left: 4px solid var(--danger); }
.alert-info { background: var(--info-bg); color: var(--info); border-left: 4px solid var(--info); }

.alert-close {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    font-size: 0.85rem;
}
.alert-close:hover { opacity: 1; }

/* ─── Cards ─── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
    width: 100%;
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }

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

.card-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.card-header h3 i { color: var(--secondary); }

.card-body { padding: 1.5rem; }
.card-body.no-padding { padding: 0; }

/* ─── Stats Cards ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-primary .stat-icon { background: rgba(26,58,92,0.1); color: var(--primary); }
.stat-success .stat-icon { background: rgba(39,174,96,0.1); color: var(--success); }
.stat-warning .stat-icon { background: rgba(243,156,18,0.1); color: var(--warning); }
.stat-danger .stat-icon { background: rgba(231,76,60,0.1); color: var(--danger); }

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}
.stat-info h3 small { font-size: 0.75rem; font-weight: 500; color: var(--text-light); }
.stat-info p { font-size: 0.8rem; color: var(--text-light); font-weight: 500; margin-top: 0.25rem; }

.stat-decoration {
    position: absolute;
    right: -20px;
    top: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    opacity: 0.05;
}
.stat-primary .stat-decoration { background: var(--primary); }
.stat-success .stat-decoration { background: var(--success); }
.stat-warning .stat-decoration { background: var(--warning); }
.stat-danger .stat-decoration { background: var(--danger); }

/* ─── Dashboard Charts ─── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.chart-bars { padding: 0.5rem 0; }
.chart-bar-item { margin-bottom: 1rem; }
.chart-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    font-weight: 500;
}
.chart-bar-label strong { color: var(--primary); }
.chart-bar-track {
    height: 10px;
    background: var(--bg);
    border-radius: 5px;
    overflow: hidden;
}
.chart-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease-out;
    width: 0;
}

.statut-cards { display: flex; flex-direction: column; gap: 0.75rem; }
.statut-mini-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
}
.statut-mini-card i { font-size: 1.2rem; }
.statut-mini-card strong { display: block; font-size: 1.1rem; }
.statut-mini-card span { font-size: 0.8rem; color: var(--text-light); }

/* ─── Tables ─── */
.table-responsive { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    background: var(--bg);
    padding: 0.85rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    text-align: left;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    vertical-align: middle;
}

.table-hover tbody tr { transition: var(--transition); }
.table-hover tbody tr:hover { background: rgba(43,188,179,0.03); }

.table-sm td, .table-sm th { padding: 0.5rem 0.75rem; font-size: 0.8rem; }

.table tfoot td {
    padding: 0.85rem 1rem;
    font-weight: 700;
    background: var(--bg);
    border-top: 2px solid var(--border);
}

.student-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.student-cell small { display: block; color: var(--text-light); font-size: 0.75rem; }

.student-thumb {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}
.student-thumb-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ─── Badges ─── */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-light { background: var(--bg); color: var(--text-light); }
.badge-teal { background: rgba(43,188,179,0.12); color: #1a9e96; }
.badge-navy { background: rgba(26,58,92,0.1); color: var(--primary); }
.badge-gold { background: rgba(212,168,67,0.15); color: #b8892e; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: #e67e22; }
.badge-danger { background: var(--danger-bg); color: var(--danger); }

/* ─── Toolbar ─── */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 0.75rem; }
.results-count {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ─── Filters ─── */
.filter-card { margin-bottom: 1.5rem; }
.filter-form {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    flex-wrap: wrap;
}

.filter-group { flex: 1; min-width: 160px; }

.search-input-wrapper {
    position: relative;
}
.search-input-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.search-input {
    width: 100%;
    padding: 0.65rem 0.75rem 0.65rem 2.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.875rem;
    transition: var(--transition);
}
.search-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(43,188,179,0.12);
}

.filter-select {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}
.filter-select:focus {
    outline: none;
    border-color: var(--secondary);
}

.filter-actions { display: flex; gap: 0.5rem; }

/* ─── Forms ─── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
.form-group.full-width { grid-column: 1 / -1; }

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.required { color: var(--danger); }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.875rem;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(43,188,179,0.12);
}

.form-group textarea { resize: vertical; min-height: 80px; }
.form-group small { display: block; margin-top: 0.3rem; font-size: 0.75rem; color: var(--text-light); }

.input-readonly { background: var(--bg) !important; color: var(--text-light) !important; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* ─── Multi-Step Form ─── */
.form-steps {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    transition: var(--transition);
    cursor: default;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    font-size: 0.75rem;
    font-weight: 700;
    transition: var(--transition);
}

.step.active {
    color: var(--primary);
    background: rgba(43,188,179,0.08);
}
.step.active .step-number {
    background: var(--secondary);
    color: white;
}

.step.completed .step-number {
    background: var(--success);
    color: white;
}
.step.completed { color: var(--success); }

.form-step-content { display: none; animation: fadeInUp 0.3s ease-out; }
.form-step-content.active { display: block; }

.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.nav-spacer { flex: 1; }

/* ─── Cycle Cards ─── */
.niveaux-visual {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.cycle-card {
    padding: 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}
.cycle-card:hover {
    border-color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.cycle-card.selected {
    border-color: var(--secondary);
    background: rgba(43,188,179,0.05);
}

.cycle-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

.cycle-card h4 { font-size: 1rem; color: var(--text); margin-bottom: 0.3rem; }
.cycle-card p { font-size: 0.7rem; color: var(--text-light); line-height: 1.4; }

/* ─── Photo Upload ─── */
.photo-upload {
    position: relative;
}
.photo-upload input[type="file"] {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.photo-preview {
    width: 120px;
    height: 120px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 0.4rem;
    transition: var(--transition);
    overflow: hidden;
}
.photo-preview:hover { border-color: var(--secondary); }
.photo-preview i { font-size: 1.5rem; }
.photo-preview span { font-size: 0.7rem; }
.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Documents Checklist ─── */
.documents-checklist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.doc-check {
    cursor: pointer;
}
.doc-check input { display: none; }
.doc-check-visual {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
}
.doc-check-visual i { font-size: 1.2rem; color: var(--text-muted); }

.doc-check input:checked + .doc-check-visual {
    border-color: var(--success);
    background: var(--success-bg);
}
.doc-check input:checked + .doc-check-visual i { color: var(--success); }

.doc-check:hover .doc-check-visual {
    border-color: var(--secondary);
}

/* ─── Payment Display ─── */
.reste-display {
    padding: 0.7rem 0.85rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--bg);
}
.reste-danger { color: var(--danger); border-color: var(--danger); background: var(--danger-bg); }
.reste-success { color: var(--success); border-color: var(--success); background: var(--success-bg); }

/* ─── Show page ─── */
.inscription-header-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.inscription-header-card.compact { padding: 1rem 1.5rem; }

.inscription-header-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.inscription-photo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.inscription-photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.inscription-header-info h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
}

.inscription-numero {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0.3rem 0;
}

.inscription-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.date-info {
    text-align: right;
}
.date-info small { display: block; font-size: 0.75rem; color: var(--text-light); }
.date-info strong { font-size: 0.9rem; color: var(--text); }

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.detail-list { }
.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}
.detail-item:last-child { border-bottom: none; }
.detail-label { color: var(--text-light); font-size: 0.85rem; }
.detail-value { font-weight: 600; font-size: 0.85rem; text-align: right; }

.doc-status-list { display: flex; flex-direction: column; gap: 0.5rem; }
.doc-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
}
.doc-ok { background: var(--success-bg); color: var(--success); }
.doc-missing { background: var(--danger-bg); color: var(--danger); }

.payment-summary { }
.payment-item {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.9rem;
}
.payment-item:last-child { border: none; }

.payment-summary-mini {
    display: flex;
    gap: 2rem;
}
.payment-summary-mini > div {
    text-align: center;
}
.payment-summary-mini small { display: block; font-size: 0.7rem; color: var(--text-light); }
.payment-summary-mini strong { font-size: 1rem; }

/* ─── Empty states ─── */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
}
.empty-state i { font-size: 3rem; color: var(--text-muted); margin-bottom: 1rem; }
.empty-state h4 { font-size: 1.1rem; color: var(--text); margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.9rem; margin-bottom: 1.5rem; }

.empty-state-small {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-light);
}
.empty-state-small i { font-size: 2rem; color: var(--text-muted); margin-bottom: 0.5rem; display: block; }

/* ─── Grids ─── */
.content-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* ─── Text helpers ─── */
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-light) !important; }

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; width: 100%; }
    .sidebar-toggle { display: flex; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .details-grid { grid-template-columns: 1fr; }
    .content-grid-2 { grid-template-columns: 1fr; }
    .niveaux-visual { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .page-content { padding: 1rem; }
    .topbar { padding: 0 1rem; }
    .form-grid { grid-template-columns: 1fr; }
    .documents-checklist { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .filter-form { flex-direction: column; }
    .filter-group { min-width: 100%; }
    .page-toolbar { flex-direction: column; align-items: flex-start; }
    .inscription-header-card { flex-direction: column; align-items: flex-start; }
    .payment-summary-mini { flex-wrap: wrap; gap: 1rem; }
    .documents-upload-grid { grid-template-columns: 1fr; }
    .doc-display-grid { grid-template-columns: 1fr; }
    .contact-fields { flex-direction: column; }
}

/* ===================================================================
   DOCUMENT UPLOAD
   =================================================================== */
.documents-upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
.doc-upload-item {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: var(--transition);
    background: var(--bg);
    position: relative;
}
.doc-upload-item:hover { border-color: var(--secondary); background: rgba(43,188,179,0.03); }
.doc-upload-label {
    font-weight: 600; color: var(--primary); margin-bottom: 0.75rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.doc-upload-label i { color: var(--secondary); }
.doc-file-input { position: absolute; width: 0; height: 0; opacity: 0; overflow: hidden; }
.doc-file-label {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1rem; background: white; border: 1px solid var(--border);
    border-radius: var(--radius-sm); cursor: pointer; font-size: 0.85rem;
    color: var(--text-light); transition: var(--transition);
}
.doc-file-label:hover { border-color: var(--secondary); color: var(--secondary); }
.doc-file-label.file-selected { border-color: var(--success); color: var(--success); background: var(--success-bg); }
.doc-file-label i { font-size: 1.1rem; }

.doc-display-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.doc-display-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.85rem 1rem; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--bg);
}
.doc-display-info { display: flex; align-items: center; gap: 0.75rem; }
.doc-display-info i { font-size: 1.2rem; }
.doc-display-info.doc-uploaded i { color: var(--success); }
.doc-display-info.doc-missing i { color: var(--text-light); opacity: 0.4; }
.doc-display-info .doc-name { font-weight: 500; font-size: 0.9rem; }
.doc-display-info.doc-missing .doc-name { color: var(--text-light); }
.doc-actions { display: flex; gap: 0.5rem; }
.doc-actions .btn-doc {
    padding: 0.35rem 0.65rem; border-radius: var(--radius-sm); font-size: 0.75rem;
    font-weight: 500; text-decoration: none; transition: var(--transition);
    display: flex; align-items: center; gap: 0.3rem; border: none; cursor: pointer;
}
.btn-doc-view { background: var(--info-bg); color: var(--info); }
.btn-doc-view:hover { background: var(--info); color: white; }
.btn-doc-download { background: var(--success-bg); color: var(--success); }
.btn-doc-download:hover { background: var(--success); color: white; }

/* ===================================================================
   CONTACTS D'URGENCE
   =================================================================== */
.contact-row {
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 1rem;
    margin-bottom: 0.75rem; animation: fadeInUp 0.3s ease-out;
}
.contact-fields { display: flex; gap: 0.75rem; align-items: center; }
.contact-field { flex: 1; }
.contact-field input, .contact-field select {
    width: 100%; padding: 0.6rem 0.85rem; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.9rem; font-family: inherit;
    transition: var(--transition);
}
.contact-field input:focus, .contact-field select:focus {
    outline: none; border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(43,188,179,0.1);
}
.btn-remove-contact {
    background: var(--danger-bg); color: var(--danger); border: none;
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: var(--transition);
}
.btn-remove-contact:hover { background: var(--danger); color: white; }

.contacts-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.75rem; }
.contact-card {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.85rem 1rem; background: var(--bg);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.contact-card-icon {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 0.9rem; flex-shrink: 0;
}
.contact-card-info { flex: 1; }
.contact-card-info .contact-name { font-weight: 600; font-size: 0.9rem; }
.contact-card-info .contact-relation { font-size: 0.75rem; color: var(--text-light); }
.contact-card-info .contact-tel { font-size: 0.85rem; color: var(--secondary); font-weight: 500; }

/* ===================================================================
   TOGGLE SWITCH
   =================================================================== */
.toggle-wrapper { display: flex; align-items: center; gap: 0.75rem; }
.toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0; background: #ccc;
    border-radius: 26px; transition: 0.3s;
}
.toggle-slider::before {
    content: ""; position: absolute; height: 20px; width: 20px;
    bottom: 3px; left: 3px; background: white; border-radius: 50%; transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--secondary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }
.toggle-label { font-size: 0.9rem; color: var(--text); }

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
