/**
 * FlatCMS - Flat-File Content Management System
 * Copyright (C) 2026 Alain BROYE
 * SPDX-License-Identifier: AGPL-3.0-or-later
 *
 * Site client Alto Séquanais — carrousels HTML/CSS sans dépendance Wix.
 * Les images et les avis restent éditables dans la page native FlatCMS.
 */
.hero--home .alto-hero-slides {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
/* The hero media live inside .page-article.prose. Reset generic editorial
   image margins/radii so every slide touches the navbar, edge-to-edge. */
.page-article.prose .hero--home .alto-hero-slides > img.hero-media {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.hero--home .alto-hero-slides > .hero-media {
  position: absolute;
  inset: 0;
  z-index: auto;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* On narrow screens the image fills the height; avoid an uncovered edge. */
  object-position: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 850ms ease, visibility 850ms ease;
}
/* Absolutely positioned, merely transparent lazy images are eagerly fetched
   by Chrome because they still intersect the viewport. display:none prevents
   network requests until JS prepares the next slide; then CSS restores the
   exact existing opacity crossfade, without hiding it during the transition.
   The first slide remains visible without JavaScript. */
.hero--home .alto-hero-slides > .hero-media:not(.is-active):not(.is-prepared):not(.is-exiting) {
  display: none;
}
/* All three originals are now physically cropped to 16:9.
   Use centered cover, without the prior 100px/150px CSS offsets:
   responsive screens can crop safely without exposing an empty band. */
.hero--home .alto-hero-slides > .hero-media.is-active {
  visibility: visible;
  opacity: 1;
}
.hero--home .hero-content {
  position: relative;
  z-index: 2;
}

/* ALTO testimonials: responsive multi-card rail inspired by the archived
   FlatCMS TestimonialCards 1.0.0 track/prev/next mechanics. No avatars,
   invented ratings, extra widget runtime or decorative canvas animations. */
.page-richtext > .section.alto-testimonials-section {
  background: var(--alto-testimonial-footer-surface, #faf8f9);
  padding: 68px 0 62px;
}
.page-richtext .alto-testimonials-intro {
  margin: 0 0 32px;
  text-align: center;
}
.page-richtext .alto-testimonials-kicker {
  display: block;
  margin: 0 0 10px;
  color: #8e1c54;
  font-size: .71rem;
  font-weight: 750;
  letter-spacing: .17em;
  line-height: 1.4;
}
.page-richtext .alto-testimonials-intro .section-title {
  margin: 0 0 12px;
  color: #9f1f63;
}
.page-richtext .alto-testimonials-intro > p {
  margin: 0;
  color: #586274;
  font-size: .98rem;
  line-height: 1.6;
}
.page-richtext .alto-testimonials-carousel {
  --alto-testimonial-gap: 22px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}
.page-richtext .alto-testimonials-rail {
  min-width: 0;
  margin: 0;
  padding: 6px 3px 24px;
  overflow: hidden;
  touch-action: pan-y;
}
.page-richtext .alto-testimonials-track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--alto-testimonial-gap);
  align-items: stretch;
}
.page-richtext .alto-testimonials-carousel.is-ready .alto-testimonials-track {
  display: flex;
  transform: translate3d(0, 0, 0);
  transition: transform 520ms cubic-bezier(.22, .7, .22, 1);
}
.page-richtext .alto-testimonial-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 320px;
  margin: 0;
  padding: 30px 32px 27px;
  border: 1px solid #e5dce2;
  border-left: 4px solid #9f1f63;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(54, 39, 51, .075);
  color: #354052;
}
.page-richtext .alto-testimonials-carousel.is-ready .alto-testimonial-card {
  flex: 0 0 calc((100% - var(--alto-testimonial-gap)) / 2);
}
/* Only the newly arriving card gets a subtle fade over the horizontal move. */
.page-richtext .alto-testimonial-card.is-entering {
  animation: alto-testimonial-fade-in 580ms ease-out both;
}
@keyframes alto-testimonial-fade-in {
  from { opacity: .72; }
  to   { opacity: 1; }
}
.page-richtext .alto-testimonial-mark {
  display: block;
  height: 54px;
  color: #aa3576;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5rem;
  font-weight: 400;
  line-height: 1;
}
.page-richtext .alto-testimonial-quote {
  margin: 7px 0 26px;
  color: #374254;
  font-size: clamp(.91rem, 1.14vw, 1.03rem);
  font-weight: 430;
  line-height: 1.67;
  overflow-wrap: break-word;
}
.page-richtext .alto-testimonial-author {
  margin: auto 0 0;
  padding: 19px 0 0;
  border-top: 1px solid #ede4e8;
  color: #81204f;
  font-size: .92rem;
  line-height: 1.35;
}
.page-richtext .alto-testimonial-author strong {
  color: inherit;
  font-weight: 750;
}
.page-richtext .alto-testimonials-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 0 4px;
}
.page-richtext .alto-testimonials-controls[hidden] {
  display: none !important;
}
.page-richtext .alto-testimonials-progress {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 16px;
  min-width: 0;
  max-width: 240px;
  margin-right: auto;
}
.page-richtext .alto-testimonials-count {
  flex: 0 0 auto;
  min-width: 94px;
  color: #82325b;
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .065em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.page-richtext .alto-testimonials-meter {
  display: block;
  flex: 1 1 auto;
  height: 3px;
  min-width: 42px;
  overflow: hidden;
  border-radius: 99px;
  background: #e7dbe2;
}
.page-richtext .alto-testimonials-meter-fill {
  display: block;
  width: 0;
  height: 100%;
  background: #9f1f63;
  transition: width 340ms ease;
}
.page-richtext .alto-testimonials-nav {
  display: inline-flex;
  flex: 0 0 42px;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid #c9a9bb;
  border-radius: 50%;
  background: #fff;
  color: #8d1f55;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.28rem;
  line-height: 1;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}
.page-richtext .alto-testimonials-nav:hover:not(:disabled) {
  border-color: #9f1f63;
  background: #9f1f63;
  color: #fff;
}
.page-richtext .alto-testimonials-nav:disabled {
  opacity: .42;
  cursor: default;
}
.page-richtext .alto-testimonials-nav[hidden] {
  display: none !important;
}
.page-richtext .alto-testimonials-nav--toggle {
  margin-right: 4px;
  font-size: .96rem;
}
.page-richtext .alto-testimonials-nav--toggle[aria-pressed="true"] {
  background: #f7eaf1;
  border-color: #9f1f63;
}
.page-richtext .alto-testimonials-nav:focus-visible,
.page-richtext .alto-testimonials-carousel:focus-visible {
  outline: 3px solid #c75a92;
  outline-offset: 3px;
}
@media (max-width: 899px) {
  .page-richtext .alto-testimonials-track {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-richtext .alto-testimonials-carousel.is-ready .alto-testimonial-card {
    flex-basis: 100%;
  }
}
@media (max-width: 639px) {
  .page-richtext > .section.alto-testimonials-section {
    padding: 52px 0 46px;
  }
  .page-richtext .alto-testimonials-intro {
    margin-bottom: 23px;
  }
  .page-richtext .alto-testimonials-rail {
    padding: 4px 2px 19px;
  }
  .page-richtext .alto-testimonial-card {
    min-height: 350px;
    padding: 23px 22px 24px;
  }
  .page-richtext .alto-testimonial-quote {
    font-size: .96rem;
    line-height: 1.65;
  }
  .page-richtext .alto-testimonials-controls {
    gap: 10px;
  }
  .page-richtext .alto-testimonials-progress {
    gap: 9px;
  }
  .page-richtext .alto-testimonials-count {
    min-width: 66px;
    font-size: .7rem;
  }
  .page-richtext .alto-testimonials-nav {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero--home .alto-hero-slides > .hero-media,
  .page-richtext .alto-testimonials-track,
  .page-richtext .alto-testimonials-meter-fill,
  .page-richtext .alto-testimonial-card.is-entering {
    transition: none !important;
    animation: none !important;
  }
}
