/* =================================================================================
   SkyCubs — feuille de style commune
   Direction : "îles flottantes au crépuscule" — un ciel dégradé chaud (crépuscule) qui
   s'assombrit vers un violet-nuit profond, des cubes isométriques dessinés en CSS pur
   comme motif de marque (pas d'image, pas d'icône générique), une typographie ronde et
   affirmée pour les titres.
   ================================================================================= */

:root {
	--sky-1: #ffb974;
	--sky-2: #e8724f;
	--sky-3: #6a3f6b;
	--sky-4: #241a3d;

	--bg: #150f22;
	--bg-elevated: #1c1530;
	--bg-card: #211934;
	--bg-card-hover: #2a2040;
	--border: rgba(255, 244, 230, 0.09);
	--border-strong: rgba(255, 244, 230, 0.18);

	--gold: #ffb454;
	--gold-soft: rgba(255, 180, 84, 0.14);
	--gold-dark: #b4671f;
	--teal: #5fd3c4;
	--teal-soft: rgba(95, 211, 196, 0.14);
	--plum: #7a5cff;
	--plum-soft: rgba(122, 92, 255, 0.16);

	--text: #f7efe6;
	--text-muted: #b3a4c4;
	--text-faint: #6f6289;

	--success: #7be495;
	--danger: #ff8272;

	--radius: 18px;
	--radius-sm: 12px;
	--container: 1140px;

	--font-display: "Baloo 2", "Manrope", system-ui, sans-serif;
	--font-body: "Manrope", system-ui, -apple-system, sans-serif;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	line-height: 1.65;
	overflow-x: hidden;
}

a {
	color: inherit;
}

img {
	max-width: 100%;
	display: block;
}

.container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
}

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 700;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

::selection {
	background: var(--gold);
	color: #1a1206;
}

svg {
	display: block;
}

/* ---------------------------------------------------------------------------------
   CUBE ISOMÉTRIQUE — motif de marque, 100% CSS (aucune image). 3 losanges assemblés :
   dessus (clair), face droite (dorée), face gauche (sombre) — donne l'illusion 3D.
   Réutilisé comme logo (petit) et comme illustration de hero (grand, flottant).
   --------------------------------------------------------------------------------- */
.iso-cube {
	position: relative;
	width: var(--cube-size, 40px);
	height: calc(var(--cube-size, 40px) * 1.15);
}

.iso-cube .face {
	position: absolute;
}

.iso-cube .top {
	width: 100%;
	height: 58%;
	top: 0;
	left: 0;
	background: linear-gradient(135deg, #ffe3b0, var(--gold));
	clip-path: polygon(50% 0%, 100% 25%, 50% 50%, 0% 25%);
}

.iso-cube .left {
	width: 50%;
	height: 65%;
	top: 25%;
	left: 0;
	background: linear-gradient(160deg, var(--plum), #3d2a70);
	clip-path: polygon(0 0, 100% 25%, 100% 100%, 0 75%);
}

.iso-cube .right {
	width: 50%;
	height: 65%;
	top: 25%;
	left: 50%;
	background: linear-gradient(200deg, var(--gold), var(--gold-dark));
	clip-path: polygon(0 25%, 100% 0, 100% 75%, 0 100%);
}

.cube-float {
	position: absolute;
	animation: floaty 7s ease-in-out infinite;
	filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}

@keyframes floaty {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-18px); }
}

/* ---------------------------------------------------------------------------------
   NAVIGATION
   --------------------------------------------------------------------------------- */
.nav {
	position: sticky;
	top: 0;
	z-index: 100;
	padding: 16px 0;
	background: rgba(21, 15, 34, 0.72);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--border);
}

.nav .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--font-display);
	font-size: 21px;
	font-weight: 700;
	text-decoration: none;
	color: var(--text);
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 6px;
}

.nav-links a {
	text-decoration: none;
	color: var(--text-muted);
	font-size: 15px;
	font-weight: 600;
	padding: 9px 16px;
	border-radius: 999px;
	transition: color .2s ease, background .2s ease;
}

.nav-links a:hover {
	color: var(--text);
	background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
	color: var(--sky-4);
	background: var(--gold);
}

.nav-cta {
	color: var(--sky-4) !important;
	background: var(--teal) !important;
	font-weight: 700 !important;
}

.nav-cta:hover {
	filter: brightness(1.08);
}

.beta-tag {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--sky-4);
	background: var(--gold);
	padding: 3px 9px;
	border-radius: 999px;
	margin-left: 2px;
	font-family: var(--font-body);
}

/* ---------------------------------------------------------------------------------
   HERO (accueil) — 2 colonnes asymétriques : texte à gauche, cubes flottants à droite.
   --------------------------------------------------------------------------------- */
.hero {
	position: relative;
	padding: 90px 0 60px;
	overflow: hidden;
}

.hero::before {
	content: "";
	position: absolute;
	inset: -30% -10% auto -10%;
	height: 720px;
	background:
		radial-gradient(closest-side, rgba(255, 185, 116, 0.22), transparent 70%),
		radial-gradient(closest-side, rgba(122, 92, 255, 0.16), transparent 70%);
	background-position: 15% 10%, 85% 30%;
	background-size: 60% 100%, 55% 100%;
	background-repeat: no-repeat;
	pointer-events: none;
	z-index: 0;
}

.hero .container {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 40px;
	align-items: center;
}

@media (max-width: 900px) {
	.hero .container {
		grid-template-columns: 1fr;
	}
}

.hero-art {
	position: relative;
	height: 340px;
	display: flex;
	align-items: center;
	justify-content: center;
}

@media (max-width: 900px) {
	.hero-art {
		height: 220px;
		order: -1;
	}
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 700;
	color: var(--sky-4);
	background: var(--gold);
	padding: 7px 16px;
	border-radius: 999px;
	margin-bottom: 26px;
}

.eyebrow .dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--sky-4);
	animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: .35; }
}

.hero h1 {
	font-size: clamp(38px, 5.4vw, 62px);
	line-height: 1.05;
}

.hero h1 span {
	color: var(--gold);
}

.hero .lede {
	max-width: 520px;
	margin: 20px 0 0;
	font-size: 18px;
	color: var(--text-muted);
}

.hero-actions {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
	margin-top: 34px;
}

.page-hero {
	padding: 76px 0 54px;
	text-align: center;
	position: relative;
}

.page-hero::before {
	content: "";
	position: absolute;
	inset: -20% 20% auto 20%;
	height: 420px;
	background: radial-gradient(closest-side, rgba(255, 185, 116, 0.18), transparent 70%);
	pointer-events: none;
}

.page-hero > * {
	position: relative;
}

.page-hero h1 {
	font-size: clamp(32px, 4.6vw, 48px);
}

.page-hero .lede {
	max-width: 620px;
	margin: 16px auto 0;
	color: var(--text-muted);
	font-size: 17px;
}

/* ---------------------------------------------------------------------------------
   BOUTONS
   --------------------------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 15px 28px;
	border-radius: 14px;
	font-weight: 700;
	font-size: 15.5px;
	text-decoration: none;
	border: 1px solid transparent;
	transition: transform .2s ease, filter .2s ease, background .2s ease;
	cursor: pointer;
	font-family: var(--font-body);
}

.btn:hover {
	transform: translateY(-2px);
}

.btn-primary {
	color: #1a1206;
	background: linear-gradient(135deg, #ffd39a, var(--gold));
	box-shadow: 0 12px 28px -12px rgba(255, 180, 84, 0.6);
}

.btn-primary:hover {
	filter: brightness(1.05);
}

.btn-secondary {
	color: var(--text);
	background: rgba(255, 255, 255, 0.04);
	border-color: var(--border-strong);
}

.btn-secondary:hover {
	background: rgba(255, 255, 255, 0.08);
}

.btn-discord {
	color: #fff;
	background: #5865F2;
	box-shadow: 0 12px 28px -12px rgba(88, 101, 242, 0.65);
}

/* ---------------------------------------------------------------------------------
   SECTIONS / TITRES
   --------------------------------------------------------------------------------- */
section {
	padding: 84px 0;
}

section + section {
	border-top: 1px solid var(--border);
}

.section-head {
	max-width: 620px;
	margin: 0 0 48px;
}

.section-head.center {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.section-head .eyebrow {
	margin-bottom: 16px;
}

.section-head h2 {
	font-size: clamp(26px, 3.6vw, 36px);
}

.section-head p {
	margin-top: 14px;
	color: var(--text-muted);
	font-size: 16px;
}

/* ---------------------------------------------------------------------------------
   ICONES (SVG monoline maison, pas d'émoji, pas de librairie externe)
   --------------------------------------------------------------------------------- */
.icon-badge {
	width: 46px;
	height: 46px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 18px;
}

.icon-badge svg {
	width: 22px;
	height: 22px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.icon-badge.gold { background: var(--gold-soft); color: var(--gold); }
.icon-badge.teal { background: var(--teal-soft); color: var(--teal); }
.icon-badge.plum { background: var(--plum-soft); color: var(--plum); }

/* ---------------------------------------------------------------------------------
   CARTES
   --------------------------------------------------------------------------------- */
.grid {
	display: grid;
	gap: 20px;
}

.grid-3 {
	grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
	grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
	.grid-3, .grid-2 {
		grid-template-columns: 1fr;
	}
}

.card {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-top: 3px solid var(--card-accent, var(--gold));
	border-radius: var(--radius);
	padding: 28px;
	transition: transform .25s ease, background .25s ease, border-color .25s ease;
}

.card:hover {
	transform: translateY(-4px);
	background: var(--bg-card-hover);
}

.card h3 {
	font-size: 19px;
	margin-bottom: 10px;
}

.card p {
	color: var(--text-muted);
	font-size: 15px;
}

/* ---------------------------------------------------------------------------------
   CALLOUTS / BOITES D'INFO
   --------------------------------------------------------------------------------- */
.callout {
	display: flex;
	gap: 18px;
	align-items: flex-start;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-left: 3px solid var(--teal);
	border-radius: var(--radius-sm);
	padding: 22px 26px;
	margin: 28px 0;
}

.callout.warn {
	border-left-color: var(--gold);
}

.callout .icon-badge {
	margin-bottom: 0;
	flex-shrink: 0;
}

.callout h4 {
	font-size: 16px;
	margin-bottom: 6px;
}

.callout p {
	color: var(--text-muted);
	font-size: 15px;
}

/* ---------------------------------------------------------------------------------
   WIKI — hub des catégories + navigation entre pages
   --------------------------------------------------------------------------------- */
.wiki-hub-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.wiki-hub-card .go {
	margin-top: auto;
	padding-top: 16px;
	font-size: 14px;
	font-weight: 700;
	color: var(--card-accent, var(--gold));
	display: flex;
	align-items: center;
	gap: 6px;
}

.wiki-cat-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 40px;
}

.wiki-cat-nav a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	color: var(--text-muted);
	background: var(--bg-card);
	border: 1px solid var(--border);
	padding: 9px 16px;
	border-radius: 999px;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.wiki-cat-nav a:hover {
	background: var(--bg-card-hover);
	color: var(--text);
}

.wiki-cat-nav a.active {
	background: var(--gold);
	border-color: var(--gold);
	color: #1a1206;
}

.wiki-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: var(--text-muted);
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 22px;
	transition: color .2s ease;
}

.wiki-back:hover {
	color: var(--gold);
}

.wiki-back svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.stat-strip {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 14px;
	margin: 28px 0;
}

.stat-box {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 16px 18px;
}

.stat-box .n {
	font-family: var(--font-display);
	font-size: 22px;
	color: var(--gold);
	display: block;
}

.stat-box .l {
	font-size: 13px;
	color: var(--text-muted);
}

.cmd-table {
	width: 100%;
	border-collapse: collapse;
	margin: 18px 0 28px;
	font-size: 14.5px;
}

.cmd-table th {
	text-align: left;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--text-faint);
	padding: 0 14px 10px;
	border-bottom: 1px solid var(--border-strong);
}

.cmd-table td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--border);
	vertical-align: top;
	color: var(--text-muted);
}

.cmd-table td:first-child {
	white-space: nowrap;
	color: var(--gold);
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 13.5px;
}

.cmd-table tr:last-child td {
	border-bottom: none;
}

.rank-chain {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 18px 0 28px;
}

.rank-chain .step {
	background: var(--bg-card);
	border: 1px solid var(--border-strong);
	border-radius: 999px;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 700;
	color: var(--text);
}

.rank-chain .arrow {
	color: var(--text-faint);
}

/* ---------------------------------------------------------------------------------
   WIKI — mise en page article (sommaire + contenu)
   --------------------------------------------------------------------------------- */
.wiki-layout {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 48px;
	align-items: start;
}

@media (max-width: 900px) {
	.wiki-layout {
		grid-template-columns: 1fr;
	}
}

.wiki-toc {
	position: sticky;
	top: 90px;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px;
}

.wiki-toc h4 {
	font-family: var(--font-body);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--text-faint);
	margin-bottom: 12px;
	font-weight: 700;
}

.wiki-toc a {
	display: block;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--text-muted);
	text-decoration: none;
	transition: background .2s ease, color .2s ease;
}

.wiki-toc a:hover {
	background: rgba(255, 255, 255, 0.05);
	color: var(--text);
}

.wiki-article h2 {
	font-size: 25px;
	margin: 54px 0 16px;
	padding-top: 8px;
	scroll-margin-top: 96px;
}

.wiki-article h2:first-child {
	margin-top: 0;
}

.wiki-article h3 {
	font-size: 18px;
	margin: 24px 0 10px;
	color: var(--gold);
	font-family: var(--font-body);
	font-weight: 700;
}

.wiki-article p {
	color: var(--text-muted);
	margin-bottom: 14px;
	font-size: 15.5px;
}

.wiki-article ul, .wiki-article ol {
	color: var(--text-muted);
	margin: 0 0 14px 22px;
	font-size: 15.5px;
}

.wiki-article li {
	margin-bottom: 6px;
}

.wiki-article strong {
	color: var(--text);
}

.wiki-article code {
	background: rgba(255, 255, 255, 0.08);
	color: var(--gold);
	padding: 2px 7px;
	border-radius: 6px;
	font-size: .9em;
	font-family: "JetBrains Mono", ui-monospace, monospace;
}

.tag-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin: 10px 0 20px;
}

.tag {
	font-size: 12.5px;
	font-weight: 700;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--plum-soft);
	color: #b6a8ff;
}

/* ---------------------------------------------------------------------------------
   FOOTER
   --------------------------------------------------------------------------------- */
footer {
	border-top: 1px solid var(--border);
	padding: 36px 0;
}

footer .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
}

footer .foot-links {
	display: flex;
	gap: 22px;
}

footer .foot-links a {
	text-decoration: none;
	color: var(--text-muted);
	font-size: 14px;
	font-weight: 600;
	transition: color .2s ease;
}

footer .foot-links a:hover {
	color: var(--text);
}

footer .copy {
	color: var(--text-faint);
	font-size: 14px;
}

/* ---------------------------------------------------------------------------------
   PAGE DE CONNEXION (clé d'accès)
   --------------------------------------------------------------------------------- */
.auth-wrap {
	min-height: calc(100vh - 140px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
	position: relative;
}

.auth-wrap::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 18% 25%, rgba(255, 185, 116, 0.16), transparent 45%),
		radial-gradient(circle at 82% 75%, rgba(122, 92, 255, 0.18), transparent 45%);
	pointer-events: none;
}

.auth-card {
	position: relative;
	width: 100%;
	max-width: 420px;
	background: var(--bg-card);
	border: 1px solid var(--border-strong);
	border-radius: 22px;
	padding: 44px 38px;
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.65);
}

.auth-icon {
	width: 60px;
	height: 60px;
	margin: 0 auto 22px;
}

.auth-card h1 {
	font-size: 25px;
	text-align: center;
}

.auth-card .lede {
	text-align: center;
	color: var(--text-muted);
	font-size: 14.5px;
	margin: 10px 0 30px;
}

.field {
	margin-bottom: 18px;
}

.field label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: var(--text-muted);
	margin-bottom: 8px;
	letter-spacing: .02em;
}

.key-input {
	width: 100%;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--border-strong);
	color: var(--text);
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 16px;
	letter-spacing: .12em;
	padding: 15px 16px;
	border-radius: var(--radius-sm);
	transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.key-input::placeholder {
	color: var(--text-faint);
	letter-spacing: normal;
	font-family: var(--font-body);
}

.key-input:focus {
	outline: none;
	border-color: var(--gold);
	background: rgba(255, 255, 255, 0.06);
	box-shadow: 0 0 0 4px var(--gold-soft);
}

.auth-submit {
	width: 100%;
	justify-content: center;
	border: none;
	font-size: 16px;
}

.auth-status {
	margin-top: 16px;
	text-align: center;
	font-size: 14px;
	min-height: 20px;
	color: var(--text-muted);
	font-weight: 600;
}

.auth-status.shake {
	animation: shake .4s ease;
	color: var(--danger);
}

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	20% { transform: translateX(-6px); }
	40% { transform: translateX(6px); }
	60% { transform: translateX(-4px); }
	80% { transform: translateX(4px); }
}

.auth-foot {
	text-align: center;
	margin-top: 26px;
	font-size: 13.5px;
	color: var(--text-faint);
}

.auth-foot a {
	color: var(--gold);
	text-decoration: none;
	font-weight: 700;
}

.auth-foot a:hover {
	text-decoration: underline;
}
