/* Popup Manager Pro - Structure uniquement */

/* Overlay principal */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.popup-overlay.popup-show {
    display: flex;
}

/* Conteneur de la popup */
.popup-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 100%;
    max-height: 90vh;
    /* width: 90%; */
    position: relative;
    overflow: hidden;
    transform: scale(0.8) translateY(50px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-container.popup-animate-in {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.popup-container.popup-animate-out {
    transform: scale(0.8) translateY(-50px);
    opacity: 0;
}

/* Bouton de fermeture */
.popup-close {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.popup-close svg {
    width: 20px;
    height: 20px;
    color: #666;
}

/* Contenu : on laisse le thème gérer */
.popup-content {
    overflow-y: auto;
    max-height: 90vh;
    text-align: left;
}

.popup-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.popup-title {
    padding: 30px 30px 10px;
}

.popup-title h2 {
    margin: 0;
}

/* NEW: Alignement du titre */
.popup-title-align-left { text-align: left; }
.popup-title-align-center { text-align: center; }
.popup-title-align-right { text-align: right; }

.popup-body {
    padding: 30px;
}

.popup-body img {
    max-width: 100%;
    height: auto;
}

/* Mode prévisualisation */
.popup-overlay[data-preview-mode="1"]::before {
    content: "PRÉVISUALISATION";
    position: fixed;
    top: 50px;
    right: 20px;
    background: #ff9800;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    z-index: 1000000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 768px) {
    .popup-container {
        width: 95%;
        max-width: 95% !important;
    }
    .popup-title, .popup-body {
        padding-left: 20px;
        padding-right: 20px;
    }
}