/* Mailjet Popup MVP Styles */

.mailjet-popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

.mailjet-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.mailjet-popup-content {
    position: absolute;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 700px;
    max-height: 90%;
    overflow: hidden;
    animation: mailjet-popup-fade-in 0.3s ease-out;
    box-sizing: border-box;
}


/* Position variants */
.mailjet-popup-container[data-position="center"] .mailjet-popup-content {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.mailjet-popup-container[data-position="top"] .mailjet-popup-content {
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.mailjet-popup-container[data-position="bottom"] .mailjet-popup-content {
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.mailjet-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.mailjet-popup-close:hover {
    background: #555;
}

.mailjet-popup-content iframe {
    width: 100%;
    border: none;
    min-height: 500px; /* augmente si le formulaire est coupé */
}



/* Animations */
@keyframes mailjet-popup-fade-in {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes mailjet-popup-fade-out {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

.mailjet-popup-content.closing {
    animation: mailjet-popup-fade-out 0.3s ease-in;
}

/* Responsive design */
@media (max-width: 768px) {
    .mailjet-popup-content {
        max-width: 95%;
        max-height: 95%;
        margin: 0 auto;
    }
    
    .mailjet-popup-container[data-position="center"] .mailjet-popup-content,
    .mailjet-popup-container[data-position="top"] .mailjet-popup-content,
    .mailjet-popup-container[data-position="bottom"] .mailjet-popup-content {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

/* Trigger element styling */
.mailjet-popup-trigger {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.mailjet-popup-trigger:hover {
    opacity: 0.8;
}

/* Loading state */
.mailjet-popup-content.loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mailjet-popup-content.loading::before {
    content: "Chargement...";
    font-size: 16px;
    color: #666;
}