/* ============================================================
   RESET — base saine et cohérente entre navigateurs
   ============================================================ */

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

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

body {
    min-height: 100vh;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

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

ul,
ol {
    list-style: none;
}

/* L'attribut [hidden] doit toujours masquer, même si une règle de classe
   redéfinit display (ex. .btn-icon { display: grid }) */
[hidden] {
    display: none !important;
}

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

h1,
h2,
h3,
h4 {
    line-height: 1.2;
    font-weight: 700;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Respecte la préférence « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
