:root {
    --bg: #07090d;
    --bg-elev: #0e1218;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.07);
    --text: #f1f4f9;
    --muted: #8f9aac;
    --accent: #4da3ff;
    --accent-bright: #7ec8ff;
    --accent-dim: rgba(77, 163, 255, 0.14);
    --accent-2: #8b6dff;
    --border: rgba(255, 255, 255, 0.09);
    --border-glow: rgba(77, 163, 255, 0.22);
    --radius: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 16px 48px rgba(0, 0, 0, 0.45);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --tracking-tight: -0.02em;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.02rem;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.55;
    position: relative;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Fond : grille + halos (animation si autorisée) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(165deg, rgba(77, 163, 255, 0.07) 0%, transparent 42%),
        linear-gradient(330deg, rgba(139, 109, 255, 0.06) 0%, transparent 38%),
        radial-gradient(ellipse 90% 70% at 50% -30%, rgba(77, 163, 255, 0.12), transparent 55%),
        radial-gradient(ellipse 60% 50% at 100% 100%, rgba(139, 109, 255, 0.08), transparent 45%),
        var(--bg);
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 10%, transparent 70%);
}

@media (prefers-reduced-motion: no-preference) {
    body::before {
        animation: ux-mesh-drift 26s ease-in-out infinite alternate;
    }
}

@keyframes ux-mesh-drift {
    0% {
        opacity: 1;
        filter: saturate(1);
    }
    100% {
        opacity: 0.92;
        filter: saturate(1.08);
    }
}

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

h1, h2, h3, p {
    margin: 0;
}

h1, h2, h3 {
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
    line-height: 1.2;
}

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

button:focus-visible,
.btn:focus-visible {
    outline-offset: 3px;
}
