/* ========== POPUPS GÉNÉRIQUES ========== */

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.popup-overlay.open {
    display: flex;
}

.popup-content {
    background: var(--background-color);
    border-radius: 12px;
    width: 90%;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: popupAppear 0.2s ease-out;
    margin: auto;
    font-size: 0.9em;
    overscroll-behavior: contain;
}

@keyframes popupAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    line-height: 1;
    color: #666;
    transition: all 0.2s;
}

.popup-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
}

.popup-header {
    text-align: center;
    padding: 6px;
}

.popup-header h2 {
    margin: 5px;
    font-size: 1.5em;
}

.work-grade {
    font-size: 0.8em;
    opacity: 0.75;
    margin-left: 6px;
    font-weight: normal;
}

/* Desktop */
@media (min-width: 600px) {
    .popup-content {
        max-width: 600px;
        max-height: 80vh;
    }
}