.bloc-intro {
  position: relative;
  display: flex;
  align-items: center; /* Centre verticalement le contenu */
  justify-content: flex-start; /* Aligne le contenu à gauche */
  width: 100%;
  min-height: 101vh;
  background-image: url('/wp-content/themes/asso-o2c-theme/assets/img/bloc_intro.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.intro-overlay {
  position: absolute;
  inset: 0;

  /* background-color: rgba(0, 0, 0, 0.5); */
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Espace entre le haut et le bas */
  width: 30%;
  padding: 5vw;
  color: white;
}

.intro-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  /* height: 100%; */
  margin-top: 100px;
}

.intro-text {
  margin-bottom: 0px;
}

.intro-text h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 64px;
  font-weight: 700;
}

.intro-bottom {
  margin-top: auto; /* Pousse le contenu en bas */
}

.intro-bottom p {
  margin-bottom: 1.5rem;
  /* Police */
  font-family: 'Roboto', sans-serif;
  font-size: 18px;
  font-weight: 400;
}

.intro-btn-outil {
  display: inline-block;
  width: 250px;
  padding: 0.8rem 1.5rem;
  margin: 5px;
  font-weight: 600;
  color: #333;
  text-align: center;
  text-decoration: none;
  background-color: white;
  border-radius: 30px;
  /* Police */
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
}

.intro-btn-outil:hover {
  background-color: #f0f0f0;
}

.intro-btn-demo {
  display: inline-block;
  width: 250px;
  padding: 0.8rem 1.5rem;
  margin: 5px;
  font-weight: 600;
  color: #FFF;
  text-align: center;
  text-decoration: none;
  background: #134F50;
  border: 2px solid white;
  border-radius: 30px;
  /* Police */
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
}

.intro-btn-demo:hover {
  background-color: #267871
}

/* Adaptation pour très grands écrans */
@media (width >= 1400px) {
  .bloc-intro {
    position: relative;
    overflow: hidden;
    background: none;
  }

  /* Ajoute un pseudo-élément pour l'image de fond à droite */
  .bloc-intro::after {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    width: 1440px; /* L'image occupe 50 % de la largeur à droite */
    height: 100%;
    content: "";

    background-image: url('/wp-content/themes/asso-o2c-theme/assets/img/bloc_intro.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 103%;
  }

  .intro-text {
    margin-bottom: -40px;
  }

  .intro-overlay {
    position: absolute;
    inset: 0;

    /* background-color: rgba(0, 0, 0, 0.5); */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Espace entre le haut et le bas */
    width: 45%;
    max-width: 600px;
    padding: 5vw;
    color: white;
  }
}

/* ÉCRANS COMMUNS (≤1400px) */
@media (max-width: 1400px) {
  .intro-bottom p {
    display: none;
  }
}

/* Adaptation pour moyen écrans */
@media (max-width: 1250px) {
  .intro-text {
    margin-top: -20px;
    margin-bottom: 10px;
  }

  .intro-text h1 {
    font-size: 50px;
  }

  .intro-bottom p {
    display: none;
  }
}

/* TABLETTES (≤1050px) */
@media (max-width: 1050px) {
  /* .bloc-intro {
    min-height: 60vh;
    padding: 2rem;
  } */

  .intro-content {
    justify-content: space-between;
  }

  .intro-overlay {
    width: 45%;           /* moins large que 50% pour rester dans l'espace de l'image */
    padding: 2rem 2rem;
    justify-content: flex-start; /* texte en haut */
    text-align: left;
  }

  .intro-text h1 {
    font-size: 40px;   /* réduit pour ne pas dépasser */
    line-height: 1.3;    /* mieux pour plusieurs lignes */
  }

  .intro-bottom {
    margin-top: 1rem;    /* un petit espace en dessous */
  }

  .intro-bottom p {
    display: none;
  }

  .intro-btn-outil,
  .intro-btn-demo {
    width: 180px;
    padding: 0.6rem 1rem;
  }
}

/* Texte intermédiaire masqué pour écrans ≤1050px en paysage */
@media (max-height: 900px) and (max-width: 1050px) and (orientation: landscape) {
  .intro-bottom p {
    display: none;
  }

  .intro-text {
    margin-top: -20px;
    margin-bottom: -10px;
  }

  .intro-text h1 {
    font-size: 25px;
    line-height: 1.2;
  }
}

/* ÉCRANS MOYENS / PETITS (≤750px) */
@media (max-width: 750px) {
  .intro-bottom p {
    display: none;         /* masque le texte intermédiaire */
  }
}

/* Texte intermédiaire masqué pour écrans ≤1050px en paysage */
@media (max-width: 750px) and (orientation: landscape) {
  .intro-text h1 {
    font-size: 20px;
    line-height: 1.2;
  }

  .intro-bottom p {
    display: none;
  }
}

/* PETITS ÉCRANS (≤480px) */
@media (max-width: 480px) {
  .bloc-intro {
    min-height: 70vh;
    justify-content: center;
  }

  .intro-overlay {
    width: 85%;           /* presque toute la largeur mais laisse un peu de marge */
    padding: 1.5rem 1rem;
    text-align: left;     /* toujours à gauche */
    justify-content: flex-start; /* texte en haut */
  }

  .intro-text {
    margin-bottom: -20px;
  }

  .intro-text h1 {
    font-size: 20px;
    line-height: 1.2;
  }

  .intro-bottom p {
    display: none;
    margin-top: 0px;
  }

  .intro-btn-outil {
    width: 50%;
    margin: 0.5rem 0;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .intro-btn-demo {
    width: 45%;
    margin: 0.5rem 0;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  background-image: linear-gradient(to right, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 70%);
}