:root {
	--bg: #fafafa;
	--fg: #111;
	--muted: #666;
	--accent: #5b7cfa;
	--accent-soft: color-mix(in srgb, var(--accent) 15%, white);
	--radius: 12px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	padding: 1rem;
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
	line-height: 1.6;
	background: var(--bg);
	color: var(--fg);
}

header, main, footer {
	max-width: 780px;
	margin: 0 auto;
}

h1 {
	font-size: clamp(1.8rem, 5vw, 2.4rem);
	margin-bottom: 0.2rem;
	letter-spacing: -0.02em;
}

.intro {
	color: var(--muted);
	margin-top: 0;
}

nav ul {
	list-style: none;
	padding-left: 0;
}

nav li {
	margin: 0.4rem 0;
	padding-left: 0.8rem;
	border-left: 3px solid transparent;
	transition: border-color 0.2s ease, background 0.2s ease;
}

nav li:hover {
	border-color: var(--accent);
	background: var(--accent-soft);
	border-radius: var(--radius);
}

nav ul ul {
	margin-top: 0.3rem;
	margin-left: 0.8rem;
}

a {
	color: var(--accent);
	text-decoration: none;
	font-weight: 500;
}

a:hover {
	color: color-mix(in srgb, var(--accent) 80%, black);
}

img {
	max-width: 100%;
	height: auto;
	border-radius: var(--radius);
}

footer {
	margin-top: 2.5rem;
	padding-top: 1rem;
	border-top: 1px solid #ddd;
	font-size: 0.9rem;
	color: var(--muted);
}

/* animations discrètes */
@media (prefers-reduced-motion: no-preference) {
	body {
		animation: fadein 0.6s ease-out;
	}

	nav li {
		animation: slideup 0.4s ease-out both;
	}
}

@keyframes fadein {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes slideup {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* mobile */
@media (max-width: 600px) {
	body {
		padding: 0.8rem;
	}

	nav li {
		padding: 0.6rem;
	}
}
