/* Page d'accueil (en plus de vitrine.css). Les cartes des villas (.house-card) sont plus bas, inchangees. */

/* ---------- En-tete : fixe, transparent sur le bandeau puis vert au defilement ---------- */
.hub-page .site-header {
  position: fixed;
  transition: background-color 300ms ease, box-shadow 300ms ease, backdrop-filter 300ms ease;
}

.hub-page .site-header.is-scrolled {
  background: rgba(31, 62, 53, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(10, 22, 18, 0.25);
}

/* ---------- Bandeau plein ecran ---------- */
.hub-hero {
  position: relative;
  isolation: isolate;
  min-height: max(660px, 100svh);
  display: grid;
  align-content: center;
  padding: 120px clamp(18px, 5vw, 72px) 200px;
  overflow: hidden;
  background: var(--pine);
  color: #fff;
}

.hub-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 26, 21, 0.74) 0%, rgba(12, 26, 21, 0.4) 55%, rgba(12, 26, 21, 0.1) 100%),
    linear-gradient(180deg, rgba(12, 26, 21, 0.45) 0%, rgba(12, 26, 21, 0) 32%, rgba(12, 26, 21, 0.3) 100%);
}

.hub-slides,
.hub-slide {
  position: absolute;
  inset: 0;
}

.hub-slides {
  z-index: -2;
}

.hub-slide {
  opacity: 0;
  transition: opacity 1.8s ease;
}

.hub-slide.is-active {
  z-index: 2;
  opacity: 1;
}

/* L'ancienne image reste visible sous la nouvelle pendant le fondu. */
.hub-slide.is-leaving {
  z-index: 1;
  opacity: 1;
}

.hub-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.04);
}

/* Zoom lent : l'animation continue pendant le fondu car le nom d'animation ne change pas. */
.hub-slide.is-active img,
.hub-slide.is-leaving img {
  animation: hub-zoom 14s ease-out forwards;
}

.hub-hero-content {
  position: relative;
  max-width: 760px;
}

.hub-hero-content > * {
  opacity: 0;
  animation: hub-rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.hub-hero-content > :nth-child(1) { animation-delay: 150ms; }
.hub-hero-content > :nth-child(2) { animation-delay: 300ms; }
.hub-hero-content > :nth-child(3) { animation-delay: 480ms; }
.hub-hero-content > :nth-child(4) { animation-delay: 640ms; }

.hub-hero .eyebrow {
  margin: 0 0 14px;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hub-hero h1 {
  margin: 0;
  font-size: clamp(3.6rem, 11vw, 8.2rem);
  line-height: 0.92;
  text-shadow: 0 4px 40px rgba(8, 18, 14, 0.35);
}

.hub-copy {
  max-width: 540px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.55;
}

.hub-hero-meta {
  position: absolute;
  right: clamp(18px, 5vw, 72px);
  bottom: 138px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hub-caption {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  font-size: 0.9rem;
  font-weight: 800;
  transition: background 160ms ease;
}

.hub-caption:hover {
  background: rgba(255, 255, 255, 0.26);
}

.hub-caption-text.is-changing {
  animation: hub-fade 700ms ease both;
}

.hub-dots {
  display: flex;
  gap: 8px;
}

.hub-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: transparent;
  transition: background 200ms ease, transform 200ms ease;
}

.hub-dots button.is-active {
  background: #fff;
  transform: scale(1.25);
}

.hub-scroll {
  position: absolute;
  left: 50%;
  bottom: 132px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-left: -22px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: hub-bounce 2.4s ease-in-out infinite;
}

.hub-scroll svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Vagues : deux couches qui derivent a des vitesses differentes. */
.hub-waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: clamp(70px, 9vw, 120px);
  overflow: hidden;
  line-height: 0;
}

.hub-wave {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  height: 100%;
}

.hub-wave-back {
  fill: var(--paper);
  opacity: 0.5;
  animation: hub-drift 30s linear infinite reverse;
}

.hub-wave-front {
  fill: var(--paper);
  animation: hub-drift 20s linear infinite;
}

/* ---------- Arguments cles ---------- */
.hub-highlights {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 36px));
  margin: -70px auto 0;
}

.hub-highlights ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
  box-shadow: var(--shadow);
  list-style: none;
}

.hub-highlights li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px;
  background: var(--surface);
}

.hub-highlights strong {
  display: block;
  font-size: 1rem;
}

.hub-highlights li span:not(.hub-icon) {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.hub-icon {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mist);
  color: var(--pine);
  transition: background 220ms ease, color 220ms ease, transform 220ms ease;
}

.hub-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hub-highlights li:hover .hub-icon {
  background: var(--pine);
  color: #fff;
  transform: rotate(-8deg) scale(1.08);
}

/* ---------- Villas : fond anime derriere les cartes ---------- */
.villas-band {
  position: relative;
  isolation: isolate;
  padding: clamp(64px, 9vw, 110px) 0 clamp(56px, 8vw, 96px);
  overflow: hidden;
  scroll-margin-top: 24px;
}

.villas-band::before,
.villas-band::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

/* Degrades qui s'eteignent avant les bords de leur boite : aucun contour visible. */
.villas-band::before {
  top: 0;
  right: -180px;
  width: 700px;
  height: 700px;
  background: radial-gradient(closest-side, rgba(31, 120, 131, 0.24), rgba(31, 120, 131, 0));
  animation: hub-float 17s ease-in-out infinite alternate;
}

.villas-band::after {
  bottom: 0;
  left: -220px;
  width: 760px;
  height: 760px;
  background: radial-gradient(closest-side, rgba(215, 163, 74, 0.28), rgba(215, 163, 74, 0));
  animation: hub-float 21s ease-in-out infinite alternate-reverse;
}

.villas-heading {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto 34px;
}

.villas-heading .section-kicker {
  margin: 0 0 8px;
  color: var(--sea);
}

.villas-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1;
}

.house-grid {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.house-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 180ms ease;
}

.house-card-media {
  display: block;
}

.house-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
}

.house-card-body {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 24px;
}

.house-card-body h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.house-card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.house-card-body h2 a:hover {
  text-decoration: underline;
}

.house-options {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.house-options a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mist);
  transition: border-color 140ms ease, background 140ms ease;
}

.house-options a:hover {
  border-color: var(--pine);
  background: #fff;
}

.house-options span {
  color: var(--muted);
  font-size: 0.92rem;
}

/* Le nombre de personnes est l'information cle : pastille a droite, sur les deux lignes de la carte. */
.house-options .house-guests {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--pine);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
  min-width: 7.5rem;
}

.house-card-body .section-kicker {
  color: var(--sea);
}

@media (max-width: 900px) {
  .house-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Situation et contact ---------- */
.hub-situation {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto clamp(40px, 6vw, 72px);
}

.hub-situation-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(24px, 5vw, 56px);
  padding: clamp(28px, 5vw, 60px);
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(125deg, var(--pine) 0%, #1f6b6f 58%, var(--sea) 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

/* Reflet qui se deplace lentement sur le panneau. */
.hub-situation-panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -40%;
  right: -10%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 65%);
  animation: hub-float 14s ease-in-out infinite alternate;
}

.hub-situation-copy .section-kicker {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.75);
}

.hub-situation-copy h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.05;
}

.hub-situation-copy p:not(.section-kicker) {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.65;
}

.hub-distances {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hub-distances li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hub-distances strong {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1;
}

.hub-distances span {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  text-align: right;
}

.hub-contact {
  width: min(820px, calc(100% - 36px));
  margin: 0 auto;
  padding-bottom: clamp(64px, 9vw, 110px);
  text-align: center;
  scroll-margin-top: 40px;
}

.hub-contact .section-kicker {
  margin: 0 0 8px;
  color: var(--sea);
}

.hub-contact h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  line-height: 1.05;
}

.hub-contact p:not(.section-kicker) {
  max-width: 600px;
  margin: 16px auto 0;
  color: var(--muted);
  line-height: 1.6;
}

.hub-contact .hero-actions {
  justify-content: center;
}

.hub-contact .secondary-link {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.villas-heading h2,
.hub-situation-copy h2,
.hub-contact h2 {
  text-wrap: balance;
}

/* ---------- Apparition au defilement (shared/hub.js ajoute .has-reveal ; sans script, tout reste visible) ---------- */
.reveal,
.house-card.reveal {
  transition: opacity 800ms ease var(--d, 0ms), transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms);
}

.has-reveal .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(32px);
}

/* ---------- Animations ---------- */
@keyframes hub-zoom {
  from { transform: scale(1.04); }
  to { transform: scale(1.18); }
}

@keyframes hub-rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

@keyframes hub-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes hub-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@keyframes hub-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes hub-float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-60px, 40px, 0) scale(1.12); }
}

@media (max-width: 900px) {
  .hub-highlights ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hub-situation-panel {
    grid-template-columns: 1fr;
  }

  .hub-hero-meta {
    right: auto;
    left: clamp(18px, 5vw, 72px);
    bottom: 128px;
  }

  .hub-scroll {
    display: none;
  }
}

@media (max-width: 560px) {
  .hub-hero {
    padding-bottom: 210px;
  }

  .hub-highlights {
    margin-top: -88px;
  }

  .hub-highlights ul {
    grid-template-columns: 1fr;
  }

  .hub-highlights li {
    padding: 16px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-slide.is-active img,
  .hub-slide.is-leaving img,
  .hub-hero-content > *,
  .hub-scroll,
  .hub-wave,
  .villas-band::before,
  .villas-band::after,
  .hub-situation-panel::before {
    animation: none;
  }

  .hub-hero-content > * {
    opacity: 1;
  }

  .hub-slide,
  .reveal {
    transition: none;
  }
}
