:root {
    color-scheme: dark;
    --color-background: #0E1114;
    --color-card-background: #20282E;
    --color-appbar: #0E1114;
    --color-appbar-text: #fbfbfb;
    --color-text: #FBFBFB;
    --color-shadow: rgba(0, 0, 0, 0.15);
    --color-button: light-dark(#fbfbfb, #424242);
    --color-button-border: #222222;
    --color-button-border-active: rgb(32, 128, 196);
    --color-sncf-red: #DB1D65;
    --color-sncf-blue: #8BE7FC;
    --radius-card: 1rem;
}

html {
    font-family: sans-serif;
    background: var(--color-background);
    color: var(--color-text);
    min-height: 100%;
    padding: 0;
    margin: 0;
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    gap: 1rem;
    padding: 0;
    margin: 0;
    width: 100%;
    flex: 1;
}

header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
    z-index: 9;
    background: var(--color-appbar);
    color: var(--color-appbar-text);
    border-bottom: 1px solid var(--color-shadow);
    font-size: 12px;
    height: 57px;
}

main {
    padding: 0.5rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

a {
    color: rgb(32, 128, 196);
    text-decoration: none;
}

footer a {
    color: currentColor;
}

button, [button] {
    border-radius: 6rem;
    padding: 0.5rem 0.75rem;
    border: none;
    margin: 1px;
    background: var(--color-sncf-red);
    color: white;
    box-shadow:
        0 0.15rem 0.25rem var(--color-shadow);
    transition: 0.1s;
    min-height: 1.8rem;
    font-size: inherit;
    cursor: pointer;
}

button:hover, [button]:hover {
    z-index: 2;
    filter: brightness(110%);
    box-shadow:
        0 0 0.5rem 1px var(--color-sncf-red);
}

#goToTop {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    background: var(--color-sncf-red);
    color: var(--color-appbar-text);
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-background);
    box-sizing: border-box;
}

footer {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media screen and (min-width: 1024px) {
    header,
    main,
    footer {
        padding-left: calc(50vw - 496px);
        padding-right: calc(50vw - 496px);
    }

    #goToTop {
        right: calc(50vw - 496px);
    }
}
