/*
 * Frise des expositions (site/exhibitions) : axe vertical au centre, année en pastille sur l'axe,
 * affiche d'un côté et texte de l'autre, en alternant gauche/droite d'une exposition à l'autre.
 * Sous 768px : axe à gauche, affiche puis texte empilés à sa droite.
 */
#exhibitions {
    --timeline-accent: #000000;
    --timeline-line: #d8d8d8;
    --timeline-text: #dadada;
    --timeline-muted: #777777;
    padding-bottom: 40px;
}

#exhibitions h1 {
    text-align: center;
    text-transform: uppercase;
    margin: 30px 0 50px;
}

#exhibitions .timeline-empty {
    text-align: center;
    color: var(--timeline-muted);
}

#exhibitions .timeline {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 0;
}

/* Axe vertical */
#exhibitions .timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    margin-left: -1.5px;
    background: var(--timeline-line);
}

#exhibitions .timeline-item {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 70px;
}

#exhibitions .timeline-item:last-child {
    margin-bottom: 0;
}

#exhibitions .timeline-poster,
#exhibitions .timeline-text {
    width: 50%;
    box-sizing: border-box;
}

#exhibitions .timeline-poster {
    padding: 0 50px;
}

#exhibitions .timeline-text {
    padding: 0 50px;
    color: var(--timeline-text);
}

/* Alternance : affiche à gauche / texte à droite, puis l'inverse */
#exhibitions .timeline-item-right {
    flex-direction: row-reverse;
}

#exhibitions .timeline-item-left .timeline-poster,
#exhibitions .timeline-item-right .timeline-text {
    text-align: right;
}

#exhibitions .timeline-item-right .timeline-poster,
#exhibitions .timeline-item-left .timeline-text {
    text-align: left;
}

/* Année en pastille sur l'axe, avec un trait horizontal vers le texte */
#exhibitions .timeline-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    transform: translate(-50%, -50%);
}

#exhibitions .timeline-marker span {
    display: inline-block;
    min-width: 64px;
    padding: 6px 10px;
    border-radius: 20px;
    background: var(--timeline-accent);
    color: #ffffff;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 0 0 5px #ffffff;
}

#exhibitions .timeline-poster img {
    display: inline-block;
    max-width: 100%;
    max-height: 520px;
    height: auto;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

#exhibitions .timeline-date {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--timeline-accent);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#exhibitions .timeline-text h2 {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;
}

#exhibitions .timeline-text p {
    margin: 0;
    line-height: 1.6;
    text-align: justify;
}

@media (max-width: 767px) {
    #exhibitions h1 {
        margin-bottom: 30px;
    }

    #exhibitions .timeline::before {
        left: 20px;
    }

    #exhibitions .timeline-item,
    #exhibitions .timeline-item-right {
        display: block;
        box-sizing: border-box;
        width: 100%;
        padding-left: 50px;
        margin-bottom: 45px;
    }

    #exhibitions .timeline-poster,
    #exhibitions .timeline-text {
        width: 100%;
        padding: 0;
        text-align: left !important;
    }

    #exhibitions .timeline-poster {
        margin-bottom: 15px;
    }

    #exhibitions .timeline-marker {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 0 0 12px -50px;
    }

    #exhibitions .timeline-marker span {
        min-width: 0;
        font-size: 13px;
    }

    #exhibitions .timeline-poster img {
        max-height: none;
    }

    #exhibitions .timeline-text p {
        text-align: left;
    }
}
