*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scrollbar-color: var(--vert-400) var(--beige-200);
    scrollbar-width: thin;
}

body {
    min-height: 100svh;
    background: var(--fond);
    color: var(--encre);
    font-family: var(--police-texte);
    font-size: var(--t-base);
    font-weight: 400;
    line-height: 1.68;
    letter-spacing: 0.004em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    opacity: 0.05;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

body.est-verrouille {
    overflow: hidden;
}

::selection {
    background: var(--vert-500);
    color: var(--creme);
}

::-webkit-scrollbar {
    width: 13px;
    height: 13px;
}

::-webkit-scrollbar-track {
    background: var(--beige-200);
    border-left: 1px solid var(--trait);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--vert-400), var(--vert-600));
    border: 3px solid var(--beige-200);
    border-radius: var(--r-full);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--vert-500), var(--vert-700));
}

::-webkit-scrollbar-corner {
    background: var(--beige-200);
}

img,
picture,
svg,
video {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
    background: var(--beige-300);
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: 0;
    cursor: pointer;
}

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

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4 {
    font-family: var(--police-titre);
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: -0.022em;
    font-variation-settings: "SOFT" 18, "WONK" 1;
    text-wrap: balance;
}

h1 {
    font-size: var(--t-3xl);
}

h2 {
    font-size: var(--t-2xl);
}

h3 {
    font-size: var(--t-xl);
    letter-spacing: -0.014em;
}

p {
    text-wrap: pretty;
}

strong {
    font-weight: 600;
}

em {
    font-style: italic;
}

hr {
    border: 0;
    border-top: 1px solid var(--trait);
}

:focus-visible {
    outline: 2px solid var(--vert-500);
    outline-offset: 3px;
    border-radius: var(--r-xs);
}

.saut-contenu {
    position: absolute;
    left: 50%;
    top: -100%;
    z-index: 200;
    transform: translateX(-50%);
    padding: var(--e-3) var(--e-5);
    background: var(--vert-700);
    color: var(--creme);
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    transition: top var(--duree-1) var(--sortie);
}

.saut-contenu:focus {
    top: 0;
}

.visuellement-cache {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.enveloppe {
    width: min(100% - (var(--gouttiere) * 2), var(--largeur));
    margin-inline: auto;
}

.enveloppe--etroite {
    width: min(100% - (var(--gouttiere) * 2), var(--largeur-etroite));
    margin-inline: auto;
}

.section {
    padding-block: clamp(4rem, 8vw, 8rem);
    position: relative;
}

.section--sombre {
    background: var(--fond-sombre);
    color: var(--beige-200);
}

.section--alt {
    background: var(--fond-alt);
}

.index-section {
    display: flex;
    align-items: center;
    gap: var(--e-3);
    font-family: var(--police-mono);
    font-size: var(--t-xs);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--vert-400);
    margin-bottom: var(--e-4);
}

.index-section::before {
    content: "";
    width: 2.25rem;
    height: 1px;
    background: currentColor;
    opacity: 0.6;
}

.section--sombre .index-section {
    color: var(--vert-200);
}

.titre-mesure {
    max-width: 22ch;
}

.chapo {
    font-size: var(--t-md);
    color: var(--encre-doux);
    max-width: 58ch;
}

.section--sombre .chapo {
    color: var(--vert-100);
}

.accent-italique {
    font-style: italic;
    color: var(--vert-500);
    font-variation-settings: "SOFT" 40, "WONK" 1;
}

.section--sombre .accent-italique {
    color: var(--vert-200);
}

.progression-lecture {
    position: fixed;
    inset-inline: 0;
    top: 0;
    height: 2px;
    z-index: 55;
    background: transparent;
    pointer-events: none;
}

.progression-lecture__barre {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--vert-500), var(--beige-500));
    transform-origin: left;
    transition: width 80ms linear;
}

[data-reveal] {
    opacity: 0;
    transform: translate3d(0, 1.75rem, 0);
    transition:
        opacity var(--duree-3) var(--sortie),
        transform var(--duree-3) var(--sortie),
        clip-path var(--duree-3) var(--sortie);
    transition-delay: calc(var(--i, 0) * 70ms);
    will-change: opacity, transform;
}

[data-reveal="gauche"] {
    transform: translate3d(-2rem, 0, 0);
}

[data-reveal="droite"] {
    transform: translate3d(2rem, 0, 0);
}

[data-reveal="zoom"] {
    transform: scale(0.94);
}

[data-reveal="rideau"] {
    transform: none;
    opacity: 1;
    clip-path: inset(0 0 100% 0);
}

[data-reveal].est-visible {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
}

.mot-anime {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.mot-anime > span {
    display: inline-block;
    transform: translateY(105%);
    transition: transform 900ms var(--sortie);
    transition-delay: calc(var(--i, 0) * 55ms);
}

.est-visible .mot-anime > span,
.mot-anime.est-visible > span {
    transform: translateY(0);
}

.voile-transition {
    position: fixed;
    inset: 0;
    z-index: 88;
    background: var(--creme);
    opacity: 0;
    pointer-events: none;
    transition: opacity 260ms var(--sortie);
}

.voile-transition.est-visible {
    opacity: 1;
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
        clip-path: none;
    }

    .mot-anime > span {
        transform: none;
    }
}
