/**
 * Longform Views – Flux continu
 */

@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Cinzel&family=UnifrakturMaguntia&family=IM+Fell+English&family=Cormorant+Garamond:wght@300;400&family=Cormorant:wght@300;400&family=Playfair+Display:wght@300;400&family=Libre+Baskerville&family=DM+Sans:wght@300;400&family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap");

:root {
    --bs-font-sans-serif: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);

    --ink-900: rgb(3, 48, 43);
    --ink-700: rgb(32, 32, 32);
    --ink-date: color-mix(in srgb, var(--ink-900) 70%, var(--ink-700) 30%);

    --tl-left: calc(50% - 22px);
    --tl-width: 44px;
    --tl-bg: rgba(255, 255, 255, 0.88);
    --tl-blur: 6px;

    --timeline-line: #6f767d;
    --timeline-century-color: #0f6a5d;

    --dot-size: 10px;
    --dot-radius: calc(var(--dot-size) / 2);
    --dot-top: 32px;

    --century-space: 160px;
    --century-space-mobile: 100px;

    --background-main: #FDF9F4;
}

/* Typography */


body {
    color: var(--ink-700);
    font-family: var(--bs-body-font-family);
}

h1,
.h1 {
    font-family: var(--bs-font-sans-serif);
    color: var(--ink-900);
    font-weight: 400;
    text-wrap: balance;
}

h2,
h3,
h4,
h5,
h6 {
    font-family: var(--bs-font-sans-serif);
    font-weight: 400;
}

p {
    color: var(--ink-700);
    line-height: 1.7;
}

.title {
    display: none;
}

.views-field-field-date {
    color: var(--ink-date);
    margin-bottom: 1rem;
    font-weight: 400;
}

#page,
#main-wrapper {
    background-color: var(--background-main);
}

.blockquote-footer {
    margin-top: -0.5rem;

}

/* Back to top */
.back-to-top {
    position: fixed;
    left: var(--tl-left);
    bottom: 1.5rem;
    width: var(--tl-width);
    height: 44px;
    border-radius: 999px;
    background: var(--tl-bg);
    backdrop-filter: blur(var(--tl-blur));
    -webkit-backdrop-filter: blur(var(--tl-blur));
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1000;
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-2px);
}

@media (max-width: 991.98px) {
    .back-to-top {
        display: none;
    }
}

/* Cover */
.longform-cover {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.longform-cover.m-md-3 {
    margin: 0 !important;
}

@supports (height: 100svh) {
    .longform-cover {
        min-height: 100svh;
    }
}

/* Timeline – structure */
.main-timeline .view-content {
    position: relative;
    overflow: visible;
}

.main-timeline .view-content::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 50%;
    width: 1px;
    background: var(--timeline-line);
    transform: translateX(-0.5px);
    z-index: 0;
}

.main-timeline .view-content > .row {
    --bs-gutter-x: 0;
    position: relative;
    display: flex !important;
    width: 100%;
    margin: 0 0 1.5rem;
}

.main-timeline .view-content > .row:nth-child(odd) {
    justify-content: flex-start;
}

.main-timeline .view-content > .row:nth-child(even) {
    justify-content: flex-end;
}

.main-timeline .timeline {
    position: relative;
    z-index: 1;
}

.card {
    border: none;
    background: none;
}

/* Point noir */
.main-timeline .view-content > .row[data-year]::after {
    content: "";
    position: absolute;
    left: 50%;
    top: var(--dot-top);
    transform: translate(-50%, -50%);
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 50%;
    background: #000;
    z-index: 3;
}

/* Filet horizontal */
.main-timeline .view-content > .row[data-year]::before {
    content: "";
    position: absolute;
    top: var(--dot-top);
    height: 1px;
    background: var(--timeline-line);
    z-index: 2;
}

@media (min-width: 768px) {
    .main-timeline .view-content > .row:nth-child(odd)::before {
        right: calc(50% + var(--dot-radius));
        width: calc(8.333333% - var(--dot-radius));
    }

    .main-timeline .view-content > .row:nth-child(even)::before {
        left: calc(50% + var(--dot-radius));
        width: calc(8.333333% - var(--dot-radius));
    }
}

/* Étiquette siècle */
.main-timeline .view-content > .row.is-century-start {
    margin-top: var(--century-space);
}

.main-timeline .view-content > .row.is-century-start + .row {
    margin-top: var(--century-space);
}

.main-timeline .century-label {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(var(--century-space) / -1);
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0;
    color: var(--timeline-century-color);
    white-space: nowrap;
    background-color: var(--background-main);
    z-index: 4;
}

.main-timeline .century-label::before,
.main-timeline .century-label::after {
    display: none;
}

.main-timeline .century-label {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.main-timeline .century-label__year {
    font-size: inherit;
    /* hérite du display-1 */
    line-height: 1;
}

.main-timeline .century-label__sub {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--timeline-century-color);
    opacity: 0.75;
}

/* Mobile */
@media (max-width: 767.98px) {
    .main-timeline .view-content::before {
        left: 12.5%;
        transform: translateX(-0.5px);
    }

    .main-timeline .view-content > .row {
        justify-content: flex-start !important;
    }

    .main-timeline .timeline {
        margin-left: 33.333333%;
        width: 66.666667%;
        max-width: 66.666667%;
        flex: 0 0 66.666667%;
    }

    .main-timeline .view-content > .row[data-year]::after {
        left: 12.5%;
        top: var(--dot-top);
    }

    .main-timeline .view-content > .row[data-year]::before {
        left: calc(12.5% + var(--dot-radius));
        width: calc(33.333333% - 12.5% - var(--dot-radius));
        top: var(--dot-top);
    }

    .main-timeline .century-label {
        left: 0;
        top: calc(var(--century-space-mobile) / -1);
        transform: none;
    }

    .main-timeline .century-label::before {
        display: none;
    }

    .main-timeline .view-content > .row.is-century-start,
    .main-timeline .view-content > .row.is-century-start + .row {
        margin-top: var(--century-space-mobile);
    }
}
