/* Animations d'ouverture/fermeture */

.accordeon-item_right {
  flex-shrink: 0;
  max-width: 16rem;
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.accordeon-item_right.visible {
  display: block;
  opacity: 1;
}


/* Classes d'animation */

.accordeon-content.opening {
  animation: slideDown 0.3s ease-out;
}

.accordeon-content.closing {
  animation: slideUp 0.3s ease-in;
}



/* Smooth transition pour le header */
.accordeon-header {
  transition: all 0.2s ease;
}

.accordeon-header.active {
  transform: scale(1.02);
}

/* Smooth transition pour l'icône */
.accordeon-icon {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.accordeon {
  flex: 60%;
  overflow: hidden;
}

.accordeon-item {
  position: relative;
}

.accordeon-item-wrapper {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.titre-vertical {
  transform: rotate(-90deg);
  color: #112F55;
  font-family: D-DIN;
  font-size: 6.25rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  display: flex;
  flex-direction: column;
  align-items: end;
}

.euclide-solution .titre-vertical {
  color: var(--solution-700);
}

.euclide-vaillant .titre-vertical {
  color: var(--vaillant-700);
}

.titre-vertical_mot-un {
  text-align: right;
}

.accordeon-header {
  width: 100%;
  padding: 1rem;
  text-align: left;
  font-family: D-DIN;
  font-size: 2.0625rem;
  font-style: normal;
  font-weight: 600;
  line-height: 2.3125rem; /* 112.121% */
  border-bottom: 1px solid #FFF;
  border-top: none;
  border-right: none;
  border-left: none;
  background-color: transparent;
  color: #FFF;
  outline: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordeon-header.active {
  border-bottom: none;
}

.accordeon-header.active .accordeon-icon {
  transform: rotate(45deg);
  opacity: 0;
}

.accordeon-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.accordeon-item_left {
  flex: 1;
  min-width: 0;
}

.accordeon-content {
  display: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease, padding 0.1s ease;
  padding: 0 1rem;
}

.accordeon-content.open {
  display: block;
  max-height: 1000px;
  padding: 1rem;
  overflow: inherit;
}

.accordeon-content .accordeon-text {
  word-break: break-word;
  line-height: 1.6;
}



.accordeon-item_right {
  flex-shrink: 0;
  max-width: 16rem;
  display: none;
  position: relative;
}

.accordeon-item_right::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  transform: translateX(0); /* Masque présent par défaut */
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordeon-item_right.visible {
  display: block;
  animation: fadeInImage 0.1s ease-out forwards; /* Fait apparaître le bloc */
}

.accordeon-item_right.visible::before {
  animation: revealMask 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards; /* Délai 0.8s après les titres */
}

@keyframes fadeInImage {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes revealMask {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}

.accordeon-item_right img {
  width: 100%;
  height: auto;
  z-index: 1000;
}

/* Responsive : image sous le contenu sur mobile */
@media (max-width: 768px) {
  .titre-vertical {
     transform: rotate(0);
     text-align: left;
    font-size: 2.5rem;

  border-bottom: 0px solid #FFF;
  color: #FFF !important;
 
  display: inline-flex;
  justify-content: inherit;
  align-items: start;
  flex-direction: row;
  gap: .5rem;
  }

  .container.container-accordeon .accordeon-header,
  .container.container-accordeon .accordeon-content {
    padding: 1rem 0.2rem;
  }

   .container.container-accordeon {
    display: block;
    padding: 0;
  }
  .accordeon-item-wrapper {
    gap: 1rem;
    display: block;
  }

  .accordeon-item_right {
    max-width: 100%;
  }
}