/* ============================================
   STRUCTURE PRINCIPALE
   ============================================ */

.student-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
}

.dashboard-header {
    background: linear-gradient(135deg, #2c3e50, #4a6491);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
}

.user-info h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

.welcome-message {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 16px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.last-login {
    background: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
}

.last-login i {
    margin-right: 8px;
}

/* ============================================
   CARTES DE STATISTIQUES
   ============================================ */

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

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e9ecef;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #007cba, #005a87);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #ffc107, #e0a800);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #6f42c1, #5a2d9c);
}

.stat-content h3 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
}

.stat-content p {
    margin: 5px 0 0 0;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

.stat-progress {
    margin-top: 10px;
    width: 100%;
}

.progress-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #007cba, #005a87);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.stat-trend {
    margin-top: 10px;
    font-size: 12px;
}

.trend-up {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.trend-new {
    color: #007cba;
    background: rgba(0, 123, 202, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
}

/* ============================================
   LIENS RAPIDES
   ============================================ */

.dashboard-quick-links {
    margin-bottom: 40px;
}

.dashboard-quick-links h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.quick-link {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
    border: 2px solid transparent;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.quick-link:hover {
    border-color: #007cba;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    color: #007cba;
}

.link-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #007cba;
    font-size: 22px;
}

.quick-link:hover .link-icon {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
}

.link-content h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.link-content p {
    margin: 5px 0 0 0;
    color: #6c757d;
    font-size: 14px;
}

.link-arrow {
    margin-left: auto;
    color: #adb5bd;
    font-size: 18px;
}

.quick-link:hover .link-arrow {
    color: #007cba;
    transform: translateX(5px);
    transition: all 0.3s;
}

/* ============================================
   CONTENU PRINCIPAL
   ============================================ */

.dashboard-content {
   
    display: block;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.content-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    margin: 0;
    font-size: 22px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: #007cba;
}

.view-all {
    color: #007cba;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.view-all:hover {
    color: #005a87;
    gap: 8px;
}

/* ============================================
   GRILLE DES COURS
   ============================================ */

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 1px solid #e9ecef;
}

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

.course-image {
    height: 160px;
    overflow: hidden;
    position: relative;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.course-card:hover .course-image img {
    transform: scale(1.05);
}

.course-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 48px;
}

.course-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
}

.course-badge.completed {
    background: rgba(40, 167, 69, 0.9);
}

.course-badge.in-progress {
    background: rgba(0, 123, 202, 0.9);
}

.course-badge.not-started {
    background: rgba(108, 117, 125, 0.9);
}

.course-content {
    padding: 20px;
}

.course-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.course-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.course-title a:hover {
    color: #007cba;
}

.course-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #6c757d;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item i {
    font-size: 12px;
}

.course-progress {
    margin-bottom: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #6c757d;
}

.course-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-continue, .btn-certificate {
    flex: 1;
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-continue {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    border: none;
}

.btn-continue:hover {
    background: linear-gradient(135deg, #005a87, #003d5c);
    color: white;
}

.btn-certificate {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    border: none;
}

.btn-certificate:hover {
    background: linear-gradient(135deg, #1e7e34, #145523);
    color: white;
}

.btn-outline {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-outline:hover {
    border-color: #007cba;
    color: #007cba;
    background: #f8f9fa;
}

.course-last-access {
    font-size: 12px;
    color: #adb5bd;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ============================================
   TABLEAU DES FACTURES
   ============================================ */

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

.invoices-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
}

.invoices-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.invoices-table tbody tr {
    transition: background 0.3s;
}

.invoices-table tbody tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.badge-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #e0a800;
}

.badge-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.badge-info {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.invoice-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    background: white;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-action:hover {
    border-color: #007cba;
    color: #007cba;
    background: #f8f9fa;
}

.btn-pay:hover {
    border-color: #28a745;
    color: #28a745;
}

/* ============================================
   FORMULAIRE DE PROFIL
   ============================================ */

.profile-form-container {
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 202, 0.1);
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

.form-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.form-section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.form-submit {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-save {
    padding: 12px 30px;
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-save:hover {
    background: linear-gradient(135deg, #005a87, #003d5c);
    transform: translateY(-2px);
}

.form-message {
    flex: 1;
    min-height: 20px;
}

/* ============================================
   CERTIFICATS
   ============================================ */

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.certificate-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s;
}

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

.certificate-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f8f9fa;
}

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

.certificate-info h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.certificate-date {
    margin: 5px 0 0 0;
    color: #6c757d;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.certificate-details {
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-label {
    color: #6c757d;
    font-weight: 500;
}

.detail-value {
    color: #2c3e50;
    font-weight: 600;
}

.grade-excellent {
    color: #28a745;
}

.grade-good {
    color: #17a2b8;
}

.grade-average {
    color: #ffc107;
}

.grade-poor {
    color: #dc3545;
}

.certificate-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-share {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    border: 2px solid #e9ecef;
    background: white;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-share:hover {
    border-color: #007cba;
    color: #007cba;
}

.certificate-share {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.certificate-share input {
    width: 100%;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
    background: white;
}

.btn-copy {
    padding: 8px 15px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-copy:hover {
    background: #545b62;
}

/* ============================================
   GRAPHIQUES DE PROGRESSION
   ============================================ */

.progress-chart-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.chart-wrapper {
    height: 300px;
    margin-bottom: 30px;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.progress-stat {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stat-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #007cba;
}

/* ============================================
   BARRE LATÉRALE
   ============================================ */

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.sidebar-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-section h3 i {
    color: #007cba;
}

.announcements-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.announcement-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.announcement-item:last-child {
    border-bottom: none;
}

.announcement-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    display: block;
    text-decoration: none;
    transition: color 0.3s;
}

.announcement-title:hover {
    color: #007cba;
}

.announcement-date {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ============================================
   ÉTATS VIDES
   ============================================ */

.empty-courses,
.empty-invoices,
.empty-certificates,
.login-required {
    text-align: center;
    padding: 50px 30px;
    background: white;
    border-radius: 12px;
    border: 2px dashed #e9ecef;
}

.empty-icon {
    font-size: 60px;
    color: #adb5bd;
    margin-bottom: 20px;
}

.empty-courses h3,
.empty-invoices h3,
.empty-certificates h3,
.login-required h2 {
    color: #6c757d;
    margin-bottom: 10px;
}

.empty-courses p,
.empty-invoices p,
.empty-certificates p,
.login-required p {
    color: #adb5bd;
    margin-bottom: 20px;
}

.login-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .user-welcome {
        flex-direction: column;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .quick-links-grid {
        grid-template-columns: 1fr;
    }
    
    .courses-grid,
    .certificates-grid {
        grid-template-columns: 1fr;
    }
    
    .course-actions {
        flex-direction: column;
    }
    
    .invoice-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .course-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .login-actions {
        flex-direction: column;
    }
}


/* ===== TABLEAU DES FORMATIONS ===== */
.enrolled-courses-list {
    margin-top: 20px;
}

.courses-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.courses-table th {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.courses-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.courses-table tbody tr {
    transition: background 0.3s;
}

.courses-table tbody tr:hover {
    background: #f8f9fa;
}

.courses-table .order-number {
    font-family: 'Courier New', monospace;
    color: #666;
    font-size: 13px;
}

.courses-table .course-price {
    font-weight: 600;
    color: #007cba;
}

.course-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    background: white;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-action:hover {
    border-color: #007cba;
    color: #007cba;
    background: #f8f9fa;
}

.btn-action i {
    font-size: 14px;
}

.view-all-container {
    margin-top: 20px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* ===== MESSAGES VIDES ===== */
.empty-courses-message {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #dee2e6;
}

.empty-courses-message p {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 16px;
}

/* ===== BADGES ===== */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #e0a800;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.badge-info {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
    border: 1px solid rgba(23, 162, 184, 0.2);
}

.badge-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .courses-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .course-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-action {
        width: 32px;
        height: 32px;
    }
}




/* ============================================
   PAGE FACTURES - STATISTIQUES HORIZONTALES
   ============================================ */

.student-invoices-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    color: #2c3e50;
    font-size: 32px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-header p {
    color: #6c757d;
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* Bouton de retour */
.back-to-dashboard {
    margin-bottom: 30px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: #f8f9fa;
    color: #007cba;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    border: 2px solid #e9ecef;
    transition: all 0.3s;
}

.btn-back:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* Grille des statistiques */
.invoices-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e9ecef;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.summary-icon {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    background: linear-gradient(135deg, #007cba, #005a87);
}

.summary-icon.paid {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.summary-icon.pending {
    background: linear-gradient(135deg, #ffc107, #e0a800);
}

.summary-icon.amount {
    background: linear-gradient(135deg, #6f42c1, #5a2d9c);
}

.summary-content h3 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.summary-content p {
    margin: 5px 0 0 0;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

/* Filtres */
.invoices-filters {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

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

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.filter-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    background: white;
    transition: all 0.3s;
}

.filter-group select:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 202, 0.1);
}

.btn-filter, .btn-reset {
    padding: 12px 25px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-filter {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
}

.btn-filter:hover {
    background: linear-gradient(135deg, #005a87, #003d5c);
}

.btn-reset {
    background: #6c757d;
    color: white;
}

.btn-reset:hover {
    background: #545b62;
}

/* Tableau des factures */
.invoices-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    margin-bottom: 30px;
}

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

.invoices-table th {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    padding: 18px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
}

.invoices-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.invoices-table tbody tr {
    transition: background 0.3s;
}

.invoices-table tbody tr:hover {
    background: #f8f9fa;
}

.invoices-table .badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.invoices-table .badge-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.invoices-table .badge-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #e0a800;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.invoices-table .badge-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.invoice-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    background: white;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-action:hover {
    border-color: #007cba;
    color: #007cba;
    background: #f8f9fa;
    transform: translateY(-2px);
}

.btn-pay:hover {
    border-color: #28a745;
    color: #28a745;
}

.back-to-dashboard-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.back-to-dashboard-bottom .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .invoices-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .invoices-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .invoice-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-action {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .invoices-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-card {
        flex-direction: column;
        text-align: center;
    }
    
    .page-header h1 {
        font-size: 24px;
        flex-direction: column;
        gap: 10px;
    }
}


/* ============================================
   TABLEAUX RESPONSIVES
   ============================================ */

.enrolled-courses-container,
.invoices-table-container {
    overflow: visible !important;
}

.courses-table-wrapper,
.invoices-table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
    background: white;
    border: 1px solid #e9ecef;
}

.courses-table-wrapper {
    max-width: 100%;
}

.courses-table,
.invoices-table {
    min-width: 800px;
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.courses-table th,
.invoices-table th {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.courses-table td,
.invoices-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    white-space: nowrap;
}

/* Pour les écrans moyens */
@media (max-width: 1024px) {
    .courses-table th,
    .courses-table td,
    .invoices-table th,
    .invoices-table td {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .course-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-action {
        width: 32px;
        height: 32px;
    }
}

/* Pour les mobiles - conversion en cartes */
@media (max-width: 768px) {
    .courses-table-wrapper,
    .invoices-table-responsive {
        overflow-x: visible;
        background: transparent;
        border: none;
    }
    
    .courses-table,
    .invoices-table {
        min-width: 100%;
        display: block;
    }
    
    .courses-table thead,
    .invoices-table thead {
        display: none;
    }
    
    .courses-table tbody,
    .invoices-table tbody {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .courses-table tr,
    .invoices-table tr {
        display: flex;
        flex-direction: column;
        background: white;
        border-radius: 10px;
        padding: 20px;
        border: 1px solid #e9ecef;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    
    .courses-table td,
    .invoices-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
        white-space: normal;
    }
    
    .courses-table td:last-child,
    .invoices-table td:last-child {
        border-bottom: none;
        padding-top: 15px;
    }
    
    .courses-table td::before,
    .invoices-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #2c3e50;
        flex: 0 0 120px;
        font-size: 13px;
    }
    
    .courses-table td > *,
    .invoices-table td > * {
        flex: 1;
        text-align: right;
    }
    
    .course-actions {
        justify-content: flex-end;
    }
    
    .badge {
        margin-left: auto;
    }
}

/* Pour les très petits écrans */
@media (max-width: 480px) {
    .courses-table td::before,
    .invoices-table td::before {
        flex: 0 0 100px;
        font-size: 12px;
    }
    
    .courses-table td,
    .invoices-table td {
        padding: 8px 0;
        font-size: 14px;
    }
    
    .order-number,
    .course-price {
        font-size: 13px;
    }
}

/* ============================================
   MESSAGES D'INFORMATION
   ============================================ */

.no-paid-courses-message {
    text-align: center;
    padding: 50px 30px;
    background: white;
    border-radius: 12px;
    border: 2px dashed #e9ecef;
    margin: 20px 0;
}

.message-icon {
    font-size: 60px;
    color: #ffc107;
    margin-bottom: 20px;
}

.no-paid-courses-message h3 {
    color: #e0a800;
    margin-bottom: 15px;
    font-size: 22px;
}

.no-paid-courses-message p {
    color: #6c757d;
    margin-bottom: 25px;
    font-size: 16px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.empty-courses-message {
    text-align: center;
    padding: 50px 30px;
    background: white;
    border-radius: 12px;
    border: 2px dashed #e9ecef;
    margin: 20px 0;
}

.empty-courses-message .empty-icon {
    font-size: 60px;
    color: #adb5bd;
    margin-bottom: 20px;
}

.empty-courses-message h3 {
    color: #6c757d;
    margin-bottom: 10px;
}

.empty-courses-message p {
    color: #adb5bd;
    margin-bottom: 25px;
    font-size: 16px;
}

/* Boutons dans les messages */
.no-paid-courses-message .btn,
.empty-courses-message .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    font-size: 16px;
}

.no-paid-courses-message .btn {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    border: none;
}

.no-paid-courses-message .btn:hover {
    background: linear-gradient(135deg, #e0a800, #d39e00);
}