/**
 * Module 8 - Styles Frontend
 * Styles pour les pages enseignant avancées
 *
 * @package Soft_Academia_SM
 * @subpackage Module_8
 * @since 1.0.0
 */

/* === Base Module 8 === */
.saspm-module8-page {
    min-height: 100vh;
    background: #f5f7fa;
}

.saspm-module8-page .site-content {
    padding: 20px;
}

/* === Messages === */
.saspm-message {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.saspm-message-info {
    background: #e7f3ff;
    border-left: 4px solid #2271b1;
    color: #2271b1;
}

.saspm-message-success {
    background: #ecf7ed;
    border-left: 4px solid #00a32a;
    color: #00a32a;
}

.saspm-message-error {
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    color: #d63638;
}

.saspm-message-warning {
    background: #fff8e5;
    border-left: 4px solid #f0b849;
    color: #9b6602;
}

.saspm-message p:last-child {
    margin-bottom: 0;
}

/* === Buttons === */
.saspm-module8-page .button,
.saspm-module8-page .btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.saspm-module8-page .button-primary,
.saspm-module8-page .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.saspm-module8-page .button-primary:hover,
.saspm-module8-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.saspm-module8-page .button-secondary,
.saspm-module8-page .btn-secondary {
    background: #fff;
    color: #667eea;
    border: 2px solid #667eea;
}

.saspm-module8-page .button-secondary:hover,
.saspm-module8-page .btn-secondary:hover {
    background: #667eea;
    color: #fff;
}

/* === Cards === */
.saspm-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.saspm-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.saspm-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f1;
}

.saspm-card-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    margin: 0;
}

.saspm-card-body {
    color: #50575e;
    line-height: 1.6;
}

/* === Tables === */
.saspm-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.saspm-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.saspm-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.saspm-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f1;
}

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

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

/* === Forms === */
.saspm-form-group {
    margin-bottom: 20px;
}

.saspm-form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1d2327;
}

.saspm-form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.saspm-form-control:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.saspm-form-control.is-invalid {
    border-color: #d63638;
}

.saspm-form-control.is-valid {
    border-color: #00a32a;
}

.saspm-form-error {
    color: #d63638;
    font-size: 13px;
    margin-top: 5px;
}

.saspm-form-help {
    color: #646970;
    font-size: 13px;
    margin-top: 5px;
}

/* === Badges === */
.saspm-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.saspm-badge-primary {
    background: #e7f3ff;
    color: #2271b1;
}

.saspm-badge-success {
    background: #ecf7ed;
    color: #00a32a;
}

.saspm-badge-danger {
    background: #fcf0f1;
    color: #d63638;
}

.saspm-badge-warning {
    background: #fff8e5;
    color: #9b6602;
}

.saspm-badge-info {
    background: #f0f6fc;
    color: #0969da;
}

/* === Modals === */
.saspm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.saspm-modal.is-active {
    display: flex;
}

.saspm-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.saspm-modal-header {
    padding: 24px;
    border-bottom: 2px solid #f0f0f1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.saspm-modal-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.saspm-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #646970;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 1;
}

.saspm-modal-close:hover {
    color: #d63638;
}

.saspm-modal-body {
    padding: 24px;
}

.saspm-modal-footer {
    padding: 20px 24px;
    border-top: 2px solid #f0f0f1;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* === Toast Notifications === */
.saspm-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    min-width: 300px;
    animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.saspm-toast-success {
    border-left: 4px solid #00a32a;
}

.saspm-toast-error {
    border-left: 4px solid #d63638;
}

.saspm-toast-info {
    border-left: 4px solid #2271b1;
}

.saspm-toast-warning {
    border-left: 4px solid #f0b849;
}

/* === Loading Spinner === */
.saspm-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.saspm-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.saspm-loading-overlay .saspm-loading {
    width: 50px;
    height: 50px;
    border-width: 5px;
}

/* === Responsive === */
@media (max-width: 768px) {
    .saspm-module8-page .site-content {
        padding: 15px;
    }
    
    .saspm-card {
        padding: 16px;
    }
    
    .saspm-modal-content {
        width: 95%;
    }
    
    .saspm-table {
        font-size: 14px;
    }
    
    .saspm-table th,
    .saspm-table td {
        padding: 10px 8px;
    }
}

/* === Error Page === */
.saspm-error {
    text-align: center;
    padding: 40px 20px;
}

.saspm-error h2 {
    color: #d63638;
    font-size: 24px;
    margin-bottom: 10px;
}

.saspm-error p {
    color: #646970;
    font-size: 16px;
}
