/* Site du serveur : interface façon jeu (cadres dorés, boutons rouges et bleus, polices du jeu).
   Textures et polices lues dans les MPQ du client par linux/extract-art.py (servies sous /art). */

@font-face { font-family: "Morpheus"; src: url(/art/fonts/morpheus.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Friz"; src: url(/art/fonts/friz.ttf) format("truetype"); font-display: swap; }

:root {
  --gold: #ffd100;
  --gold-soft: #f2c66d;
  --gold-dim: #b8913f;
  --text: #e8e2d4;
  --muted: #a49c8a;
  --bg: #07090d;
  --panel: rgba(8, 9, 12, .88);
  --panel-solid: #0d0f13;
  --line: rgba(184, 145, 63, .35);
  --red: #c6331f;
  --blue: #2a6fd6;
  --alliance: #4aa3ff;
  --horde: #ff4a3d;
  --ok: #3fdc63;
  --ko: #ff5a4a;
  --frame: url(/art/ui/ShellFrame.png);
  --frame-small: url(/art/ui/ShellTooltipFrame.png);
  --tile: url(/art/ui/ShellBackground.png);
  --button-up: url(/art/ui/ShellButtonUp.png);
  --button-down: url(/art/ui/ShellButtonDown.png);
  --title: "Morpheus", "Cinzel", Georgia, serif;
  --ui: "Friz", "Trebuchet MS", Georgia, serif;
  --body: system-ui, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Pied de page collé en bas : la page est une colonne dont le contenu prend la place restante */
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  color: var(--text); font: 16px/1.6 var(--body);
  background: var(--bg);
  overflow-x: hidden; position: relative; isolation: isolate;
}
body > main { flex: 1 0 auto; }
body > .footer { flex-shrink: 0; }
/* Fond plein écran (même très large) : l'écran de chargement flouté et assombri */
body::before {
  content: ""; position: fixed; inset: -40px; z-index: -2; pointer-events: none;
  background: url(/art/northrend.jpg) center 35% / cover no-repeat;
  filter: blur(28px) brightness(.32) saturate(1.2);
}
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: var(--gold); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--title); color: var(--gold); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; text-shadow: 0 2px 6px #000; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
:root { --gutter: clamp(16px, 3vw, 56px); --content: 1640px; }
.wrap { width: min(var(--content), 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { width: min(820px, 100% - 2 * var(--gutter)); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.inline { display: inline; margin: 0; }
.eyebrow { font: 600 .85rem var(--ui); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: .6rem; }
.gold { color: var(--gold); }

/* Cadre du jeu (bordure dorée en 9 parties + fond sombre) */
.frame, .card {
  border: 32px solid transparent;
  border-image: var(--frame) 32 fill / 32px stretch;
  background: var(--tile), var(--panel);
  background-origin: border-box; background-clip: padding-box;
  padding: 6px 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
.card { border-width: 20px; border-image-width: 20px; padding: 8px 10px; }
.thin { border: 8px solid transparent; border-image: var(--frame-small) 16 fill / 8px stretch; background: var(--panel); padding: 14px 16px; }

/* Boutons du jeu : rouge (principal) et bleu (secondaire) */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 40px; padding: 0 26px; border: 0; cursor: pointer; white-space: nowrap;
  font: 1rem var(--ui); color: var(--gold); text-shadow: 0 1px 2px #000; text-decoration: none;
  background: none; isolation: isolate;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border: 8px solid transparent; border-image: var(--button-up) 8 10 fill / 8px 10px stretch;
}
.btn:hover { color: #fff; }
.btn:hover::before { filter: brightness(1.25); }
.btn:active::before { border-image-source: var(--button-down); }
.btn-blue::before, .btn-ghost::before { filter: hue-rotate(205deg) saturate(1.4) brightness(1.05); }
.btn-blue:hover::before, .btn-ghost:hover::before { filter: hue-rotate(205deg) saturate(1.4) brightness(1.3); }
.btn-lg { min-height: 52px; padding: 0 38px; font-size: 1.2rem; }
.btn-sm { min-height: 32px; padding: 0 16px; font-size: .9rem; }
.btn-danger::before { filter: saturate(1.6) brightness(.9); }
.btn-primary { }
.link-btn { background: none; border: 0; padding: 0; color: var(--gold-soft); font: inherit; cursor: pointer; }
.link-btn:hover { color: var(--gold); }

/* En-tête */
.topbar { position: sticky; top: 0; z-index: 50; background: linear-gradient(180deg, rgba(4, 5, 8, .95), rgba(4, 5, 8, .75)); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.topbar-inner { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font: 1.7rem var(--title); color: var(--gold); text-shadow: 0 2px 6px #000; }
.brand img { width: 74px; height: auto; filter: drop-shadow(0 2px 4px #000); }
.nav { display: flex; align-items: center; gap: clamp(12px, 1.4vw, 24px); margin-left: auto; font: 1rem var(--ui); }
.nav a, .nav .link-btn { color: var(--gold-soft); font-family: var(--ui); }
.nav a.active, .nav a:hover { color: var(--gold); text-shadow: 0 0 10px rgba(255, 209, 0, .35); }
.nav-toggle, .nav-burger { display: none; }

/* Accueil : héros */
/* Le Roi-liche : calé sur la hauteur du bloc d'accueil, à droite, quelle que soit la largeur d'écran.
   L'image (carrée, logo en haut) est agrandie à 150 % de la hauteur et alignée vers le bas : le logo sort du cadre. */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(36px, 6vw, 90px) 0 clamp(30px, 4vw, 60px);
  min-height: clamp(560px, 82vh, 1100px);
  display: flex; align-items: center;
}
.hero > .wrap { position: relative; }
.hero-art {
  position: absolute; z-index: -1; pointer-events: none;
  height: 150%; aspect-ratio: 1 / 1; bottom: -12%;
  right: max(-6vw, calc((100vw - var(--content)) / 2 - 10vw));
  background: url(/art/northrend.jpg) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%, #000 86%, transparent 100%), linear-gradient(180deg, #000 68%, transparent 92%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 40%, #000 86%, transparent 100%), linear-gradient(180deg, #000 68%, transparent 92%);
  mask-composite: intersect;
}
.hero-grid { display: grid; gap: 18px; justify-items: start; }
.hero-panel, .realm-panel { width: min(820px, 100%); }
.hero .frame { padding: 18px 26px 10px; background: var(--tile), rgba(6, 7, 10, .82); }
.realm-panel h2 { text-align: center; font-size: 1.25rem; font-family: var(--ui); color: var(--gold); margin-bottom: 10px; }
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); }
.hero .lead { font-size: 1.12rem; max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 18px; }
.hero-note { font-size: .9rem; color: var(--muted); }
.hero-logo { width: 240px; display: block; margin: -8px 0 8px -10px; filter: drop-shadow(0 4px 10px #000); }

/* Liste des royaumes (comme la sélection de royaume du jeu) */
.realms { margin-block: 10px 46px; }
.realms h2 { text-align: center; font-size: 1.25rem; font-family: var(--ui); color: var(--gold); margin-bottom: 10px; }
.realm-table { width: 100%; border-collapse: collapse; font-family: var(--ui); }
.realm-table th { text-align: left; color: var(--gold); font-weight: 400; font-size: .9rem; padding: 6px 12px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(90, 70, 30, .35), rgba(40, 30, 10, .2)); }
.realm-table td { padding: 10px 12px; color: #fff; }
.realm-table tr.realm-row:hover td { background: rgba(255, 209, 0, .07); }
.realm-type { color: var(--gold-soft); }
.on { color: var(--ok); } .off { color: var(--ko); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; box-shadow: 0 0 8px currentColor; background: currentColor; }

/* Sections */
.section { margin-block: 54px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-intro { max-width: 70ch; color: var(--text); }

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }

.device h3 { margin-bottom: .2em; display: flex; align-items: center; gap: 10px; }
.device h3 .icon { width: 30px; height: 30px; color: var(--gold-soft); stroke-width: 1.5; }
.device .tag { font: .85rem var(--ui); color: var(--gold-soft); margin-bottom: .6em; }
.device ul { margin: .4em 0 0; padding-left: 1.1em; color: var(--muted); font-size: .92rem; }
.device .use { margin-top: .8em; font-size: .92rem; }
.device .use strong { color: var(--gold); font-family: var(--ui); font-weight: 400; }

/* Journal de quêtes : guides */
.questlog { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.quest-group h3 { font: 1rem var(--ui); color: var(--gold); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.quest-group ul { list-style: none; margin: 0 0 1em; padding: 0; }
.quest-group li { padding: 5px 0; }
.quest-group li a::before { content: "◆"; color: var(--gold-dim); margin-right: 8px; font-size: .75em; }

/* Galerie */
.zones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.zone { margin: 0; position: relative; overflow: hidden; border: 8px solid transparent; border-image: var(--frame-small) 16 fill / 8px stretch; background: #000; aspect-ratio: 16 / 10; }
.zone-art { position: absolute; inset: 0; background: center 52% / 140% auto no-repeat; transition: transform .5s; }
.zone:hover .zone-art { transform: scale(1.06); }
.zone figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 10px; background: linear-gradient(0deg, rgba(0, 0, 0, .9), transparent); display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.zone strong { font: 1.15rem var(--title); color: var(--gold); font-weight: 400; }
.zone span { color: var(--muted); font-size: .85rem; }
.art-pitofsaron { background-image: url(/art/pitofsaron.jpg); }
.art-ulduar { background-image: url(/art/ulduar.jpg); }
.art-icecrown { background-image: url(/art/icecrown.jpg); }
.art-crusader { background-image: url(/art/crusader.jpg); }
.art-wintergrasp { background-image: url(/art/wintergrasp.jpg); }
.art-reflection { background-image: url(/art/reflection.jpg); }
.art-malygos { background-image: url(/art/malygos.jpg); }
.art-naxxramas { background-image: url(/art/naxxramas.jpg); }
.art-northrend { background-image: url(/art/northrend.jpg); }
.art-deathknight { background-image: url(/art/deathknight.jpg); }

/* Actualités */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 18px; }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(560px, 100%), 1fr)); column-gap: 40px; }
.news-card h3, .news-card h2 { font-size: 1.25rem; margin: .2em 0 .4em; }
.news-card time { font-size: .85rem; }
.news-list { display: grid; gap: 18px; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 12px 4px; }
.faq summary { cursor: pointer; font: 1.05rem var(--ui); color: var(--gold-soft); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--gold); }
.faq details[open] summary::before { content: "−"; }
.faq details p { margin: .6em 0 .2em 1.2em; color: var(--text); }

/* Appel final */
.cta { text-align: center; padding: 30px 20px 10px; }
.cta h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cta .hero-actions { justify-content: center; }

/* Pages intérieures */
.page { padding: 40px 0 60px; }
.page > h1 { margin-bottom: .6em; }
.account-layout, .status-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.auth-page { display: flex; justify-content: center; }
.form-card { width: min(480px, 100%); }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font: .95rem var(--ui); color: var(--gold-soft); }
.form label.check { display: flex; gap: 10px; align-items: flex-start; font-family: var(--body); color: var(--text); }
.form input, .form textarea, .form select {
  width: 100%; padding: 10px 12px; font: 1rem var(--body); color: #fff;
  background: rgba(0, 0, 0, .55); border: 1px solid #5c4a24; border-radius: 3px; outline: none;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .8);
}
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), inset 0 2px 6px rgba(0, 0, 0, .8); }
.form .btn { justify-self: start; margin-top: 6px; }
.hp { position: absolute; left: -9999px; }
.alert { padding: 10px 14px; margin: 14px 0; border: 1px solid; background: rgba(0, 0, 0, .55); font-family: var(--ui); }
.alert-error { color: #ffb3a8; border-color: #8c2c22; }
.alert-success { color: #b6f5c3; border-color: #2c8c45; }
.details { display: grid; gap: 10px; margin: 0 0 18px; }
.details div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(184, 145, 63, .15); padding-bottom: 6px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; color: #fff; }
.char-list, .admin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.char-list li, .admin-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid rgba(184, 145, 63, .15); }
.badge { font: .75rem var(--ui); color: #0b1a0e; background: var(--ok); padding: 1px 8px; border-radius: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; }
thead th { font: .9rem var(--ui); color: var(--gold); border-bottom: 1px solid var(--line); }
tbody tr + tr td { border-top: 1px solid rgba(184, 145, 63, .12); }
.steps { list-style: none; counter-reset: step; padding: 0; display: grid; gap: 16px; }
.steps li { counter-increment: step; position: relative; padding-left: 56px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 40px; height: 40px; display: grid; place-items: center; font: 1.3rem var(--title); color: var(--gold); border: 2px solid var(--gold-dim); border-radius: 50%; background: rgba(0, 0, 0, .5); }
.article p { font-size: 1.05rem; }

/* Statut : carte du royaume */
.status-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.status-realm { font: 1.4rem var(--title); color: var(--gold); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.stats div { background: rgba(0, 0, 0, .35); padding: 8px 10px; border: 1px solid rgba(184, 145, 63, .2); }
.stats dt { color: var(--muted); font-size: .8rem; }
.stats dd { margin: 0; font: 1.3rem var(--ui); color: #fff; }
.faction-bar { height: 10px; background: var(--horde); border: 1px solid #000; box-shadow: 0 0 0 1px var(--gold-dim); }
.faction-bar span { display: block; height: 100%; background: var(--alliance); }
.faction-labels { display: flex; justify-content: space-between; margin-top: 6px; font: .9rem var(--ui); }
.alliance-text { color: var(--alliance); } .horde-text { color: var(--horde); }
.dot-on { color: var(--ok); } .dot-off { color: var(--ko); }

/* Icônes de classe : planche 4x4 UI-CharacterCreate-Classes */
.class-icon { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; margin-right: 8px; border-radius: 3px; background: url(/art/classes.png) no-repeat; background-size: 400% 400%; }
.class-icon.c1 { background-position: 0 0; } .class-icon.c8 { background-position: 33.333% 0; }
.class-icon.c4 { background-position: 66.667% 0; } .class-icon.c11 { background-position: 100% 0; }
.class-icon.c3 { background-position: 0 33.333%; } .class-icon.c7 { background-position: 33.333% 33.333%; }
.class-icon.c5 { background-position: 66.667% 33.333%; } .class-icon.c9 { background-position: 100% 33.333%; }
.class-icon.c2 { background-position: 0 66.667%; } .class-icon.c6 { background-position: 33.333% 66.667%; }
.faction-icon { display: inline-block; width: 22px; height: 22px; vertical-align: -6px; margin: 0 6px; background-repeat: no-repeat; background-size: 170% 170%; background-position: 0 0; }
.alliance-icon { background-image: url(/art/alliance.png); }
.horde-icon { background-image: url(/art/horde.png); }

/* Pied de page */
.footer { border-top: 1px solid var(--line); background: rgba(3, 4, 6, .94); padding: 26px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer strong { font: 1.2rem var(--title); color: var(--gold); font-weight: 400; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--ui); }

/* Sélecteur de langue */
.lang-menu { position: relative; font-family: var(--ui); }
.lang-menu summary { list-style: none; cursor: pointer; color: var(--gold-soft); padding: 4px 8px; border: 1px solid var(--line); border-radius: 3px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu[open] summary { color: var(--gold); border-color: var(--gold-soft); }
.lang-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 170px; display: grid; padding: 6px;
  border: 8px solid transparent; border-image: var(--frame-small) 16 fill / 8px stretch; background: var(--panel-solid); }
.lang-list a { padding: 6px 10px; color: var(--text); font-family: var(--body); }
.lang-list a:hover, .lang-list a.active { color: var(--gold); background: rgba(255, 209, 0, .07); }

/* Langues dont les polices du jeu n'ont pas l'alphabet : titres en serif système */
.lang-ru h1, .lang-ru h2, .lang-ru h3, .lang-ru .brand, .lang-zh h1, .lang-zh h2, .lang-zh h3 {
  font-family: Georgia, "Noto Serif", "Noto Serif SC", "Songti SC", "SimSun", serif; font-weight: 700; letter-spacing: 0;
}

/* Écrans larges et ultra-larges (21:9, 32:9) */
@media (min-width: 1500px) {
  .hero { min-height: min(82vh, 980px); }
  .zones { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 2200px) {
  :root { --content: 2100px; }
  body { font-size: 17px; }
  .zones { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .zone { aspect-ratio: 3 / 4; }
  .zone-art { background-size: auto 140%; }
  .hero-panel, .realm-panel { width: min(1080px, 100%); }
  .hero h1 { font-size: 4.2rem; }
  .hero .lead { font-size: 1.3rem; }
}
@media (min-width: 3000px) {
  :root { --content: 2600px; }
  body { font-size: 18px; }
}

/* Tablettes et mobiles */
@media (max-width: 960px) {
  .zones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-art { opacity: .4; right: -35vw; }
}
@media (max-width: 760px) {
  .lang-menu summary { display: inline-block; margin-top: 8px; }
  .lang-list { position: static; margin-top: 6px; }
  .nav-burger { display: block; margin-left: auto; width: 40px; height: 40px; cursor: pointer; position: relative; }
  .nav-burger span, .nav-burger span::before, .nav-burger span::after { position: absolute; left: 8px; right: 8px; height: 2px; background: var(--gold); content: ""; }
  .nav-burger span { top: 19px; } .nav-burger span::before { top: -8px; left: 0; right: 0; } .nav-burger span::after { top: 8px; left: 0; right: 0; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: rgba(5, 6, 9, .98); border-bottom: 1px solid var(--line); padding: 6px 16px 16px; }
  .nav a, .nav form { padding: 10px 0; border-bottom: 1px solid rgba(184, 145, 63, .15); }
  .nav .btn { margin-top: 12px; }
  .nav-toggle:checked ~ .nav { display: flex; }
  .brand { font-size: 1.35rem; }
  .brand img { width: 56px; }
  .zones { grid-template-columns: 1fr; }
  .frame { border-width: 22px; border-image-width: 22px; }
  .hero .frame { padding: 10px 6px 4px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .realm-table th:nth-child(3), .realm-table td:nth-child(3) { display: none; }
  .section-head { flex-direction: column; align-items: start; }
}

/* Icônes dans la navigation */
.nav a.with-icon { display: inline-flex; align-items: center; gap: 6px; }
.lang-menu summary .chevron { width: .85em; height: .85em; opacity: .8; transition: transform .2s; }
.lang-menu[open] summary .chevron { transform: rotate(180deg); }
.btn .icon { margin-right: 2px; }

