/**
 * MILLIOT JACQUEMART — Hero Page Home
 * Fichier : child-theme/assets/css/home/mj-home-hero.css
 * Chargé uniquement sur la home via functions.php + is_front_page()
 * Navigateurs : Chrome, Firefox, Safari, Edge (modern)
 * IE11 : voir mj-home-hero-ie.css
 */

/* ==========================================================
   HERO — Conteneur principal
   ========================================================== */
.mj-hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  max-height: 900px;
  overflow: visible; /* visible pour que la section 4 remonte dessus */
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: end;
  -webkit-justify-content: flex-end;
  -ms-flex-pack: end;
  justify-content: flex-end;
}

/* ==========================================================
   SLIDESHOW — Photos de fond
   ========================================================== */
.mj-hero-slides {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  overflow: hidden;
}

.mj-hero-slide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  opacity: 0;
  -webkit-transition: opacity 1.4s ease;
  -o-transition: opacity 1.4s ease;
  transition: opacity 1.4s ease;
  will-change: opacity;
}

.mj-hero-slide.active {
  opacity: 1;
}

/* ==========================================================
   OVERLAY — Dégradé sombre bas
   ========================================================== */
.mj-hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1;
  background: -webkit-linear-gradient(
    top,
    rgba(8, 14, 24, 0.00) 0%,
    rgba(8, 14, 24, 0.02) 40%,
    rgba(8, 14, 24, 0.32) 75%,
    rgba(8, 14, 24, 0.62) 100%
  );
  background: -o-linear-gradient(
    top,
    rgba(8, 14, 24, 0.00) 0%,
    rgba(8, 14, 24, 0.02) 40%,
    rgba(8, 14, 24, 0.32) 75%,
    rgba(8, 14, 24, 0.62) 100%
  );
  background: linear-gradient(
    to bottom,
    rgba(8, 14, 24, 0.00) 0%,
    rgba(8, 14, 24, 0.02) 40%,
    rgba(8, 14, 24, 0.32) 75%,
    rgba(8, 14, 24, 0.62) 100%
  );
}

/* ==========================================================
   H1 — Positionné sous la nav, aligné JS sur "Nos services"
   ========================================================== */
#mj-hero-h1 {
  position: absolute;
  top: 114px; /* nav 80px + topbar 34px */
  right: 56px;
  z-index: 2;
  /* left est calculé dynamiquement par mj-home.js */
}

.mj-hero-h1 {
  font-family: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
  padding: 0;
}

/* Ligne 1 — dégradé turquoise → vert → amber */
.mj-hero-h1 .h1-gradient {
  display: block;
  font-size: 64px;
  line-height: 1;
  letter-spacing: 2px;
  /* Fallback couleur pour navigateurs sans support background-clip */
  color: #4AB8C1;
  background: -webkit-linear-gradient(left, #4AB8C1 0%, #7DC242 50%, #F5A623 100%);
  background: -o-linear-gradient(left, #4AB8C1 0%, #7DC242 50%, #F5A623 100%);
  background: linear-gradient(90deg, #4AB8C1 0%, #7DC242 50%, #F5A623 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Ligne 2 — blanc */
.mj-hero-h1 .h1-white {
  display: block;
  color: rgba(255, 255, 255, 0.85);
  /* reset du dégradé hérité */
  background: none;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.85);
}

/* Ligne 3 — localisation amber */
.mj-hero-h1 .h1-location {
  display: block;
  font-size: 26px;
  letter-spacing: 6px;
  color: #F5A623;
  background: none;
  -webkit-text-fill-color: #F5A623;
  margin-top: 14px;
}

/* ==========================================================
   HERO BOTTOM — Bouton "Nos références"
   ========================================================== */
.mj-hero-bottom {
  position: relative;
  z-index: 4;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: end;
  -webkit-align-items: flex-end;
  -ms-flex-align: end;
  align-items: flex-end;
  -webkit-box-pack: end;
  -webkit-justify-content: flex-end;
  -ms-flex-pack: end;
  justify-content: flex-end;
  padding: 0 56px 100px;
}

/* ==========================================================
   SCROLL INDICATOR — Ligne animée
   ========================================================== */
.mj-hero-scroll {
  position: absolute;
  bottom: -32px;
  left: 50%;
  -webkit-transform: translateX(-50%);
  -ms-transform: translateX(-50%);
  transform: translateX(-50%);
  z-index: 3;
}

.mj-hero-scroll-line {
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.mj-hero-scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 1px;
  height: 100%;
  background: #F5A623;
  -webkit-animation: mjScrollDrop 1.8s ease infinite;
  animation: mjScrollDrop 1.8s ease infinite;
}

/* ==========================================================
   RESPONSIVE — Tablette (max 1024px)
   ========================================================== */
@media screen and (max-width: 1024px) {

  .mj-hero {
    height: 75vh;
  }

  #mj-hero-h1 {
    /* Sur tablette on sort du mode "aligné sur nav"
       et on revient à un positionnement fixe */
    position: absolute;
    top: 100px;
    left: 40px !important; /* override le JS */
    right: 40px;
  }

  .mj-hero-h1 .h1-gradient {
    font-size: 48px;
  }

  .mj-hero-h1 .h1-location {
    font-size: 20px;
  }

  .mj-hero-bottom {
    padding: 0 40px 80px;
  }
}

/* ==========================================================
   RESPONSIVE — Mobile large (max 768px)
   ========================================================== */
@media screen and (max-width: 768px) {

  .mj-hero {
    height: 85vh;
    min-height: 480px;
  }

  #mj-hero-h1 {
    top: 90px;
    left: 24px !important;
    right: 24px;
  }

  .mj-hero-h1 .h1-gradient {
    font-size: 36px;
    letter-spacing: 1px;
  }

  .mj-hero-h1 .h1-white {
    font-size: 28px;
  }

  .mj-hero-h1 .h1-location {
    font-size: 16px;
    letter-spacing: 4px;
    margin-top: 10px;
  }

  .mj-hero-bottom {
    padding: 0 24px 60px;
    -webkit-box-pack: start;
    -webkit-justify-content: flex-start;
    -ms-flex-pack: start;
    justify-content: flex-start;
  }
}

/* ==========================================================
   RESPONSIVE — Mobile small (max 480px)
   ========================================================== */
@media screen and (max-width: 480px) {

  .mj-hero {
    height: 90vh;
    min-height: 420px;
  }

  .mj-hero-h1 .h1-gradient {
    font-size: 28px;
  }

  .mj-hero-h1 .h1-white {
    font-size: 22px;
  }

  .mj-hero-h1 .h1-location {
    font-size: 13px;
    letter-spacing: 3px;
  }

  /* Scroll indicator masqué sur très petit écran */
  .mj-hero-scroll {
    display: none;
  }
}