/* Exit Popup Manager - Frontend Styles */

.epm-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.epm-popup-overlay.epm-show {
    opacity: 1;
    visibility: visible;
}

.epm-popup-overlay.epm-show .epm-popup-container {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.epm-popup-overlay.epm-closing {
    opacity: 0;
    visibility: hidden;
}

.epm-popup-overlay.epm-closing .epm-popup-container {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
}

.epm-popup-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    width: max-content;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10000;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: epm-slideIn 0.5s ease-out;
}

@keyframes epm-slideIn {
    0% {
        transform: translate(-50%, -50%) scale(0.5) rotate(10deg);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
}

.epm-popup-header {
    position: relative;
    padding: 30px 30px 0;
}

.epm-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
    transition: all 0.2s ease;
    font-weight: 700;
    font-family: var(--bs-body-font-family);
    z-index: 10001;
}

.epm-popup-close:hover {
    transform: rotate(90deg);
    background: rgba(0, 0, 0, 0.05);
}

.epm-popup-close:active {
    transform: rotate(90deg) scale(0.95);
}

.epm-popup-content {
    padding: 30px 60px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Gestion de la position de l'image */
.epm-popup-content:has(.epm-image-left),
.epm-popup-content:has(.epm-image-right) {
    flex-direction: row;
    text-align: left;
}

.epm-popup-content:has(.epm-image-right) {
    flex-direction: row-reverse;
}

.epm-popup-image {
    max-width: 100%;
    height: auto;
    border-radius: 20px;

    img {
        border-radius: 20px;
        max-width: 100%;
        height: auto;
    }
}

.epm-popup-image.epm-image-top,
.epm-popup-image.epm-image-bottom {
    max-width: 500px;
}

.epm-popup-image.epm-image-left,
.epm-popup-image.epm-image-right {
    max-width: 300px;
    flex-shrink: 0;
}

.epm-popup-image.epm-image-centered {
    margin-left: auto;
    margin-right: auto;
}

.epm-popup-text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.epm-popup-title {
    font-size: 1.6em;
    font-weight: 700;
    color: black;
    margin-bottom: 15px;
}

.epm-popup-text {
    color: black;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 25px;
}

.epm-popup-button {
    display: inline-block;
    padding: 10px 30px;
    background: #d3e387;
    color: black;
    text-decoration: none;
    font-size: 1.1em;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    margin: auto;
    height: unset;
    font-weight: 700;
    border-radius: 25px;
}

.epm-popup-button:hover {
    background: #a2d416;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 115, 170, 0.3);
    color: black;
}

.epm-popup-button:active {
    transform: translateY(0);
}