/* Popup Styles */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: auto;
}

.popup-overlay.show {
    display: block;
    opacity: 1;
}

.popup-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: fixed;
    top: 50%;
    left: 50%;
    margin: 0;
    padding: 0;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100000;
    pointer-events: none;
    display: none;
}

.popup-modal.show {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.popup-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.popup-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

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

.popup-content {
    padding: 20px;
    color: #555;
    line-height: 1.6;
    background-color: white;
}

.popup-content * {
    background-color: transparent !important;
}

.popup-content h1,
.popup-content h2,
.popup-content h3,
.popup-content h4,
.popup-content h5,
.popup-content h6 {
    color: #333;
    margin-top: 15px;
    margin-bottom: 10px;
}

.popup-content p {
    margin-bottom: 15px;
}

.popup-content a {
    color: #007bff;
    text-decoration: none;
}

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

/* Popup Button (minimized/collapsed state) */
.popup-button {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #007bff;
    color: white;
    padding: 12px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    z-index: 99998;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s, box-shadow 0.2s;
}

.popup-button:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.popup-button.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .popup-modal {
        width: 95%;
        max-height: 90vh;
    }

    .popup-header h2 {
        font-size: 1.2rem;
    }

    .popup-content {
        padding: 15px;
    }

    .popup-button {
        bottom: 15px;
        left: 15px;
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* Masquer scroll sans décaler le contenu */
body.no-scroll {
    overflow: hidden;
}
