/* ============================================================
   Homepage — Hero slider, blocs sections, grille, actualités
   ============================================================ */

/* ─── Hero — structure ────────────────────────────────────── */

.vc-hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
  background-color: var(--vc-color-black);
}

/* ─── Fond (slider / vidéo) ───────────────────────────────── */

.vc-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.vc-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translate3d(0, calc(var(--vc-scroll, 0px) * .30), 0);
}

/* ─── Slider ──────────────────────────────────────────────── */

.vc-hero-slider {
  position: absolute;
  inset: 0;
  /* Couche la plus lointaine : elle « traîne » derrière le scroll.
     Appliqué au conteneur, jamais aux slides (leur transform sert au zoom). */
  transform: translate3d(0, calc(var(--vc-scroll, 0px) * .30), 0);
}

.vc-hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition:
    opacity 1.2s var(--vc-ease),
    transform 9s cubic-bezier(.25, .46, .45, .94);
  will-change: opacity, transform;
}

.vc-hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.vc-hero-slide.is-leaving {
  opacity: 0;
  z-index: 0;
}

.vc-hero-slide--default {
  background: linear-gradient(140deg, #0a2019 0%, #14332a 55%, #0d0d0b 100%);
}

/* ─── Overlay ─────────────────────────────────────────────── */

.vc-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      to top,
      rgba(13, 13, 11, 0.82) 0%,
      rgba(13, 13, 11, 0.35) 45%,
      rgba(13, 13, 11, 0.15) 75%,
      rgba(13, 13, 11, 0.35) 100%
    );
}

/* ─── Contenu — aligné à gauche, façon éditorial ──────────── */

.vc-hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  text-align: left;
  padding-bottom: clamp(4rem, 12vh, 9rem);
  padding-top: var(--vc-header-height);
  /* Le contenu s'efface à mesure qu'on quitte le hero (piloté par parallax.js) */
  opacity: var(--vc-hero-fade, 1);
}

.vc-hero.is-faded .vc-hero-content {
  pointer-events: none;
}

/* Largeur en rem (et non en ch) : le `ch` se calcule sur la police du
   conteneur, pas sur celle du titre — 22ch cassait « Golf 7 Fontaines »
   sur 3 lignes. Ici le titre tient sur 1 à 2 lignes selon la largeur d'écran. */
.vc-hero-inner {
  max-width: min(100%, 60rem);
}

/* Les éléments du hero se révèlent en cascade : surtitre → mots du titre →
   filet → bouton. Chaque étape porte son propre délai.

   Parallaxe au scroll : chaque élément déclare sa profondeur via --vc-parallax,
   dérivée de --vc-scroll (écrite par parallax.js). Le déplacement est
   intégré aux keyframes d'entrée : sans cela, une animation en `both` figerait
   son transform final et écraserait le parallaxe. */

@keyframes vc-hero-reveal {
  from { opacity: 0; transform: translate3d(0, calc(28px + var(--vc-parallax, 0px)), 0); }
  to   { opacity: 1; transform: translate3d(0, var(--vc-parallax, 0px), 0); }
}

.vc-hero-eyebrow {
  font-family: var(--vc-font-body);
  font-size: var(--vc-font-size-xs);
  font-weight: 500;
  letter-spacing: var(--vc-tracking-wide);
  text-transform: uppercase;
  color: var(--vc-on-dark-muted);
  margin: 0 0 var(--vc-space-5);
  --vc-parallax: calc(var(--vc-scroll, 0px) * .05);
  animation: vc-hero-reveal .9s var(--vc-ease-out) .15s both;
}

.vc-hero-title {
  font-family: var(--vc-font-heading);
  font-size: var(--vc-font-size-hero);
  font-weight: 500;
  font-style: normal;
  letter-spacing: var(--vc-tracking-display);
  color: var(--vc-color-white);
  line-height: 0.95;
  margin: 0 0 var(--vc-space-8);
  text-wrap: balance; /* répartit les mots quand le titre passe sur 2 lignes */
  /* Plus « proche » que le surtitre : il glisse davantage, l'écart se creuse */
  transform: translate3d(0, calc(var(--vc-scroll, 0px) * .12), 0);
}

/* Un mot = un masque. Le padding compense les jambages (le « g » de Golf),
   la marge négative annule l'espace ajouté sous chaque ligne. */
.vc-hero-title-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

/* Easing propre au titre : --vc-ease-out est un « expo out » qui consomme
   l'essentiel de la course en ~10 % du temps — sur un mot qui monte de sa
   propre hauteur, le mouvement en devient invisible. Ici la décélération
   reste lisible sur toute la durée. */
.vc-hero-title-word > span {
  display: inline-block;
  animation: vc-hero-word-in 1.15s cubic-bezier(.2, .7, .25, 1) both;
  animation-delay: calc(.3s + var(--word-index, 0) * .16s);
}

@keyframes vc-hero-word-in {
  from { opacity: 0; transform: translateY(115%); }
  to   { opacity: 1; transform: translateY(0); }
}

.vc-hero-divider {
  width: 72px;
  height: 1px;
  background-color: var(--vc-on-dark-border);
  margin: 0 0 var(--vc-space-8);
  transform-origin: left center;
  --vc-parallax: calc(var(--vc-scroll, 0px) * .17);
  animation: vc-hero-line-in 1s var(--vc-ease-out) .95s both;
}

@keyframes vc-hero-line-in {
  from { transform: translate3d(0, var(--vc-parallax, 0px), 0) scaleX(0); opacity: 0; }
  to   { transform: translate3d(0, var(--vc-parallax, 0px), 0) scaleX(1); opacity: 1; }
}

.vc-hero-actions {
  display: flex;
  justify-content: flex-start;
  gap: var(--vc-space-4);
  flex-wrap: wrap;
  --vc-parallax: calc(var(--vc-scroll, 0px) * .21);
  animation: vc-hero-reveal .9s var(--vc-ease-out) 1.1s both;
}

/* Bouton hero */
.vc-btn--hero {
  display: inline-flex;
  align-items: center;
  gap: var(--vc-space-3);
  padding: var(--vc-space-4) var(--vc-space-8);
  font-family: var(--vc-font-body);
  font-size: var(--vc-font-size-sm);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--vc-color-ink);
  background: var(--vc-color-cream);
  border: 1px solid var(--vc-color-cream);
  border-radius: var(--vc-radius-full);
  text-decoration: none;
  transition: background-color var(--vc-duration-base) var(--vc-ease),
              border-color var(--vc-duration-base) var(--vc-ease),
              color var(--vc-duration-base) var(--vc-ease);
  cursor: pointer;
}
.vc-btn--hero:hover {
  background-color: transparent;
  border-color: var(--vc-color-cream);
  color: var(--vc-color-cream);
}
.vc-btn--hero svg { transition: transform var(--vc-duration-base) var(--vc-ease-out); }
.vc-btn--hero:hover svg { transform: translateX(5px); }

/* ─── Dots slider ─────────────────────────────────────────── */

.vc-hero-dots {
  position: absolute;
  bottom: var(--vc-space-10);
  right: var(--vc-container-padding);
  left: auto;
  transform: none;
  z-index: 4;
  display: flex;
  gap: var(--vc-space-2);
}

.vc-hero-dot {
  width: 26px;
  height: 2px;
  padding: 0;
  background: rgba(251, 249, 245, 0.35);
  border: none;
  cursor: pointer;
  transition: background-color var(--vc-duration-base) var(--vc-ease),
              width var(--vc-duration-base) var(--vc-ease);
}
.vc-hero-dot.is-active {
  background: var(--vc-color-cream);
  width: 46px;
}

/* ─── Flèches ─────────────────────────────────────────────── */

.vc-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--vc-on-dark-border);
  border-radius: 50%;
  color: var(--vc-color-cream);
  cursor: pointer;
  transition: background var(--vc-duration-fast) var(--vc-ease),
              border-color var(--vc-duration-fast) var(--vc-ease),
              color var(--vc-duration-fast) var(--vc-ease);
}
.vc-hero-arrow:hover {
  background: var(--vc-color-cream);
  border-color: var(--vc-color-cream);
  color: var(--vc-color-ink);
}

.vc-hero-arrow--prev { left: var(--vc-space-6); }
.vc-hero-arrow--next { right: var(--vc-space-6); }

@media (max-width: 900px) {
  .vc-hero-arrow { display: none; }
}

/* ─── Scroll indicator ────────────────────────────────────── */

.vc-hero-scroll {
  position: absolute;
  bottom: var(--vc-space-10);
  left: var(--vc-container-padding);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--vc-on-dark-border);
  border-radius: 50%;
  color: var(--vc-on-dark-muted);
  text-decoration: none;
  animation: vc-bounce 2.6s ease-in-out infinite;
  transition: color var(--vc-duration-fast) var(--vc-ease),
              border-color var(--vc-duration-fast) var(--vc-ease);
}
.vc-hero-scroll:hover { color: var(--vc-color-cream); border-color: var(--vc-color-cream); }

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

@media (max-width: 640px) {
  .vc-hero-scroll { display: none; }
  .vc-hero-dots   { bottom: var(--vc-space-6); }
}

/* ─── Blocs sections (texte + image) ──────────────────────── */

.vc-section-block {
  position: relative;
  background-color: var(--vc-color-bg);
  padding: var(--vc-section-py) 0;
  overflow: hidden;
}

/* Alternance de fond, très légère */
.vc-section-block:nth-of-type(even) {
  background-color: var(--vc-color-bg-alt);
}

.vc-section-block-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 7rem);
  align-items: center;
}

.vc-section-block--reversed .vc-section-block-inner {
  direction: rtl;
}
.vc-section-block--reversed .vc-section-block-inner > * {
  direction: ltr;
}

.vc-section-block-text {
  max-width: 46ch;
}

.vc-section-block-title {
  font-family: var(--vc-font-heading);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 500;
  font-style: normal;
  letter-spacing: var(--vc-tracking-display);
  color: var(--vc-color-ink);
  margin-bottom: var(--vc-space-6);
  line-height: var(--vc-line-height-tight);
  /* Remonte à contre-sens pendant que l'image descend : les deux se décalent */
  transform: translate3d(0, var(--vc-parallax-y, 0px), 0);
}

.vc-section-block-body {
  color: var(--vc-color-grey-700);
  font-size: var(--vc-font-size-md);
  line-height: var(--vc-line-height-loose);
  margin-bottom: var(--vc-space-8);
}

.vc-section-block-image {
  position: relative;
  overflow: hidden;
  border-radius: var(--vc-radius-lg);
}

/* Le scale de repos ménage la marge de débord consommée par le parallaxe */
.vc-section-block-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  --vc-zoom: 1.12;
  transform: translate3d(0, var(--vc-parallax-y, 0px), 0) scale(var(--vc-zoom));
  transition: --vc-zoom 1.2s var(--vc-ease-out);
}
.vc-section-block:hover .vc-section-block-img {
  --vc-zoom: 1.16;
}

.vc-section-block-img-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: var(--vc-radius-lg);
  background: linear-gradient(135deg, var(--vc-color-sand), var(--vc-color-cream-2));
}

@media (max-width: 900px) {
  .vc-section-block-inner  { grid-template-columns: 1fr; gap: var(--vc-space-10); }
  .vc-section-block--reversed .vc-section-block-inner { direction: ltr; }
  .vc-section-block { padding: var(--vc-section-py-sm) 0; }
}

/* ─── Grille des sections du club ─────────────────────────── */

.vc-sections-grid-wrap {
  background-color: var(--vc-color-ink);
  color: var(--vc-on-dark);
  padding: var(--vc-section-py) 0;
}

.vc-sections-grid-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: end;
  gap: var(--vc-space-8);
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
  text-align: left;
}

.vc-sections-grid-header .vc-eyebrow {
  color: var(--vc-on-dark-muted);
  margin-bottom: var(--vc-space-4);
}

.vc-sections-grid-title {
  font-family: var(--vc-font-heading);
  font-size: clamp(2.25rem, 5.5vw, 4.5rem);
  font-weight: 500;
  font-style: normal;
  letter-spacing: var(--vc-tracking-display);
  line-height: 0.98;
  color: var(--vc-color-cream);
  margin: 0;
  transform: translate3d(0, var(--vc-parallax-y, 0px), 0);
}

.vc-sections-grid-subtitle {
  font-family: var(--vc-font-body);
  font-size: var(--vc-font-size-md);
  letter-spacing: 0;
  text-transform: none;
  color: var(--vc-on-dark-muted);
  line-height: var(--vc-line-height-normal);
  margin: 0;
  max-width: 46ch;
  justify-self: end;
}

.vc-sections-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--vc-gap-grid);
  background: none;
  border: none;
}

/* 4 par ligne, dernière ligne centrée */
.vc-sections-grid > .vc-section-card {
  flex: 0 1 calc(25% - var(--vc-gap-grid) * 3 / 4);
  max-width: calc(25% - var(--vc-gap-grid) * 3 / 4);
}

/* ─── Cartes sections ─────────────────────────────────────── */

.vc-section-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: none;
  border-radius: var(--vc-radius-lg);
  background-color: var(--section-color, var(--vc-color-primary));
  color: var(--vc-color-cream);
  text-align: left;
  isolation: isolate;
  transition: transform var(--vc-duration-base) var(--vc-ease-out);
}

.vc-section-card:hover { transform: translateY(-6px); }

/* Média : photo si disponible, sinon aplat de couleur + glyphe */
.vc-section-card-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.vc-section-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  --vc-zoom: 1.1;
  transform: translate3d(0, var(--vc-parallax-y, 0px), 0) scale(var(--vc-zoom));
  transition: --vc-zoom 1.1s var(--vc-ease-out);
}
.vc-section-card:hover .vc-section-card-img { --vc-zoom: 1.16; }

/* Voile de lecture au-dessus du média */
.vc-section-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13, 13, 11, 0.72) 0%,
    rgba(13, 13, 11, 0.28) 45%,
    rgba(13, 13, 11, 0.05) 100%
  );
  transition: opacity var(--vc-duration-base) var(--vc-ease);
}
.vc-section-card:hover .vc-section-card-media::after { opacity: 0.85; }

/* Glyphe : grand, discret, en filigrane */
.vc-section-card-icon {
  position: absolute;
  top: var(--vc-space-6);
  left: var(--vc-space-6);
  display: block;
  width: 54px;
  height: 54px;
  color: var(--vc-color-cream);
  opacity: 0.92;
  transition: transform var(--vc-duration-base) var(--vc-ease-out),
              opacity var(--vc-duration-base) var(--vc-ease);
  z-index: 1;
}
.vc-section-card-glyph { width: 100%; height: 100%; }
.vc-section-card:hover .vc-section-card-icon { transform: translateY(-4px); opacity: 1; }

/* Sur les cartes sans photo, un glyphe fantôme remplit le fond */
.vc-section-card:not(.vc-section-card--photo) .vc-section-card-media::before {
  content: '';
  position: absolute;
  right: -18%;
  bottom: -12%;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(251, 249, 245, 0.08);
}
.vc-section-card:not(.vc-section-card--photo) .vc-section-card-media::after {
  background:
    linear-gradient(to top, rgba(13, 13, 11, 0.5) 0%, rgba(13, 13, 11, 0.05) 55%, transparent 100%),
    radial-gradient(120% 80% at 20% 0%, rgba(251, 249, 245, 0.1) 0%, transparent 60%);
}

.vc-section-card-body {
  position: relative;
  z-index: 1;
  padding: var(--vc-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--vc-space-2);
}

.vc-section-card-index {
  font-family: var(--vc-font-body);
  font-size: var(--vc-font-size-xs);
  font-weight: 500;
  letter-spacing: var(--vc-tracking-wide);
  color: rgba(251, 249, 245, 0.6);
}

.vc-section-card-title {
  font-family: var(--vc-font-heading);
  font-size: clamp(1.375rem, 1.6vw, 1.75rem);
  font-weight: 500;
  font-style: normal;
  letter-spacing: var(--vc-tracking-tight);
  line-height: 1.05;
  color: var(--vc-color-cream);
  margin: 0 0 var(--vc-space-1);
}

.vc-section-card-desc {
  font-size: var(--vc-font-size-sm);
  letter-spacing: 0;
  text-transform: none;
  color: rgba(251, 249, 245, 0.72);
  line-height: var(--vc-line-height-normal);
  margin: 0;
  transition: color var(--vc-duration-base) var(--vc-ease);
}
.vc-section-card:hover .vc-section-card-desc { color: rgba(251, 249, 245, 0.92); }

/* Flèche en pastille */
.vc-section-card-arrow {
  position: absolute;
  top: var(--vc-space-5);
  right: var(--vc-space-5);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(251, 249, 245, 0.35);
  color: var(--vc-color-cream);
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: opacity var(--vc-duration-base) var(--vc-ease),
              transform var(--vc-duration-base) var(--vc-ease-out),
              background-color var(--vc-duration-base) var(--vc-ease);
}
.vc-section-card:hover .vc-section-card-arrow,
.vc-section-card:focus-within .vc-section-card-arrow {
  opacity: 1;
  transform: translate(0, 0);
  background-color: rgba(251, 249, 245, 0.14);
}

.vc-section-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.vc-section-card-link:focus-visible {
  outline: 2px solid var(--vc-color-cream);
  outline-offset: -4px;
  border-radius: var(--vc-radius-lg);
}

@media (max-width: 1100px) {
  .vc-sections-grid > .vc-section-card {
    flex-basis: calc(33.333% - var(--vc-gap-grid) * 2 / 3);
    max-width: calc(33.333% - var(--vc-gap-grid) * 2 / 3);
  }
}

@media (max-width: 820px) {
  .vc-sections-grid-header { grid-template-columns: 1fr; align-items: start; }
  .vc-sections-grid-subtitle { justify-self: start; }
  .vc-sections-grid > .vc-section-card {
    flex-basis: calc(50% - var(--vc-gap-grid) / 2);
    max-width: calc(50% - var(--vc-gap-grid) / 2);
  }
}

@media (max-width: 480px) {
  .vc-sections-grid > .vc-section-card {
    flex-basis: 100%;
    max-width: 100%;
  }
  .vc-section-card { aspect-ratio: 4 / 3; }
}

/* ─── Dernières actualités ────────────────────────────────── */

.vc-latest-news {
  padding: var(--vc-section-py) 0;
  background-color: var(--vc-color-bg);
}

.vc-latest-news-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: clamp(2rem, 5vw, 4rem);
  flex-wrap: wrap;
  gap: var(--vc-space-4);
  padding-bottom: var(--vc-space-6);
  border-bottom: 1px solid var(--vc-color-border-soft);
}

.vc-latest-news-title {
  font-family: var(--vc-font-heading);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 500;
  font-style: normal;
  letter-spacing: var(--vc-tracking-display);
  color: var(--vc-color-ink);
  margin: 0;
  transform: translate3d(0, var(--vc-parallax-y, 0px), 0);
}

@media (max-width: 640px) {
  .vc-latest-news-header { flex-direction: column; align-items: flex-start; }
  .vc-sections-grid-wrap,
  .vc-latest-news { padding: var(--vc-section-py-sm) 0; }
}
