/* COSEM Popup Styles */

.cosem-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

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

.cosem-popup-container {
    background: #ffffff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease-in-out;
}

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

.cosem-popup-header {
    position: relative;
    padding: 15px 20px 0;
}

.cosem-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

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

.cosem-popup-content {
    padding: 0 20px 25px;
}

.cosem-popup-image {
    text-align: center;
    margin-bottom: 20px;
}

.cosem-popup-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cosem-popup-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.3;
    text-align: center;
}

.cosem-popup-description {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
    text-align: center;
}

.cosem-popup-description p {
    margin-bottom: 12px;
}

.cosem-popup-description p:last-child {
    margin-bottom: 0;
}

.cosem-popup-actions {
    text-align: center;
    margin-top: 25px;
}

.cosem-popup-btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    line-height: 1.4;
}

.cosem-popup-btn-primary {
    background-color: #0073aa;
    color: #ffffff;
}

.cosem-popup-btn-primary:hover {
    background-color: #005a87;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .cosem-popup-container {
        width: 95%;
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .cosem-popup-title {
        font-size: 20px;
    }
    
    .cosem-popup-description {
        font-size: 14px;
    }
    
    .cosem-popup-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
    
    .cosem-popup-content {
        padding: 0 15px 20px;
    }
    
    .cosem-popup-header {
        padding: 10px 15px 0;
    }
    
    .cosem-popup-close {
        top: 10px;
        right: 15px;
        font-size: 24px;
        width: 25px;
        height: 25px;
    }
}

/* Accessibilité */
.cosem-popup-overlay:focus-within {
    outline: none;
}

.cosem-popup-close:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.cosem-popup-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Animation de sortie */
.cosem-popup-overlay.animate-out {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.cosem-popup-overlay.animate-out .cosem-popup-container {
    transform: scale(0.9);
    transition: transform 0.2s ease-in-out;
}