/************************
TIMELINE VERTICALE (contenu d'une page entière, sans défilement propre)
Ligne centrale, étapes alternées gauche/droite, date en pastille côté opposé,
Mobile : ligne à gauche.
*************************/
.block-timeline-v {
    --tl-line: var(--color-support, var(--color-primary));
    --tl-accent: var(--color-primary);
    padding: 3rem 0;
    container: tlv / inline-size;
}

.tl-v {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Ligne verticale */
.tl-v::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 3px;
    border-radius: 2px;
    background: var(--tl-line);
    opacity: .35;
}

.tl-v__item {
    position: relative;
    margin: 0 0 2.5rem;
    padding: 0 0 0 56px;
}

.tl-v__item:last-child {
    margin-bottom: 0;
}

/* Puce sur la ligne */
.tl-v__dot {
    position: absolute;
    top: 1.05rem; /* mobile : aligné sur la pastille au-dessus de la carte */
    left: 11px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #fff;
    border: 5px solid var(--tl-accent);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .6);
}

/* Pastille de date / année */
.tl-v__date {
    display: inline-block;
    margin-bottom: .75rem;
    padding: .6rem 1.5rem;
    border-radius: var(--radius-pill, 20px);
    background: var(--tl-accent);
    color: #fff;
    font-weight: 800;
    font-size: 1.4rem;
    line-height: 1.2;
}

/* Carte */
.tl-v__card {
    position: relative;
    padding: 1.5rem 1.75rem;
    border-radius: var(--radius-card, .5rem);
    background: #fff;
    color: #212529;
    box-shadow: var(--shadow-card, 0 2px 8px rgba(0, 0, 0, .08));
    border: 1px solid rgba(0, 0, 0, .06);
    transition: transform .3s ease, box-shadow .3s ease;
}

/* Survol : léger zoom + ombre renforcée */
.tl-v__card:hover,
.tl-v__card:focus-within {
    transform: scale(1.025);
    box-shadow: var(--shadow-card-hover, 0 10px 28px rgba(0, 0, 0, .22));
}

.tl-v__body {
    position: relative;
}

.tl-v__title {
    margin: 0 0 .25rem;
    font-size: 1.6rem;
    line-height: 1.25;
    font-weight: 700;
    color: var(--tl-line);
}

.tl-v__subtitle {
    margin: 0 0 .6rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--tl-accent);
}

.tl-v__text {
    margin: 0 0 1rem;
}

.tl-v__text:last-child {
    margin-bottom: 0;
}

.tl-v__link {
    min-height: 2.5rem;
}

/* Apparition au scroll (désactivée si JS absent ou animations réduites) */
.tl-v--anim .tl-v__item {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}

.tl-v--anim .tl-v__item.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .tl-v__card:hover,
    .tl-v__card:focus-within {
        transform: none;
    }

    .tl-v--anim .tl-v__item {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Desktop : ligne centrale, étapes en alternance */
@container tlv (min-width: 820px) {
    .tl-v::before {
        left: 50%;
        margin-left: -1.5px;
    }

    .tl-v__item {
        width: 50%;
        padding: 0 3.25rem 0 0;
        text-align: right;
    }

    .tl-v__item:nth-child(even) {
        margin-left: 50%;
        padding: 0 0 0 3.25rem;
        text-align: left;
    }

    .tl-v__item .tl-v__dot {
        top: 1.45rem;
        left: auto;
        right: -10.5px;
    }

    .tl-v__item:nth-child(even) .tl-v__dot {
        right: auto;
        left: -10.5px;
    }

    /* Date côté opposé à la carte, alignée sur la puce */
    .tl-v__item .tl-v__date {
        position: absolute;
        top: .6rem;
        left: calc(100% + 3.25rem);
        margin: 0;
        white-space: nowrap;
    }

    .tl-v__item:nth-child(even) .tl-v__date {
        left: auto;
        right: calc(100% + 3.25rem);
    }

}

/* Fond de section sombre : ligne et pastilles en blanc (cartes toujours blanches) */
.block-timeline-v--sombre {
    --tl-line: #fff;
}

.block-timeline-v--sombre .tl-v::before {
    opacity: .55;
}

.block-timeline-v--sombre .tl-v__date {
    background: #fff;
    color: var(--color-support, #212529);
}

.block-timeline-v--sombre .tl-v__dot {
    background: var(--color-support, #212529);
    border-color: #fff;
}

.block-timeline-v--sombre .tl-v__title {
    color: var(--color-support, #212529);
}

