/**
 * Styles pour l'intégration 3DS
 */

/* Modal de chargement 3DS */
#3ds-loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#3ds-loading-modal > div {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Spinner de chargement */
.spinner-3ds {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Container pour l'iframe 3DS */
.3ds-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Iframe 3DS */
.3ds-iframe {
    position: relative;
    width: 90%;
    max-width: 600px;
    height: 70%;
    max-height: 500px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10001;
}

/* Bouton de fermeture 3DS */
.3ds-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: #ff4444;
    color: white;
    font-size: 16px;
    cursor: pointer;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.3ds-close-btn:hover {
    background: #cc3333;
}

/* Messages d'erreur 3DS */
.3ds-error-message {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    color: #c62828;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
}

.3ds-success-message {
    background: #e8f5e8;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
}

/* Overlay de traitement existant */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.processing-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 300px;
}

.processing-box .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .3ds-iframe {
        width: 95%;
        height: 80%;
        max-height: 400px;
    }
    
    #3ds-loading-modal > div {
        margin: 20px;
        padding: 20px;
    }
    
    .processing-box {
        margin: 20px;
        padding: 20px;
    }
}
