/* ==========================================================================
   Reset & fondations typographiques
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
}

body, h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure {
    margin: 0;
}

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

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

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

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

input {
    font: inherit;
    color: inherit;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    /* Starfield partagé + deux voiles de couleur basse opacité (or / corail)
       ancrés en haut du tout premier viewport, comme sur katabump.com. */
    background-image:
        var(--stars-image),
        radial-gradient(900px 500px at 15% 0%, rgba(245, 169, 74, 0.08), transparent 60%),
        radial-gradient(700px 400px at 90% 5%, rgba(230, 85, 89, 0.06), transparent 60%);
    background-size: var(--stars-size), auto, auto;
    background-repeat: repeat, no-repeat, no-repeat;
    background-attachment: fixed, fixed, fixed;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
}

code, pre, kbd, samp {
    font-family: var(--font-mono);
}

::selection {
    background: rgba(245, 169, 74, 0.25);
    color: var(--text-primary);
}

/* Scrollbar discrète, cohérente avec le thème sombre */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
    background-clip: padding-box;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -48px;
    left: var(--space-md);
    z-index: 1000;
    background: var(--bg-card);
    color: var(--text-primary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-md);
}

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