/* Reset minimal, pensé pour rester lisible et facile à étendre */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

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

html:has(:target) {
    scroll-padding-top: calc(var(--nav-height) + var(--space-4));
}

body {
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

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

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

button {
    cursor: pointer;
    background: none;
    border: none;
}

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

ul,
ol {
    list-style: none;
    padding: 0;
}

h1,
h2,
h3,
h4 {
    font-weight: 600;
    line-height: var(--lh-tight);
    letter-spacing: -0.01em;
    color: var(--color-text);
}

p {
    color: var(--color-text-secondary);
}

strong {
    font-weight: 600;
    color: var(--color-text);
}

/* Accessibilité clavier : anneau de focus visible partout */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    z-index: 100;
    padding: var(--space-2) var(--space-4);
    background: var(--color-text);
    color: var(--color-bg);
    border-radius: var(--radius-sm);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: calc(var(--announcement-height) + var(--space-2));
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
