/* Mosquée Chevilly-Larue - Popup d'Accueil */
/* Design moderne et élégant */

/* Overlay de fond */
.mosquee-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mosquee-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Container de la popup */
.mosquee-popup-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000000;
    margin: auto;
}

.mosquee-popup-overlay.active .mosquee-popup-container {
    transform: scale(1);
    opacity: 1;
}

/* Animation fadeInUp */
.mosquee-popup-container.fadeInUp {
    transform: translateY(50px) scale(0.9);
}

.mosquee-popup-overlay.active .mosquee-popup-container.fadeInUp {
    transform: translateY(0) scale(1);
}

/* Animation fadeInDown */
.mosquee-popup-container.fadeInDown {
    transform: translateY(-50px) scale(0.9);
}

.mosquee-popup-overlay.active .mosquee-popup-container.fadeInDown {
    transform: translateY(0) scale(1);
}

/* Animation zoomIn */
.mosquee-popup-container.zoomIn {
    transform: scale(0.5);
}

.mosquee-popup-overlay.active .mosquee-popup-container.zoomIn {
    transform: scale(1);
}

/* Header de la popup */
.mosquee-popup-header {
    padding: 30px 30px 20px;
    text-align: center;
    position: relative;
}

.mosquee-popup-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, #004B39, #DB9E30);
}

/* Bouton fermer (X) */
.mosquee-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    transition: all 0.3s ease;
    z-index: 10;
}

.mosquee-popup-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

/* Image (si activée) */
.mosquee-popup-image-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: block;
    background: #f5f5f5;
}

.mosquee-popup-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto;
    padding: 0;
}

/* Sur tablette */
@media screen and (max-width: 1024px) {
    .mosquee-popup-image {
        max-height: 350px;
    }
}

/* Sur mobile */
@media screen and (max-width: 768px) {
    .mosquee-popup-image {
        max-height: 300px;
    }
}

@media screen and (max-width: 480px) {
    .mosquee-popup-image {
        max-height: 250px;
    }
}

/* Icône décorative */
.mosquee-popup-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: inline-block;
    animation: popupIconFloat 3s ease-in-out infinite;
}

@keyframes popupIconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Titre */
.mosquee-popup-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.3;
    color: #004B39;
}

/* Corps de la popup */
.mosquee-popup-body {
    padding: 0 30px 30px;
    text-align: center;
}

.mosquee-popup-message {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 25px 0;
}

.mosquee-popup-message p {
    margin: 0 0 10px 0;
}

.mosquee-popup-message p:last-child {
    margin-bottom: 0;
}

/* Bouton d'action */
.mosquee-popup-button {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.mosquee-popup-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.mosquee-popup-button:hover::before {
    width: 300px;
    height: 300px;
}

.mosquee-popup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.mosquee-popup-button:active {
    transform: translateY(0);
}

/* Footer optionnel */
.mosquee-popup-footer {
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.03);
    text-align: center;
    font-size: 13px;
    color: #666;
}

/* Design pattern décoratif */
.mosquee-popup-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    opacity: 0.05;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 10px, #004B39 10px, #004B39 20px),
        repeating-linear-gradient(-45deg, transparent, transparent 10px, #DB9E30 10px, #DB9E30 20px);
    pointer-events: none;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .mosquee-popup-overlay {
        padding: 15px;
        align-items: center;
        justify-content: center;
    }
    
    .mosquee-popup-container {
        max-width: 95%;
        border-radius: 15px;
        width: 100%;
        display: block !important;
        visibility: visible !important;
    }
    
    .mosquee-popup-overlay.active .mosquee-popup-container {
        display: block !important;
    }
    
    .mosquee-popup-header {
        padding: 25px 20px 15px;
    }
    
    .mosquee-popup-title {
        font-size: 24px;
    }
    
    .mosquee-popup-body {
        padding: 0 20px 25px;
    }
    
    .mosquee-popup-message {
        font-size: 15px;
    }
    
    .mosquee-popup-button {
        padding: 12px 28px;
        font-size: 15px;
    }
    
    .mosquee-popup-icon {
        font-size: 40px;
    }
}

@media screen and (max-width: 480px) {
    .mosquee-popup-overlay {
        padding: 10px;
        align-items: center;
        justify-content: center;
    }
    
    .mosquee-popup-container {
        border-radius: 12px;
        max-width: 100%;
        width: 100%;
        display: block !important;
    }
    
    .mosquee-popup-header {
        padding: 20px 15px 12px;
    }
    
    .mosquee-popup-title {
        font-size: 20px;
    }
    
    .mosquee-popup-body {
        padding: 0 15px 20px;
    }
    
    .mosquee-popup-message {
        font-size: 14px;
    }
    
    .mosquee-popup-button {
        padding: 10px 24px;
        font-size: 14px;
        width: 100%;
    }
    
    .mosquee-popup-icon {
        font-size: 36px;
    }
    
    .mosquee-popup-close {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    .mosquee-popup-overlay,
    .mosquee-popup-container,
    .mosquee-popup-button {
        transition: none;
    }
    
    .mosquee-popup-icon {
        animation: none;
    }
    
    .mosquee-popup-close:hover {
        transform: none;
    }
}

/* Mode impression */
@media print {
    .mosquee-popup-overlay {
        display: none !important;
    }
}
