  @import url('https://fonts.cdnfonts.com/css/d-din');

/* État initial : masqué au chargement */
.acf-block-tabs-animated {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    position: relative;
}

.tab-text.closing {
    opacity: 0;
    transform: translate(50px, -50%); /* Retour à droite */
    pointer-events: none;
}

.tabs-labels {
    position: relative;
    display: flex;
    width: 17rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.tab-label {
    position: relative;
    display: flex;
    flex: 1 1 15rem;
    justify-content: right;
    align-items: center;
    text-align: right;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'D-DIN Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.375rem;
    height: 3.875rem;
    color: white;

}

.tab-label:hover {
    font-size: 3.0625rem;
    transform: translateY(-2px);
}

.tab-label.active {
    font-size: 3.0625rem;
    color: white;
}

.tabs-images {
    display: flex;
    position: relative;
    flex: 0 1 23.375rem;
    overflow: hidden;
    height: 32.375rem;
}

.tab-image {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 1; /* Image toujours visible */
}

.tab-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #04326c; /* Couleur du masque */
    z-index: 2;
    transform: translateX(0); /* Masque présent par défaut */
    transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Masquer les images non actives */
.tab-image:not(.active) {
    opacity: 0;
    pointer-events: none;
}

/* Animation au scroll pour la première apparition */
.tab-image.active.scroll-triggered::before {
    transform: translateX(100%);
}

/* Animation normale pour les changements de tabs */
.tab-image.active::before {
    transform: translateX(100%);

}

/* Nouvel état de fermeture */
.tab-image.closing::before {
  transform: translateX(0); /* le masque revient couvrir l’image */
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-image.closing {
  opacity: 1; /* garde visible tant que le masque n’a pas fini */
}


.tab-image img {
    max-width: 23.375rem;
    width: 100%;
    max-height: 32.375rem;
    display: block;
}

.tabs-content-texts {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.tabs-texts {
    position: relative;
    display: block;
    width: 18.8125rem;
    height: 20.75rem;
    margin-left: 3rem;
  
}
.tabs-link {
    position: absolute;
    bottom: 0;
    display: block;
    color: white;
    width: 18.8125rem;
}

.tab-text {
    position: absolute;
    display: block;
    color: white;
    top: 50%;
    right: 0;
    width: 100%;
    height: auto;
    pointer-events: none; 
    opacity: 0;
    transform: translate(50px, -50%);
    transition: all .5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-text.active {
    opacity: 1;
    transform: translate(0, -50%);
    pointer-events: auto; /* Permet les interactions avec le texte actif */
}



.tab-text p {
    margin: 0;
    line-height: 1.6;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .acf-block-tabs-animated {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 15px;
    }
    
    .tabs-labels {
        flex-direction: row;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 10px;
    }
    
    .tab-label {
        min-width: 120px;
        flex-shrink: 0;
    }
    
    .tabs-images,
    .tabs-texts {
        max-width: 100%;
    }
}

   

.indicator-column {
   position: absolute;
    left: 100%; /* juste à droite des labels */
    top: 12%;
    margin-left: 1rem;
    width: 4px;
}

.indicator {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 1px;
    background-color: white;
    transition: top 0.3s ease;
}


