/* =========================================
   Lesson Validator - Modales
   ========================================= */

/* Overlay de la modale */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Conteneur principal de la modale */
.modal {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 440px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
    animation: slideUp 0.3s ease;
}

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

/* Bouton de fermeture */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f3f4f6;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Contenu de la modale */
.modal-content {
    padding: 40px 32px 32px 32px;
    text-align: center;
}

/* Icône de la modale */
.modal-icon {
    width: 80px !important;
    height: 80px !important;
    margin: 0 auto 24px auto !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Icône SVG */
.modal-icon svg {
    width: 48px;
    height: 48px;
    fill: white;
    color: white;
}

.modal.modal-success .modal-icon {
    background-color: #009b39;
}

.modal.modal-error .modal-icon {
    background-color: #ef4444 !important;
}

.modal.modal-warning .modal-icon {
    background-color: #f59e0b;
}

.modal.modal-info .modal-icon {
    background-color: #3b82f6;
}

/* Titre de la modale */
.modal-title {
    margin: 0 0 16px 0 !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    line-height: 1.2 !important;
    display: block !important;
}

/* Message de la modale */
.modal-message {
    margin: 0 0 32px 0;
    color: #6b7280;
    line-height: 1.5;
    font-size: 16px;
}

/* Actions de la modale */
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-actions button {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 140px;
}

/* Bouton principal - Style bleu moderne */
.modal-actions .btn-primary,
.modal-actions .btn-next-lesson {
    background-color: #3b82f6;
    color: white;
    font-weight: 500;
}

.modal-actions .btn-primary:hover,
.modal-actions .btn-next-lesson:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Bouton secondaire */
.modal-actions .btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    font-weight: 500;
}

.modal-actions .btn-secondary:hover {
    background-color: #e5e7eb;
}

/* Bouton certificat doré */
.modal-actions .btn-certificate {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    font-weight: 600;
}

.modal-actions .btn-certificate:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}



/* Responsive */
@media (max-width: 480px) {
    .modal {
        width: 95%;
        margin: 10px;
    }
    
    .modal-content {
        padding: 25px 20px 20px 20px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-message {
        font-size: 15px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
    }
}