/* Sections dynamiques de l'accueil Gutenberg 4165 */

#afm-gutenberg-4165 .afm-gb-events {
    margin: 34px 0 24px;
    padding: 28px;
    background: #eef4fb;
    border-left: 5px solid #4681b5;
    border-radius: 16px;
}

#afm-gutenberg-4165 .afm-gb-events-heading > span,
#afm-gutenberg-4165 .afm-gb-facebook > span {
    color: #754477;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

#afm-gutenberg-4165 .afm-gb-events h2 {
    color: #292531;
    font-size: 30px;
    margin: 14px 0;
}

#afm-gutenberg-4165 .afm-gb-events-heading p {
    color: #686573;
    margin-bottom: 20px;
}

#afm-gutenberg-4165 .afm-gb-marquee {
    overflow: hidden;
    background: white;
    border: 1px solid #dce5ef;
    border-radius: 12px;
    padding: 15px 0;
}

#afm-gutenberg-4165 .afm-gb-track {
    display: flex;
    width: max-content;
    animation: afm-gb-scroll 45s linear infinite;
}

#afm-gutenberg-4165 .afm-gb-marquee:hover .afm-gb-track,
#afm-gutenberg-4165 .afm-gb-marquee:focus-within .afm-gb-track {
    animation-play-state: paused;
}

#afm-gutenberg-4165 .afm-gb-posters {
    display: flex;
    gap: 16px;
    padding-right: 16px;
}

#afm-gutenberg-4165 .afm-gb-posters a {
    display: flex;
    flex-direction: column;
    width: 125px;
    flex: 0 0 125px;
    color: #36313d;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

#afm-gutenberg-4165 .afm-gb-posters img {
    width: 125px;
    height: 170px;
    object-fit: contain;
    border-radius: 8px;
}

#afm-gutenberg-4165 .afm-gb-posters a span {
    margin-top: 8px;
    overflow-wrap: anywhere;
}

@keyframes afm-gb-scroll {
    to { transform: translateX(-50%); }
}

#afm-gutenberg-4165 .afm-gb-events-button {
    display: inline-block;
    margin-top: 20px;
    padding: 13px 22px;
    background: #421b49;
    color: white;
    border-radius: 9px;
    text-decoration: none;
    font-weight: 700;
}

#afm-gutenberg-4165 .afm-gb-facebook {
    max-width: 650px;
    margin: 24px auto 45px;
    padding: 30px;
    background: #f2eaf5;
    border-left: 5px solid #754477;
    border-radius: 16px;
    text-align: center;
}

#afm-gutenberg-4165 .afm-gb-facebook h2 {
    font-size: 27px;
    color: #421b49;
    margin: 14px 0;
}

#afm-gutenberg-4165 .afm-gb-facebook iframe {
    display: block;
    margin: 24px auto;
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
}

#afm-gutenberg-4165 .afm-gb-facebook a {
    color: #421b49;
    font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
    #afm-gutenberg-4165 .afm-gb-track {
        animation: none;
    }
    #afm-gutenberg-4165 .afm-gb-marquee {
        overflow-x: auto;
    }
}

@media (max-width: 700px) {
    #afm-gutenberg-4165 .afm-gb-events,
    #afm-gutenberg-4165 .afm-gb-facebook {
        padding: 18px;
    }
}

/* AFM — finitions manifestations et Facebook */

#afm-gutenberg-4165 .afm-gb-events-button,
#afm-gutenberg-4165 .afm-gb-events-button:visited,
#afm-gutenberg-4165 .afm-gb-events-button:hover {
    color: #ffffff !important;
    background: #421b49 !important;
}

#afm-gutenberg-4165 .afm-gb-facebook h2 {
    background: transparent !important;
    color: #421b49 !important;
    font-size: 28px !important;
    font-weight: 750 !important;
    line-height: 1.25 !important;
    padding: 0 !important;
    margin: 15px 0 20px !important;
}

#afm-gutenberg-4165 .afm-gb-facebook > span {
    color: #754477 !important;
    letter-spacing: 2px;
}

#afm-gutenberg-4165 .afm-gb-facebook {
    box-sizing: border-box;
    width: 100%;
    max-width: 650px;
}

#afm-gutenberg-4165 .afm-gb-facebook iframe {
    width: 100%;
    max-width: 500px;
    height: 600px;
}


/* Titre des manifestations — suppression du fond violet */
#afm-gutenberg-4165 .afm-gb-events h2,
#afm-gutenberg-4165 .afm-gb-events-heading h2 {
    background: transparent !important;
    background-image: none !important;
    color: #292531 !important;
    font-size: 30px !important;
    font-weight: 750 !important;
    line-height: 1.2 !important;
    padding: 0 !important;
    margin: 14px 0 20px !important;
}

/* AFM - Facebook : affichage compact provisoire */
#afm-gutenberg-4165 .afm-gb-facebook {
    min-height: 0 !important;
    height: auto !important;
    margin-bottom: 20px !important;
    padding: 28px !important;
}

#afm-gutenberg-4165 .afm-gb-facebook iframe {
    display: none !important;
}

#afm-gutenberg-4165 .afm-gb-facebook > p:last-child {
    margin: 24px 0 0 !important;
}

#afm-gutenberg-4165 .afm-gb-facebook > p:last-child a {
    display: inline-block;
    background: #68145b;
    color: #ffffff !important;
    text-decoration: none;
    padding: 13px 24px;
    border-radius: 10px;
    font-weight: 700;
}

#afm-gutenberg-4165 .afm-gb-facebook > p:last-child a:hover {
    background: #87105a;
}

/* AFM - Restauration du fil Facebook */
#afm-gutenberg-4165 .afm-gb-facebook iframe {
    display: block !important;
    width: 100% !important;
    max-width: 500px !important;
    height: 600px !important;
    margin: 24px auto !important;
}


/* AFM - Colonnes accueil : finition compacte */
@media (min-width: 782px) {
  #afm-gutenberg-4165 .wp-block-columns.afm-bas-de-page-4165 {
    align-items: flex-start !important;
  }

  #afm-gutenberg-4165 .afm-bas-de-page-4165 .afm-gb-facebook {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 18px 20px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  #afm-gutenberg-4165 .afm-gb-facebook .fb-page {
    width: 100% !important;
    max-width: 500px !important;
    height: 600px !important;
    min-height: 600px !important;
    margin: 0 auto !important;
    flex-shrink: 0 !important;
  }

  #afm-gutenberg-4165 .afm-gb-facebook > p:last-child {
    margin: 12px 0 0 !important;
    padding: 0 !important;
    text-align: center !important;
  }
}

/* Facebook : presentation commune */
#afm-gutenberg-4165 .afm-gb-facebook > span,
#afm-gutenberg-4165 .afm-gb-facebook > p:not(:last-child) {
  display: none !important;
}

#afm-gutenberg-4165 .afm-gb-facebook > h2 {
  display: block !important;
  background: transparent !important;
  color: #481c4d !important;
  font-size: 26px !important;
  text-align: center !important;
  margin: 0 0 14px !important;
}

#afm-gutenberg-4165 .afm-gb-facebook .fb-page iframe {
  display: block !important;
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 500px !important;
  height: 600px !important;
  min-height: 600px !important;
}
