/* ============================================================
   ST-BLOC — Bloc immersif 3 colonnes avec image de fond
   Desktop : hover interactif crossfade + texte révélé
   Mobile  : carrousel photo + textes empilés visibles
   ============================================================ */

/* ---- Section wrapper ---- */
.st-bloc {
  position: relative;
  width: 100%;
  overflow: hidden;
  height: 560px;
          max-height: 75vh;
  clip-path: polygon(60px 0, 100% 0, 100% calc(100% - 60px), calc(100% - 60px) 100%, 0 100%, 0 60px);
}

/* ---- Background images (crossfade system) ---- */
.st-bloc__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.st-bloc__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.st-bloc__bg-img--default {
  z-index: 0;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.st-bloc__bg.has-hover .st-bloc__bg-img--default {
  opacity: 0.4;
}

.st-bloc__bg-img--hover {
  z-index: 1;
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.st-bloc__bg-img--hover.is-active {
  opacity: 1;
}

/* ---- Dots (hidden on desktop) ---- */
.st-bloc__dots {
  display: none;
}

/* ---- Gradient overlay ---- */
.st-bloc__gradient {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 40%,
    rgba(0, 0, 0, 0.85) 88%
  )
}

/* ---- Content layer ---- */
.st-bloc__content {
  position: relative;
  z-index: 3;
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- 3-column flexbox grid ---- */
.st-bloc__grid {
  display: flex;
  height: 100%;
}

/* ---- Column ---- */
.st-bloc__col {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  padding-bottom: 48px;
  cursor: pointer;
  transition: background-color 0.4s ease;
}

.st-bloc__col:hover {
  background-color: rgba(0, 0, 0, 0.12);
}

/* Vertical separator lines */
.st-bloc__col::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
}

.st-bloc__col:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
}

.st-bloc__col--last::after {
  display: none;
}

.st-bloc.is-active .st-bloc__col::after,
.st-bloc.is-active .st-bloc__col:first-child::before {
  transform: scaleY(1);
}

/* ---- Title (first column only) ---- */
.st-bloc__title {
  font-family: "itc-avant-garde-gothic-pro", sans-serif;
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
  text-transform: uppercase;
  margin: 0;
  position: absolute;
  top: 40px;
  left: 32px;
  right: 32px;
}

/* ---- Tagline text ---- */
.st-bloc__text h3 {
  font-family: "futura-pt", sans-serif;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 400;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  transition: color 0.35s ease;
}

.st-bloc__text h3 strong {
  font-weight: 700;
  color: #fff;
}

.st-bloc__col:hover .st-bloc__text h3 {
  color: #fff;
}

/* ---- Hidden description (desktop: revealed on hover) ---- */
.st-bloc__desc {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(10px);
  transition:
    max-height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.45s ease 0.08s,
    transform 0.45s ease 0.08s;
}

.st-bloc__desc p {
  margin: 14px 0 0;
  font-family: "futura-pt", sans-serif;
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: 400;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
}

.st-bloc__col:hover .st-bloc__desc {
  max-height: 250px;
  opacity: 1;
  transform: translateY(0);
}

/* ---- CTA button ---- */
.st-bloc__cta {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-family: "futura-pt", sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.st-bloc__cta:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}

/* ---- Fade-in animation (scroll reveal) ---- */
.st-bloc__fade {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.st-bloc__fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   DESKTOP RESPONSIVE
   ============================================================ */

@media (min-width: 1024px) {
  .st-bloc {
    height: 650px;
  }
  .st-bloc__col {
    padding-bottom: 56px;
  }
}

@media (min-width: 1440px) {
  .st-bloc {
    height: 800px;
  }
  .st-bloc__col {
    padding-bottom: 72px;
  }
  .st-bloc__title {
    top: 56px;
  }
}

@media (min-width: 1920px) {
  .st-bloc {
    height: 960px;
  }
  .st-bloc__col {
    padding-bottom: 80px;
  }
}

@media (max-width: 1023px) {
  .st-bloc__title {
    font-size: 32px;
  }
}

/* ============================================================
   MOBILE — Carrousel + textes empilés
   ============================================================ */

@media (max-width: 767px) {

  /* Section : auto height, stacked */
  .st-bloc {
    height: auto;
    display: flex;
    max-height:100%;
    flex-direction: column;
    overflow: visible;
    clip-path: polygon(40px 0, 100% 0, 100% calc(100% - 40px), calc(100% - 40px) 100%, 0 100%, 0 40px);
  }

  /* --- Carrousel photos (swipe natif) --- */
  .st-bloc__bg {
    position: relative;
    inset: auto;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
    cursor: grab;
  }

  .st-bloc__bg:active {
    cursor: grabbing;
  }

  .st-bloc__bg::-webkit-scrollbar {
    display: none;
  }

  /* Hide default image on mobile */
  .st-bloc__bg-img--default {
    display: none;
  }

  /* Hover images become carousel slides */
  .st-bloc__bg-img--hover {
    position: relative;
    inset: auto;
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    opacity: 1;
    scroll-snap-align: start;
    object-position: center center;
  }

  /* No crossfade classes on mobile */
  .st-bloc__bg.has-hover .st-bloc__bg-img--default,
  .st-bloc__bg-img--hover.is-active {
    opacity: 1;
  }

  /* --- Dots --- */
  .st-bloc__dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 14px 0;
    background: #0a3a5a;
  }

  .st-bloc__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transition: background 0.3s ease, transform 0.3s ease;
  }

  .st-bloc__dot.is-active {
    background: #fff;
    transform: scale(1.25);
  }

  /* --- Gradient : off --- */
  .st-bloc__gradient {
    display: none;
  }

  /* --- Content : dark background, flows below carousel --- */
  .st-bloc__content {
    position: relative;
    z-index: auto;
    height: auto;
    background: #0a3a5a;
    padding: 32px 20px 40px;
  }

  /* --- Grid : vertical stack --- */
  .st-bloc__grid {
    flex-direction: column;
    height: auto;
    gap: 0;
  }

  /* --- Column --- */
  .st-bloc__col {
    flex: none;
    padding: 24px 0;
    cursor: default;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .st-bloc__col:last-child {
    border-bottom: none;
  }

  /* No hover effects on mobile */
  .st-bloc__col:hover {
    background-color: transparent;
  }

  .st-bloc__col:hover .st-bloc__text h3 {
    color: rgba(255, 255, 255, 0.85);
  }

  /* No pseudo-element separators on mobile */
  .st-bloc__col::after,
  .st-bloc__col:first-child::before {
    display: none;
  }

  /* --- Title in flow --- */
  .st-bloc__title {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    font-size: 28px;
    margin-bottom: 8px;
  }

  /* --- Tagline --- */
  .st-bloc__text h3 {
    font-size: 18px;
  }

  /* --- Description : always visible --- */
  .st-bloc__desc {
    max-height: none;
    opacity: 1;
    transform: none;
    overflow: visible;
    transition: none;
  }

  .st-bloc__desc p {
    margin-top: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
  }

  .st-bloc__cta {
    margin-top: 14px;
    padding: 10px 20px;
    font-size: 12px;
  }

  /* --- Fade-in : visible immediately on mobile --- */
  .st-bloc__fade {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   OVERRIDES — Contrer les styles hérités de #blocgauche
   Spécificité augmentée pour battre #blocgauche h2/h3/p/a/img
   ============================================================ */

/* Images de fond : annuler le reset global img et #blocgauche img */
.st-bloc .st-bloc__bg-img {
  display: block;
  max-width: none;
  height: 100%;
  border-radius: 0;
  margin: 0;
}

/* H2 titre : annuler #blocgauche h2 (margin 30px, font-size 2em) */
#blocgauche .st-bloc .st-bloc__title {
  margin: 0;
  padding: 0;
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: 300;
  color: #fff;
  text-align: left;
}

/* H3 taglines : annuler #blocgauche h3 (font-weight 600, font-size 1.3em, margin 30px) */
#blocgauche .st-bloc .st-bloc__text h3 {
  font-weight: 400;
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  padding: 0;
}

#blocgauche .st-bloc .st-bloc__text h3 strong {
  font-weight: 700;
  color: #fff;
}

#blocgauche .st-bloc .st-bloc__col:hover .st-bloc__text h3 {
  color: #fff;
}

/* Paragraphes desc : annuler #blocgauche p */
#blocgauche .st-bloc .st-bloc__desc p {
  margin: 14px 0 0;
  margin-bottom: 0;
  font-family: "futura-pt", sans-serif;
  font-size: clamp(13px, 1.1vw, 16px);
  line-height: 1.55;
  color: white;
    font-weight: 600;
}

/* Liens CTA : annuler #blocgauche a (color #0f527d, text-decoration underline) */
#blocgauche .st-bloc .st-bloc__cta {
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background-color: transparent;
}

#blocgauche .st-bloc .st-bloc__cta:hover,
#blocgauche .st-bloc .st-bloc__cta:focus,
#blocgauche .st-bloc .st-bloc__cta:active {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.15) !important;
  border-color: #fff;
  text-decoration: none;
}

#blocgauche .st-bloc .st-bloc__cta:visited {
  color: #fff;
}

/* Mobile overrides */
@media (max-width: 767px) {
  #blocgauche .st-bloc .st-bloc__title {
    font-size: 28px;
    margin-bottom: 8px;
  }

  #blocgauche .st-bloc .st-bloc__text h3 {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
  }

  #blocgauche .st-bloc .st-bloc__desc p {
    margin-top: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
  }

  #blocgauche .st-bloc .st-bloc__cta {
    font-size: 12px;
  }
}
