/* -------------- FIRST SECTION : COALITION -------------- */

.coalition-section {
  padding: 0 40px;
}

.coalition-section .wrapper {
  gap: 48px;
  align-items: flex-start;
}

.coalition-section .underline {
  z-index: -1;
}

.coalition-section p {
  font-size: clamp(16px, 2.5vw, 32px);
  line-height: 150%;
  opacity: 0;
}

.coalition-section .jump-to-form {
  font-weight: 600;
}

.coalition-section p .paragraph {
  margin-bottom: 16px;
}

@media screen and (max-width: 400px) {
  .coalition-section {
    padding: 64px 16px 0;
  }
  .coalition-section .wrapper {
    gap: 16px;
  }
}

/*  ----------------- START OF THE MEMBER SECTION --------------- */
.members-section h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(20px, 5vw, 48px);
  color: white;
  margin-bottom: 20px;
}

.members-section h2 {
  text-align: center;
  font-size: clamp(16px, 4vw, 24px);
}

.members-section .wrapper {
  margin-top: 64px;
  gap: 40px;
  padding: 400px 48px;
}

.members-section .slider-containerSpons {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.gridSpons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 5vh);
  gap: 20px;
}

.gridSpons > * {
  flex-grow: 1;
}

.slideSpons {
  display: none;
}

.slideSpons.activeSpons {
  display: grid;
}

.logoSpons {
  width: 100%;
  height: 100%;
  background: rgba(39, 102, 57, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10%;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
.logoSpons img {
  max-height: 80%;
  max-width: 80%;
  object-fit: contain;
  display: block;

  margin: 0 auto;
  transition: transform 0.3s ease;
  will-change: transform;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transform-origin: center center;
}
.logoSpons:hover img {
  transform: scale(1.15);
}
.imgPetit {
  max-width: 40% !important;
}
.imgPetit2 {
  max-width: 60% !important;
}
.imgPetit3 {
  max-width: 100% !important;
}

.buttonsSpons {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  text-align: center;
}

#prevSpons,
#nextSpons {
  padding: 10px 20px;
  margin: 0 10px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  background: rgba(39, 102, 57, 1);
  color: white;
  border-radius: 6px;
  cursor: none;
  transition: background 0.5s ease, transform 0.3s ease;
  transition-delay: 0s;
  will-change: transform;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transform-origin: center center;
}
#prevSpons:hover,
#nextSpons:hover {
  transform: scale(1.1);
}

#prevSpons:disabled,
#nextSpons:disabled {
  background: rgba(39, 102, 57, 0.5);
}

/* Default: 9 items (3x3 grid) */
.members-section .gridSpons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 136px);
  gap: 20px;
}

/* Tablet: 6 items (3x2 grid) */
@media screen and (max-width: 768px) {
  .members-section .wrapper {
    margin-top: 0px;
  }
  .members-section .gridSpons {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: 3 items (3x1 grid) */
@media screen and (max-width: 560px) {
  .members-section .wrapper {
    gap: 16px;
    padding: 76px 48px 0;
  }

  .members-section h1 {
    margin-bottom: 8px;
  }

  .members-section .gridSpons {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 400px) {
  .members-section .wrapper {
    gap: 0;
  }

  .members-section .gridSpons {
    /* grid-template-rows: repeat(3, 136px); */
    gap: 12px;
  }
}

/* Ensure slides behave correctly */
.members-section .slideSpons {
  display: none;
}

.members-section .slideSpons.activeSpons {
  display: grid;
}
