
/* Ajustements de largeur du modèle Manifestations */

body:has(#manifestations-2026) #manifestations-2026 {
    width: 96% !important;
    max-width: 1450px !important;
    margin: 30px auto !important;
}

body:has(#manifestations-2026) #manifestations-2026 h2 {
    background: transparent !important;
    color: #641158 !important;
    font-size: 27px !important;
    padding: 12px 0 !important;
    text-align: left !important;
}

body:has(#manifestations-2026) #afm-carte {
    height: 600px !important;
}

body:has(#manifestations-2026) #afm-affiches article p {
    color: #333 !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
}

@media (max-width: 600px) {
    body:has(#manifestations-2026) #afm-carte {
        height: 420px !important;
    }
}

/* Carte Manifestations : sortir de la largeur du thème */
#manifestations-2026 {
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 92vw !important;
    max-width: 1450px !important;
    margin: 30px 0 !important;
    box-sizing: border-box !important;
}

#manifestations-2026 h2 {
    background: #fff !important;
    color: #641158 !important;
    font-size: 26px !important;
    text-align: center !important;
}

@media (max-width: 600px) {
    #manifestations-2026 {
        width: 96vw !important;
        padding: 12px !important;
    }
}

/* Carte compacte, affiches prioritaires */

#manifestations-2026 #afm-carte {
    height: 220px !important;
    max-height: none !important;
    transition: height .25s ease;
}

#manifestations-2026 #afm-carte.afm-agrandie {
    height: 600px !important;
}

#afm-bouton-carte {
    display: block;
    margin: 12px auto 22px;
    padding: 11px 22px;
    background: #70216d;
    color: white;
    border: 0;
    border-radius: 9px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

#manifestations-2026 #afm-affiches {
    margin-top: 12px !important;
}

@media(max-width:600px) {
    #manifestations-2026 #afm-carte {
        height: 190px !important;
    }
    #manifestations-2026 #afm-carte.afm-agrandie {
        height: 430px !important;
    }
}

/* Présentation : petite carte à gauche, affiches à droite */

@media (min-width: 850px) {
    #manifestations-2026 {
        display: grid !important;
        grid-template-columns: 340px minmax(0, 1fr) !important;
        column-gap: 24px !important;
        align-items: start !important;
    }

    #manifestations-2026 > h1,
    #manifestations-2026 > h2,
    #manifestations-2026 > .intro {
        grid-column: 1 / -1 !important;
    }

    #manifestations-2026 #afm-carte {
        grid-column: 1 !important;
        grid-row: auto !important;
        height: 260px !important;
        width: 100% !important;
    }

    #manifestations-2026 #afm-bouton-carte {
        grid-column: 1 !important;
        margin: 8px auto !important;
    }

    #manifestations-2026 #afm-affiches {
        grid-column: 2 !important;
        grid-row: 2 / span 3 !important;
        margin-top: 0 !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    #manifestations-2026 #afm-carte.afm-agrandie {
        height: 550px !important;
    }
}

@media (max-width: 849px) {
    #manifestations-2026 #afm-carte {
        height: 190px !important;
    }
}

/* Disposition finale carte + affiches */

#manifestations-2026 #afm-disposition-2026 {
    display: grid !important;
    grid-template-columns: 300px minmax(0, 1fr) !important;
    gap: 24px !important;
    align-items: start !important;
}

#manifestations-2026 #afm-zone-carte,
#manifestations-2026 #afm-zone-affiches {
    min-width: 0;
}

#manifestations-2026 #afm-zone-carte #afm-carte {
    width: 100% !important;
    height: 260px !important;
}

#manifestations-2026 #afm-zone-carte #afm-carte.afm-agrandie {
    height: 550px !important;
}

#manifestations-2026 #afm-zone-affiches #afm-affiches {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
}

@media (max-width: 850px) {
    #manifestations-2026 #afm-disposition-2026 {
        display: flex !important;
        flex-direction: column-reverse !important;
    }

    #manifestations-2026 #afm-zone-carte,
    #manifestations-2026 #afm-zone-affiches {
        width: 100% !important;
    }

    #manifestations-2026 #afm-zone-affiches #afm-affiches {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 480px) {
    #manifestations-2026 #afm-zone-affiches #afm-affiches {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Correction de la disposition Manifestations */

@media (min-width: 851px) {
    #manifestations-2026 {
        display: block !important;
    }

    #manifestations-2026 #afm-disposition-2026 {
        display: grid !important;
        grid-template-columns: 300px minmax(0, 1fr) !important;
        gap: 24px !important;
        align-items: start !important;
    }

    #manifestations-2026 #afm-zone-carte #afm-carte {
        height: 260px !important;
        width: 100% !important;
    }

    #manifestations-2026 #afm-zone-affiches #afm-affiches {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 850px) {
    #manifestations-2026 {
        display: block !important;
    }

    #manifestations-2026 #afm-disposition-2026 {
        display: flex !important;
        flex-direction: column-reverse !important;
    }
}
