/* ASW Packages — feuille de style unique.
   Pas de framework : une poignée de composants, autant les écrire à la main. */

:root {
	--bg: #fbfbfa;
	--surface: #ffffff;
	--border: #e4e4e1;
	--text: #1c1c1a;
	--muted: #6b6b66;
	--accent: #1f6feb;
	--code-bg: #f5f5f3;
	--radius: 10px;
	--shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 12px rgba(0, 0, 0, .03);
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #16161a;
		--surface: #1e1e23;
		--border: #2e2e35;
		--text: #e8e8e6;
		--muted: #9a9a94;
		--accent: #6ea8fe;
		--code-bg: #14141a;
		--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
	}
}

* { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { text-decoration: none; }

code, pre {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
		"Liberation Mono", monospace;
	font-size: .875em;
}

.page {
	max-width: 900px;
	margin: 0 auto;
	padding: clamp(2rem, 6vw, 4.5rem) 1.25rem 4rem;
}

/* --- Page "hey toi" (anonyme) ----------------------------------------- */

.page--lost {
	min-height: 100vh;
	display: grid;
	place-items: center;
	text-align: center;
}

.lost { max-width: 34rem; }

.lost-emoji {
	font-size: clamp(3.5rem, 12vw, 5.5rem);
	line-height: 1;
	margin-bottom: 1.25rem;
}

.lost h1 {
	font-size: clamp(1.6rem, 5vw, 2.4rem);
	line-height: 1.2;
	letter-spacing: -.02em;
	margin: 0 0 1rem;
}

.lost .lede {
	color: var(--muted);
	font-size: 1.05rem;
	margin: 0;
}

/* --- Tableau de bord (connecté) --------------------------------------- */

.masthead { margin-bottom: 2.5rem; }

.masthead h1 {
	margin: 0 0 .6rem;
	font-size: clamp(1.7rem, 5vw, 2.3rem);
	line-height: 1.15;
	letter-spacing: -.025em;
}

.lede {
	margin: 0;
	max-width: 46rem;
	color: var(--muted);
	font-size: 1.02rem;
}

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: clamp(1.25rem, 4vw, 1.75rem);
	margin-bottom: 2.5rem;
}

.card h2 {
	margin: 0 0 1.25rem;
	font-size: 1.15rem;
	letter-spacing: -.01em;
}

.card h3 {
	margin: 1.5rem 0 .5rem;
	font-size: .92rem;
	font-weight: 600;
}

.card h3:first-of-type { margin-top: 0; }

.muted { color: var(--muted); font-weight: 400; }

.step-note {
	margin: 0 0 .6rem;
	color: var(--muted);
	font-size: .88rem;
}

pre {
	margin: 0;
	padding: .85rem 1rem;
	background: var(--code-bg);
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow-x: auto;
}

pre code { white-space: pre; }

p code {
	padding: .12em .4em;
	background: var(--code-bg);
	border-radius: 4px;
}

.section-head {
	display: flex;
	align-items: center;
	gap: .6rem;
	margin-bottom: 1rem;
}

.section-head h2 {
	margin: 0;
	font-size: 1.15rem;
	letter-spacing: -.01em;
}

.count {
	padding: .1rem .5rem;
	background: var(--code-bg);
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--muted);
	font-size: .78rem;
	font-variant-numeric: tabular-nums;
}

.packages {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
	gap: .85rem;
}

.package {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	padding: 1rem 1.1rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.package-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: .75rem;
}

.package h3 {
	margin: 0;
	font-size: .95rem;
	line-height: 1.3;
	letter-spacing: -.01em;
}

.version {
	flex: none;
	color: var(--muted);
	font-size: .78rem;
	font-variant-numeric: tabular-nums;
}

.description {
	flex: 1;
	margin: 0;
	color: var(--muted);
	font-size: .85rem;
	line-height: 1.5;
}

.require {
	display: block;
	padding: .4rem .6rem;
	background: var(--code-bg);
	border-radius: 6px;
	color: var(--muted);
	font-size: .78rem;
	overflow-x: auto;
	white-space: nowrap;
}

.empty p { margin: 0; color: var(--muted); }

.foot {
	margin-top: 3rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--border);
}

.foot p {
	margin: 0;
	color: var(--muted);
	font-size: .85rem;
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	justify-content: space-between;
}
