/* ======================================================
   RESET GLOBAL
====================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    background: var(--color-white);
    color: var(--color-text);

    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: 1.65;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ======================================================
   ÉLÉMENTS DE FORMULAIRE
====================================================== */

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

button,
input,
textarea,
select {
    margin: 0;
}

button {
    cursor: pointer;
}


/* ======================================================
   MÉDIAS
====================================================== */

img,
picture,
svg,
video {
    display: block;

    max-width: 100%;
    height: auto;
}


/* ======================================================
   LIENS
====================================================== */

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


/* ======================================================
   LISTES
====================================================== */

ul,
ol {
    margin: 0;
    padding: 0;
}


/* ======================================================
   TEXTES
====================================================== */

p {
    margin-top: 0;
    margin-bottom: var(--spacing-sm);
}

p:last-child {
    margin-bottom: 0;
}


/* ======================================================
   TITRES
====================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: var(--spacing-sm);

    color: var(--color-black);

    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

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

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

h3 {
    font-size: var(--font-size-xl);
}

h4 {
    font-size: var(--font-size-lg);
}


/* ======================================================
   CONTENU PRINCIPAL
====================================================== */

main {
    display: block;
}


/* ======================================================
   ACCESSIBILITÉ CLAVIER
====================================================== */

:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}


/* ======================================================
   TEXTE MASQUÉ VISUELLEMENT
   Accessible aux lecteurs d’écran
====================================================== */

.screen-reader-text {
    position: absolute;

    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;

    overflow: hidden;

    border: 0;

    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);

    white-space: nowrap;
}

.screen-reader-text:focus {
    position: fixed;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    z-index: 9999;

    width: auto;
    height: auto;
    margin: 0;
    padding: var(--spacing-sm);

    overflow: visible;

    background: var(--color-white);
    color: var(--color-black);

    clip: auto;
    clip-path: none;
}


/* ======================================================
   BARRE D’ADMINISTRATION WORDPRESS
====================================================== */

@media screen and (max-width: 782px) {

    html {
        scroll-padding-top: 46px;
    }
}

/* ======================================================
   PASSE QUALITÉ 1.8 — ACCESSIBILITÉ ET RÉSILIENCE
====================================================== */

.skip-link:focus {
    top: 1rem;
    left: 1rem;
    z-index: 10000;
    padding: .85rem 1.1rem;
    border-radius: .5rem;
    background: var(--color-black);
    color: var(--color-white);
    box-shadow: 0 0 0 3px var(--color-primary);
}

:target {
    scroll-margin-top: 7rem;
}

a,
button,
input,
select,
textarea,
summary {
    touch-action: manipulation;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
}

iframe {
    border: 0;
}

@media (forced-colors: active) {
    :focus-visible {
        outline: 3px solid CanvasText;
    }

    .button,
    button {
        border: 1px solid ButtonText;
    }
}
