/* CHAPITRE 1 */

#chap-1 .chart > .chart-window,
#chap-1 .chart > .controller-window {
    grid-row: 2;
    height: 100%;
    min-height: 0;
}

#chap-1 .chart {
    height: min(90svh, 100%);
    max-height: 90svh;
    min-height: 0;
    grid-template-rows: auto 1fr;
    align-items: stretch;
}

#chap-1 .chart > h3 {
    grid-row: 1;
}

#chap-1 .chart-window {
    background-color: var(--Dark-Cyan-50);
    border: 2px solid var(--Black-25);
    grid-column: 2 / 10;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 16px;
}

#chap-1 .controller-window {
    grid-column: 10 / 12;
    background-color: var(--Black-25);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    border: 2px solid var(--White-5);
    color: var(--White);
}

.chart-container {
    align-self: stretch;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
}

#chap-1 .controller-window .window-titlebar {
    border-bottom: 0px;
    background-color: var(--Black-25);
    border-bottom: 2px solid var(--White-5);
}

/* Chart & Controller */

#song-duration {
    border-radius: 8px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.slider-rail {
    height: 100%;
    width: 100%;
    padding: 24px;
    box-sizing: border-box;
    position: relative;
}

.year-slider {
    writing-mode: vertical-lr;
    direction: rtl;
    height: 100%;
    width: 100%;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    accent-color: var(--White);
    cursor: pointer;
}

/* Curseur - Slider Thumb */
.slider-container {
    --track-width: 8px;
    --thumb-height: 40px;
    --thumb-width: 24px;
}

.year-slider::-webkit-slider-thumb {
    appearance: none;
    width: var(--thumb-width);
    height: var(--thumb-height);
    border-radius: 4px;
    margin-left: calc((var(--track-width) - var(--thumb-width)) / 2);
    background: url(../assets/media/Cursor.svg) no-repeat center center;
}

.year-slider::-moz-range-thumb {
    appearance: none;
    width: var(--thumb-width);
    height: var(--thumb-height);
    border-radius: 4px;
    margin-left: calc((var(--track-width) - var(--thumb-width)) / 2);
    background: url(../assets/media/Cursor.svg) no-repeat center center;
    cursor: pointer;
}

.year-slider::-ms-thumb {
    width: var(--thumb-width);
    height: var(--thumb-height);
    border-radius: 4px;
    margin-left: calc((var(--track-width) - var(--thumb-width)) / 2);
    background: url(../assets/media/Cursor.svg) no-repeat center center;
    cursor: pointer;
}

/* Rail - Slider Track */
.year-slider::-webkit-slider-runnable-track {
    background: var(--White-5);
    width: var(--track-width);
    border-radius: 8px;
}

.year-slider::-moz-range-track {
    background: var(--White-5);
    width: var(--track-width);
    border-radius: 8px;
}

.year-slider::-ms-fill-lower {
    background: var(--White-5);
    border-radius: 8px;
}

/* Légende du slider */

.ticks {
    position: absolute;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    top: 0;
    box-sizing: border-box;
    padding-top: 36px;
    padding-bottom: 32px;
    pointer-events: none;
}

.ticks span {
    display: block;
    font-size: .875rem;
    color: var(--White-25);
    font-family: "Geist Mono", monospace;
}

.slider-extents {
    position: absolute;
    top: 36px;
    bottom: 32px;
    right: 24px;
    width: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
    font-size: .875rem;
    color: var(--White-25);
    font-family: "Geist Mono", monospace;
    text-align: right;
}

/* Trivia */

.first-year,
.last-year {
    position: absolute;
}

#chap-1 .chart-container canvas {
    aspect-ratio: auto;
    height: 672px;
}