/* ====================================================
   popup.css — Styles des popups front CMS
   3 layouts : texte | photo_gauche | banniere
   ==================================================== */

/* === Overlay === */
.cmsPopupOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 9998;
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}

.cmsPopupOverlay.visible {
    opacity: 1;
    pointer-events: all;
}

/* === Conteneur popup === */
.cmsPopup {
    position: fixed;
    z-index: 9999;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px) scale(.97);
    transition: opacity .35s ease, transform .35s ease;
    pointer-events: none;
}

.cmsPopup.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* === Fermer === */
.cmsPopupClose {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(0, 0, 0, .08);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    transition: background .2s;
    z-index: 2;
}

.cmsPopupClose:hover {
    background: rgba(0, 0, 0, .18);
}

/* === CTA === */
.cmsPopupCta {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 24px;
    background: var(--plus, #4f46e5);
    color: #fff !important;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: opacity .2s;
}

.cmsPopupCta:hover {
    opacity: .85;
}

/* ─── LAYOUT : texte seul ─── */
.cmsPopup--texte {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.97);
    width: min(90vw, 480px);
    max-height: 90vh;
    overflow-y: auto;
}

.cmsPopup--texte.visible {
    transform: translate(-50%, -50%) scale(1);
}

.cmsPopup--texte .cmsPopupBody {
    padding: 36px 32px 28px;
}

.cmsPopup--texte .cmsPopupTitre {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--plus, #1f2937);
}

.cmsPopup--texte .cmsPopupContenu {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* ─── LAYOUT : photo à gauche ─── */
.cmsPopup--photo_gauche {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.97);
    width: min(92vw, 700px);
    max-height: 90vh;
    display: flex;
    overflow: hidden;
}

.cmsPopup--photo_gauche.visible {
    transform: translate(-50%, -50%) scale(1);
}

.cmsPopup--photo_gauche .cmsPopupImg {
    flex: 0 0 42%;
    max-width: 42%;
    overflow: hidden;
}

.cmsPopup--photo_gauche .cmsPopupImg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cmsPopup--photo_gauche .cmsPopupBody {
    flex: 1;
    padding: 36px 28px 28px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cmsPopup--photo_gauche .cmsPopupTitre {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--plus, #1f2937);
}

.cmsPopup--photo_gauche .cmsPopupContenu {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* ─── LAYOUT : bannière (bas de page) ─── */
.cmsPopup--banniere {
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 12px 12px 0 0;
    transform: translateY(100%);
    transition: opacity .35s ease, transform .4s ease;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 18px 40px 18px 24px;
    min-height: 80px;
    background: var(--plus, #4f46e5);
    color: #fff;
}

.cmsPopup--banniere.visible {
    transform: translateY(0);
}

.cmsPopup--banniere .cmsPopupClose {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.cmsPopup--banniere .cmsPopupImg {
    flex: 0 0 60px;
}

.cmsPopup--banniere .cmsPopupImg img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.cmsPopup--banniere .cmsPopupBody {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cmsPopup--banniere .cmsPopupTitre {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.cmsPopup--banniere .cmsPopupContenu {
    font-size: 13px;
    color: rgba(255, 255, 255, .85);
}

.cmsPopup--banniere .cmsPopupCta {
    background: #fff;
    color: var(--plus, #4f46e5) !important;
    margin-top: 0;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 600px) {
    .cmsPopup--photo_gauche {
        flex-direction: column;
    }

    .cmsPopup--photo_gauche .cmsPopupImg {
        flex: 0 0 180px;
        max-width: 100%;
    }

    .cmsPopup--photo_gauche .cmsPopupImg img {
        height: 180px;
    }

    .cmsPopup--banniere {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px 24px;
    }
}