/* Container */
.cpb-container {
    display: inline-block;
    margin: 10px 0;
}

/* Trigger Button */
.cpb-trigger-button {
    padding: 12px 24px;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cpb-trigger-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

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

/* Modal Popup */
.cpb-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cpb-modal.is-open {
    opacity: 1;
    visibility: visible;
}

/* Modal Overlay */
.cpb-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Modal Content Box */
.cpb-modal-content {
    position: relative;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    width: 95%; /* Plus large sur mobile */
    max-width: 1200px; /* Beaucoup plus grand pour les flipbooks/PDFs */
    height: 90vh; /* Hauteur fixe à 90% de l'écran pour un confort de lecture */
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    display: flex;
    flex-direction: column;
}

/* Modal Body Text */
.cpb-modal-body {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    flex-grow: 1; /* Permet au contenu de prendre toute la hauteur disponible */
    display: flex;
    flex-direction: column;
}

/* Ajustement pour le contenu interne (flipbook) */
.cpb-modal-body > * {
    flex-grow: 1;
}

.cpb-modal.is-open .cpb-modal-content {
    transform: scale(1);
}

/* Close Button */
.cpb-close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    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: background-color 0.2s ease, color 0.2s ease;
}

.cpb-close-button:hover {
    background-color: #f3f4f6;
    color: #000;
}

/* Modal Body Text */
.cpb-modal-body {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}
