/* Timeline verticale : date dans un carré arrondi sur le trait, carte à droite */

.custom-timeline-pryntec {
    --timeline-col: 96px; /* largeur de la colonne de gauche */
    --timeline-progress: 0px; /* hauteur du remplissage, pilotée en JS */
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Une seule ligne continue derrière toutes les étapes : la piste claire */
.custom-timeline-pryntec::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--timeline-col) / 2);
    transform: translateX(-50%);
    width: 2px;
    background-color: #04221D;
}

/* Le remplissage teal qui grandit jusqu'à la dernière étape atteinte */
.custom-timeline-pryntec::after {
    content: "";
    position: absolute;
    top: 0;
    left: calc(var(--timeline-col) / 2);
    transform: translateX(-50%);
    width: 2px;
    height: var(--timeline-progress);
    background-color: #34B4A3;
    transition: height 0.8s ease-in-out;
}

.custom-timeline-pryntec .timeline-item {
    display: grid;
    grid-template-columns: var(--timeline-col) 1fr;
    align-items: stretch;
    column-gap: 24px;
}

/* Colonne gauche : le carré de date, centré sur la ligne */
.custom-timeline-pryntec .timeline-item__marker {
    position: relative;
    display: flex;
    justify-content: center;
}

/* Le carré arrondi contenant la date */
.custom-timeline-pryntec .timeline-item__date {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    min-height: 56px;
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    height: fit-content;
    /* État de repos */
    background-color: #0b3c36;
    border: 1px solid #BBFEF1;
    color: #BBFEF1;
    transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;
}

/* Colonne droite : la carte de contenu */
.custom-timeline-pryntec .timeline-item__content {
    background-color: transparent;
    border: 1px solid #BBFEF1;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 32px;
    transition: border-color 0.5s ease;
}

.custom-timeline-pryntec .timeline-item:last-child .timeline-item__content {
    margin-bottom: 0;
}

.custom-timeline-pryntec .timeline-item__title {
    margin: 0 0 8px;
}

.custom-timeline-pryntec .timeline-item__text p:last-child {
    margin-bottom: 0;
}

/* État actif : déclenché en JS quand l'étape arrive à 30% du bas de l'écran */
.custom-timeline-pryntec .timeline-item.is-active .timeline-item__date {
    background-color: #34B4A3;
    border-color: #34B4A3;
    color: #04221D;
}

.custom-timeline-pryntec .timeline-item.is-active .timeline-item__content {
    border-color: #34B4A3;
}

/* Responsive : colonne plus étroite, la ligne suit via --timeline-col */
@media (max-width: 768px) {
    .custom-timeline-pryntec {
        --timeline-col: 56px;
    }
    .custom-timeline-pryntec .timeline-item {
        column-gap: 16px;
    }
}
