/* Mosquée Chevilly-Larue — Popup Annonces v5.2 */

.mcl-overlay {
    display: none; /* JS gère l'affichage via .show() */
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    transition: opacity .3s ease;
}
/* Quand JS ajoute display:flex via .show() */
.mcl-overlay[style*="display: flex"],
.mcl-overlay[style*="display:flex"] {
    display: flex !important;
}
.mcl-overlay.active {
    opacity: 1;
}

/* Container */
.mcl-popup {
    position: relative;
    width: 100%;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
    overflow: hidden;
    margin: auto;
    transform: translateY(40px);
    transition: transform .4s cubic-bezier(.22,1,.36,1);
}
.mcl-overlay.active .mcl-popup  { transform: translateY(0); }
.mcl-popup.fadeInDown            { transform: translateY(-40px); }
.mcl-popup.zoomIn                { transform: scale(.5); }
.mcl-overlay.active .mcl-popup.zoomIn { transform: scale(1); }

/* Barre top */
.mcl-topbar { height: 4px; width: 100%; }

/* Bouton fermer */
.mcl-close {
    position: absolute; top: 13px; right: 13px;
    width: 33px; height: 33px; border: none;
    background: rgba(0,0,0,.06); border-radius: 50%;
    font-size: .95rem; cursor: pointer;
    display: grid; place-items: center;
    z-index: 10; color: #333;
    transition: background .2s, transform .2s;
}
.mcl-close:hover { background: rgba(0,0,0,.13); transform: rotate(90deg); }

/* Image */
.mcl-img-wrap { width: 100%; overflow: hidden; background: #f5f5f5; }
.mcl-img { width: 100%; height: auto; max-height: 300px; object-fit: cover; display: block; }

/* Header */
.mcl-header { padding: 26px 26px 12px; text-align: center; position: relative; }
.mcl-header::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 54px; height: 4px; border-radius: 2px;
    background: linear-gradient(90deg, #004B39, #DB9E30);
}
.mcl-icon { font-size: 40px; display: inline-block; margin-bottom: 8px; animation: mclFloat 3s ease-in-out infinite; }
@keyframes mclFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }
.mcl-title { font-size: 1.45rem; font-weight: 700; color: #004B39; margin: 0; line-height: 1.3; }

/* Body */
.mcl-body { padding: 0 26px 22px; text-align: center; }
.mcl-message { font-size: .94rem; line-height: 1.7; color: #555; margin-bottom: 18px; }
.mcl-message p { margin: 0 0 8px; }
.mcl-message p:last-child { margin-bottom: 0; }

.mcl-btn {
    display: inline-block; padding: 12px 28px;
    font-size: .93rem; font-weight: 700; border-radius: 50px;
    border: none; cursor: pointer; text-decoration: none;
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
    transition: transform .2s, box-shadow .2s;
}
.mcl-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 20px rgba(0,0,0,.25); }

/* Slides */
.mcl-slide { display: none; }
.mcl-slide.active { display: block; animation: mclIn .32s ease; }
@keyframes mclIn { from{opacity:0;transform:translateX(20px)} to{opacity:1;transform:translateX(0)} }

/* Navigation */
.mcl-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px; background: rgba(255,255,255,.88);
    border: 1px solid rgba(0,0,0,.08); border-radius: 50%;
    font-size: .9rem; cursor: pointer; display: grid; place-items: center;
    z-index: 5; box-shadow: 0 2px 8px rgba(0,0,0,.1);
    transition: background .2s;
}
.mcl-nav:hover { background: #fff; }
.mcl-prev { left: 8px; }
.mcl-next { right: 8px; }

/* Points */
.mcl-dots { display: flex; justify-content: center; gap: 7px; padding: 8px 0 4px; }
.mcl-dot { width: 10px; height: 10px; border-radius: 50%; border: none; cursor: pointer; padding: 0; transition: transform .2s, background .25s; }
.mcl-dot.active { transform: scale(1.4); }

/* Compteur */
.mcl-counter { text-align: center; font-size: .73rem; font-weight: 700; letter-spacing: .05em; margin: 0 0 14px; opacity: .7; }

/* Responsive */
@media(max-width:560px) {
    .mcl-overlay { padding: 10px; }
    .mcl-popup { border-radius: 14px; }
    .mcl-header { padding: 20px 14px 10px; }
    .mcl-body { padding: 0 14px 18px; }
    .mcl-title { font-size: 1.15rem; }
    .mcl-btn { width: 100%; padding: 11px 20px; font-size: .88rem; }
    .mcl-nav { width: 26px; height: 26px; font-size: .8rem; }
}
@media(prefers-reduced-motion:reduce) {
    .mcl-overlay,.mcl-popup { transition: none; }
    .mcl-icon { animation: none; }
    .mcl-slide.active { animation: none; }
}
@media print { .mcl-overlay { display: none !important; } }
