@font-face { font-family: 'MinecraftPix'; src: url('fonts/Minecraft.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'MinecraftPix'; src: url('fonts/Minecraft-Bold.otf') format('opentype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('fonts/barlow-normal-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('fonts/barlow-normal-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('fonts/barlow-italic-400.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
/* ============================================================
   INFERIUM — Traveller's Codex v2
   100 % dans la DA de la page CurseForge : bannieres webp
   animees, or braise, creme, braises. Hierarchie typo :
   pixel (Silkscreen) = identite/H1 SEULEMENT ; Cinzel = titres
   d'apparat ; Vollkorn = lecture. Fond rechauffe, bandes
   alternees, images explicatives.
   ============================================================ */


:root {
  --ink: #131017;
  --band: #1a1420;
  --panel: #211a26;
  --panel-2: #281f2e;
  --gold: #e4a060;
  --gold-bright: #ffce50;
  --gold-deep: #96682c;
  --cream: #f0e6d0;
  --cream-dim: #c3b49a;
  --blood: #e25860;
  --ember: #ff9e34;
  --line: rgba(228, 160, 96, .28);
  --maxw: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: 'Barlow', 'Bahnschrift', Arial, sans-serif;
  font-size: 20px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* -------- atmosphere -------- */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(110% 80% at 50% 115%, rgba(255,130,45,.16), transparent 55%),
    radial-gradient(90% 60% at 50% -10%, rgba(255,158,52,.07), transparent 60%),
    radial-gradient(150% 130% at 50% 50%, transparent 60%, rgba(0,0,0,.5) 100%);
}
body::after {
  content: ''; position: fixed; inset: -50%; z-index: -1; pointer-events: none; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  animation: grain 1.1s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0,0) } 25% { transform: translate(-2%,1%) }
  50% { transform: translate(1%,-2%) } 75% { transform: translate(-1%,2%) } 100% { transform: translate(2%,-1%) }
}
.embers { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.embers i {
  position: absolute; bottom: -12px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ffd9a0, var(--ember) 55%, transparent 75%);
  opacity: 0; animation: rise linear infinite; filter: blur(.4px);
}
@keyframes rise {
  0% { transform: translate(0,0) scale(1); opacity: 0 }
  8% { opacity: .85 } 60% { opacity: .5 }
  100% { transform: translate(var(--drift,30px),-108vh) scale(.45); opacity: 0 }
}

/* ------------------------------- typographie ------------------------------- */
h1 {
  font-family: 'MinecraftPix', monospace;
  color: var(--gold);
  font-size: clamp(30px, 5vw, 54px);
  letter-spacing: .03em; text-transform: uppercase; line-height: 1.2;
  text-shadow: 2px 2px 0 #17100a, 4px 4px 0 rgba(0,0,0,.5), 0 0 40px rgba(255,158,52,.3);
}
h2 {
  font-family: 'MinecraftPix', monospace; font-weight: 700;
  color: var(--gold-bright);
  font-size: clamp(26px, 3.4vw, 40px);
  letter-spacing: .06em; line-height: 1.2;
  text-shadow: 2px 2px 0 #17100a, 3px 3px 0 rgba(0,0,0,.45);
}
h3 {
  font-family: 'MinecraftPix', monospace; font-weight: 700;
  color: var(--gold-bright); font-size: 22px; letter-spacing: .04em;
}
.px { font-family: 'MinecraftPix', monospace; text-transform: uppercase; }
.kicker {
  font-family: 'Barlow', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: .28em;
  color: var(--cream-dim); text-transform: uppercase;
}
.kicker .dot { color: var(--blood); }
em { color: var(--gold-bright); font-style: italic; }
strong { color: var(--gold-bright); font-weight: 600; }
a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(228,160,96,.35); transition: color .2s, border-color .2s; }
a:hover { color: var(--gold-bright); border-color: var(--gold-bright); }

/* ornement sous H2 : filet + losange */
.orn { position: relative; height: 16px; margin: 12px auto 0; max-width: 380px; }
.orn::before {
  content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.orn::after {
  content: ''; position: absolute; left: 50%; top: 2px; width: 12px; height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--gold-bright); box-shadow: 0 0 14px rgba(255,206,80,.7);
}
.orn.left { margin-left: 0; }
.orn.left::before { right: 30%; }
.orn.left::after { left: 0; transform: rotate(45deg); }

/* ------------------------------- structure ------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }
section { padding: 64px 0; }
section.band {
  background: linear-gradient(180deg, var(--band), #16111b 85%);
  border-top: 1px solid rgba(228,160,96,.14);
  border-bottom: 1px solid rgba(228,160,96,.14);
}
.center { text-align: center; }

/* ------------------------------- nav ------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(#17111af8, #150f18e8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(228,160,96,.35);
}
.nav::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold-bright) 50%, var(--gold) 80%, transparent);
  opacity: .8;
}
.nav .wrap { display: flex; align-items: center; gap: 2px; height: 66px; }
.nav .brand {
  font-family: 'MinecraftPix', monospace; font-weight: 700; font-size: 14px;
  color: var(--gold-bright); border: none; margin-right: auto; white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}
.nav .brand img { height: 22px; image-rendering: pixelated; }
.nav a.tab {
  font-family: 'Barlow', sans-serif; font-weight: 600; font-size: 14.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--cream-dim); border: none; padding: 8px 10px; border-radius: 6px;
  transition: all .2s; white-space: nowrap;
}
.nav a.tab { position: relative; }
.nav a.tab::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform: scaleX(0); transform-origin: center; transition: transform .25s ease;
}
.nav a.tab:hover { color: var(--gold-bright); }
.nav a.tab:hover::after { transform: scaleX(1); }
.nav a.tab.on { color: var(--gold-bright); }
.nav a.tab.on::after { transform: scaleX(1); box-shadow: 0 0 10px rgba(255,206,80,.6); }
@media (max-width: 980px) { .nav a.tab { display: none } .nav a.tab.always { display: inline-block } }

/* ------------------------------- bannieres (DA de la description) ------------------------------- */
.banner { margin: 34px auto 0; max-width: var(--maxw); padding: 0 28px; position: relative; z-index: 1; }
.banner img {
  width: 100%; display: block; border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 44px rgba(255,158,52,.08);
}
.banner.frameless img { box-shadow: 0 18px 50px rgba(0,0,0,.5); }

/* figure explicative */
.figure { margin: 30px 0; }
.figure img {
  width: 100%; display: block; border-radius: 4px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.figure figcaption {
  margin-top: 12px; text-align: center; font-size: 17px; color: var(--cream-dim);
  font-style: italic;
}
.figure.half { max-width: 640px; }

/* apparitions */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------- hero ------------------------------- */
.hero { padding: 56px 0 56px; text-align: center; position: relative; }
.hero .sig { width: 120px; image-rendering: pixelated; margin: 18px 0 6px;
  filter: drop-shadow(0 0 26px rgba(255,206,80,.4)); }
.hero p.lede { max-width: 760px; margin: 20px auto 0; font-size: 22px; }

/* ------------------------------- cartes ------------------------------- */
.grid { display: grid; gap: 24px; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 940px) { .grid.c3 { grid-template-columns: repeat(2,1fr) } }
@media (max-width: 680px) { .grid.c3, .grid.c2 { grid-template-columns: 1fr } }

.card {
  position: relative;
  background: linear-gradient(160deg, var(--panel-2), var(--panel) 65%);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 26px 26px 24px;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,206,80,.6);
  box-shadow: 0 18px 44px rgba(0,0,0,.5), 0 0 34px rgba(255,158,52,.14);
}
.card .num { position: absolute; top: 14px; right: 18px; font-family: 'MinecraftPix', monospace;
  font-weight: 700; font-size: 24px; color: rgba(228,160,96,.35); }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 17.5px; color: var(--cream-dim); }
.card p.tagline { color: var(--cream); font-style: italic; }
.card a.go, a.card .go {
  display: inline-block; margin-top: 14px; font-family: 'Barlow', sans-serif; font-weight: 600;
  font-size: 13.5px; letter-spacing: .1em; text-transform: uppercase; border: none; color: var(--gold-bright);
}
.card a.go::after, a.card .go::after { content: ' »'; }
a.card { display: block; color: inherit; }

/* ------------------------------- fiche boss ------------------------------- */
.boss {
  display: grid; grid-template-columns: 240px 1fr; gap: 30px;
  background: linear-gradient(150deg, var(--panel-2), var(--panel) 55%);
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  margin: 30px 0; position: relative;
}
@media (max-width: 780px) { .boss { grid-template-columns: 1fr } }
.boss::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border: 1px solid transparent;
  background: linear-gradient(120deg, transparent 30%, rgba(255,206,80,.4) 50%, transparent 70%) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  background-size: 300% 100%;
  animation: sheen 6s linear infinite;
}
@keyframes sheen { to { background-position: 300% 0 } }
.boss .portrait {
  min-height: 220px; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(70% 60% at 50% 60%, rgba(255,158,52,.18), transparent 72%),
    linear-gradient(160deg, #2a1f30, #171019);
  border-right: 1px solid var(--line); position: relative;
}
@media (max-width: 780px) { .boss .portrait { border-right: none; border-bottom: 1px solid var(--line) } }
.medallion {
  width: 132px; height: 132px; border-radius: 50%; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 38% 32%, #35283c, #1c1420 70%);
  border: 3px solid var(--gold-deep);
  box-shadow: 0 0 0 3px #140f18, 0 0 0 4px rgba(255,206,80,.5), 0 0 34px rgba(255,158,52,.35), inset 0 0 26px rgba(0,0,0,.6);
  animation: float 5s ease-in-out infinite;
}
.medallion::before {
  content: ''; position: absolute; inset: 7px; border-radius: 50%;
  border: 1px dashed rgba(255,206,80,.4);
}
.medallion span {
  font-family: 'MinecraftPix', monospace; font-weight: 700; font-size: 44px;
  color: var(--gold-bright); text-shadow: 0 0 22px rgba(255,158,52,.8);
}
.medallion small {
  position: absolute; bottom: 14px; font-family: 'MinecraftPix', monospace;
  font-size: 9px; color: var(--gold); letter-spacing: .15em;
}
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }
.boss .body { padding: 24px 30px 22px 0; }
@media (max-width: 780px) { .boss .body { padding: 0 26px 22px } }
.boss .body h3 { font-size: 26px; margin: 14px 0 2px; }
.boss .body .sub { font-family: 'MinecraftPix', monospace; font-size: 10px; color: var(--blood);
  letter-spacing: .24em; text-transform: uppercase; }
.boss .stat { display: flex; gap: 12px; margin: 13px 0 0; }
.boss .stat b {
  flex: none; font-family: 'MinecraftPix', monospace; font-weight: 700; font-size: 13px; letter-spacing: .1em;
  color: var(--gold); text-transform: uppercase; padding-top: 4px; width: 72px;
}
.boss .stat span { color: var(--cream); font-size: 18px; }
.hp { color: var(--blood); font-weight: 600; }

/* ------------------------------- narration & guides ------------------------------- */
.lore {
  border-left: 3px solid var(--gold-deep); padding: 8px 0 8px 22px; margin: 26px 0;
  font-style: italic; color: var(--cream-dim); font-size: 21px;
}
.steps { counter-reset: step; margin: 22px 0; }
.step { display: flex; gap: 18px; padding: 15px 0; border-bottom: 1px dashed rgba(228,160,96,.18); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: 'MinecraftPix', monospace; font-weight: 700; color: var(--blood); font-size: 22px; padding-top: 2px;
}
.step div { flex: 1; }
.step b { color: var(--gold-bright); font-weight: 600; }

.pills { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.pill {
  font-family: 'Barlow', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: .07em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 8px; color: var(--cream);
  background: rgba(40,31,46,.9); border: 1px solid rgba(228,160,96,.4);
}
.pill.hot { background: var(--gold); color: #1a1206; border-color: transparent; font-weight: 700; }
a.pill { transition: all .2s; }
a.pill:hover { border-color: var(--gold-bright); color: var(--gold-bright); transform: translateY(-2px); }

/* sommaire chips (mods) */
.toc { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px 0 8px; }

footer { border-top: 1px solid var(--line); padding: 44px 0 60px; margin-top: 60px;
  text-align: center; color: var(--cream-dim); font-size: 15px; }
footer .px { font-size: 11px; letter-spacing: .2em; color: var(--gold-deep); }

.progress { position: fixed; top: 0; left: 0; height: 3px; z-index: 60;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  width: 0; box-shadow: 0 0 12px rgba(255,206,80,.5); }


/* ------------------------------- page header compose ------------------------------- */
.ph {
  position: relative; overflow: hidden;
  background:
    radial-gradient(90% 130% at 18% -20%, rgba(255,158,52,.13), transparent 55%),
    radial-gradient(70% 120% at 88% 120%, rgba(226,88,96,.10), transparent 60%),
    linear-gradient(180deg, #1d1622, #151019 90%);
  border-bottom: 1px solid rgba(228,160,96,.30);
}
.ph::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 3px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(228,160,96,.5), transparent);
}
.ph-grid {
  display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: center;
  padding-top: 58px; padding-bottom: 54px;
}
@media (max-width: 880px) { .ph-grid { grid-template-columns: 1fr } .ph-deco { display: none } }
.ph h1 { margin: 14px 0 0; }
.ph .lede { max-width: 640px; margin-top: 18px; font-size: 21px; color: var(--cream); }
.ph-deco { position: relative; display: flex; align-items: center; justify-content: center; }
.ph-deco::before {
  content: ''; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(10,7,12,.85) 30%, transparent 70%);
}
.ph-deco::after {
  content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,168,68,.22), transparent 65%);
  filter: blur(10px);
}
.ph-deco img { position: relative; z-index: 1; width: 250px; image-rendering: pixelated;
  filter: drop-shadow(0 14px 26px rgba(0,0,0,.55)); }

.ph.hero .ph-grid { grid-template-columns: 1fr; text-align: center; padding-top: 64px; }
.ph.hero .ph-deco { order: -1; margin-bottom: 8px; display: flex; }
.ph.hero .ph-deco img { width: 230px; }
.ph.hero .lede { margin-left: auto; margin-right: auto; max-width: 760px; }
.ph.hero .orn { margin-left: auto; margin-right: auto; }
.ph.hero .orn.left { margin-left: auto; }
.ph.hero .pills { justify-content: center; }
