@charset "UTF-8";

/*
 * Front-Office ground rules: design system tokens, page skeleton, smooth scrolling.
 * Everything screen specific lives in its own file (docs/06-conventions-code.md §9).
 */

.fo {
    /* Design system of docs/05-maquettes/README.md */
    --fo-color-primary: #A6A6A6;
    --fo-color-background: #FFFFFF;
    --fo-color-text: #000000;
    --fo-color-overlay-text: #FFFFFF;

    --fo-font-serif: 'baskervville', Times, "Times New Roman", Georgia, serif;
    --fo-font-sans: 'helveticaneue-thin', Verdana, Arial, Helvetica, sans-serif;

    /* The three layers of the Front-Office, from the sticky header up to the cookie banner, which
       the acceptance criteria of FO-COOKIE-BANNER-01 put above everything, the medias carousel
       included */
    --fo-z-header: 1030;
    --fo-z-carousel: 1040;
    --fo-z-cookie-banner: 1050;

    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--fo-color-background);
    color: var(--fo-color-text);
    font-family: var(--fo-font-sans);
    font-weight: 100;
}

/*
 * Cyrillic languages: only the two font families change, every other rule keeps reading the same
 * custom property. Adding a language is therefore a one line change on AllowedLocale.
 */
.fo--cyrillic {
    --fo-font-serif: 'ebgaramond12', Times, "Times New Roman", Georgia, serif;
    --fo-font-sans: 'helveticaneuecyr-thin', Verdana, Arial, Helvetica, sans-serif;
}

/* Carries the anchor jump from the arrow down to the galleries, with no JavaScript */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/*
 * Turbo puts every visit back at the top of the page through "window.scrollTo", which the rule
 * above turns into an animation: arriving on a page, the visitor saw it glide upwards for the best
 * part of a second before settling. Turbo marks the document busy for the length of a visit, which
 * is exactly the window where scrolling has to be instant again.
 */
html[aria-busy="true"] {
    scroll-behavior: auto;
}

/*
 * No "overflow-x: hidden" on the body on purpose: it turns the body into a scroll container and
 * silently breaks the "position: sticky" of the header. Nothing here is sized in vw units wide
 * enough to overflow anyway, so a horizontal scrollbar would be a bug to fix at its source rather
 * than something to hide.
 */

/* Pushes the footer to the bottom of the screen when the content is too short to fill it */
.fo__main {
    flex: 1 0 auto;
}

.fo a {
    color: inherit;
    text-decoration: none;
}
