/* ================================
   ESPACE FORMATEUR - FRONTEND CSS OPTIMIS�
   Version responsive et performante
   ================================ */

/* ================================
   1. VARIABLES CSS ET RESET
   ================================ */

:root {
    /* Couleurs principales */
    --ef-primary: #667eea;
    --ef-primary-dark: #5a67d8;
    --ef-secondary: #764ba2;
    --ef-secondary-dark: #6b46c1;
    --ef-danger: #E2093A;
    --ef-danger-dark: #8B0000;
    --ef-dark: #000032;
    --ef-dark-light: #080840;
    
    /* Couleurs d'�tat */
    --ef-success: #38a169;
    --ef-success-light: #c6f6d5;
    --ef-warning: #f6e05e;
    --ef-warning-light: #fef5e7;
    --ef-error: #e53e3e;
    --ef-error-light: #fed7d7;
    
    /* Couleurs neutres */
    --ef-gray-50: #f9fafb;
    --ef-gray-100: #f3f4f6;
    --ef-gray-200: #e5e7eb;
    --ef-gray-300: #d1d5db;
    --ef-gray-400: #9ca3af;
    --ef-gray-500: #6b7280;
    --ef-gray-600: #4b5563;
    --ef-gray-700: #374151;
    --ef-gray-800: #1f2937;
    --ef-gray-900: #1e293b;
    
    /* Espacements */
    --ef-space-xs: 4px;
    --ef-space-sm: 8px;
    --ef-space-md: 12px;
    --ef-space-lg: 16px;
    --ef-space-xl: 20px;
    --ef-space-2xl: 24px;
    --ef-space-3xl: 32px;
    
    /* Border radius */
    --ef-radius-sm: 6px;
    --ef-radius-md: 8px;
    --ef-radius-lg: 12px;
    --ef-radius-xl: 16px;
    
    /* Ombres */
    --ef-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --ef-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --ef-shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
    --ef-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --ef-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ef-transition-fast: all 0.2s ease;
    
    /* Responsive breakpoints */
    --ef-mobile: 480px;
    --ef-tablet: 768px;
    --ef-desktop: 1024px;
    --ef-wide: 1200px;
}

/* Reset minimal pour les containers du plugin */
.espace-formateur-login-container *,
.espace-formateur-documents-container * {
    box-sizing: border-box;
}

/* ================================
   2. FORMULAIRE DE CONNEXION
   ================================ */

.espace-formateur-login-container {
    max-width: 420px;
    margin: 40px auto;
    padding: 20px;
}

.formateur-login-card {
    background: #ffffff;
    border-radius: var(--ef-radius-xl);
    box-shadow: var(--ef-shadow-xl);
    padding: 48px 32px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.formateur-login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ef-danger) 0%, var(--ef-dark) 49.6%);
}

.login-header {
    text-align: center;
    margin-bottom: var(--ef-space-3xl);
}

.login-header h2 {
    color: var(--ef-gray-900);
    font-weight: 700;
    margin: 0 0 var(--ef-space-md) 0;
    letter-spacing: -0.025em;
}

.login-header p,
.reset-header p {
    color: var(--ef-gray-500);
    margin: 0;
}
.reset-header p {
    margin-bottom: 2em;
	text-align: center;
}

.formateur-login-form {
    margin-bottom: 28px;
}

.form-group {
    position: relative;
    margin-bottom: var(--ef-space-2xl);
}

.form-group label {
    display: block;
    margin-bottom: var(--ef-space-sm);
    color: var(--ef-gray-700);
    font-weight: 600;
	display: flex;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: var(--ef-space-lg) 48px var(--ef-space-lg) var(--ef-space-lg);
    border: 2px solid var(--ef-gray-200);
    border-radius: var(--ef-radius-lg);
    transition: var(--ef-transition);
    background: var(--ef-gray-50);
    color: var(--ef-gray-700);
	font-size:16px;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    border-color: var(--ef-primary);
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.input-icon {
    position: absolute;
    right: var(--ef-space-lg);
    top: 50%;
    transform: translateY(-50%);
    color: var(--ef-gray-400);
    pointer-events: none;
    margin-top: var(--ef-space-md);
    transition: color 0.3s ease;
}

.form-group:focus-within .input-icon {
    color: var(--ef-primary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--ef-gray-600);
    margin-top: var(--ef-space-sm);
}

.checkbox-label input[type="checkbox"] {
    margin-right: var(--ef-space-md);
    transform: scale(1.1);
    accent-color: var(--ef-primary);
}

.btn-login, .btn-reset {
    width: 100%;
    background: var(--color-marine);
    color: white;
    border: none;
    padding: var(--ef-space-lg) var(--ef-space-2xl);
    border-radius: var(--ef-radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: var(--ef-transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ef-space-sm);
    margin-top: var(--ef-space-sm);
}

.btn-login:hover, .btn-reset:hover {
    background: var(--color-marine);
}

.btn-login:active, .btn-reset:active {
    transform: translateY(-1px);
}

.btn-login:disabled, .btn-reset:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loading-spinner svg {
    animation: spin 1s linear infinite;
}

.login-messages {
    margin-top: var(--ef-space-2xl);
}

.message {
    padding: var(--ef-space-lg) var(--ef-space-xl);
    border-radius: var(--ef-radius-lg);
    margin-bottom: var(--ef-space-md);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--ef-space-sm);
}

.message.error {
    background: linear-gradient(135deg, var(--ef-error-light) 0%, #feb2b2 100%);
    color: #c53030;
    border: 1px solid #fc8181;
}

.message.success {
    background: linear-gradient(135deg, var(--ef-success-light) 0%, #9ae6b4 100%);
    color: #2f855a;
    border: 1px solid #68d391;
}

.login-footer {
    text-align: center;
    border-top: 1px solid var(--ef-gray-200);
    padding-top: var(--ef-space-2xl);
}

.forgot-password-link {
    color: var(--color-marine);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    text-decoration-line: underline;
    text-underline-position: from-font;
}

.help-text {
    color: var(--ef-gray-400);
    margin: var(--ef-space-lg) 0 0 0;
}

/* �tat "d�j� connect�" */
.formateur-already-logged {
    text-align: center;
    background: linear-gradient(135deg, #ebf8ff 0%, #bee3f8 100%);
    border: 2px solid #3182ce;
    border-radius: var(--ef-radius-xl);
    padding: 40px var(--ef-space-2xl);
    max-width: 420px;
    margin: 40px auto;
}

.formateur-already-logged p {
    margin: 0 0 var(--ef-space-lg) 0;
    color: #2c5282;
}

.btn-access-documents {
    display: inline-block;
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    color: white;
    padding: 14px 28px;
    border-radius: var(--ef-radius-lg);
    text-decoration: none;
    font-weight: 600;
    transition: var(--ef-transition);
    margin-bottom: var(--ef-space-md);
}

.btn-access-documents:hover {
    background: linear-gradient(135deg, #2c5282 0%, #2a4a7a 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(49, 130, 206, 0.4);
}

/* ================================
   3. INTERFACE DOCUMENTS FRONT-END
   ================================ */

.espace-formateur-documents-container {
    max-width: var(--ef-wide);
    margin: 0 auto;
    padding: var(--ef-space-xl);
    background: var(--ef-gray-50);
    min-height: 100vh;
}

/* Header principal */
.documents-header {
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.documents-header .welcome-section {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: flex-start;
}

.documents-header .welcome-section h2 {
    font-weight: 700;
    margin: 0 0 var(--ef-space-lg) 0;
    color: var(--ef-gray-900);
}

.intro-ef-section p {
    color: var(--ef-gray-600);
    line-height: 1.6;
    margin-bottom: var(--ef-space-lg);
}

/* Container du mot de passe */
.mot-de-passe-info {
    background: var(--ef-dark);
    border-radius: var(--ef-radius-lg);
    padding: var(--ef-space-sm) var(--ef-space-lg);
    margin-top: var(--ef-space-lg);
    display: flex;
    width: max-content;
    align-items: center;
    gap: var(--ef-space-md);
}

.password-label {
    display: block;
    color: #fff;
    padding-right: 1em;
    font-weight: 500;
}

.password-copy-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--ef-space-sm);
    border-radius: var(--ef-radius-md);
    transition: var(--ef-transition-fast);
    padding: var(--ef-space-xs);
}

.password-copy-container:hover {
    background: rgba(255, 255, 255, 0.1);
}

.password-value {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
    user-select: all;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    width: 28px;
    height: 28px;
    border-radius: var(--ef-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--ef-transition-fast);
    padding: 0;
    position: relative;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background: rgba(0, 255, 136, 0.2);
    border-color: #fff;
    color: #fff;
}

.copy-btn.copied .copy-icon {
    display: none;
}

.copy-btn.copied .check-icon {
    display: block !important;
}

/* Actions utilisateur */
.user-actions {
    background: #fff;
    border-radius: var(--ef-radius-lg);
    padding: var(--ef-space-xl) 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--ef-space-md);
    min-width: 275px;
    justify-content: center;
    box-shadow: var(--ef-shadow-sm);
}

.user-name {
    display: block;
    font-weight: 600;
    letter-spacing: -1px;
    color: var(--ef-gray-900);
}

.btn-logout {
    color: var(--ef-dark);
    text-decoration: underline;
    transition: var(--ef-transition);
    line-height: 130%;
    text-decoration-line: underline;
    text-underline-position: from-font;
    display: flex;
    align-items: center;
    gap: var(--ef-space-sm);
    font-weight: 500;
}

.btn-logout:hover {
    opacity: 0.8;
    transform: translateY(-1px);
    color: var(--ef-dark);
}

/* ================================
   4. SECTIONS DE DOCUMENTS
   ================================ */

.documents-section {
    background: white;
    border-radius: var(--ef-radius-xl);
    margin-bottom: var(--ef-space-3xl);
    overflow: hidden;
    box-shadow: var(--ef-shadow-md);
    border: 1px solid var(--ef-gray-200);
}

.section-header {
    background: linear-gradient(135deg, var(--ef-dark) 0%, var(--ef-dark-light) 100%);
    color: white;
    padding: var(--ef-space-2xl) var(--ef-space-3xl);
    position: relative;
}

.section-header h3 {
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--ef-space-md);
    font-size: 20px;
    font-weight: 600;
}

.section-intro {
    padding: var(--ef-space-md) var(--ef-space-2xl) 0;
}

.section-description {
    margin: var(--ef-space-lg) 0 0 0;
    opacity: 0.9;
    line-height: 1.5;
}

/* Section sp�ciale Documents formateurs */
.documents-formateurs .section-header {
    background: linear-gradient(90deg, var(--ef-danger) 0%, var(--ef-dark) 49.6%);
}

/* Pictogrammes de cat�gories */
.category-picto {
    width: 32px;
    height: 32px;
    margin-right: var(--ef-space-md);
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.section-header h3:hover .category-picto {
    transform: scale(1.1);
}

/* ================================
   5. GRILLES DE DOCUMENTS
   ================================ */

.documents-grid {
    padding: var(--ef-space-2xl);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: var(--ef-space-xl);
}

.document-item {
    background: var(--ef-gray-50);
    border-radius: var(--ef-radius-lg);
    padding: var(--ef-space-md) var(--ef-space-xl);
    transition: var(--ef-transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    min-height: 60px;
    gap: var(--ef-space-lg);
    border: 1px solid transparent;
}

.document-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 0, 50, 0.15);
    border-color: var(--ef-gray-300);
}

.document-item.formation-specifique {
    border-left: 4px solid var(--ef-danger);
}

.document-item.download-success {
    background: linear-gradient(135deg, rgba(56, 161, 105, 0.1) 0%, rgba(154, 230, 180, 0.1) 100%);
    border-color: var(--ef-success);
    animation: downloadSuccess 0.8s ease-out;
}

.document-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--ef-space-sm);
}

.document-title {
    color: var(--ef-gray-900);
    margin: 0;
    font-weight: 600;
    line-height: 1.4;
}

.document-prefix {
    background: var(--ef-dark);
    color: white;
    padding: 2px var(--ef-space-sm);
    border-radius: var(--ef-radius-sm);
    font-weight: 600;
    margin-right: var(--ef-space-sm);
    font-size: 14px;
}

.document-version {
    background: var(--ef-gray-200);
    color: var(--ef-gray-600);
    padding: 2px var(--ef-space-sm);
    border-radius: var(--ef-radius-sm);
    font-weight: 600;
    margin-left: var(--ef-space-sm);
    font-size: 14px;
}

.document-description {
    color: var(--ef-gray-500);
    margin: 0 0 var(--ef-space-md) 0;
    line-height: 1.4;
}

.document-meta {
    display: flex;
    align-items: center;
    gap: var(--ef-space-md);
    color: var(--ef-gray-400);
}

.document-date {
    font-weight: 500;
    font-size: 14px;
}

.formation-specifique-tag {
    color: var(--ef-danger);
    font-weight: 600;
    font-style: italic;
    font-size: 12px;
}

/* ================================
   6. FORMATIONS SP�CIFIQUES
   ================================ */

.formations-specifiques-section {
    background: var(--ef-dark);
    border-radius: 0 0 var(--ef-radius-lg);
    overflow: hidden;
    box-shadow: var(--ef-shadow-md);
}

.formations-specifiques-header {
    padding: 25px 25px 10px;
}

.formations-specifiques-header h4 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.5px;
}

.formations-specifiques-grid {
    display: grid;
    gap: var(--ef-space-lg);
    padding: var(--ef-space-xl);
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.document-item-specifique {
    background: #ffffff;
    border-radius: var(--ef-radius-md);
    padding: var(--ef-space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--ef-shadow-sm);
    transition: var(--ef-transition);
    border-left: 4px solid var(--ef-danger);
}

.document-item-specifique:hover {
    transform: translateY(-1px);
    box-shadow: var(--ef-shadow-md);
}

.document-item-specifique .document-content {
    margin-right: var(--ef-space-lg);
}

.document-item-specifique .document-title {
    font-size: 16px;
}

/* ================================
   7. ACTIONS DE DOCUMENTS
   ================================ */

.document-actions {
    flex-shrink: 0;
    display: flex;
    gap: var(--ef-space-sm);
    align-items: center;
}

.action-icon {
    width: 20px;
    height: 20px;
    transition: var(--ef-transition);
}

.btn-preview,
.btn-download,
.download-direct {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--ef-radius-md);
    text-decoration: none;
    transition: var(--ef-transition);
    background: rgba(0, 0, 50, 0.05);
    border: 1px solid rgba(0, 0, 50, 0.1);
}

.btn-preview:hover,
.btn-download:hover,
.download-direct:hover {
    background: rgba(0, 0, 50, 0.1);
    border-color: #000032;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 50, 0.2);
}

.action-disabled {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--ef-radius-md);
    background: var(--ef-gray-100);
    border: 2px solid var(--ef-gray-200);
    cursor: not-allowed;
    opacity: 0.6;
}

.action-disabled .action-icon {
    filter: brightness(0) saturate(100%) invert(62%) sepia(6%) saturate(15%) hue-rotate(317deg) brightness(93%) contrast(88%);
    opacity: 0.5;
}

.action-icon.loading {
    animation: spin 1s linear infinite;
}

/* ================================
   8. TOOLTIPS SYST�ME
   ================================ */

.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.tooltip-wrapper::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    
    background: #333;
    color: #fff;
    padding: var(--ef-space-sm) var(--ef-space-md);
    border-radius: var(--ef-radius-sm);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: var(--ef-shadow-md);
    
    opacity: 0;
    pointer-events: none;
    transition: var(--ef-transition);
    z-index: 1000;
    margin-bottom: var(--ef-space-sm);
}

.tooltip-wrapper::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    
    opacity: 0;
    pointer-events: none;
    transition: var(--ef-transition);
    z-index: 1000;
    margin-bottom: 1px;
}

.tooltip-wrapper:hover::before,
.tooltip-wrapper:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.tooltip-wrapper:hover::after {
    transform: translateX(-50%);
}

/* ================================
   9. NOTIFICATIONS
   ================================ */

#download-notifications {
    position: fixed;
    top: var(--ef-space-xl);
    right: var(--ef-space-xl);
    z-index: 10000;
}

.download-notification {
    background: white;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: var(--ef-space-md);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 3px solid var(--ef-gray-300);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 350px;
    font-weight: 500;
    font-size: 14px;
}

.download-notification.error {
    border-left-color: #dc2626;
    color: #991b1b;
}

.download-notification.success {
    border-left-color: #16a34a;
    color: #166534;
}

.download-notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Message aucun document */
.no-documents {
    text-align: center;
    padding: 80px var(--ef-space-3xl);
    color: var(--ef-gray-500);
    background: white;
    border-radius: var(--ef-radius-xl);
    margin: var(--ef-space-3xl) 0;
    box-shadow: var(--ef-shadow-sm);
}

.no-documents h3 {
    color: var(--ef-gray-900);
    font-weight: 700;
    margin: 0 0 var(--ef-space-lg) 0;
}

.no-documents p {
    margin: 0 0 var(--ef-space-md) 0;
}

.no-documents-icon {
    font-size: 48px;
    margin-bottom: var(--ef-space-lg);
}

/* ================================
   10. ANIMATIONS
   ================================ */

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

@keyframes downloadSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

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

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(102, 126, 234, 0.4); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.document-item {
    animation: fadeInUp 0.5s ease-out;
}

.login-success-animation {
    animation: successPulse 0.6s ease-in-out;
}

.shake-animation {
    animation: shake 0.5s ease-in-out;
}

/* ================================
   11. RESPONSIVE DESIGN
   ================================ */

/* Tablettes et �crans moyens */
@media (max-width: 1024px) {
    .espace-formateur-documents-container {
        padding: var(--ef-space-lg);
    }
    
    .documents-header .welcome-section {
        flex-direction: column;
        gap: var(--ef-space-xl);
    }
    
    .user-actions {
        align-self: stretch;
        text-align: center;
    }
    
    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: var(--ef-space-lg);
        padding: var(--ef-space-xl) var(--ef-space-2xl) var(--ef-space-2xl);
    }
    
    .section-header {
        padding: var(--ef-space-xl) var(--ef-space-2xl);
    }
    
    .formations-specifiques-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: var(--ef-space-md);
        padding: var(--ef-space-lg) var(--ef-space-2xl) var(--ef-space-xl);
    }
}

/* Tablettes et petits �crans */
@media (max-width: 768px) {
    .espace-formateur-login-container {
        padding: var(--ef-space-lg);
        margin: var(--ef-space-xl) auto;
    }
    
    .formateur-login-card {
        padding: var(--ef-space-3xl) var(--ef-space-2xl);
    }
    
    .espace-formateur-documents-container {
        padding: var(--ef-space-lg);
    }
    
    .documents-header .welcome-section {
        flex-direction: column;
        align-items: stretch;
        gap: var(--ef-space-xl);
    }
    
    .user-actions {
        align-items: center;
        width: 100%;
        text-align: center;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
        gap: var(--ef-space-md);
        padding: var(--ef-space-lg) var(--ef-space-xl) var(--ef-space-xl);
    }
    
    .section-header {
        padding: var(--ef-space-lg) var(--ef-space-xl);
    }
    
    .section-header h3 {
        font-size: 18px;
    }
    
    .category-picto {
        width: 24px;
        height: 24px;
    }
    
    .document-item {
        padding: var(--ef-space-lg);
        min-height: auto;
        flex-direction: column;
        align-items: stretch;
        gap: var(--ef-space-lg);
        text-align: center;
    }
    
    .document-content {
        margin-right: 0;
    }
    
    .document-actions {
        align-self: center;
        justify-content: center;
    }
    
    .download-notification {
        right: var(--ef-space-lg);
        left: var(--ef-space-lg);
        max-width: none;
        transform: translateY(-100px);
    }
    
    .download-notification.show {
        transform: translateY(0);
    }
    
    .formations-specifiques-grid {
        grid-template-columns: 1fr;
        gap: var(--ef-space-md);
        padding: var(--ef-space-lg) var(--ef-space-xl) var(--ef-space-xl);
    }
    
    .formations-specifiques-header {
        padding: var(--ef-space-lg) var(--ef-space-xl);
    }
    
    .formations-specifiques-header h4 {
        font-size: 16px;
    }
    
    .document-item-specifique {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: var(--ef-space-lg);
    }
    
    .document-item-specifique .document-content {
        margin-right: 0;
    }
    
    .document-item-specifique .document-actions {
        align-self: center;
    }
    
    /* Position en bas pour les tooltips sur mobile */
    .tooltip-wrapper::before {
        bottom: auto;
        top: 100%;
        transform: translateX(-50%) translateY(8px);
        margin-bottom: 0;
        margin-top: var(--ef-space-sm);
    }
    
    .tooltip-wrapper::after {
        bottom: auto;
        top: 100%;
        border-top-color: transparent;
        border-bottom-color: #333;
        margin-bottom: 0;
        margin-top: 1px;
    }
    
    .tooltip-wrapper:hover::before {
        transform: translateX(-50%) translateY(0);
    }
    
    .tooltip-wrapper:hover::after {
        transform: translateX(-50%);
    }
    .mot-de-passe-info{
        flex-direction: column;
        width: 100%;
        padding: 16px 16px 8px;
    }
}

/* Petits mobiles */
@media (max-width: 480px) {
    .espace-formateur-documents-container {
        padding: var(--ef-space-md);
    }
    
    .documents-header {
        padding: var(--ef-space-2xl) 0;
    }
    
    .documents-grid {
        padding: var(--ef-space-md) var(--ef-space-lg) var(--ef-space-lg);
    }
    
    .section-header {
        padding: var(--ef-space-md) var(--ef-space-lg);
    }
    
    .section-header h3 {
        font-size: 16px;
        flex-direction: column;
        gap: var(--ef-space-sm);
        text-align: center;
    }
    
    .document-item {
        padding: var(--ef-space-lg);
    }
    .documents-header {
        margin-bottom: 10px;
        padding-top:0;
    }
    .btn-download,
    .download-direct,
    .btn-preview,
    .action-disabled {
        width: 40px;
        height: 40px;
        border-radius: var(--ef-radius-md);
        justify-content: center;
    }
    .document-item {
        gap: 8px;
        align-items: center;
        padding: 8px;
    }
    .document-actions {
        align-self: auto;
    }
    .document-title {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
   .document-version {
        margin-left: 0;
    } 
    .document-meta {
        justify-content: center;
    }
    .formations-specifiques-grid {
        padding: var(--ef-space-md) var(--ef-space-lg) var(--ef-space-lg);
    }
    
    .formations-specifiques-header {
        padding: var(--ef-space-md) var(--ef-space-lg);
    }
    
    .document-item-specifique {
        padding: var(--ef-space-lg);
    }
    
    .user-actions {
        padding: var(--ef-space-lg) var(--ef-space-xl);
        min-width: auto;
    }
    
    .mot-de-passe-info {
        flex-direction: column;
        gap: var(--ef-space-sm);
        text-align: center;
        padding: var(--ef-space-lg);
    }
    
    .password-label {
        padding-right: 0;
    }
    
    .password-value {
        font-size: 16px;
        letter-spacing: 1px;
    }
}

/* ================================
   12. PRINT STYLES
   ================================ */

@media print {
    .espace-formateur-documents-container {
        background: white;
        padding: 0;
    }
    
    .documents-header,
    .user-actions,
    .document-actions,
    .btn-logout,
    .copy-btn,
    .tooltip-wrapper::before,
    .tooltip-wrapper::after,
    #download-notifications {
        display: none !important;
    }
    
    .documents-section {
        box-shadow: none;
        border: 1px solid var(--ef-gray-300);
        break-inside: avoid;
    }
    
    .section-header {
        background: var(--ef-gray-100) !important;
        color: var(--ef-gray-900) !important;
    }
    
    .document-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--ef-gray-200);
    }
}

/* ================================
   13. ACCESSIBILIT�
   ================================ */

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus styles pour l'accessibilit� */
.btn-login:focus,
.btn-download:focus,
.download-direct:focus,
.btn-preview:focus,
.copy-btn:focus,
.btn-access-documents:focus,
.forgot-password-link:focus {
    outline: 2px solid var(--ef-primary);
    outline-offset: 2px;
}

/* Reduce motion pour les utilisateurs sensibles */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Mode contraste �lev� */
@media (prefers-contrast: high) {
    .document-item {
        border: 2px solid var(--ef-gray-600);
    }
    
    .btn-download,
    .download-direct,
    .btn-preview {
        border: 2px solid var(--ef-gray-700);
    }
    
    .section-header {
        border-bottom: 3px solid var(--ef-gray-300);
    }
}


/* Animations pour le formulaire de connexion */
.login-success-animation {
    animation: successPulse 0.6s ease-in-out;
}

.shake-animation {
    animation: shake 0.5s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(102, 126, 234, 0.4); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}


/* ================================
   INT�GRATION TH�ME - ESPACE FORMATEUR
   ================================ */

#formateurpage {
    padding: 40px 0;
    background: #f8f9fa;
    min-height: 50vh;
}

.espace-formateur-wrapper {
    width: 100%;
    max-width: none;
}

/* Adapter les couleurs au th�me */
.espace-formateur-login-container,
.espace-formateur-documents-container {
    background: transparent;
    padding: 0;
}

/* Harmoniser avec votre th�me */
.formateur-login-card {
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    #formateurpage {
        padding: 20px 0;
    }
    
    .espace-formateur-wrapper {
        padding: 0;
    }
}

/* Si vous voulez personnaliser les couleurs selon votre th�me */
.btn-login,
.btn-filter,
.btn-primary,
.btn-reset{
    /* Remplacez par la couleur principale de votre th�me */
    background: linear-gradient(90deg, var(--ef-danger) 0%, var(--ef-dark) 49.6%);
	color:#fff;
    transition: filter 0.3s ease, transform 0.3s ease;
}
.btn-login .btn-text,
.btn-reset .btn-text {
	color:#fff;
	font-size:16px;
}

.back-to-login{
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
    display: block;
    margin-top: 1em;
	margin-bottom: 2em;
    text-align: center;
}
.field-error{
    font-size: 14px;
    padding-top: .5em;
}
/* Adaptation des messages */
.message.success {
    border-left: 4px solid var(--color-marine);
}

.message.error {
    border-left: 4px solid var(--color-red);
}


/* ================================
   CHECKBOX PERSONNALIS�E - FORMULAIRE DE CONNEXION
   ================================ */

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--ef-gray-600);
    margin-top: var(--ef-space-sm);
    font-size: 14px;
    user-select: none;
    transition: var(--ef-transition-fast);
}

.checkbox-label:hover {
    color: var(--ef-gray-700);
}

/* Cacher la checkbox native */
.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

/* Style du checkmark personnalis� */
.checkmark {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    background: var(--ef-gray-50);
    border: 2px solid var(--ef-gray-300);
    border-radius: var(--ef-radius-sm);
    margin-right: var(--ef-space-md);
    transition: var(--ef-transition);
    flex-shrink: 0;
}

/* Quand la checkbox est coch�e */
.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--color-marine);
    transform: scale(1.05);
	border-color: var(--color-marine);
}

/* Ic�ne de validation */
.checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Afficher l'ic�ne quand coch�e */
.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    display: block;
    animation: checkmarkSlide 0.3s ease-out;
}

/* Focus pour l'accessibilit� */
/*.checkbox-label input[type="checkbox"]:focus + .checkmark {
    outline: 2px solid var(--color-marine);
    outline-offset: 2px;
}*/

/* Animation de la coche */
@keyframes checkmarkSlide {
    0% {
        opacity: 0;
        transform: rotate(45deg) scale(0.5);
    }
    50% {
        opacity: 0.7;
        transform: rotate(45deg) scale(1.2);
    }
    100% {
        opacity: 1;
        transform: rotate(45deg) scale(1);
    }
}

/* Version alternative avec une coche plus styl�e (optionnel) */
.checkbox-label.style-alt .checkmark::after {
    content: "?";
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.checkbox-label.style-alt input[type="checkbox"]:checked + .checkmark::after {
    display: block;
    animation: checkmarkPop 0.3s ease-out;
}

@keyframes checkmarkPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.3);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* �tat d�sactiv� */
.checkbox-label.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.checkbox-label.disabled .checkmark {
    background: var(--ef-gray-100);
    border-color: var(--ef-gray-200);
}

/* Responsive - plus grande zone de touch sur mobile */
@media (max-width: 768px) {
    .checkbox-label {
        padding: var(--ef-space-sm) 0;
        margin-top: var(--ef-space-md);
    }
    
    .checkmark {
        width: 22px;
        height: 22px;
        margin-right: var(--ef-space-lg);
    }
    
    .checkmark::after {
        left: 7px;
        top: 3px;
        width: 6px;
        height: 11px;
    }
}

/* Mode sombre (si impl�ment� plus tard) */
@media (prefers-color-scheme: dark) {
    .checkbox-label {
        color: #e2e8f0;
    }
    
    .checkmark {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .checkbox-label:hover .checkmark {
        border-color: var(--ef-primary);
        background: rgba(102, 126, 234, 0.1);
    }
}

/* Am�lioration pour les utilisateurs qui pr�f�rent moins d'animations */
@media (prefers-reduced-motion: reduce) {
    .checkmark,
    .checkbox-label input[type="checkbox"]:checked + .checkmark,
    .checkmark::after {
        transition: none !important;
        animation: none !important;
    }
}

/* ================================
   PASSWORD RESET INTERFACE
   ================================ */

.formateur-reset-password-form {
    width: 100%;
    max-width: 100%;
}

.reset-password-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--ef-space-md);
}

.reset-password-header p {
    margin-bottom: var(--ef-space-xl);
    line-height: 1.6;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input[type="password"],
.password-input-wrapper input[type="text"] {
    padding-right: 45px \!important;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ef-gray-500);
    transition: color var(--ef-transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.password-toggle:hover {
    color: var(--ef-primary);
}

.password-toggle:focus {
    outline: 2px solid var(--ef-primary);
    outline-offset: 2px;
    border-radius: var(--ef-radius-sm);
}

/* Password Strength Meter */
.password-strength {
    margin-top: var(--ef-space-sm);
}

.strength-meter {
    width: 100%;
    height: 6px;
    background: var(--ef-gray-200);
    border-radius: var(--ef-radius-full);
    overflow: hidden;
    margin-bottom: var(--ef-space-xs);
}

.strength-bar {
    height: 100%;
    width: 0%;
    border-radius: var(--ef-radius-full);
    transition: all 0.3s ease;
    background: var(--ef-gray-300);
}

.strength-bar.weak {
    background: var(--ef-error);
}

.strength-bar.medium {
    background: var(--ef-warning);
}

.strength-bar.strong {
    background: #3182ce;
}

.strength-bar.very-strong {
    background: var(--ef-success);
}

.strength-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ef-gray-600);
}

/* Password Requirements */
.password-requirements {
    margin-top: var(--ef-space-lg);
    padding: var(--ef-space-lg);
    background: var(--ef-gray-50);
    border-radius: var(--ef-radius-md);
    border: 1px solid var(--ef-gray-200);
}

.password-requirements p {
    margin: 0 0 var(--ef-space-md) 0;
    font-weight: 600;
    color: var(--ef-gray-700);
}

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

.requirements-list li {
    display: flex;
    align-items: center;
    margin-bottom: var(--ef-space-xs);
    font-size: 0.875rem;
    color: var(--ef-gray-600);
    transition: color var(--ef-transition);
}

.requirements-list li::before {
    content: "○";
    margin-right: var(--ef-space-sm);
    font-weight: bold;
    color: var(--ef-gray-400);
    transition: all var(--ef-transition);
}

.requirements-list li.valid {
    color: var(--ef-success);
}

.requirements-list li.valid::before {
    content: "✓";
    color: var(--ef-success);
}

.requirements-list li.invalid {
    color: var(--ef-error);
}

.requirements-list li.invalid::before {
    content: "✗";
    color: var(--ef-error);
}

/* Password Match Error */
.password-match-error {
    color: var(--ef-error);
    font-size: 0.875rem;
    margin-top: var(--ef-space-xs);
    display: flex;
    align-items: center;
}

.password-match-error::before {
    content: "⚠";
    margin-right: var(--ef-space-xs);
}

/* Input Error State */
input.error {
    border-color: var(--ef-error) \!important;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1) \!important;
}

/* Reset Password Messages */
.reset-password-messages {
    margin-top: var(--ef-space-lg);
}

.reset-password-messages .message {
    padding: var(--ef-space-md) var(--ef-space-lg);
    border-radius: var(--ef-radius-md);
    margin-bottom: var(--ef-space-md);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.reset-password-messages .message.success {
    background: var(--ef-success-light);
    color: var(--ef-success);
    border: 1px solid var(--ef-success);
}

.reset-password-messages .message.error {
    background: var(--ef-error-light);
    color: var(--ef-error);
    border: 1px solid var(--ef-error);
}

.reset-password-messages .message::before {
    margin-right: var(--ef-space-sm);
    font-size: 1.125rem;
}

.reset-password-messages .message.success::before {
    content: "✓";
}

.reset-password-messages .message.error::before {
    content: "⚠";
}

/* Reset Error Message (for invalid links) */
.reset-error-message {
    text-align: center;
    margin-bottom: var(--ef-space-xl);
}

.reset-error-message .btn-primary {
    display: inline-block;
    padding: var(--ef-space-md) var(--ef-space-xl);
    background: linear-gradient(90deg, var(--ef-danger) 0%, var(--ef-dark) 49.6%);
    color: white;
    text-decoration: none;
    border-radius: var(--ef-radius-md);
    font-weight: 600;
    transition: all var(--ef-transition);
    border: none;
    cursor: pointer;
}

.reset-error-message .btn-primary:hover {
    background: linear-gradient(90deg, #e2093a 0%, #000032 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(226, 9, 58, 0.2);
}

/* Mobile Responsiveness for Password Reset */
@media (max-width: 768px) {
    .reset-password-header h2 {
        font-size: 1.5rem;
    }
    
    .password-requirements {
        padding: var(--ef-space-md);
    }
    
    .requirements-list li {
        font-size: 0.8125rem;
    }
    
    .password-toggle {
        right: 10px;
    }
}


/* ================================
   ACTIVATION INTERFACE
   ================================ */

.formateur-activation-form {
    width: 100%;
    max-width: 100%;
}

.activation-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--ef-space-md);
}

.activation-header p {
    margin-bottom: var(--ef-space-xl);
    line-height: 1.6;
}

/* Activation Messages */
.activation-messages {
    margin-top: var(--ef-space-lg);
}

.activation-messages .message {
    padding: var(--ef-space-md) var(--ef-space-lg);
    border-radius: var(--ef-radius-md);
    margin-bottom: var(--ef-space-md);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.activation-messages .message.success {
    background: var(--ef-success-light);
    color: var(--ef-success);
    border: 1px solid var(--ef-success);
}

.activation-messages .message.error {
    background: var(--ef-error-light);
    color: var(--ef-error);
    border: 1px solid var(--ef-error);
}

.activation-messages .message::before {
    margin-right: var(--ef-space-sm);
    font-size: 1.125rem;
}

.activation-messages .message.success::before {
    content: "✓";
}

.activation-messages .message.error::before {
    content: "⚠";
}

/* Activation Error Message (for invalid links) */
.activation-error-message {
    text-align: center;
    margin-bottom: var(--ef-space-xl);
}

.activation-error-message .btn-primary {
    display: inline-block;
    padding: var(--ef-space-md) var(--ef-space-xl);
    background: linear-gradient(90deg, var(--ef-danger) 0%, var(--ef-dark) 49.6%);
    color: white;
    text-decoration: none;
    border-radius: var(--ef-radius-md);
    font-weight: 600;
    transition: all var(--ef-transition);
    border: none;
    cursor: pointer;
}

.activation-error-message .btn-primary:hover {
    background: linear-gradient(90deg, #e2093a 0%, #000032 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(226, 9, 58, 0.2);
}

/* ================================
   MESSAGES ÉPURÉS ET MODERNES
   ================================ */

/* Classes pour messages épurés */
.ef-message {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid;
    background: #fff;
}

.ef-message-success {
    color: #166534;
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.ef-message-error {
    color: #991b1b;
    border-color: #fecaca;
    background: #fef2f2;
}

.ef-message-warning {
    color: #92400e;
    border-color: #fed7aa;
    background: #fffbeb;
}

.ef-message-info {
    color: #1e40af;
    border-color: #bfdbfe;
    background: #eff6ff;
}

/* Icônes des messages */
.ef-message::before {
    content: "";
    width: 16px;
    height: 16px;
    margin-right: 8px;
    flex-shrink: 0;
    font-weight: 600;
}

.ef-message-success::before {
    content: "✓";
    color: #16a34a;
}

.ef-message-error::before {
    content: "✕";
    color: #dc2626;
}

.ef-message-warning::before {
    content: "⚠";
    color: #d97706;
}

.ef-message-info::before {
    content: "ℹ";
    color: #2563eb;
}
