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

* {
    margin: 0;
}

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

html:has(dialog[open]) {
    overflow: hidden;
}

body {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--fond);
    color: var(--texte);
    font-family: var(--police-texte);
    font-size: var(--fs-0);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex: 1;
}

main:focus {
    outline: none;
}

h1,
h2,
h3 {
    line-height: 1.15;
    text-wrap: balance;
}

h1,
h2 {
    font-family: var(--police-titre);
    font-weight: 400;
}

h3 {
    font-weight: 500;
}

p,
li,
dd {
    text-wrap: pretty;
}

p {
    max-width: var(--mesure);
}

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

a {
    color: inherit;
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.25em;
    text-decoration-color: var(--secondaire);
    transition: text-decoration-color var(--duree) var(--courbe), color var(--duree) var(--courbe);
}

a:hover {
    text-decoration-color: var(--accent);
}

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

::selection {
    background: var(--texte);
    color: var(--fond);
}

ul[class],
ol[class],
nav ul {
    list-style: none;
    padding: 0;
}

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

.evitement {
    position: absolute;
    left: var(--marge);
    top: var(--espace-2);
    z-index: 10;
    padding: var(--espace-1) var(--espace-2);
    background: var(--texte);
    color: var(--fond);
    transform: translateY(-200%);
}

.evitement:focus {
    transform: none;
}

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