.temoignages__container_hp {
  padding-bottom: 90px;
}

.temoignages-cards {
  display: flex;
  gap: 20px;
  align-items: stretch;
  width: 100%;
  overflow: hidden;

  --desc-w: 45%;
  --identity-h: 78px;
  --desc-pad: 20px;
}

.temoignage-card {
  display: grid;
  grid-template-columns: 0 1fr;
  align-items: stretch;

  flex: 1 1 0;
  min-width: 0;

  min-height: 400px;
  height: 400px;
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  position: relative;
  color: #fff;
  cursor: pointer;

  transition: grid-template-columns 0.4s ease, flex 0.4s ease;
}

.temoignage-2 .temoignage-visual {
    background-position: 60% center;
}

@media (hover: hover) and (pointer: fine) {
  .temoignages-cards:hover .temoignage-card {
    flex: 1 1 0;
  }
  .temoignages-cards:hover .temoignage-card:hover {
    flex: 3 1 0;
  }
}
.temoignage-card.active {
  flex: 3 1 0;
}

.temoignage-description {
  grid-column: 1;
  background: var(--color-primary);
  color: #fff;
  padding: 20px;
  padding-bottom: calc(var(--identity-h) + var(--desc-pad));
  font-size: 0.9rem;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.description-text {
  font-size: 20px;
}

.temoignage-visual {
  grid-column: 2;
  position: relative;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: 100%;
}

.temoignage-visual::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 0.8) 100%
  );
  pointer-events: none;
}

.temoignage-nom-poste {
  position: absolute;
  left: 0;
  bottom: 20px;
  width: 100%;
  height: var(--identity-h);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: center;
  color: #fff;
  pointer-events: none;
  user-select: none;
  z-index: 2;
  transition: left 0.3s ease, width 0.3s ease, text-align 0.3s ease;
}
.temoignage-prenom {
  font-size: 25px;
  font-weight: 600;
}
.temoignage-poste {
  font-size: 16px;
}

.temoignage-card:hover,
.temoignage-card.active {
  grid-template-columns: var(--desc-w) 1fr;
}
.temoignage-card:hover .temoignage-description,
.temoignage-card.active .temoignage-description {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

@media (hover: hover) and (pointer: fine) {
  .temoignage-card:hover .temoignage-nom-poste,
  .temoignage-card.active .temoignage-nom-poste {
    left: 20px;
    text-align: left;
    width: calc(var(--desc-w) - 40px);
  }
}

@media (max-width: 768px) {
  .temoignage-nom-poste {
    left: 0;
    text-align: center;
    width: 100%;
  }
}

.temoignage-1:hover .temoignage-description,
.temoignage-1.active .temoignage-description {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.temoignage-2:hover .temoignage-description,
.temoignage-3:hover .temoignage-description,
.temoignage-4:hover .temoignage-description,
.temoignage-2.active .temoignage-description,
.temoignage-3.active .temoignage-description,
.temoignage-4.active .temoignage-description {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

@media (max-width: 768px) {
  .temoignages__container_hp {
    padding-bottom: 45px;
  }
  .temoignages-section {
    display: flex;
    flex-direction: column;
  }

  .temoignages-cards[data-carousel] {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding-bottom: 4px;
  }

  .temoignage-card {
    flex: 0 0 85%;
    min-width: 85%;
    height: auto;
    min-height: 380px;
    scroll-snap-align: center;

    grid-template-columns: 0 1fr !important;
  }
  .temoignage-description {
    display: none;
  }

  .temoignages-cards[data-carousel] {
    scrollbar-width: none;
  }
  .temoignages-cards[data-carousel]::-webkit-scrollbar {
    display: none;
  }

  .temoignages-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 12px;
  }
  .temoignages-dot {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
  }
  .temoignages-dot:focus {
    outline: none;
  }
}

@media (min-width: 769px) {
  .temoignages-dots {
    display: none;
  }
}

.temoignage-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10000;
}
.temoignage-modal.is-open {
  display: block;
}

@media (max-width: 768px) {
  .temoignage-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1;
  }

  .temoignage-modal__panel {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(88vw, 440px);
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    z-index: 2;
  }

  .temoignage-modal__content {
    display: flex;
    padding: 25px;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    flex: 1 0 0;
    align-self: stretch;
    border-radius: 40px;
    background: var(--color-primary);
    color: #fff;
    min-height: 350px;
  }

  .temoignage-modal__desc {
    margin: 0 0 16px 0;
    font-size: 22px;
    line-height: 1.45;
  }

  .temoignage-modal__identity {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .temoignage-modal__prenom {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
  }
  .temoignage-modal__poste {
    font-size: 14px;
    opacity: 0.9;
  }

  .temoignage-modal__close {
    position: absolute;
    right: 0;
    top: -50px;
    width: 36px;
    height: 36px;
    border-radius: 20px;
    background: #fff;
    color: #000;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  }
}

@media (min-width: 769px) {
  .temoignage-modal {
    display: none !important;
  }
}
.no-scroll {
  overflow: hidden;
}
