/**
 * Styles du tableau de bord appariteur
 * 
 * @package Soft_Academia_SM
 * @since 1.0.0
 */

/* Masquer le header du site WordPress sur la page de dashboard */
body.saspm-dashboard-page header,
body.saspm-dashboard-page .site-header,
body.saspm-dashboard-page #masthead,
body.saspm-dashboard-page .header,
body.saspm-dashboard-page .page-header,
body.saspm-dashboard-page nav.navbar,
body.saspm-dashboard-page .top-header,
body.saspm-dashboard-page .main-header,
body.saspm-dashboard-page #site-header,
body.saspm-dashboard-page .site-navigation,
body.saspm-dashboard-page #site-navigation,
body.saspm-dashboard-page .primary-navigation,
body.saspm-dashboard-page #header,
body.saspm-dashboard-page .elementor-location-header {
    display: none !important;
}

/* Masquer les menus de navigation */
body.saspm-dashboard-page .main-navigation,
body.saspm-dashboard-page #main-navigation,
body.saspm-dashboard-page .primary-menu,
body.saspm-dashboard-page #primary-menu {
    display: none !important;
}

/* Conteneur principal */
.saspm-apparitor-dashboard-wrapper {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Header Dashboard */
.saspm-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-radius: 10px;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.saspm-welcome h1 {
    margin: 0 0 5px 0;
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
}

.saspm-welcome h1 .user-name {
    color: #fbbf24;
}

.saspm-subtitle {
    margin: 0;
    font-size: 16px;
    color: #dbeafe;
}

.saspm-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.saspm-logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.saspm-logout-btn .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

/* Grille de statistiques */
.saspm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.saspm-stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.saspm-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.saspm-stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 32px;
}

.saspm-stat-total .saspm-stat-icon {
    background: #dbeafe;
    color: #1e40af;
}

.saspm-stat-pending .saspm-stat-icon {
    background: #fef3c7;
    color: #d97706;
}

.saspm-stat-validated .saspm-stat-icon {
    background: #d1fae5;
    color: #059669;
}

.saspm-stat-content h3 {
    margin: 0 0 5px 0;
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
}

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

/* Actions rapides */
.saspm-quick-actions {
    margin-bottom: 40px;
}

.saspm-quick-actions h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
}

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

.saspm-action-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
}

.saspm-action-card:hover {
    border-color: #1e40af;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.2);
    transform: translateY(-2px);
}

.saspm-action-card .dashicons {
    width: 48px;
    height: 48px;
    font-size: 48px;
    color: #1e40af;
    margin-bottom: 15px;
}

.saspm-action-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.saspm-action-card p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.saspm-action-card .saspm-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: #dc2626;
    color: #ffffff;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
}

/* Sections */
.saspm-section {
    margin-bottom: 40px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.saspm-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 20px 25px;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.saspm-section h2 .dashicons {
    width: 24px;
    height: 24px;
    font-size: 24px;
    color: #1e40af;
}

/* Tableau étudiants */
.saspm-students-table {
    overflow-x: auto;
}

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

.saspm-students-table thead {
    background: #f9fafb;
}

.saspm-students-table th {
    padding: 15px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e7eb;
}

.saspm-students-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #1f2937;
}

.saspm-students-table tbody tr:hover {
    background: #f9fafb;
}

.saspm-students-table tbody tr:last-child td {
    border-bottom: none;
}

/* Boutons */
.saspm-btn-small {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.saspm-btn-primary {
    background-color: #1e40af;
    color: #ffffff;
}

.saspm-btn-primary:hover {
    background-color: #1e3a8a;
    color: #ffffff;
}

/* Badge de statut */
.saspm-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.saspm-status-validated {
    background: #d1fae5;
    color: #065f46;
}

.saspm-status-badge .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* Footer de section */
.saspm-section-footer {
    padding: 15px 25px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.saspm-btn-link {
    color: #1e40af;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s;
}

.saspm-btn-link:hover {
    color: #1e3a8a;
    text-decoration: underline;
}

/* Notices */
.saspm-notice {
    padding: 20px 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 4px solid;
}

.saspm-notice-success {
    background-color: #d1fae5;
    border-left-color: #10b981;
    color: #065f46;
}

.saspm-notice-warning {
    background-color: #fef3c7;
    border-left-color: #f59e0b;
    color: #92400e;
}

.saspm-notice-error {
    background-color: #fee2e2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.saspm-notice-info {
    background-color: #dbeafe;
    border-left-color: #3b82f6;
    color: #1e3a8a;
}

.saspm-notice h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.saspm-notice p {
    margin: 5px 0;
}

.saspm-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #1e40af;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.saspm-button:hover {
    background-color: #1e3a8a;
}

/* Responsive */
@media (max-width: 768px) {
    .saspm-dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .saspm-welcome h1 {
        font-size: 24px;
    }

    .saspm-stats-grid,
    .saspm-actions-grid {
        grid-template-columns: 1fr;
    }

    .saspm-students-table {
        font-size: 12px;
    }

    .saspm-students-table th,
    .saspm-students-table td {
        padding: 10px 12px;
    }
}
