/* ===================================
   ESPACE ÉLÈVE STYLES
   =================================== */

body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.back-btn {
    background: transparent;
    color: var(--text-dark);
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* ===================================
   AUTH SECTION
   =================================== */
.auth-section {
    padding: 120px 0 60px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.auth-container {
    max-width: 500px;
    margin: 0 auto;
}

.auth-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.6s ease-out;
}

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

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header i {
    font-size: 60px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.auth-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-light);
    font-size: 14px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: var(--primary-color);
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.auth-submit-btn {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.auth-submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.auth-switch a {
    color: var(--primary-color);
    font-weight: 600;
    margin-left: 5px;
}

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

/* ===================================
   DASHBOARD SECTION
   =================================== */
.dashboard-section {
    padding: 120px 0 60px;
    min-height: 100vh;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.welcome-message h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.welcome-message h1 span {
    color: var(--primary-color);
}

.welcome-message p {
    color: var(--text-light);
    font-size: 14px;
}

.logout-btn {
    background: transparent;
    color: var(--primary-color);
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Stats Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stats-card {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.stats-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--white);
}

.stats-info h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.stats-info p {
    font-size: 14px;
    color: var(--text-light);
}

/* Dashboard Content */
.dashboard-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.dashboard-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.card-header {
    background: var(--light-bg);
    padding: 20px 25px;
    border-bottom: 2px solid #e9ecef;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header i {
    color: var(--primary-color);
}

.card-body {
    padding: 25px;
}

/* Profile */
.profile-info {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.profile-avatar {
    flex-shrink: 0;
}

.profile-avatar i {
    font-size: 80px;
    color: var(--primary-color);
}

.profile-details {
    flex: 1;
}

.profile-details p {
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-dark);
}

.profile-details strong {
    font-weight: 600;
    margin-right: 10px;
}

.status-badge {
    background: var(--success);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Cours List */
.cours-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cours-item {
    background: var(--light-bg);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.cours-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.cours-item p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state i {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 15px;
}

.empty-state p {
    color: var(--text-light);
    font-size: 14px;
}

/* Documents */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.document-item {
    background: var(--light-bg);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.document-item i:first-child {
    font-size: 24px;
    color: var(--primary-color);
}

.document-item span {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.download-btn {
    width: 35px;
    height: 35px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.download-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease-out;
}

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

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-content {
        grid-template-columns: 1fr;
    }

    .profile-info {
        flex-direction: column;
        text-align: center;
    }

    .auth-card {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 25px 15px;
    }

    .auth-header h2 {
        font-size: 1.5rem;
    }

    .form-group input,
    .form-group select {
        font-size: 14px;
        padding: 10px 12px;
    }

    .auth-btn {
        padding: 12px;
        font-size: 14px;
    }

    .back-btn {
        font-size: 14px;
        padding: 8px 15px;
    }
}
