.section-equipes {
  position: relative;
  width: 100%;
  height: 168vh;
  margin: 50px auto;
  font-family: "Avenir", sans-serif;
}

.equipes-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start; /* aligne les éléments côte à côte */
  gap: 60px; /* espace entre gauche et droite */
  margin: 40px auto;
  max-width: 1200px;
  position: relative;
  z-index: 2;
}

.equipes-header .title-left {
  display: flex;
  color: #0b0b28;
  align-items: center;
  margin-top: 15px;
  gap: 12px;
  min-width: 200px; /* fixe l’espace à gauche */
}

.section-equipes .title-left h2 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #0b0b28;
}

.equipes-header .title-right h3 {
  font-size: 2rem;
  font-weight: 500;
  color: #0b0b28;
  margin-bottom: -8px;
  font-family: "Futura Std", sans-serif;
  line-height: 1.2;
  margin-left: 280px;
  letter-spacing: -1px;
}

.wave-img {
  position: absolute;
  z-index: 1; /* au-dessus du vert */
  top: 153px;
  left: 0;
  width: 100%;
  height: auto;
}

.coach-container {
  position: absolute;
  bottom: -30px;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 3;
}

.coach {
  display: none; /* cachée par défaut */
  max-width: 90%;
  height: auto;
}

.coach.active {
  display: inline-block; /* affiche seulement l'image active */
}

.terrain-wrapper {
  position: relative;
  width: 100%;
  max-width: 1200px; /* largeur max du terrain */
  margin: 150px auto 0;
  z-index: 2;
}

.terrain {
  width: 100%;
  height: auto;
  display: block;
}

.team {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: none; /* cachée par défaut */
  justify-content: center;
}

.team.active {
  display: flex; /* affiche seulement l'équipe active */
}

/* Flèches */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 3;
}

.arrow.left {
  left: -50px;
}

.arrow.right {
  right: -50px;
}

.cards {
  position: absolute;
  top: -50px; /* tu ajustes */
  left: 180px;
  width: 70%;
  height: auto;

  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  } /* monte de 20px */
  100% {
    transform: translateY(0px);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px); /* part un peu plus bas */
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.coach {
  display: none;
  max-width: 90%;
  height: auto;
  opacity: 0;
}

.coach.active {
  display: inline-block;
  animation: fadeInUp 0.6s ease-out forwards; /* fade + slide */
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.team-title {
  display: none;
  opacity: 0;
}

.team-title.active {
  display: block;
  animation: fadeInUp 0.6s ease-out forwards;
}

/* ========== RESPONSIVE ÉQUIPES ========== */

@media screen and (max-width: 1200px) {
  .equipes-header {
    padding: 0 20px;
  }

  .terrain-wrapper {
    max-width: 90%;
  }

  .arrow.left {
    left: -30px;
  }

  .arrow.right {
    right: -30px;
  }

  .cards {
    left: 150px;
    width: 65%;
  }

  .team.active img {
    display: flex;
    margin-left: 40px;
    margin-top: 10px;
    width: 70%;
    height: auto;
  }
}

@media screen and (max-width: 992px) {
  .section-equipes {
    height: auto;
    padding-bottom: 40px; /* réduit légèrement */
    margin: 30px auto;
  }

  .equipes-header {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .equipes-header .title-left {
    justify-content: center;
    min-width: auto;
  }

  .terrain-wrapper {
    margin: 100px auto 0; /* réduit l’espace */
  }

  .cards {
    left: 120px;
    width: 60%;
    top: -40px;
  }

  .wave-img {
    position: absolute;
    z-index: 1; /* au-dessus du vert */
    top: 153px;
    left: 0;
    width: 100%;
    height: auto;
  }
  .equipes-header .title-right h3 {
    font-size: 1rem;
    font-weight: 500;
    color: #0b0b28;
    margin-bottom: -8px;
    font-family: "Futura Std", sans-serif;
    line-height: 1.2;
    margin-left: 335px;
    letter-spacing: -1px;
    padding-left: 20px;
  }
}

@media screen and (max-width: 768px) {
  .section-equipes {
    margin: 20px auto; /* espace réduit */
    padding-bottom: 30px;
  }

  .section-equipes .title-left h2 {
    font-size: 1.8rem;
  }

  .terrain-wrapper {
    margin: 40px auto 0; /* top réduit */
  }

  .cards {
    left: 80px;
    width: 55%;
    top: -30px;
  }

  .arrow {
    font-size: 2rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .arrow.left {
    left: 10px;
  }

  .arrow.right {
    right: 10px;
  }

  .wave-img {
    position: absolute;
    z-index: 1; /* au-dessus du vert */
    top: 153px;
    left: 0;
    width: 100%;
    height: auto;
  }

  .equipes-header .title-right h3 {
    font-size: 2rem;
    font-weight: 500;
    color: #0b0b28;
    margin-bottom: -8px;
    font-family: "Futura Std", sans-serif;
    line-height: 1.2;
    margin-left: 335px;
    letter-spacing: -1px;
    padding-left: 145px;
  }
}

@media screen and (max-width: 576px) {
  .section-equipes .title-left h2 {
    font-size: 1.5rem;
  }

  .terrain-wrapper {
    margin: 30px auto 0; /* encore plus réduit */
  }

  .cards {
    left: 40px;
    width: 50%;
    top: -20px;
  }

  .arrow {
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
    top: 45%;
  }

  .wave-img {
    top: 163px;
  }

  @keyframes float {
    0% {
      transform: translateY(0px);
    }
    50% {
      transform: translateY(-10px);
    }
    100% {
      transform: translateY(0px);
    }
  }

  .equipes-header .title-right h3 {
    display: none;
    font-size: 1rem;
    font-weight: 500;
    color: #0b0b28;
    margin-bottom: -8px;
    font-family: "Futura Std", sans-serif;
    line-height: 1.2;
    margin-left: 25px;
    letter-spacing: -1px;
    margin-right: 0px;
  }
}

@media screen and (max-width: 480px) {
  .terrain-wrapper {
    margin: 20px auto 0; /* espace minimum */
  }

  .cards {
    left: 20px;
    width: 45%;
    top: -15px;
  }

  .arrow {
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
  }

  .coach-container {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 3;
  }
}

@media screen and (max-width: 380px) and (orientation: portrait) {
  .cards {
    left: 15px;
    width: 40%;
    top: -10px;
  }

  .section-equipes {
    margin: 15px auto;
    padding-bottom: 20px;
  }
}

@media screen and (max-height: 500px) and (orientation: landscape) {
  .section-equipes {
    height: auto;
    min-height: 100vh;
  }

  .terrain-wrapper {
    margin: 40px auto 0;
  }

  .cards {
    top: -25px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .arrow {
    width: 45px;
    height: 45px;
    font-size: 1.8rem;
  }
}
