/* Page d'accueil — thème clair (blanc) + galerie CoverFlow.
   Chargé APRÈS site.css pour surcharger le thème sombre par défaut. */

/* ---- Fond blanc + arbres ---- */
body.home-photo {
  background: #fff;
  color: #2a2723;
}
body.home-photo::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: #fff url("/assets/remote/wp-content/uploads/2014/12/background.jpg") center top / 100% auto no-repeat;
}
body.home-photo::after { display: none; }

/* ---- Titre « Je capture … » : espaces resserrés ---- */
body.home-photo .page-main { padding-top: 0.4rem; }
body.home-photo .legacy-home-layout { text-align: center; padding-top: 0; }
body.home-photo .intro { margin: 0; }
body.home-photo .intro h2 {
  color: #2a2723;
  font-weight: 300;               /* « Je capture » en écriture fine */
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.2;
  margin: 0;
}
body.home-photo .intro h2 .cap { color: #fea621; font-weight: 300; }  /* « capture » doré fin */
/* Le mot qui change : gras, largeur réservée (JS) pour que « Je capture » ne bouge jamais */
body.home-photo .rotator {
  display: inline-block;
  text-align: left;
  white-space: nowrap;
  vertical-align: baseline;
}
body.home-photo .rotator-word {
  font-weight: 700;
  transition: opacity 0.3s ease;
}
body.home-photo .rotator-dot { font-weight: 300; }

/* ---- Galerie CoverFlow ---- */
.coverflow {
  position: relative;
  width: min(1500px, 94vw);     /* largeur maîtrisée, sort de la colonne de contenu */
  left: 50%;
  transform: translateX(-50%);
  margin: -6px 0 36px;
  height: 520px;
  perspective: 1600px;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}
.coverflow:active { cursor: grabbing; }
.coverflow__stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  opacity: 0;                       /* invisible tant que la photo centrale se cale */
  transition: opacity 0.45s ease;
}
.coverflow__stage.is-ready { opacity: 1; }
.coverflow__card {
  position: absolute;
  top: 46%;
  left: 50%;
  transform-origin: center center;
  will-change: transform;
}
.coverflow__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 3px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  /* Reflet sous la photo (Safari/Chrome) */
  -webkit-box-reflect: below 8px linear-gradient(transparent, transparent 58%, rgba(255, 255, 255, 0.30));
}
.coverflow__card.is-center img {
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}
.coverflow__arrow {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 2000;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: #2a2723;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transition: background 0.15s, transform 0.15s;
}
.coverflow__arrow:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.coverflow__prev { left: clamp(10px, 2vw, 40px); }
.coverflow__next { right: clamp(10px, 2vw, 40px); }

@media (max-width: 720px) {
  .coverflow { height: 380px; perspective: 1000px; }
  .coverflow__arrow { width: 40px; height: 40px; font-size: 22px; }
}

/* Titre « Je capture … » en mobile : réduit + retour à la ligne propre */
@media (max-width: 620px) {
  body.home-photo .intro h2 {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.1em;
    font-size: clamp(1.5rem, 7.5vw, 2.1rem);
  }
}

/* La galerie pleine largeur ne doit pas créer de défilement horizontal */
body.home-photo { overflow-x: hidden; }
