/* Diaporama du Grand Loto, partagé entre l’accueil et l’agenda. */
.loto-gallery {
  position: relative;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  background: #173e45;
}
.agenda-loto-gallery { aspect-ratio: 1600 / 901; }
.home-news-gallery { min-height: 160px; }
.loto-gallery .loto-gallery-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .75s ease;
}
.agenda-loto-gallery .portrait { object-fit: contain; }
.loto-gallery .loto-gallery-image[data-current] { opacity: 1; }
.home-news-gallery .focal-1 { object-position: 45% 57%; }
.home-news-gallery .focal-2 { object-position: 62% 38%; }
.home-news-gallery .focal-3 { object-position: 51% 55%; }
.home-news-gallery .focal-4 { object-position: 63% 45%; }
.home-news-gallery .focal-5 { object-position: 63% 47%; }

.loto-gallery-controls:not([hidden]) {
  position: absolute;
  z-index: 1;
  bottom: 7px;
  right: 7px;
  display: flex;
  gap: 4px;
}
.loto-gallery-controls button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #ffffff80;
  border-radius: 8px;
  color: white;
  background: #102c34e8;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.loto-gallery-controls button:hover { background: #205564; }
.loto-gallery-controls button:focus-visible {
  outline: 2px solid white;
  outline-offset: 1px;
}
.loto-gallery-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (max-width: 620px) {
  .home-news-gallery {
    order: 1;
    min-height: 0;
    aspect-ratio: 2.5;
  }
}
@media (prefers-reduced-motion: reduce) {
  .loto-gallery .loto-gallery-image { transition: none; }
}

.village-gallery {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #153f46;
  color: #fff;
}
.village-gallery-frame {
  aspect-ratio: 16 / 10;
}
.village-gallery .loto-gallery-image {
  transition-duration: 1.1s;
}
.village-gallery .village-photo-corso { object-position: 44% 58%; }
.village-gallery .village-photo-eglise { object-position: center 35%; }
.village-gallery .village-photo-fresque { object-position: center 29%; }
.village-gallery figcaption {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .15rem;
  min-height: 4rem;
  padding: .65rem .9rem;
  font-size: .95rem;
  line-height: 1.35;
}
.village-gallery figcaption span {
  color: #deeeeb;
  font-size: .85rem;
}
.village-gallery .loto-gallery-controls button {
  width: 42px;
  height: 42px;
}
@media (max-width: 620px) {
  .village-gallery-frame { aspect-ratio: 4 / 3; }
  .village-gallery figcaption { min-height: 4.85rem; }
}

.home-news .home-news-media {
  display: grid;
  min-width: 0;
}
.home-news .home-news-media[hidden],
.home-news .home-news-gallery[hidden] {
  display: none;
}
.home-news[data-no-photo] {
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 620px) {
  .home-news .home-news-media { order: 1; }
}

.home-news .home-news-photo-link {
  position: absolute;
  inset: 0;
}
.home-news .home-news-photo-link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -5px;
}
