/* VALDORA ONLINE — site stylesheet. Palette of the game's UI: night blue + gold, parchment text. */
:root {
	--night: #0d1220;
	--ink: #151c30;
	--ink-2: #1d2742;
	--line: #2c3a5e;
	--gold: #e6c068;
	--gold-2: #f3dc9a;
	--text: #ece5d3;
	--muted: #a7a191;
	--green: #6fcf8a;
	--red: #e07060;
	--radius: 10px;
	--wrap: 1120px;
	--serif: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--night); color: var(--text); font: 16px/1.6 var(--sans); }
a { color: var(--gold-2); }
a:hover { color: #fff3c8; }
img { max-width: 100%; height: auto; image-rendering: pixelated; }
h1, h2, h3 { font-family: var(--serif); letter-spacing: .02em; line-height: 1.2; color: var(--gold-2); }
h1 em, .brand em { font-style: normal; color: var(--gold); }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--gold); color: #000; padding: 6px 10px; z-index: 10; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px; padding: 10px 20px;
	background: rgba(13, 18, 32, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font: 600 20px var(--serif); }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--text); }
.top nav a:hover, .top nav a[aria-current="page"] { background: var(--ink-2); color: var(--gold-2); }
.top-right { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.lang { padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; font-size: 14px; }
.status { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.status i { width: 9px; height: 9px; border-radius: 50%; background: #666; display: inline-block; }
.status.on i { background: var(--green); box-shadow: 0 0 8px var(--green); }
.status.off i { background: var(--red); }
.status b { font-weight: 500; }

/* Buttons */
.btn { display: inline-block; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line); background: var(--ink-2);
	color: var(--text); text-decoration: none; font-weight: 600; cursor: pointer; font-size: 15px; transition: transform .12s, background .12s; }
.btn:hover { transform: translateY(-1px); background: #26325a; color: #fff; }
.btn.gold { background: linear-gradient(180deg, #f0cf7a, #c89a3c); color: #1a1406; border-color: #f3dc9a; }
.btn.gold:hover { background: linear-gradient(180deg, #f8dc92, #d5a848); color: #000; }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* Hero */
.hero { position: relative; min-height: min(78vh, 680px); display: flex; align-items: flex-end; overflow: hidden; max-width: none; padding: 0; }
.hero-art { position: absolute; inset: 0; background: #0b1020 url("/img/screens/hero.png") center 45% / cover no-repeat; image-rendering: pixelated; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,18,32,.88) 0%, rgba(13,18,32,.55) 45%, rgba(13,18,32,.1) 75%), linear-gradient(180deg, rgba(13,18,32,0) 55%, var(--night) 100%); }
.hero-text { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 40px 20px 56px; width: 100%; }
.hero h1 { font-size: clamp(42px, 7vw, 84px); margin: 10px 0 6px; text-shadow: 0 3px 0 #000, 0 0 28px rgba(230,192,104,.35); }
.tagline { font: italic 22px var(--serif); color: var(--gold-2); margin: 0 0 10px; }
.hero p { max-width: 640px; text-shadow: 0 1px 2px #000; }
.badge { display: inline-block; padding: 4px 10px; border: 1px solid var(--gold); color: var(--gold); border-radius: 99px; font-size: 13px; background: rgba(13,18,32,.6); }

/* Sections */
section { max-width: var(--wrap); margin: 0 auto; padding: 36px 20px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.feature, .panel { background: linear-gradient(180deg, var(--ink-2), var(--ink)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.feature h2 { font-size: 18px; margin: 6px 0; }
.feature .ico { font-size: 22px; color: var(--gold); }
.class-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.class-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--ink); border-top: 3px solid var(--c, var(--gold)); }
.class-card h3 { margin: 0 0 6px; color: var(--c, var(--gold-2)); }
.class-card p { font-size: 14px; color: var(--muted); margin: 0; }
/* In-game captures of each class in its late set (pixel art: never smoothed). */
.class-portrait { display: block; width: 100%; height: auto; aspect-ratio: 9 / 13; object-fit: cover; image-rendering: pixelated;
	border-radius: calc(var(--radius) - 2px); margin: 0 auto 10px; max-width: 220px; background: #0b0f1a; }
.class-trio { display: block; width: 100%; max-width: 560px; height: auto; image-rendering: pixelated; border: 1px solid var(--line);
	border-radius: var(--radius); margin: 8px 0 14px; background: #0b0f1a; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.shots figure { margin: 0; position: relative; background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
	box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: border-color .2s, box-shadow .2s, transform .2s; }
.shots figure.wide { grid-column: 1 / -1; }
.shots figure:hover { border-color: var(--gold); box-shadow: 0 12px 32px rgba(0,0,0,.5), 0 0 0 1px rgba(230,192,104,.25); transform: translateY(-2px); }
.shots a { display: block; position: relative; overflow: hidden; cursor: zoom-in; }
.shots img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .3s; }
.shots figure:hover img { transform: scale(1.035); filter: brightness(1.06); }
.shots .zoom { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
	background: rgba(13,18,32,.75); color: var(--gold-2); border: 1px solid rgba(230,192,104,.5); font-size: 16px; opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s; }
.shots figure:hover .zoom, .shots a:focus-visible .zoom { opacity: 1; transform: none; }
.shots figcaption { padding: 10px 14px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }

/* Lightbox */
html.lb-lock { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-rows: 1fr auto; visibility: hidden; opacity: 0;
	background: radial-gradient(ellipse at center, rgba(13,18,32,.88), rgba(5,8,15,.97)); backdrop-filter: blur(8px); transition: opacity .25s, visibility .25s; }
.lb.on { visibility: visible; opacity: 1; }
.lb-stage { display: grid; place-items: center; padding: 56px 72px 8px; min-height: 0; }
.lb-img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; border-radius: 8px; border: 1px solid rgba(230,192,104,.35);
	box-shadow: 0 20px 60px rgba(0,0,0,.6); opacity: 0; transform: scale(.96); transition: opacity .3s, transform .35s cubic-bezier(.2,.7,.2,1); image-rendering: pixelated; }
.lb-img.from-l { transform: translateX(-28px); } .lb-img.from-r { transform: translateX(28px); }
.lb-img.in { opacity: 1; transform: none; }
.lb-bar { display: flex; gap: 14px; align-items: baseline; justify-content: center; padding: 12px 20px 22px; text-align: center; }
.lb-cap { margin: 0; font: 18px var(--serif); color: var(--gold-2); }
.lb-count { color: var(--muted); font-size: 13px; letter-spacing: .08em; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; font-size: 28px; line-height: 1;
	color: var(--gold-2); background: rgba(21,28,48,.85); border: 1px solid var(--line); transition: background .15s, border-color .15s, transform .15s; }
.lb-btn:hover { background: var(--ink-2); border-color: var(--gold); transform: scale(1.06); }
.lb-close { top: 14px; right: 16px; font-size: 18px; width: 42px; height: 42px; }
.lb-prev { left: 14px; top: 50%; margin-top: -40px; } .lb-next { right: 14px; top: 50%; margin-top: -40px; }
@media (max-width: 720px) { .lb-stage { padding: 56px 8px 8px; } .lb-prev, .lb-next { top: auto; bottom: 70px; margin: 0; } }
@media (prefers-reduced-motion: reduce) { .lb, .lb-img, .shots img, .shots figure { transition: none; } }
.news article { border-left: 3px solid var(--gold); padding: 4px 14px; margin: 10px 0; }
.news time, .panel time { color: var(--muted); font-size: 13px; }
.notes { margin: 8px 0 4px; padding-left: 20px; }
.notes li { margin: 6px 0; line-height: 1.55; }
.notes li::marker { color: var(--gold); }
.notes strong { color: var(--gold); font-weight: 600; }
.join { text-align: center; }
.join .actions { justify-content: center; }
.page h1 { font-size: 38px; }
.narrow { max-width: 760px; }
.lead { font: 22px var(--serif); color: var(--gold-2); }
.notice { border: 1px dashed var(--gold); border-radius: 8px; padding: 10px 14px; color: var(--gold-2); background: rgba(230,192,104,.06); }

/* Forms */
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--text); background: #0f1528; border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hp { position: absolute; left: -5000px; }
.ok { color: var(--green); }
.err { color: var(--red); }
details.faq { border-bottom: 1px solid var(--line); padding: 8px 0; }
details.faq summary { cursor: pointer; color: var(--gold-2); }

/* Wiki */
.wiki-head { display: grid; gap: 8px; }
#wiki-search { width: 100%; max-width: 520px; }
.wiki-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.wiki-tabs a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; color: var(--text); font-size: 14px; }
.wiki-tabs a.on { background: var(--gold); color: #1a1406; border-color: var(--gold); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.entry { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); text-decoration: none; color: var(--text); }
.entry:hover { border-color: var(--gold); }
.entry img { width: 48px; height: 48px; object-fit: contain; flex: none; }
.entry small { display: block; color: var(--muted); }
.detail { display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: 20px; align-items: start; }
.detail img.big { width: 100%; max-width: 200px; background: #0f1528; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--gold-2); font-weight: 600; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); margin-right: 4px; }
.tag.elite { color: #c79bff; border-color: #6e4fa0; }
.tag.boss, .tag.mvp { color: #ff9a5c; border-color: #a0532a; }

.foot { border-top: 1px solid var(--line); padding: 24px 20px; text-align: center; color: var(--muted); font-size: 14px; }
@media (max-width: 720px) {
	.top { gap: 8px; }
	.top-right { margin-left: 0; width: 100%; justify-content: space-between; }
	.detail { grid-template-columns: 1fr; }
	.hero { min-height: 70vh; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* Wiki — database layout (categories → A–Z index → entry page) */
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.crumbs a { text-decoration: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tile { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto 1fr; column-gap: 14px; padding: 16px; text-decoration: none; color: var(--text);
	border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--ink-2), var(--ink)); transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--text); }
.tile img, .tile .ph { grid-row: 1 / 4; width: 56px; height: 56px; object-fit: contain; }
.tile b { font: 600 18px var(--serif); color: var(--gold-2); }
.tile .n { color: var(--gold); font-size: 13px; }
.tile span { font-size: 14px; color: var(--muted); margin-top: 4px; }
.ph { display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 8px; font: 600 20px var(--serif); font-style: normal;
	color: var(--c, var(--gold)); background: #0f1528; border: 1px solid var(--line); }
.big.ph { width: 100%; max-width: 200px; aspect-ratio: 1; font-size: 64px; }
.entry { border-left: 3px solid var(--c, var(--line)); }
.db .filters { align-items: center; }
.db .count { margin-left: auto; font-size: 14px; }
.az { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 4px; position: sticky; top: 58px; z-index: 2; padding: 6px 0; background: var(--night); }
.az a { min-width: 30px; text-align: center; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; font: 600 14px var(--serif); }
.az a:hover { background: var(--gold); color: #1a1406; border-color: var(--gold); }
h3.letter { margin: 22px 0 10px; padding-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 22px; scroll-margin-top: 110px; }
.detail .tags { margin: 0 0 10px; }
.detail-art { position: sticky; top: 80px; }
.detail .desc { font-size: 16px; }
.box { padding: 14px 16px; margin: 14px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink); max-width: none; }
.box h3 { margin: 0 0 10px; font-size: 17px; }
.box .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
table.kv th { width: 45%; color: var(--muted); font-weight: 500; }
table.kv td { color: var(--text); font-weight: 600; }
td.ico { width: 40px; }
td.ico img { width: 32px; height: 32px; object-fit: contain; display: block; }
.effect { font-size: 17px; color: var(--gold-2); margin: 0 0 6px; }
.bonus { margin: 0; padding-left: 18px; }
.bonus li { margin: 4px 0; }
.tag.gold { color: var(--gold); border-color: var(--gold); }
a.class-card { text-decoration: none; color: var(--text); }
a.class-card:hover { border-color: var(--c); }
@media (max-width: 720px) { .detail-art { position: static; } .az { top: 0; } }

.rolls td, .rolls th { white-space: nowrap; text-align: center; }
.rolls td:first-child, .rolls th:first-child { text-align: left; }
.scroll-x { overflow-x: auto; }
.box select { margin: 0 0 10px; }
.src { margin: 0 0 6px; }
.src ul { margin: 4px 0 12px; padding-left: 18px; }

/* Wiki — database tables (sortable) and drop sheets */
table.dbt { margin-top: 6px; }
table.dbt th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
table.dbt th.sortable:hover { color: #fff3c8; }
table.dbt th.asc::after { content: " ▲"; font-size: 10px; }
table.dbt th.desc::after { content: " ▼"; font-size: 10px; }
table.dbt tr.rowlink { cursor: pointer; }
table.dbt tr.rowlink:hover td { background: rgba(230,192,104,.06); }
table.dbt td { vertical-align: middle; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.wrap { min-width: 220px; }
.nm { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
img.tico { width: 32px; height: 32px; object-fit: contain; flex: none; }
i.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.db .filters input[type=search] { min-width: 200px; flex: 1 1 200px; max-width: 320px; }
.sheet { margin: 0 0 14px; }
.sheet > p { margin: 0 0 6px; }
table.drops summary { cursor: pointer; color: var(--gold-2); }
.pieces { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 4px; font-size: 14px; }
.pieces a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.pieces img.tico { width: 24px; height: 24px; }
.box details { margin: 4px 0; }
.box details > summary { cursor: pointer; font-weight: 600; color: var(--gold-2); }
.detail.noart { grid-template-columns: 1fr; }
/* Premium shop (2026-10-18) */
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 12px 0 8px; }
.pack { text-align: center; display: flex; flex-direction: column; gap: 6px; }
.pack .amount { font-size: 22px; color: var(--gold); font-weight: 700; margin: 4px 0 0; }
.pack .bonus { color: #8fd18f; margin: 0; font-size: 14px; }
.pack .price { font-size: 18px; margin: 4px 0 8px; }
.cosmetics { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 10px 0; }
.cos .price { color: var(--gold); margin: 6px 0 0; }
.policy p { margin: 8px 0; line-height: 1.55; }

/* Talents v2 (2026-10-22): maluses in red, talent behaviours in turquoise, typical builds as cards. */
.malus { color: #ff6b6b; }
.beh { color: #4fd1c5; }
.grid > .card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.grid > .card h4 { margin: 0 0 6px; }
.grid > .card code { word-break: break-all; font-size: 12px; }
/* PvP 3v3 classé (wiki, 2026-10-22): pixel art kept crisp, map schematics at a readable width, a short table. */
img.px { image-rendering: pixelated; vertical-align: middle; }
img.schema { display: block; max-width: 100%; width: 320px; margin: 8px 0; border-radius: 6px; border: 1px solid var(--line); }
table.tbl { width: auto; min-width: 260px; margin: 6px 0 10px; }

/* Mission 08 : animation d'un sort capturée en jeu (4 temps), pixels nets */
.spell-anim { margin: 12px 0; }
.spell-anim img { display: block; width: 100%; max-width: 960px; height: auto; image-rendering: pixelated; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink); }
.spell-anim figcaption { font-size: .85em; margin-top: 4px; }
