/* Text Popup Manager - Styles */

.tpm-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tpm-popup-overlay.tpm-show {
    opacity: 1;
}

.tpm-popup-container {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.tpm-popup-overlay.tpm-show .tpm-popup-container {
    transform: scale(1);
}

/* Positions */
.tpm-popup-overlay .tpm-position-top {
    align-self: flex-start;
    margin-top: 50px;
}

.tpm-popup-overlay .tpm-position-bottom {
    align-self: flex-end;
    margin-bottom: 50px;
}

.tpm-popup-overlay .tpm-position-center {
    align-self: center;
}

/* Animations */
.tpm-popup-overlay.tpm-animation-fade .tpm-popup-container {
    transform: scale(1);
    opacity: 0;
}

.tpm-popup-overlay.tpm-animation-fade.tpm-show .tpm-popup-container {
    opacity: 1;
}

.tpm-popup-overlay.tpm-animation-slide-down .tpm-popup-container {
    transform: translateY(-100px);
}

.tpm-popup-overlay.tpm-animation-slide-down.tpm-show .tpm-popup-container {
    transform: translateY(0);
}

.tpm-popup-overlay.tpm-animation-slide-up .tpm-popup-container {
    transform: translateY(100px);
}

.tpm-popup-overlay.tpm-animation-slide-up.tpm-show .tpm-popup-container {
    transform: translateY(0);
}

.tpm-popup-overlay.tpm-animation-zoom .tpm-popup-container {
    transform: scale(0.3);
}

.tpm-popup-overlay.tpm-animation-zoom.tpm-show .tpm-popup-container {
    transform: scale(1);
}

/* Bouton de fermeture */
.tpm-close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tpm-close-button:hover {
    opacity: 1;
}

/* Titre */
.tpm-popup-title h2 {
    margin: 0 0 20px 0;
    padding: 0;
    font-size: 24px;
    line-height: 1.4;
}

/* Contenu */
.tpm-popup-content {
    font-size: 16px;
    line-height: 1.6;
}

.tpm-popup-content p:last-child {
    margin-bottom: 0;
}

.tpm-popup-content a {
    color: inherit;
    text-decoration: underline;
}

.tpm-popup-content a:hover {
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .tpm-popup-container {
        padding: 20px;
        max-width: 95%;
    }
    
    .tpm-popup-title h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .tpm-popup-content {
        font-size: 14px;
    }
    
    .tpm-close-button {
        top: 10px;
        right: 10px;
        font-size: 28px;
    }
    
    .tpm-position-top,
    .tpm-position-bottom {
        margin-top: 20px;
        margin-bottom: 20px;
    }
}

/* Empêcher le défilement du body quand la popup est ouverte */
body.tpm-popup-open {
    overflow: hidden;
}

/* Style par défaut pour les boutons déclencheurs */
.tpm-trigger-button {
    display: inline-block;
    background: #0073aa;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
    font-family: inherit;
    line-height: 1.4;
    text-align: center;
}

.tpm-trigger-button:hover {
    background: #005177;
    transform: translateY(-1px);
}

.tpm-trigger-button:active {
    transform: translateY(0);
}

.tpm-trigger-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}
