/* Mosquée Chevilly-Larue — Popup Carrousel v5 */

.mosquee-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, visibility .3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.mosquee-popup-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

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

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

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

/* Image */
.mosquee-popup-image-wrapper { width: 100%; overflow: hidden; background: #f5f5f5; }
.mosquee-popup-image { width: 100%; height: auto; max-height: 320px; object-fit: cover; display: block; }

/* Header slide */
.mosquee-popup-header {
    padding: 28px 28px 14px;
    text-align: center;
    position: relative;
}
.mosquee-popup-header::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 56px; height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, #004B39, #DB9E30);
}
.mosquee-popup-icon {
    font-size: 42px;
    display: inline-block;
    margin-bottom: 10px;
    animation: mpFloat 3s ease-in-out infinite;
}
@keyframes mpFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

.mosquee-popup-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #004B39;
    margin: 0 0 4px;
    line-height: 1.3;
}

/* Body */
.mosquee-popup-body { padding: 0 28px 24px; text-align: center; }
.mosquee-popup-message { font-size: .95rem; line-height: 1.65; color: #555; margin-bottom: 20px; }
.mosquee-popup-message p { margin: 0 0 8px; }
.mosquee-popup-message p:last-child { margin-bottom: 0; }

/* Bouton */
.mosquee-popup-button {
    display: inline-block;
    padding: 13px 30px;
    font-size: .95rem;
    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;
}
.mosquee-popup-button:hover { transform: translateY(-2px); box-shadow: 0 7px 20px rgba(0,0,0,.25); }

/* ── CARROUSEL ── */
.mosquee-carousel { position: relative; }
.mosquee-carousel-track { overflow: hidden; }

/* Slides */
.mosquee-slide { display: none; }
.mosquee-slide.active { display: block; animation: mpSlideIn .35s ease; }
@keyframes mpSlideIn { from{opacity:0;transform:translateX(30px)} to{opacity:1;transform:translateX(0)} }
.mosquee-slide.prev { animation: mpSlideOut .35s ease; }
@keyframes mpSlideOut { from{opacity:1;transform:translateX(0)} to{opacity:0;transform:translateX(-30px)} }

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

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

/* Compteur */
.mosquee-counter {
    text-align: center;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .05em;
    margin-bottom: 6px;
    opacity: .7;
}

/* Responsive */
@media(max-width:600px) {
    .mosquee-popup-overlay { padding: 10px; }
    .mosquee-popup-container { border-radius: 14px; }
    .mosquee-popup-header { padding: 22px 16px 10px; }
    .mosquee-popup-body { padding: 0 16px 18px; }
    .mosquee-popup-title { font-size: 1.2rem; }
    .mosquee-popup-icon { font-size: 34px; }
    .mosquee-popup-button { padding: 11px 22px; font-size: .88rem; width: 100%; }
    .mosquee-nav { width: 28px; height: 28px; font-size: .85rem; }
}
@media(prefers-reduced-motion:reduce) {
    .mosquee-popup-overlay,.mosquee-popup-container,.mosquee-popup-button { transition:none; }
    .mosquee-popup-icon { animation:none; }
    .mosquee-slide.active { animation:none; }
}
@media print { .mosquee-popup-overlay { display:none !important; } }
