/*
   Base : variables, thèmes clair / sombre, réglages généraux et grands écrans
*/

:root {
    --echelle: 1;
    --largeur-max: calc(1180px * var(--echelle));
    --encre: #0c0d12;
    --accent: #2f5bff;
    --papier: #f3f3ef;
    --gris: #8a8d96;
    --sur-accent: #fff;
    --couleur-etiquette: #2f5bff;
    --fond-carte: color-mix(in srgb, var(--papier) 50%, #fff);
    --ombre: color-mix(in srgb, var(--encre) 30%, transparent);
}

[data-theme="dark"] {
    --encre: #f3f3ef;
    --papier: #0c0d12;
    --couleur-etiquette: #8ca6ff;
    --fond-carte: #161924;
    --ombre: rgba(255, 255, 255, 0.1);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
    margin: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font:
        16px/1.5 system-ui,
        -apple-system,
        "Segoe UI",
        sans-serif;
    background: var(--papier);
    color: var(--encre);
    overflow-x: clip;
    transition:
        background 0.5s,
        color 0.5s;
}

img {
    display: block;
    width: 100%;
    height: auto;
}

svg {
    overflow: visible;
}

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

button {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 8px;
}

.grand-titre,
h2,
.domaine b,
.ruban b,
.menu .menu-lien {
    font-family: "Arial Black", "Helvetica Neue", Impact, system-ui, sans-serif;
    font-weight: 900;
    text-transform: uppercase;
}

@media (hover: none) {
    html {
        scroll-behavior: smooth;
    }
}

@media (min-width: 1500px) {
    :root {
        --echelle: 1.12;
    }
}

@media (min-width: 1920px) {
    :root {
        --echelle: 1.32;
    }
}

@media (min-width: 2560px) {
    :root {
        --echelle: 1.6;
    }
}

@media (min-width: 3200px) {
    :root {
        --echelle: 1.95;
    }
}

@media (min-width: 4200px) {
    :root {
        --echelle: 2.4;
    }
}

@media (horizontal-viewport-segments: 2) {
    :root {
        --charniere: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0) + 40px);
    }
}
