/* Styles pour les popups de formulaires */
.form-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in-out;
}

.form-popup .popup-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease-out;
}

.form-popup .popup-header {
    display: flex;
    align-items: center;
    padding: 20px 20px 15px 20px;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.form-popup .popup-icon {
    font-size: 24px;
    margin-right: 15px;
}

.form-popup .popup-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    flex-grow: 1;
}

.form-popup .popup-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.form-popup .popup-close:hover {
    background-color: #f8f9fa;
    color: #666;
}

.form-popup .popup-body {
    padding: 20px;
}

.form-popup .popup-body p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: #555;
}

/* Styles spécifiques pour les popups de succès */
.form-popup-success .popup-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.form-popup-success .popup-header .popup-title {
    color: white;
}

.form-popup-success .popup-header .popup-close {
    color: rgba(255, 255, 255, 0.8);
}

.form-popup-success .popup-header .popup-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Styles spécifiques pour les popups d'erreur */
.form-popup-error .popup-header {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
}

.form-popup-error .popup-header .popup-title {
    color: white;
}

.form-popup-error .popup-header .popup-close {
    color: rgba(255, 255, 255, 0.8);
}

.form-popup-error .popup-header .popup-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .form-popup .popup-content {
        width: 95%;
        margin: 20px;
    }
    
    .form-popup .popup-header {
        padding: 15px 15px 10px 15px;
    }
    
    .form-popup .popup-body {
        padding: 15px;
    }
    
    .form-popup .popup-title {
        font-size: 16px;
    }
    
    .form-popup .popup-body p {
        font-size: 14px;
    }
}

/* Styles pour les boutons de formulaire désactivés */
button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Indicateur de chargement */
button[type="submit"]:disabled::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

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