/* ===== SYSTÈME DE GESTION DES ÉTUDIANTS - KHOMBOLE PREMIUM ===== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Variables CSS Premium */
:root {
    /* Couleurs principales du logo Khombole - Version Premium */
    --primary-green: #059669;
    --light-green: #10b981;
    --emerald: #065f46;
    --mint: #6ee7b7;
    --primary-blue: #1e3a8a;
    --light-blue: #3b82f6;
    --navy: #1e40af;
    --sky: #0ea5e9;
    
    /* Couleurs système premium */
    --white: #ffffff;
    --pearl: #fefefe;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Couleurs d'état premium */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --error: #ef4444;
    --error-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    
    /* Gradients premium */
    --gradient-primary: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 50%, var(--primary-blue) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--light-blue) 0%, var(--sky) 100%);
    --gradient-success: linear-gradient(135deg, var(--success) 0%, var(--mint) 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    
    /* Ombres premium */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(5, 150, 105, 0.3);
    
    /* Bordures premium */
    --border-radius-sm: 6px;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-full: 9999px;
}

/* Animations globales */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Reset et base premium */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, 
        var(--gray-50) 0%, 
        var(--gray-100) 25%,
        var(--pearl) 50%,
        var(--gray-100) 75%,
        var(--gray-50) 100%);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    animation: fadeIn 0.5s ease-out;
}

/* Header moderne */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        var(--shadow-sm),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header:hover {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    position: relative;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.site-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.site-subtitle {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
    margin-top: -0.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Cards modernes */
.card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    border-bottom: 2px solid var(--primary-green);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.card-title {
    color: var(--gray-900);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.3s;
}

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

.btn-logout {
    background-color: var(--secondary-green);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: var(--white);
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-logout:hover {
    background-color: #047857;
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-gray);
}

.card-header {
    border-bottom: 2px solid var(--primary-blue);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.card-title {
    color: var(--primary-blue);
    font-size: 1.5rem;
    font-weight: bold;
}

/* Formulaires modernes */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background-color: var(--white);
    color: var(--gray-900);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
    transform: translateY(-1px);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

/* Boutons modernes */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    min-height: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 100%);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--light-green) 0%, var(--primary-green) 100%);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--light-green) 100%);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--gray-500);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--gray-600);
    transform: translateY(-2px);
}

/* Profile section */
.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 100%);
    color: var(--white);
    border-radius: 12px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
}

.profile-info h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.profile-info p {
    opacity: 0.9;
}

/* Actions rapides */
.quick-actions {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
}

.action-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--light-green));
}

.action-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.action-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.action-card p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: var(--white);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Barre de progression */
.completion-bar {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green), var(--light-green));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--gray-600);
    font-weight: 600;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--white) 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border-left: 4px solid var(--secondary-green);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--dark-gray);
    font-weight: 600;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.table th {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-light-blue) 100%);
    color: var(--white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-gray);
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

/* Search */
.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: end;
}

.search-input {
    flex: 1;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d1fae5;
    border-color: var(--secondary-green);
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    border-color: #dc2626;
    color: #991b1b;
}

.alert-info {
    background-color: #dbeafe;
    border-color: var(--accent-light-blue);
    color: #1e40af;
}

/* Auth pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-light-blue) 100%);
}

.auth-card {
    background: var(--white);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

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

.auth-logo img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.auth-title {
    color: var(--primary-blue);
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-link a {
    color: var(--accent-light-blue);
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Profile section */
.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-light-blue) 100%);
    color: var(--white);
    border-radius: 12px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
}

.profile-info h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.profile-info p {
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
        font-size: 1.5rem;
    }
    
    .profile-info h2 {
        font-size: 1.5rem;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
}

/* File upload */
.file-upload {
    border: 2px dashed var(--border-gray);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s;
}

.file-upload:hover {
    border-color: var(--accent-light-blue);
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload-label {
    cursor: pointer;
    color: var(--accent-light-blue);
    font-weight: 600;
}

/* CV viewer */
.cv-viewer {
    background: var(--white);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-gray);
}

.cv-link {
    color: var(--accent-light-blue);
    text-decoration: none;
    font-weight: 600;
}

.cv-link:hover {
    text-decoration: underline;
}
