:root {
	--ink: #f2ede3;
	--muted: #a9a294;
	--accent: #e0a458;
	--panel: rgba(16, 18, 24, 0.82);
	--line: rgba(255, 255, 255, 0.12);
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	height: 100%;
	overflow: hidden;
	background: #0d0f13;
	color: var(--ink);
	font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

#scene {
	position: fixed;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	cursor: crosshair;
}

.hidden {
	display: none !important;
}

/* ------------------------------------------------------------- écran d'accueil */

#overlay {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at 50% 35%, rgba(30, 34, 44, 0.72), rgba(8, 9, 12, 0.94));
	backdrop-filter: blur(3px);
	cursor: pointer;
}

.card {
	width: min(560px, calc(100vw - 3rem));
	padding: 2.2rem 2.4rem 1.8rem;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 18px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.eyebrow {
	margin: 0 0 0.6rem;
	font-size: 0.72rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--muted);
}

.card h1 {
	margin: 0;
	font-size: 2.1rem;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.card h1 span {
	color: var(--accent);
}

.lede {
	margin: 0.7rem 0 1.5rem;
	color: var(--muted);
	line-height: 1.55;
	font-size: 0.95rem;
}

.keys {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0.45rem 1.2rem;
	margin: 0 0 1.6rem;
	padding: 1rem 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.keys > div {
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
}

.keys dt {
	min-width: 7.6rem;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--ink);
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 0.16rem 0.4rem;
	text-align: center;
}

.keys dd {
	margin: 0;
	font-size: 0.85rem;
	color: var(--muted);
}

button {
	width: 100%;
	padding: 0.85rem 1rem;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	color: #14161b;
	background: linear-gradient(180deg, #f0c07a, var(--accent));
	border: none;
	border-radius: 10px;
	cursor: pointer;
	transition: transform 0.12s ease, filter 0.12s ease;
}

button:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
}

.foot {
	margin: 1rem 0 0;
	text-align: center;
	font-size: 0.74rem;
	color: rgba(169, 162, 148, 0.7);
}

/* ------------------------------------------------------------------- en jeu */

#hud {
	position: fixed;
	inset: 0;
	pointer-events: none;
}

#crosshair {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 6px;
	height: 6px;
	margin: -3px 0 0 -3px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.65);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

.readout {
	position: absolute;
	left: 1.1rem;
	bottom: 1.1rem;
	display: flex;
	gap: 1.1rem;
	font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", monospace;
	font-size: 0.76rem;
	color: rgba(242, 237, 227, 0.72);
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

#mode {
	position: absolute;
	right: 1.1rem;
	bottom: 1.1rem;
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(242, 237, 227, 0.5);
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

#mode.warn {
	color: var(--accent);
}

#help {
	position: fixed;
	top: 1.1rem;
	right: 1.1rem;
	padding: 0.9rem 1.1rem;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 12px;
	font-size: 0.8rem;
	line-height: 1.7;
	color: var(--muted);
	pointer-events: none;
}

#help b {
	color: var(--ink);
	font-weight: 600;
}
