/*
    Elfsight Form Builder Modal Styles
    Version: 1.5.1
    
    Modal functionality for form display
*/

/* Bouton modal */
.elfsight-modal-button {
    background: #007cba;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    line-height: 1.4;
}

.elfsight-modal-button:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.elfsight-modal-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3);
}

/* Conteneur de la modale */
.elfsight-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

.elfsight-modal.elfsight-modal-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Overlay de fond */
.elfsight-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    animation: elfsight-modal-fade-in 0.3s ease;
}

/* Contenu de la modale */
.elfsight-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    padding: 20px;
    margin: 20px;
    animation: elfsight-modal-slide-in 0.3s ease;
    z-index: 1;
}

/* Bouton de fermeture */
.elfsight-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 2;
}

.elfsight-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.elfsight-modal-close:active {
    background: #e0e0e0;
}

/* Animations */
@keyframes elfsight-modal-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes elfsight-modal-slide-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .elfsight-modal-content {
        margin: 10px;
        padding: 15px;
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .elfsight-modal-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .elfsight-modal-content {
        margin: 5px;
        padding: 12px;
        border-radius: 4px;
    }
    
    .elfsight-modal-close {
        top: 10px;
        right: 10px;
        font-size: 20px;
        width: 25px;
        height: 25px;
    }
}

/* Assurer que le formulaire s'affiche correctement dans la modale */
.elfsight-modal-content .elfsight-widget {
    width: 100%;
    max-width: none;
}

/* Éviter les conflits avec d'autres styles */
.elfsight-modal * {
    box-sizing: border-box;
}

/* Masquer le scroll du body quand la modale est ouverte */
body.elfsight-modal-open {
    overflow: hidden;
}