/* ============================================
   MODALE D'ANNONCE — MOSQUÉE MIRAIL TOULOUSE
   ============================================ */

.mmt-annonce-modal {
    position: fixed;
    inset: 0;
    /* Doit rester au-dessus du menu latéral mobile Islam (z-index jusqu'à
       1 000 000, voir islam-categories.css) mais sous la bannière de
       cookies CookieYes (z-index jusqu'à 999 999 999, volontairement
       toujours au-dessus de tout pour rester accessible). */
    z-index: 1050000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mmt-annonce-modal[hidden] {
    display: none;
}

body.mmt-annonce-open {
    overflow: hidden;
}

.mmt-annonce-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 10, 15, 0.65);
    animation: mmt-annonce-fade-in 0.25s ease;
}

.mmt-annonce-box {
    position: relative;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    /* Occupe ~60% de la largeur d'écran sur grand écran, sans dépasser
       1100px ni descendre sous 320px (le passage en quasi pleine largeur
       sur mobile est géré par le media query plus bas). */
    width: clamp(320px, 60vw, 1100px);
    max-width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    animation: mmt-annonce-pop-in 0.3s ease;
}

.mmt-annonce-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #B01D58;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.mmt-annonce-close:hover,
.mmt-annonce-close:focus-visible {
    background: #B01D58;
    color: #fff;
    transform: scale(1.05);
}

.mmt-annonce-image {
    width: 100%;
    line-height: 0;
    border-radius: 5px 5px 0 0;
    overflow: hidden;
}

/* Image seule, sans titre ni texte en dessous : elle devient le dernier
   élément de la boîte, ses coins doivent donc être arrondis des 4 côtés. */
.mmt-annonce-image:last-child {
    border-radius: 5px;
}

.mmt-annonce-image img {
    width: 100%;
    height: auto;
    display: block;
}

.mmt-annonce-content {
    padding: 24px;
}

.mmt-annonce-image + .mmt-annonce-content {
    padding-top: 20px;
}

.mmt-annonce-titre {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.3;
    color: #B01D58;
}

.mmt-annonce-texte {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.mmt-annonce-texte p {
    margin: 0 0 10px;
}

.mmt-annonce-texte p:last-child {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .mmt-annonce-modal {
        padding: 12px;
    }

    .mmt-annonce-box {
        width: 100%;
        max-height: 90vh;
        border-radius: 5px;
    }

    .mmt-annonce-titre {
        font-size: 19px;
    }

    .mmt-annonce-content {
        padding: 18px;
    }
}

@keyframes mmt-annonce-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes mmt-annonce-pop-in {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .mmt-annonce-overlay,
    .mmt-annonce-box {
        animation: none;
    }
}
