.formation-item {
  overflow: hidden;
}

.logo.ep {
  width: 265px;
  height: 80px;
}

.logo.ps {
  width: 343px;
  height: 65px;
}

.ecole-row {
  position: relative;
  overflow: hidden;
}

.ecole-item {
  flex: 0 0 calc((100% - 75px - 48px) / 5);
  position: relative;
  height: 368px;
  transition: all 0.5s ease;
  cursor: pointer;
  border-radius: 16px;
  box-sizing: border-box;
  scroll-snap-align: start;
}

.ecole-item.active {
  flex: 0 0 calc(((100% - 75px - 48px) / 5) * 2 + 25px);
}

.carousel-inner {
  display: flex;
  gap: 25px;
  overflow-x: scroll;
  align-items: stretch;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 1rem;
  scroll-padding-right: 1rem;
}

.carousel-inner::-webkit-scrollbar {
  display: none;
}

.carousel-inner {
  -ms-overflow-style: none;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

/* Boutons de carousel */
.carousel-btn {
  position: absolute;
  top: 50%;
  color: white;
  background: var(--bs-primary);
  border: none;
  border-radius: 50%;
  width: 65px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transform: translate(-50%, -50%);
  transition: background 0.3s ease;
  border: 2px solid var(--bs-primary);
}

.carousel-btn:hover {
  color: var(--bs-primary);
  background: white;
  border: 2px solid var(--bs-primary);
}

.carousel-btn svg {
  width: 34px !important;
  height: 34px !important;
}

.carousel-btn.prev { left: calc(((100% - 75px - 48px) / 5) + 12.5px); }
.carousel-btn.next { right: calc(((100% - 75px - 48px) / 5) - 19px - 12.5px + 3px); }

/* Contenu des cards formation */
.ecole-item h4 { display: none; }
.ecole-item.active h4 { display: block; opacity: 1; }

.ecole-item .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: var(--bs-primary);
  background: #F9F6EED4;
  border-radius: 14px;
  display: flex;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.ecole-item.active:hover .overlay {
  opacity: 1;
}

.ecole-item .overlay li {
  margin-bottom: 3px;
}

.ecole-item.active:hover h4 {
  opacity: 0;
}

/* Responsive - 768px */
@media screen and (max-width: 768px) {
  .formation-item {
    padding-bottom: 70px;
  }
  .ecole-item {
    flex: 0 0 100% !important;
  }
  .ecole-row {
    overflow: visible !important;
  }
  .carousel-inner {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .carousel-btn {
    top: 100%;
    width: 55px;
    height: 55px;
    transform: translate(0, 0);
  }

  .carousel-btn svg {
    width: 30px !important;
    height: 30px !important;
  }
  .carousel-btn.prev { left: 1rem; margin-top: 10px; }
  .carousel-btn.next { right: 1rem; margin-top: 10px; }

  .overlay { justify-content: center; }
}

/* Responsive - 576px */
@media screen and (max-width: 576px) {
  .ecole-item {
    flex: 0 0 100% !important;
  }
  .carousel-inner {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  .carousel-btn.prev { left: 1rem; margin-top: 10px; }
  .carousel-btn.next { right: 1rem; margin-top: 10px; }

  .logo.ep {
    width: 198px;
    height: 60px;
  }
  .logo.ps {
    width: 228px;
    height: 43px;
  }
}
