/* Main masthead container */
#masthead{
  padding-top: 20svh; /* Large top spacing based on viewport height */
  height:100%;
  padding-left: 5%;
  position: relative;
  z-index: 10;
  width: 100%;
}
/* Main title spacing */
#titre_mast{
  padding-top: 20px;
  font-size: clamp(20px, 5.5vw, 200px);
  font-weight: bold;
  width: 80%;
  position: relative;
  z-index: 0;
}
#titre_mast2{
  font-size: clamp(20px, 4.5vw, 200px);
  width: 80%;
}
#container_titre_3{
  position: relative;
  width: 80%;
}
#titre_mast3{
  font-size: clamp(20px, 4vw, 200px);
}
#titre_mast3_en{
  font-size: clamp(20px, 4vw, 200px);
}
/* Button container */
#container_btn_mast{
  width: 100%;
  position: relative;
  height:100%;
}

/* Button placement */
#btn_mast{
  margin-left: 0;
  margin-top: 2%;
}
#btn_mast_en{
  position: absolute;
  right:8%;
  top: 35%;
}
#btn_mast_en_resp{
  display: none;
}
/* Background or decorative masthead image */
#img_mast{
  position: absolute;
  width: 60%;
  height:auto;
  left:20%;
  top:10%;
  z-index: 0;
  opacity: 0.3;
  transform: rotate(20deg); /* Slight rotation for aesthetic effect */
}

/* Title container */
#container_titre_mast{
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Desktop-only image, initially hidden */
.img_desktop{
  display: none;
  position: absolute;
  width: 60%;
  height:auto;
  right: 0%;
  z-index: 0;
  opacity: 0.3;
}


/* ---------------- HEIGHT-BASED MEDIA QUERIES ---------------- */

/* Lower screens: slightly reduce title spacing */
@media (max-height: 664px){
  #titre_mast{
    padding-top: 0;
  }
}

/* Even smaller height: add spacing back to avoid crowding */
@media (max-height: 600px){
  #titre_mast{
    padding-top: 25px;
  }
}


/* ---------------- WIDTH-BASED MEDIA QUERIES ---------------- */


@media (max-width: 1176px){
  #titre_mast{
    font-size: clamp(25px, 5vw, 200px);
  }
  #titre_mast2{
    font-size: clamp(22px, 4vw, 200px);
  }
  #titre_mast3{
    font-size: clamp(20px, 3.5vw, 200px);
  }
}
@media (max-width: 1152px){
  #titre_mast{
    font-size: clamp(25px, 6vw, 200px);
  }
  #titre_mast2{
    font-size: clamp(22px, 5vw, 200px);
  }
  #titre_mast3{
    font-size: clamp(20px, 4vw, 200px);
  }
}

@media (max-width: 950px){
  #btn_mast_en_resp{
    display: block;
    margin-top: 5%;
  }
  #btn_mast_en{
    display: none;
  }

}





/* Tablets: widen title container */
@media (max-width: 800px){
  #container_titre_mast{
    width: 100%;
    text-align: center;
  }
  #titre_mast{
    font-size: clamp(40px, 6.5vw, 200px);
    width: 100%;
    padding-top: 0;
  }
  #titre_mast2{
    margin-top: 0;
    width: 100%;
    font-size: clamp(30px, 4.5vw, 200px);
  }
  #titre_mast3{
    margin-top: 0;
    width: 100%;
    font-size: clamp(25px, 4vw, 200px);
  }
  #container_titre_3{
    width: 100%;
  }
  #masthead{
    padding-left: 2%; /* Reduces left margin */
    padding-top: 120px; /* Standard top padding instead of svh */
  }
  #img_mast{
    display: none; /* Hide background image on mobile */
  }
  #container_titre_mast{
    width: 98%; /* Max width for small screens */
  }
  #titre_mast{
    letter-spacing: 2px; /* Better readability on mobile */
  }
  #titre_mast2{
      line-height: 1.5; /* Comfortable text spacing on mobile */
  }
  #btn_mast{
      left:50%;
      transform: translateX(-50%); /* Center the button */
      margin-top: 35px;
  }
  .img_desktop{
    display: block; /* Show the alternate mobile-friendly image */
    top:30%;
  }
}