/* ===== Module Ps_Popup (popups multiples + bandeau image) =====
 * Scopé sous .ps-popup-overlay, avec resets pour primer sur le thème.
 */

.ps-popup-overlay,
.ps-popup-overlay * {
    box-sizing: border-box;
}

.ps-popup-overlay {
    position: fixed;
    inset: 0;
    top: 0; right: 0; bottom: 0; left: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 2147483000;
    animation: ps-popup-fade .25s ease;
}

.ps-popup-overlay .ps-popup {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow: hidden auto;            /* clippe les coins arrondis (image incluse) */
    padding: 0;
    margin: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    text-align: center;
    animation: ps-popup-pop .3s ease;
}

/* Bandeau image : bord à bord, aucune marge blanche */
.ps-popup-overlay .ps-popup-media {
    margin: 0;
    padding: 0;
    font-size: 0;
    line-height: 0;
}
.ps-popup-overlay .ps-popup-media img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

/* Corps : c'est lui qui porte le rembourrage */
.ps-popup-overlay .ps-popup-body {
    padding: 40px 32px 32px;
    text-align: center;
}
/* Quand il y a une image, on réduit le blanc en haut du corps */
.ps-popup-overlay .ps-popup--has-media .ps-popup-body {
    padding-top: 24px;
}

.ps-popup-overlay .ps-popup-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 34px;
    height: 34px;
    min-width: 0;
    padding: 0;
    margin: 0;
    font-size: 24px;
    line-height: 32px;
    font-weight: 400;
    color: #555;
    background: none;
    border: none;
    border-radius: 50%;
    box-shadow: none;
    cursor: pointer;
    text-transform: none;
    transition: color .15s ease, background .15s ease;
}
.ps-popup-overlay .ps-popup-close:hover {
    color: #111;
}
/* Sur une image, on ajoute un fond pour garder la croix lisible */
.ps-popup-overlay .ps-popup--media-full .ps-popup-close {
    background: rgba(255, 255, 255, .85);
    color: #333;
}
.ps-popup-overlay .ps-popup--media-full .ps-popup-close:hover {
    background: #fff;
}

.ps-popup-overlay .ps-popup-title {
    margin: 0 0 14px;
    padding: 0;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.2;
    color: #222;
}

.ps-popup-overlay .ps-popup-content {
    margin: 0 0 22px;
    padding: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: #555;
    word-wrap: break-word;
}
.ps-popup-overlay .ps-popup-content p { margin: 0 0 10px; }
.ps-popup-overlay .ps-popup-content p:last-child { margin-bottom: 0; }
/* Image insérée DANS le contenu : centrée, pleine largeur dispo, sans débordement */
.ps-popup-overlay .ps-popup-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 8px auto;
    border-radius: 6px;
}

.ps-popup-overlay .ps-popup-actions {
    margin: 8px 0 0;
    padding: 0;
}

.ps-popup-overlay .ps-popup-btn {
    display: inline-block;
    width: auto;
    max-width: 100%;
    min-width: 0;
    padding: 12px 28px;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    text-transform: none;
    color: #fff;
    text-decoration: none;
    background: #2fb5d2;            /* accent : à adapter à ta charte */
    border: none;
    border-radius: 6px;
    box-shadow: none;
    cursor: pointer;
    transition: filter .15s ease;
}
.ps-popup-overlay .ps-popup-btn:hover {
    filter: brightness(.92);
    color: #fff;
    text-decoration: none;
    background: #2fb5d2;
}


/* Image à largeur fixe : centrée, dans un cadre avec un peu d'espace */
.ps-popup-overlay .ps-popup-media--inset {
    padding: 28px 24px 0;
    font-size: 0;
    line-height: 0;
    text-align: center;
}
.ps-popup-overlay .ps-popup-media--inset img {
    display: inline-block;
    max-width: 100%;        /* ne dépasse jamais la popup */
    height: auto;
    margin: 0 auto;
    border-radius: 6px;
}
/* La croix ne reçoit le fond clair que pour une image pleine largeur */
.ps-popup-overlay .ps-popup--has-media:not(.ps-popup--media-full) .ps-popup-close {
    background: none;
    color: #555;
}

@keyframes ps-popup-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes ps-popup-pop {
    from { transform: translateY(12px) scale(.97); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

@media (max-width: 480px) {
    .ps-popup-overlay .ps-popup-body { padding: 32px 20px 24px; }
    .ps-popup-overlay .ps-popup-title { font-size: 1.3rem; }
    .ps-popup-overlay .ps-popup-btn { white-space: normal; }
}
