/* Minerite QoL : site du mod. Palette « coupe de mine » : ardoise des profondeurs, lave pour l'action, minerais pour les catégories. */
:root {
	--deep: #151924;
	--slate: #1d2230;
	--stone: #283044;
	--edge: #364058;
	--text: #eef0f5;
	--muted: #a3abbe;
	--lava: #ff6a2b;
	--lava-dark: #c2410c;
	--diamond: #4fd8e0;
	--gold: #f2c14e;
	--emerald: #3ecf7a;
	--amethyst: #b083ff;
	--redstone: #ff5c6c;
	--px: 4px;
	--display: "Pixelify Sans", "Rubik", system-ui, sans-serif;
	--body: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
	background: var(--deep);
	color: var(--text);
	font: 17px/1.6 var(--body);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

a { color: var(--diamond); text-underline-offset: 3px; }
a:hover { color: #9cf0f4; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- en-tête ---------- */
.top {
	position: sticky; top: 0; z-index: 10;
	background: rgba(21, 25, 36, .92);
	backdrop-filter: blur(8px);
	border-bottom: 2px solid var(--stone);
}
.top .wrap { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { display: flex; flex: none; }
.logo-svg { width: 178px; height: auto; display: block; }
.top nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a {
	color: var(--muted); text-decoration: none; white-space: nowrap;
	padding: 8px 11px; border-radius: 6px; font-weight: 500; font-size: 15px;
}
.top nav a:hover { color: var(--text); background: var(--slate); }
.top nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -3px 0 var(--lava); border-radius: 6px 6px 0 0; }
.top .dl { flex: none; }

/* ---------- boutons (blocs en relief, comme dans le jeu) ---------- */
.btn {
	display: inline-flex; align-items: center; gap: 10px;
	font: 600 17px/1 var(--display); letter-spacing: .02em;
	text-decoration: none; cursor: pointer;
	padding: 15px 22px 17px;
	color: #1a0d06; background: var(--lava);
	border: 0; border-radius: 4px;
	box-shadow: inset 0 -5px 0 var(--lava-dark), inset 0 2px 0 #ffa27a;
}
.btn:hover { color: #1a0d06; background: #ff7d45; }
.btn:active { box-shadow: inset 0 -2px 0 var(--lava-dark), inset 0 2px 0 #ffa27a; transform: translateY(2px); }
.btn.small { font-size: 15px; padding: 10px 14px 12px; box-shadow: inset 0 -4px 0 var(--lava-dark), inset 0 2px 0 #ffa27a; }
.btn.stone { color: var(--text); background: var(--stone); box-shadow: inset 0 -5px 0 #1b2131, inset 0 2px 0 #3c4762; }
.btn.stone:hover { background: #313a51; color: var(--text); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- typographie ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: .005em; }
h1 { font-size: clamp(38px, 6vw, 64px); }
h2 { font-size: clamp(28px, 3.6vw, 38px); }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }
.lead { font-size: 19px; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
code, kbd { white-space: nowrap;
	font: 500 .88em/1 ui-monospace, "Cascadia Mono", Consolas, monospace;
	background: var(--stone); border-radius: 4px; padding: 3px 6px;
}
kbd { box-shadow: inset 0 -2px 0 #1b2131; }

main { flex: 1; }
.page-head { padding: 64px 0 34px; }
.page-head p { margin-top: 16px; }
section.block { padding: 40px 0; }
section.block > h2 { margin-bottom: 22px; }

/* ---------- accueil : la coupe de mine ---------- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: 60px 0 56px; }
.hero h1 { max-width: 13ch; }
.hero .lead { margin: 20px 0 30px; }
.hero .meta { color: var(--muted); font-size: 14px; margin-top: 14px; }

.shaft { position: relative; border-radius: 8px; overflow: hidden; border: 2px solid var(--edge); background: var(--slate); }
.layer {
	position: relative; display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 16px;
	padding: 20px 72px 20px 0; min-height: 112px;
	color: var(--text); text-decoration: none;
	background-image:
		linear-gradient(90deg, rgba(0,0,0,.28), rgba(0,0,0,0) 40%),
		var(--rock);
	background-size: auto, 32px 32px;
	border-top: 2px solid rgba(0,0,0,.35);
}
.layer:first-child { border-top: 0; }
.layer .depth {
	align-self: stretch; display: flex; align-items: center; justify-content: center;
	font: 700 15px/1 var(--display); color: rgba(255,255,255,.75);
	border-right: 2px dashed rgba(255,255,255,.18);
}
.layer strong { display: block; font: 700 22px/1.15 var(--display); }
.layer span.what { display: block; color: rgba(238,240,245,.82); font-size: 15px; margin-top: 4px; }
.layer::after {
	content: ""; position: absolute; right: 18px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
	border-right: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: rotate(-45deg);
	opacity: .55; transition: transform .2s, opacity .2s;
}
.layer:hover::after { opacity: 1; transform: translateX(4px) rotate(-45deg); }
.layer:hover { filter: brightness(1.12); }
.layer.grass { --rock: repeating-linear-gradient(0deg, #4f3a26 0 8px, #5c4430 8px 16px); border-top: 8px solid #4caf50; padding-top: 14px; }
.layer.stone { --rock: conic-gradient(from 90deg at 50% 50%, #5d6575 0 25%, #666f80 0 50%, #5d6575 0 75%, #535b6a 0); }
.layer.deep { --rock: conic-gradient(from 90deg at 50% 50%, #353a49 0 25%, #3c4252 0 50%, #353a49 0 75%, #2f3441 0); }
.layer.abyss { --rock: conic-gradient(from 90deg at 50% 50%, #241c36 0 25%, #2b2140 0 50%, #241c36 0 75%, #1f182e 0); }
.ore { position: absolute; width: 8px; height: 8px; box-shadow: 8px 0 0 currentColor, 0 8px 0 currentColor, 8px 8px 0 currentColor; background: currentColor; opacity: .9; pointer-events: none; }
.layer.stone .ore { color: var(--gold); }
.layer.deep .ore { color: var(--diamond); }
.layer.abyss .ore { color: var(--amethyst); }
.lava-floor { height: 26px; background: repeating-linear-gradient(90deg, #ff6a2b 0 18px, #ff8a3c 18px 30px, #e6551d 30px 44px); animation: lava 6s linear infinite; }
@keyframes lava { to { background-position: 44px 0; } }

/* ---------- nouveautés de la version ---------- */
.release {
	display: grid; grid-template-columns: 220px 1fr; gap: 28px;
	background: var(--slate); border: 2px solid var(--stone); border-left: 6px solid var(--gold); border-radius: 6px;
	padding: 26px 28px;
}
.release .v { font: 700 44px/1 var(--display); color: var(--gold); }
.release .v small { display: block; font: 400 14px/1.4 var(--body); color: var(--muted); margin-top: 8px; }
.release ul { margin: 0; padding-left: 20px; }
.release li { margin-bottom: 6px; }
.release li::marker { color: var(--gold); }

/* ---------- étapes ---------- */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.steps > li::before {
	content: counter(s); display: flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; font: 700 20px/1 var(--display); color: var(--deep);
	background: var(--diamond); border-radius: 4px; box-shadow: inset 0 -4px 0 #2a9aa1;
}
.steps > li p { margin: 9px 0 0; }

/* ---------- confiance ---------- */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 2px solid var(--stone); border-radius: 6px; overflow: hidden; }
.trust > div { padding: 22px 24px; background: var(--slate); }
.trust > div + div { border-left: 2px solid var(--stone); }
.trust h3 { font-size: 18px; margin-bottom: 8px; color: var(--emerald); }
.trust p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- fonctionnalités ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.filters button {
	font: 500 15px/1 var(--body); color: var(--muted); cursor: pointer;
	background: var(--slate); border: 2px solid var(--stone); border-radius: 999px; padding: 9px 15px;
	display: inline-flex; align-items: center; gap: 8px;
}
.filters button i { width: 10px; height: 10px; border-radius: 2px; background: var(--c, var(--muted)); }
.filters button[aria-pressed="true"] { color: var(--text); border-color: var(--c, var(--text)); background: var(--stone); }
.group { margin-bottom: 38px; }
.group > h2 { font-size: 26px; display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.group > h2::before { content: ""; width: 14px; height: 14px; background: var(--c); box-shadow: 4px 4px 0 rgba(0,0,0,.35); }
.feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--stone); }
.feats li { padding: 16px 20px 16px 0; border-bottom: 2px solid var(--stone); }
.feats li:nth-child(odd) { padding-right: 32px; }
.feats strong { display: block; font-weight: 600; font-size: 17px; margin-bottom: 3px; }
.feats span { color: var(--muted); font-size: 15px; }
.feats .new { font: 600 12px/1 var(--body); color: var(--deep); background: var(--gold); border-radius: 3px; padding: 3px 6px; margin-left: 8px; vertical-align: 2px; }
[data-cat="minage"] { --c: var(--gold); }
[data-cat="jeux"] { --c: var(--amethyst); }
[data-cat="chat"] { --c: var(--diamond); }
[data-cat="eco"] { --c: var(--emerald); }
[data-cat="outils"] { --c: #c7cfdd; }
[data-cat="affichage"] { --c: var(--redstone); }

/* ---------- pages de jeu (idle, TCG) ---------- */
.descent { list-style: none; margin: 0; padding: 0; border-left: 4px solid var(--edge); }
.descent li { position: relative; padding: 0 0 26px 30px; }
.descent li::before { content: ""; position: absolute; left: -10px; top: 6px; width: 16px; height: 16px; background: var(--c, var(--gold)); box-shadow: inset 0 -3px 0 rgba(0,0,0,.3); }
.descent li:last-child { padding-bottom: 0; }
.descent h3 { margin-bottom: 6px; }
.descent p { margin: 0; color: var(--muted); max-width: 66ch; }
.cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 40px; }
.cols > div h3 { font-size: 19px; margin-bottom: 6px; }
.cols > div p { color: var(--muted); margin: 0; font-size: 16px; }
.note { background: var(--slate); border: 2px solid var(--stone); border-radius: 6px; padding: 18px 22px; color: var(--muted); }
.note strong { color: var(--text); }
.rarities { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 8px; }
.rarities li { font: 600 15px/1 var(--display); padding: 9px 12px; border-radius: 4px; background: var(--slate); border: 2px solid var(--c); color: var(--c); }
.facts { display: flex; flex-wrap: wrap; gap: 14px 34px; margin: 26px 0 0; }
.facts div { font-size: 15px; color: var(--muted); }
.facts b { display: block; font: 700 30px/1.1 var(--display); color: var(--text); }

/* ---------- questions ---------- */
details { border-bottom: 2px solid var(--stone); padding: 4px 0; }
details summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font: 700 22px/1 var(--display); color: var(--lava); }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); margin: 0 0 14px; max-width: 70ch; }

/* ---------- journal des versions ---------- */
.log { display: grid; gap: 22px; }
.log article { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding-bottom: 22px; border-bottom: 2px solid var(--stone); }
.log h2 { font-size: 30px; color: var(--gold); }
.log time { display: block; color: var(--muted); font-size: 14px; margin-top: 6px; }
.log ul { margin: 0; padding-left: 20px; }
.log li { margin-bottom: 6px; }

/* ---------- pied de page ---------- */
footer { border-top: 2px solid var(--stone); margin-top: 60px; padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 30px; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

/* ---------- petits écrans ---------- */
@media (max-width: 880px) {
	.hero { grid-template-columns: 1fr; gap: 36px; padding-top: 40px; }
	.release { grid-template-columns: 1fr; gap: 14px; }
	.trust { grid-template-columns: 1fr; }
	.trust > div + div { border-left: 0; border-top: 2px solid var(--stone); }
	.feats, .cols { grid-template-columns: 1fr; }
	.feats li:nth-child(odd) { padding-right: 0; }
	.log article { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 640px) {
	body { font-size: 16px; }
	.top .wrap { height: auto; flex-wrap: wrap; gap: 6px 14px; padding-top: 10px; padding-bottom: 6px; }
	.top nav { order: 3; flex-basis: 100%; margin: 0 -8px; }
	.top .dl { margin-left: auto; }
	.logo-svg { width: 150px; }
	.layer { grid-template-columns: 56px 1fr; min-height: 96px; }
	.layer strong { font-size: 19px; }
	.page-head { padding: 40px 0 20px; }
}
