/* BAO V36 — corrections d'ergonomie sur mobile ; identique pour les quatre thèmes. */
@media (max-width: 767px) {
  /* V37 — alignement des cartes de responsables sur celles du bureau.
     Les styles hérités ajoutent déjà un retrait au parent #repe :
     supprimer le second retrait propre à .bureau-cards--repe. */
  .section-row--repe #repe .wp2 > .bureau-cards--repe {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
  .section-row--repe #repe .wp2 > .bureau-cards--repe > .bureau-card {
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0;
  }
  /* V37 — conserver la grille d'origine de la galerie et les miniatures
     de Romane ; seul le diaporama ouvert utilise le swipe natif. */
  /* La présentation conserve son contenu complet, accessible au clic. */
  .about-body.bao-about-collapsed {
    max-height: 270px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom,#000 0%,#000 76%,transparent 100%);
    mask-image: linear-gradient(to bottom,#000 0%,#000 76%,transparent 100%);
  }
  .bao-about-toggle {
    display: inline-flex;
    align-items:center;
    justify-content:center;
    margin: 14px auto 0;
    padding: 11px 19px;
    border: 1px solid currentColor;
    border-radius: 24px;
    color: #694732;
    background: transparent;
    font: 700 14px/1.3 Lato,sans-serif;
    cursor: pointer;
  }
  .bao-about-toggle:focus-visible { outline: 3px solid #b28a53; outline-offset: 3px; }
  body.classic-site .bao-about-toggle { color:#053e5f; }
  body.octobre-rose .bao-about-toggle { color:#a91b5a; }
  body.noel .bao-about-toggle { color:#174839; }
  /* Diaporama plein écran : glissement natif entre photos, sans changer l'apparence générale. */
  .lightbox .lightbox-media.bao-photo-swipe-mode {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    height: min(78vh, 800px);
    max-height: 78vh;
  }
  .lightbox .bao-lightbox-track {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
  }
  .lightbox .bao-lightbox-track::-webkit-scrollbar {display:none;}
  .lightbox .bao-lightbox-slide {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    box-sizing: border-box;
  }
  .lightbox.active .bao-lightbox-slide img,
  .lightbox .bao-lightbox-slide img {
    display:block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 74vh;
    object-fit: contain;
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
  .lightbox .lightbox-media.bao-photo-swipe-mode > #lightbox-img { display:none!important; }
  .lightbox .bao-photo-swipe-mode .lightbox-caption { z-index: 2; }
  .lightbox .lightbox-nav { z-index: 3; }
}
@media (min-width: 768px) {
  .bao-about-toggle {display:none!important;}
}
@media (prefers-reduced-motion: reduce) {
  .lightbox .bao-lightbox-track {scroll-behavior:auto!important;}
}
