/* ==========================================================================
   aifluence - base : remise a zero, typographie, elements natifs
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Un element masque par l'attribut hidden le reste, meme si une regle plus
   loin lui donne un display. Sans cela, un conteneur en position fixed
   continue d'intercepter les clics de toute la page. */
[hidden] {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    margin: 0;
    background: var(--fond);
    color: var(--texte);
    font-family: var(--police-texte);
    font-size: var(--corps);
    line-height: var(--interligne);
    font-weight: 400;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--police-titre);
    color: var(--titre);
    line-height: var(--interligne-titre);
    margin: 0 0 var(--e4);
    text-wrap: balance;
    letter-spacing: -0.015em;
}

h1 { font-size: var(--h1); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: var(--h2); font-weight: 700; margin-top: var(--e7); }
h3 { font-size: var(--h3); font-weight: 600; margin-top: var(--e5); }
h4 { font-size: 1.0625rem; font-weight: 600; margin-top: var(--e5); }

p {
    margin: 0 0 var(--e4);
}

a {
    color: var(--lien);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    text-decoration-thickness: 1px;
    text-decoration-color: color-mix(in srgb, var(--teal) 45%, transparent);
    transition: color var(--transition), text-decoration-color var(--transition);
}

a:hover {
    color: var(--lien-survol);
    text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
    border-radius: 2px;
}

strong, b {
    font-weight: 600;
    color: var(--bleu-nuit);
}

small {
    font-size: var(--petit);
}

ul, ol {
    margin: 0 0 var(--e4);
    padding-left: 1.35em;
}

li {
    margin-bottom: var(--e2);
}

li::marker {
    color: var(--teal);
}

blockquote {
    margin: var(--e5) 0;
    padding: var(--e1) 0 var(--e1) var(--e4);
    border-left: var(--filet) solid var(--teal);
    color: var(--bleu-nuit);
    font-size: 1.0625em;
}

blockquote p:last-child {
    margin-bottom: 0;
}

code, kbd, samp, pre {
    font-family: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Consolas, monospace;
    font-size: 0.9em;
}

code {
    background: var(--glacier);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-badge);
    padding: 0.1em 0.35em;
}

pre {
    background: var(--bleu-nuit);
    color: #E8EEF4;
    padding: var(--e4);
    border-radius: var(--rayon-carte);
    overflow-x: auto;
}

pre code {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
}

img, picture, video, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

figure {
    margin: var(--e5) 0;
}

figcaption {
    margin-top: var(--e2);
    color: var(--texte-secondaire);
    font-size: var(--petit);
}

hr {
    border: 0;
    border-top: 1px solid var(--bordure);
    margin: var(--e6) 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
    font-size: var(--petit);
}

th, td {
    text-align: left;
    padding: var(--e3);
    border-bottom: 1px solid var(--bordure);
}

th {
    font-family: var(--police-titre);
    font-weight: 600;
    color: var(--bleu-nuit);
    white-space: nowrap;
}

tbody tr:hover {
    background: var(--glacier);
}

time {
    font-variant-numeric: tabular-nums;
}

::selection {
    background: color-mix(in srgb, var(--teal) 25%, transparent);
    color: var(--bleu-nuit);
}

/* Accessibilite */

.saut-contenu {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--bleu-nuit);
    color: #fff;
    padding: var(--e3) var(--e4);
    z-index: 100;
    border-radius: 0 0 var(--rayon-carte) 0;
}

.saut-contenu:focus {
    left: 0;
}

.visuellement-cache {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
