/**
 * Styles du tableau de bord étudiant
 * 
 * @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-dashboard-wrapper {
    max-width: 1200px;
    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, #2271b1 0%, #135e96 100%);
    border-radius: 10px;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(34, 113, 177, 0.3);
}

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

.saspm-welcome h1 .student-name {
    color: #ffd54f;
}

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

.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;
}

/* Grid Cards */
.saspm-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.saspm-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

/* Cards */
.saspm-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.saspm-card-header {
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.saspm-card-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2271b1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.saspm-card-header h2 .dashicons {
    width: 24px;
    height: 24px;
    font-size: 24px;
}

.saspm-card-body {
    padding: 25px;
}

/* Informations Profil */
.saspm-profile-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.saspm-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.saspm-info-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.saspm-info-item.saspm-full-width {
    grid-column: 1 / -1;
    flex-direction: column;
    gap: 8px;
}

.saspm-info-item .label {
    font-weight: 600;
    color: #666666;
    font-size: 14px;
    flex-shrink: 0;
}

.saspm-info-item .value {
    color: #333333;
    font-size: 14px;
    text-align: right;
    word-break: break-word;
}

.saspm-info-item.saspm-full-width .value {
    text-align: left;
}

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

.saspm-document-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.saspm-document-item:hover {
    background: #e9ecef;
}

.saspm-document-item .dashicons {
    color: #2271b1;
    flex-shrink: 0;
}

.saspm-document-item a {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
}

.saspm-document-item a:hover {
    text-decoration: underline;
}

/* Formulaire */
.saspm-profile-form .saspm-form-field {
    margin-bottom: 20px;
}

.saspm-profile-form .saspm-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.saspm-profile-form input[type="text"],
.saspm-profile-form input[type="tel"],
.saspm-profile-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.saspm-profile-form input:focus,
.saspm-profile-form textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.saspm-profile-form textarea {
    resize: vertical;
    min-height: 80px;
}

.saspm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.saspm-form-actions {
    margin-top: 25px;
}

.saspm-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #2271b1;
    color: #ffffff;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

.saspm-submit-btn:hover {
    background-color: #135e96;
}

.saspm-submit-btn:active {
    transform: translateY(1px);
}

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

/* Card Statut */
.saspm-card-status {
    grid-column: 1 / -1;
}

.saspm-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
}

.saspm-status-validated {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

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

.saspm-status-date {
    margin: 15px 0 0 0;
    color: #666666;
    font-size: 14px;
}

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

.saspm-notice-success {
    background-color: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.saspm-notice-warning {
    background-color: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.saspm-notice-error {
    background-color: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.saspm-notice-info {
    background-color: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

.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: #2271b1;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.saspm-button:hover {
    background-color: #135e96;
}

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

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

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

    .saspm-info-item {
        flex-direction: column;
        gap: 5px;
        align-items: start;
    }

    .saspm-info-item .value {
        text-align: left;
    }

    .saspm-form-row {
        grid-template-columns: 1fr;
    }

    .saspm-submit-btn {
        width: 100%;
        justify-content: center;
    }
}
