/*
 * Reset moderne minimaliste.
 * S'appuie sur les techniques actuelles (Andy Bell, Josh Comeau).
 * Pas une remise à zéro brutale : juste les normalisations utiles.
 */

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

* {
    margin: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Empêche le scroll horizontal accidentel */
    overflow-x: hidden;
}

html, body {
    min-height: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Images responsive par défaut */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

/* Inputs et boutons héritent de la typo */
input, button, textarea, select {
    font: inherit;
    color: inherit;
}

/* Pas de bouton "system" stylé */
button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

/* Liens héritent de la couleur, soulignement préservé */
a {
    color: inherit;
}

/* Listes par défaut sans bullet (les composants qui en veulent les remettent) */
ul, ol {
    list-style: none;
    padding: 0;
}

/* Évite que les éléments de texte aient un default break douteux */
h1, h2, h3, h4, h5, h6, p {
    overflow-wrap: break-word;
}

/* Focus visible accessible — anneau accent */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* On enlève le focus default sur les éléments qui gèrent leur propre style */
:focus:not(:focus-visible) {
    outline: none;
}

/* Empêche le double-tap zoom sur mobile pour les boutons */
button, [role='button'] {
    touch-action: manipulation;
}

/* Scrollbar discrète sur webkit */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 5px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-faint);
}
