/* Dreams In Midgard - habillage « interface du jeu ».
   Le site reprend les codes du client Ragnarok : fenetres a barre de titre bleu pervenche, boutons blancs arrondis,
   lignes surlignees comme dans les menus de PNJ, jauges, cases d'inventaire. En tete : le ciel de l'illustration
   officielle de Rachel. Les illustrations sont affichees a leur taille reelle (ou a un agrandissement prepare
   hors ligne pour les ecrans ultra-larges) ; les sprites du jeu sont affiches pixel pour pixel. */
:root {
	--page: #e3eaf5;
	--win: #ffffff;
	--win-2: #f1f5fb;
	--win-3: #dfe8f8;
	--frame: #8898bd;
	--line: #cfd8e8;
	--bar-1: #f7f9fe;
	--bar-2: #d7e1f6;
	--bar-3: #bfcfee;
	--bar-line: #a2b2d6;
	--ink: #1a2238;
	--ink-2: #56627f;
	--navy: #1c3a8a;
	--link: #1a4fb0;
	--pick: #d3e2fc;
	--orange: #bf4708;
	--gold: #f4b63b;
	--sky-1: #2b8be6;
	--sky-2: #7dc4f2;
	--sky-3: #d8edf9;
	--sand: #e9c57e;
	--sand-ink: #33260f;
	--grass: #86b85a;
	--ok: #238a43;
	--ko: #c93a2c;
	--sans: "Segoe UI", Tahoma, Verdana, Arial, sans-serif;
	--ui: Tahoma, Verdana, "Segoe UI", Arial, sans-serif;
	--wrap: 1360px;
	color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--page); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--page); color: var(--ink); font: 15px/1.55 var(--sans); }
body > main { flex: 1 0 auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; color: var(--ink); }
:focus-visible { outline: 2px solid #f09a12; outline-offset: 2px; }
.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.px, .px img { image-rendering: pixelated; }
.muted, .dim { color: var(--ink-2); }
.small { font-size: 13px; }
.smooth { image-rendering: auto; }
.noicon { display: inline-block; vertical-align: middle; }
.gc { color: var(--c); }

/* ---------- Bandeau : ciel, logo, illustration ---------- */
.masthead { position: relative; height: 300px; overflow: hidden; background: linear-gradient(180deg, #2485e3 0%, #4da8ee 50%, #9ed3f5 100%); }
.masthead .container { position: relative; height: 100%; }
.masthead .art {
	position: absolute; right: 20px; top: 0; width: 640px; height: 768px;
	background: url("img/rachel-duo.jpg") no-repeat 0 0 / 640px 768px;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%, #000 86%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 30%, #000 86%, transparent 100%);
}
.logo { position: absolute; left: 8px; bottom: 28px; display: block; color: #fff; }
.logo:hover { text-decoration: none; }
/* le nom avec le lettrage du site d'origine : image generee par tools/build_site_art.py (570 x 154, et le double) */
.logo img { display: block; height: 154px; width: auto; max-width: none; }
.logo span { display: block; margin: 0 0 0 14px; font: 600 14.5px/1.3 var(--sans); letter-spacing: .02em; text-shadow: 0 1px 2px rgba(8, 28, 80, .85), 0 0 8px rgba(8, 28, 80, .35); }

/* pages internes : bandeau plus bas, on arrive tout de suite au contenu */
.masthead:not(.home) { height: 150px; }
.masthead:not(.home) .art { top: -86px; }
.masthead:not(.home) .logo { bottom: 20px; }
.masthead:not(.home) .logo img { height: 108px; }
.masthead:not(.home) .logo span { display: none; }

/* ---------- Barre de menu ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: linear-gradient(#2e57b6, #1f3f92); border-top: 1px solid #7093e0; border-bottom: 1px solid #12285e; box-shadow: 0 2px 5px rgba(15, 30, 80, .3); }
.nav .container { display: flex; align-items: stretch; min-height: 46px; }
.nav-home { display: flex; align-items: center; margin-right: 8px; }
.nav-home img { display: block; width: 41px; height: 39px; image-rendering: pixelated; }
.nav-links { display: flex; align-items: stretch; flex: 1; }
.nav-item { position: relative; display: flex; }
.nav-item > a, .nav-item > span { display: flex; align-items: center; padding: 0 15px; color: #fff; font: 600 14.5px/1 var(--sans); cursor: pointer; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); white-space: nowrap; }
.nav-item > a:hover, .nav-item > span:hover, .nav-item:focus-within > span { background: rgba(255, 255, 255, .15); text-decoration: none; }
.nav-item > a.on, .nav-item > span.on { background: linear-gradient(#fff, #dbe5f7); color: var(--navy); text-shadow: none; }
.nav-item > span::after { content: ""; margin-left: 7px; border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; opacity: .8; }
.dropdown { position: absolute; top: 100%; left: 0; min-width: 226px; padding: 4px; background: var(--win); border: 1px solid var(--frame); border-top: 0; border-radius: 0 0 7px 7px; box-shadow: 0 8px 18px rgba(20, 40, 90, .25); opacity: 0; visibility: hidden; transition: opacity .1s ease; }
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown { opacity: 1; visibility: visible; }
.dropdown a { display: block; padding: 7px 10px; border-radius: 4px; color: var(--ink); font-size: 14.5px; }
.dropdown a:hover, .dropdown a:focus { background: var(--pick); text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 14px; margin-left: auto; color: #fff; font-size: 13.5px; }
.nav-status { display: flex; align-items: center; gap: 7px; white-space: nowrap; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); }
#nav-toggle, .nav-burger { display: none; }
.nav-burger { width: 38px; height: 34px; place-items: center; border: 1px solid rgba(255, 255, 255, .55); border-radius: 6px; color: #fff; cursor: pointer; }
.nav-burger svg { width: 18px; height: 18px; }

.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: none; background: #a9b3c8; box-shadow: 0 0 0 1px rgba(10, 20, 50, .45); }
.dot.on { background: radial-gradient(circle at 35% 30%, #d6ffdc, #36cf5f 58%, #1c9440); }
.dot.off { background: radial-gradient(circle at 35% 30%, #ffd9d3, #e24c3b 58%, #ab2a1d); }

/* ---------- Boutons (ceux du client) ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 16px;
	font: 700 14px/1.2 var(--sans); color: var(--ink); background: linear-gradient(#fff, #e4e9f4);
	border: 1px solid #848fa8; border-radius: 6px; box-shadow: inset 0 1px 0 #fff, 0 1px 1px rgba(20, 35, 80, .14); cursor: pointer;
}
.btn:hover { text-decoration: none; background: linear-gradient(#f3f7ff, #c2d4f7); border-color: #5b7cc4; }
.btn:active { background: linear-gradient(#c2d4f7, #e6edfb); box-shadow: inset 0 1px 2px rgba(20, 35, 80, .3); }
.btn-primary { color: #fff; background: linear-gradient(#4070d8, #2453bb); border-color: #1d4498; text-shadow: 0 1px 0 rgba(0, 0, 0, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 2px rgba(20, 35, 80, .3); }
.btn-primary:hover { background: linear-gradient(#4b7ce2, #2b5cc6); border-color: #1d4498; }
.btn-primary:active { background: linear-gradient(#2453bb, #3a6ad2); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
/* Déconnexion dans la barre du haut et dans le menu du pseudo : même bouton, texte rouge */
.btn-out { color: var(--ko); }
.btn-out:hover { color: #fff; background: linear-gradient(#d9574a, #b8352a); border-color: #9c2a20; }
.dropdown a.out { margin-top: 4px; padding-top: 9px; border-top: 1px solid var(--line); border-radius: 0 0 4px 4px; color: var(--ko); font-weight: 700; }
.dropdown a.out:hover, .dropdown a.out:focus { color: #fff; background: #c93a2c; }
.btn-block { display: flex; width: 100%; }
/* Jouer dans le navigateur : le bouton dore, a part des boutons bleus du compte */
.btn-play { color: #3b2400; background: linear-gradient(#ffe08f, #f4b63b); border-color: #b0730f; text-shadow: 0 1px 0 rgba(255, 255, 255, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 2px rgba(80, 50, 10, .3); }
.btn-play:hover { background: linear-gradient(#ffe9ad, #f7c357); border-color: #9a630b; }
.btn-play:active { background: linear-gradient(#f4b63b, #ffd77a); }
.btn-lg { padding: 11px 28px; font-size: 16.5px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.btn-row .btn { padding-left: 8px; padding-right: 8px; }
.launch { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 7px; background: linear-gradient(var(--win), var(--win-2)); }
.launch p { flex: 1 1 260px; margin: 0; font-size: 14px; }
.launch p .dot { margin-right: 7px; vertical-align: -1px; }
.launch small { display: block; margin-top: 3px; color: var(--ink-2); }
.play-sub { margin: 4px 0 10px; text-align: center; font-size: 12.5px; color: var(--ink-2); }
.launch-alt { margin: 0 0 18px; }
kbd { padding: 0 6px; border: 1px solid var(--frame); border-bottom-width: 2px; border-radius: 4px; background: var(--win-2); font: 700 .86em/1.5 var(--ui); }
.more { font-weight: 600; white-space: nowrap; }
.more::after { content: " \203A"; }

/* ---------- Fenetres ---------- */
.win { position: relative; background: var(--win); border: 1px solid var(--frame); border-radius: 7px; box-shadow: 0 1px 3px rgba(30, 50, 100, .16); overflow: hidden; }
.win + .win { margin-top: 14px; }
.win-head { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 12px 0 10px; background: linear-gradient(var(--bar-1), var(--bar-2) 55%, var(--bar-3)); border-bottom: 1px solid var(--bar-line); box-shadow: inset 0 1px 0 #fff; }
.win-head::before { content: ""; width: 11px; height: 11px; flex: none; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d4e4ff, #4f86ea 55%, #2450b6); box-shadow: 0 0 0 1px #2a55b5; }
.win-head h2, .win-head h3 { margin: 0; font: 700 13.5px/1.2 var(--ui); color: #1b2a55; }
.win-head a { margin-left: auto; font: 600 12.5px/1.2 var(--ui); white-space: nowrap; }
.win-body { padding: 12px 14px 14px; }
.win-body > :first-child { margin-top: 0; }
.win-body > :last-child { margin-bottom: 0; }

/* ---------- Accueil : le portail ---------- */
.portal { display: grid; grid-template-columns: 272px minmax(0, 1fr) 324px; gap: 16px; align-items: start; padding-top: 18px; padding-bottom: 40px; }
.col-a { grid-column: 1; grid-row: 1 / span 2; }
.col-b { grid-column: 2; grid-row: 1; }
.col-c { grid-column: 2; grid-row: 2; }
.col-d { grid-column: 3; grid-row: 1 / span 2; }

/* le dialogue de PNJ : la Kafra accueille le visiteur */
.npc { min-height: 268px; padding-right: 262px; }
.npc .win-body { padding: 16px 18px 16px; }
.npc .who { margin: 0 0 4px; color: #1a3fa6; font-weight: 700; }
.npc p { margin: 0 0 10px; }
.npc-art { position: absolute; right: 10px; top: 10px; width: 238px; height: auto; max-width: none; pointer-events: none; }
.npc-menu { margin: 12px 0 0; padding: 4px; list-style: none; border: 1px solid var(--line); border-radius: 6px; background: var(--win-2); }
.npc-menu a { display: flex; align-items: center; gap: 10px; padding: 5px 9px; border-radius: 4px; color: var(--ink); font-weight: 600; }
.npc-menu a:hover, .npc-menu a:focus { background: var(--pick); text-decoration: none; }
.npc-menu img { width: 24px; height: 24px; image-rendering: pixelated; flex: none; }
.npc-menu small { margin-left: auto; font-weight: 400; color: var(--ink-2); font-size: 13px; }

.lamps { margin: 0 0 10px; padding: 0; list-style: none; }
.lamps li { display: flex; align-items: center; gap: 9px; padding: 4px 0; font-size: 14px; }
.lamps li span.t { margin-left: auto; color: var(--ink-2); font-size: 13px; }
.online { display: flex; align-items: baseline; gap: 7px; margin: 0 0 12px; padding: 8px 10px; background: var(--win-2); border: 1px solid var(--line); border-radius: 6px; }
.online b { font: 700 26px/1 var(--sans); color: var(--navy); font-variant-numeric: tabular-nums; }
.win-body .btn-block + .btn-block { margin-top: 8px; }
.hello { margin: 0 0 10px; }

.kv { margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 14px; font-size: 14px; }
.kv > div:nth-child(odd) { background: var(--win-2); }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 700; text-align: right; }
.win-body.flush { padding: 0; }

.journal article { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 14px; padding: 2px 0 14px; }
.journal article + article { padding-top: 14px; border-top: 1px solid var(--line); }
.journal .when { align-self: start; padding: 5px 0 6px; text-align: center; background: linear-gradient(var(--bar-1), var(--bar-2)); border: 1px solid var(--bar-line); border-radius: 6px; font: 700 20px/1.05 var(--sans); color: var(--navy); }
.journal .when small { display: block; margin-top: 3px; font: 600 11px/1.1 var(--ui); color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.journal h3 { margin: 0 0 5px; font-size: 17.5px; line-height: 1.25; color: var(--navy); }
.journal .body p { margin: 0 0 8px; }
.journal .body a, .journal .byline a { text-decoration: underline; text-underline-offset: 2px; }   /* liens reconnaissables sans la couleur (audit, 18/11/2026) */
.journal .byline { margin: 0; color: var(--ink-2); font-size: 13px; }

.countdown { display: flex; gap: 6px; margin: 8px 0 10px; }
.countdown div { flex: 1; padding: 7px 0 6px; text-align: center; background: #1d2f5f; border: 1px solid #0f1d44; border-radius: 6px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.countdown b { display: block; font: 700 26px/1 Consolas, "Cascadia Mono", "Courier New", monospace; color: #fff; font-variant-numeric: tabular-nums; }
.countdown span { display: block; margin-top: 3px; font: 600 11px/1 var(--ui); color: #b9c8ee; text-transform: uppercase; letter-spacing: .05em; }
.woe-live { margin: 8px 0; padding: 8px 10px; border-radius: 6px; background: #fdebd9; border: 1px solid #f0b47d; color: #9a3d06; font-weight: 700; }
.woe-days { margin: 0 0 10px; padding: 0; list-style: none; font-size: 14px; }
.woe-days li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dotted var(--line); text-transform: capitalize; }
.woe-days li span { color: var(--ink-2); text-transform: none; }
.woe-days li.next b { color: var(--orange); }
.woe-days.soir li { text-transform: none; }                 /* « Ce soir a Midgard » : des titres, pas des jours (« Nuit des Songes », pas « Nuit Des Songes ») */
.nw { white-space: nowrap; }
/* avertissement « souris et clavier » pres des boutons Jouer : petit ecran ou ecran tactile seulement */
.mobile-only { display: none; }
.avis-tactile { margin: 10px 0 0; padding: 8px 11px; font-size: 13.5px; line-height: 1.4; color: #5c4306; background: #fff6dc; border: 1px solid #e5c275; border-radius: 6px; }
.launch .avis-tactile { flex: 1 0 100%; margin: 0; font-size: 13.5px; }
.play-sub + .avis-tactile { margin: -2px 0 10px; }
@media (max-width: 860px), (hover: none) and (pointer: coarse) { .mobile-only { display: block; } }

.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 6px 14px; }
.rank-list li:nth-child(odd) { background: var(--win-2); }
.rank-pos { width: 18px; font: 700 15px/1 var(--sans); color: var(--orange); text-align: center; }
.rank-name { font-weight: 700; line-height: 1.25; }
.rank-sub { font-size: 12.5px; color: var(--ink-2); line-height: 1.25; }
.rank-lvl { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.census { margin: 0; padding: 9px 14px 11px; color: var(--ink-2); font-size: 13.5px; border-top: 1px solid var(--line); }
.census b { color: var(--ink); }

/* sprites du jeu poses sur un decor : ciel + sol */
.lineup { display: flex; align-items: stretch; justify-content: space-between; gap: 6px; padding: 18px 16px 0; overflow-x: auto; background: linear-gradient(to top, #6fa246 0, var(--grass) 58px, var(--sky-3) 58px, var(--sky-2) 100%); }
.mob { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; flex: 1 0 auto; min-width: 92px; color: #18300a; text-align: center; }
.mob:hover { text-decoration: none; }
.mob img { image-rendering: pixelated; max-width: none; transition: transform .12s ease; transform-origin: bottom center; }
.mob:hover img { transform: translateY(-4px); }
.mob-cap { height: 58px; padding-top: 9px; line-height: 1.2; }
.mob-cap b { display: block; font-size: 13.5px; }
.mob-cap span { font-size: 12px; }
.mob-cap .mvp-tag { color: #7a1f00; font-weight: 700; }
.cast-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; padding: 20px 16px 0; overflow-x: auto; background: linear-gradient(to top, #dcb669 0, var(--sand) 66px, var(--sky-3) 66px, var(--sky-2) 100%); }
.cast-row figure { display: flex; flex-direction: column; align-items: center; flex: 1 0 86px; width: 86px; margin: 0; }
.cast-row figcaption { height: 66px; padding-top: 9px; text-align: center; line-height: 1.2; color: var(--sand-ink); }
.cast-row figcaption b { display: block; font-size: 14px; }
.cast-row figcaption span { font-size: 12px; opacity: .85; }

.sommaire { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sommaire a { display: flex; align-items: center; gap: 9px; padding: 6px 8px; color: var(--ink); background: var(--win-2); border: 1px solid var(--line); border-radius: 6px; line-height: 1.2; }
.sommaire a:hover { text-decoration: none; background: var(--pick); border-color: #9db6e6; }
.sommaire img { width: 24px; height: 24px; image-rendering: pixelated; flex: none; }
.sommaire b { display: block; font-size: 13.5px; }
.sommaire span { font-size: 12px; color: var(--ink-2); }

/* ---------- Pages internes : une grande fenetre ---------- */
.container.page, .container.page-body { width: calc(100% - 32px); margin: 16px auto 40px; padding: 0 24px 28px; background: var(--win); border: 1px solid var(--frame); border-radius: 7px; box-shadow: 0 1px 3px rgba(30, 50, 100, .16); }
.page-head { margin: 0 -24px 20px; padding: 14px 24px 13px; background: linear-gradient(var(--bar-1), var(--bar-2) 60%, var(--bar-3)); border-bottom: 1px solid var(--bar-line); border-radius: 6px 6px 0 0; box-shadow: inset 0 1px 0 #fff; }
.page-head .crumb { display: block; margin-bottom: 2px; font: 700 11.5px/1.3 var(--ui); letter-spacing: .06em; text-transform: uppercase; color: #5567a0; }
.page-head .crumb a { color: inherit; }
.page-head h1 { margin: 0; font-size: 26px; line-height: 1.2; color: #16275c; }
.page-head h1 > img { vertical-align: middle; margin-right: 6px; }
.page-head .sub { margin: 5px 0 0; max-width: 62em; color: #3c4a72; font-size: 14.5px; }
.page-head h1 .mvp, .page-head h1 small { font: 700 12px/1 var(--ui); letter-spacing: .05em; vertical-align: middle; margin-left: 10px; padding: 4px 7px; border-radius: 4px; background: var(--orange); color: #fff; text-transform: uppercase; }
.page h2, .page-card h2 { margin: 30px 0 12px; padding: 6px 12px; font-size: 16px; line-height: 1.3; color: #16275c; background: var(--win-3); border-left: 4px solid #4c7fe3; border-radius: 0 5px 5px 0; }
.page h2 small { font: 400 13.5px/1.3 var(--sans); color: var(--ink-2); margin-left: 8px; }
.page h3, .page-card h3 { margin: 20px 0 8px; font-size: 16px; }
.page-card { overflow-x: auto; }
.page-card h3 img { vertical-align: middle; image-rendering: pixelated; }
.page-card > h2:first-of-type { display: none; }            /* le titre est deja dans la barre de la fenetre */
.empty { padding: 24px; text-align: center; color: var(--ink-2); background: var(--win-2); border: 1px dashed #aab7d3; border-radius: 6px; }
.note { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-2); }
.flash, .message, .notice { margin: 14px 0; padding: 10px 14px; border: 1px solid #e5c275; border-radius: 6px; background: #fff6dc !important; color: #5c4306 !important; font-weight: 600; }
.red { color: var(--ko) !important; }
.green, .online-txt, .up { color: var(--ok) !important; }
.offline, .down { color: var(--ko) !important; }
.not-applicable, .none { color: var(--ink-2) !important; font-style: italic; }
.mvp { color: var(--orange); font-weight: 700; font-size: .85em; }
#submenu, #pagemenu { margin: 0 0 16px; color: var(--ink-2); font-size: 14px; }
#submenu a, #pagemenu a { font-weight: 600; }
#submenu a.current-sub-menu { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* tableaux et formulaires FluxCP */
.page-card table { font-size: 14.5px; }
.horizontal-table, .vertical-table, .generic-form-table { width: 100%; border-collapse: collapse !important; border: 1px solid var(--line) !important; margin: 0 0 16px; }
.horizontal-table th, .vertical-table th, .generic-form-table th { background: var(--win-3) !important; color: #2a3a6b; font: 700 12.5px/1.3 var(--ui) !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; padding: 8px 12px !important; text-align: left; vertical-align: middle; white-space: nowrap; }
.horizontal-table th a, .vertical-table th a { color: inherit; }
.horizontal-table td, .vertical-table td, .generic-form-table td { background: transparent !important; color: var(--ink); border: 0 !important; border-bottom: 1px solid var(--line) !important; padding: 8px 12px !important; font-size: 14.5px !important; vertical-align: middle; }
.vertical-table th, .generic-form-table th { width: 1%; }
.horizontal-table tr:nth-child(even) td { background: var(--win-2) !important; }
.horizontal-table tr:hover td { background: var(--pick) !important; }
.horizontal-table td img, .vertical-table td img { image-rendering: pixelated; vertical-align: middle; }
.horizontal-table td[width="24"] { padding-right: 0 !important; }
.vertical-table td img[src*="/items/images/"] { mix-blend-mode: multiply; }
.td-action a, .td-action span { white-space: nowrap; }
.pages { margin: 16px 0; color: var(--ink-2); font-size: 14px; }
.pages a { display: inline-block; min-width: 30px; padding: 3px 8px; margin: 0 2px 4px 0; text-align: center; border: 1px solid #848fa8; border-radius: 5px; color: var(--ink); font-weight: 700; background: linear-gradient(#fff, #e4e9f4); }
.pages a:hover { background: linear-gradient(#f3f7ff, #c2d4f7); text-decoration: none; }
.pages a.current-page { background: #2a5ec8; border-color: #1d4498; color: #fff; }

input[type=text], input[type=password], input[type=email], input[type=number], input[type=file], textarea, select {
	background: #fff !important; color: var(--ink) !important; border: 1px solid #8a96b3 !important; border-radius: 5px;
	padding: 6px 9px; font: 14.5px/1.3 var(--sans); max-width: 100%; vertical-align: middle; box-shadow: inset 0 1px 2px rgba(20, 35, 80, .1);
}
input:focus, textarea:focus, select:focus { outline: 2px solid #6f9cf0; outline-offset: 0; border-color: #3f6fd1 !important; }
input[type=submit], input[type=button], button:not(.icon-btn), .submit_button {
	color: #fff !important; background: linear-gradient(#4070d8, #2453bb) !important; border: 1px solid #1d4498 !important; border-radius: 6px;
	padding: 7px 16px; font: 700 14px/1.2 var(--sans); cursor: pointer; text-shadow: 0 1px 0 rgba(0, 0, 0, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 2px rgba(20, 35, 80, .3);
}
input[type=button] { color: var(--ink) !important; background: linear-gradient(#fff, #e4e9f4) !important; border-color: #848fa8 !important; text-shadow: none; }
input[type=submit]:hover, button:not(.icon-btn):hover { background: linear-gradient(#4b7ce2, #2b5cc6) !important; }
.search-form, .search-form2 { background: var(--win-2) !important; border: 1px solid var(--line) !important; border-radius: 7px; padding: 10px 16px !important; margin: 0 0 16px; line-height: 2.8; color: var(--ink-2); }
.search-form { display: none; }                              /* s'ouvre avec le lien « Rechercher... » (toggleSearchForm) */
.search-form input[type=text] { width: 9em; }
.search-form label, .search-form2 label { font-weight: 600; }
.search-form p, .search-form2 p { margin: 0; }
.toggler { margin: 0 0 14px; }
.toggler a { display: inline-block; padding: 5px 12px; border: 1px solid #848fa8; border-radius: 6px; background: linear-gradient(#fff, #e4e9f4); color: var(--ink); font-weight: 700; font-size: 13.5px; }
.toggler a:hover { text-decoration: none; background: linear-gradient(#f3f7ff, #c2d4f7); }
.generic-form-table td p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; }

/* installer le jeu, pages de contenu */
.prose { max-width: 50em; }
.prose h2 { margin-top: 26px; }
.prose li { margin: 5px 0; }
.prose code, .steps code { padding: 1px 5px; background: var(--win-3); border: 1px solid var(--line); border-radius: 4px; font: 600 .9em Consolas, "Cascadia Mono", monospace; }
.install { display: grid; grid-template-columns: minmax(0, 1fr) 428px; gap: 28px; align-items: start; }
.steps { counter-reset: etape; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.steps > .step { position: relative; padding: 14px 18px 14px 62px; counter-increment: etape; }
.steps > .step:nth-child(even) { background: var(--win-2); }
.steps > .step + .step { border-top: 1px solid var(--line); }
.steps > .step::before { content: counter(etape); position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font: 700 15px/1 var(--sans); color: #fff; background: radial-gradient(circle at 35% 30%, #9cc0ff, #3d72de 58%, #2450b0); box-shadow: 0 0 0 1px #1d4498; }
.step h3 { margin: 3px 0 4px; font-size: 16.5px; color: #16275c; }
.step p { margin: 0 0 8px; color: #3c4763; }
.figure { margin: 0; }
.figure img { display: block; width: 100%; height: auto; border: 1px solid var(--frame); border-radius: 6px; }
.figure figcaption { margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.spec { margin: 14px 0 0; padding: 0; list-style: none; font-size: 14px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.spec li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 12px; }
.spec li:nth-child(odd) { background: var(--win-2); }
.spec li span { color: var(--ink-2); }
.guide { display: flex; align-items: flex-end; gap: 14px; margin: 0 0 14px; padding: 12px 14px 0; background: linear-gradient(var(--sky-2), var(--sky-3)); border: 1px solid var(--frame); border-radius: 7px; overflow: hidden; }
.guide img { width: 150px; height: auto; flex: none; margin-bottom: -70px; }
.guide p { margin: 0 0 14px; padding: 10px 12px; background: #fff; border: 1px solid var(--frame); border-radius: 7px; font-size: 14px; }
.guide p b { color: #1a3fa6; }

/* ---- Jouer ensemble : le texte a gauche, les captures du jeu a droite, a leur taille reelle (jamais agrandies) ---- */
.page code { padding: 1px 5px; background: var(--win-3); border: 1px solid var(--line); border-radius: 4px; font: 600 .9em Consolas, "Cascadia Mono", monospace; white-space: nowrap; }
.page h2[id] { scroll-margin-top: 70px; }
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 590px); gap: 26px; align-items: start; }
.duo > div > :first-child { margin-top: 0; }
.duo .spec, .duo .list, .duo .facts { margin: 12px 0; }
.duo .spec b { text-align: right; }
.duo .traits { margin: 0 0 12px; }
.shots { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin: 0; }
.shots img { display: block; max-width: 100%; height: auto; border: 1px solid var(--frame); border-radius: 6px; }
.shots figcaption { flex-basis: 100%; font-size: 13px; color: var(--ink-2); }
.duo > div > .shots { margin-top: 14px; }
.duo + .duo { margin-top: 26px; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0 0; }
.trio .scene { display: block; color: var(--ink); }
.trio .scene:hover, .trio .scene:focus { text-decoration: none; border-color: #4c7fe3; }
.trio .scene .ground { min-height: 216px; }
.trio .scene .cap { padding: 7px 12px 8px; background: var(--win); border-top: 1px solid var(--bar-line); }
.trio .scene .cap b { display: block; font-size: 15px; color: #16275c; }
.trio .scene .cap span { font-size: 13px; color: var(--ink-2); }
/* piste des lots (pass, case du jour) : la grille de cases de l'inventaire, numerotee ; .done = obtenu, .set = piece du set */
.bag.pass { grid-template-columns: repeat(10, 58px); width: max-content; max-width: 100%; margin: 12px 0 6px; }
.bag.pass .cell.set { box-shadow: inset 0 0 0 2px var(--gold); }
.bag.pass .cell.done { background: #e6f3dc; border-color: #5e9a3c; }
.bag.pass .cell.done .ref { color: #9c3a06; }
.bag.pass .cell.done::after { content: "\2713"; position: absolute; right: 3px; top: 0; font: 700 13px/1.2 var(--ui); color: #1a6b33; }

/* ---------- Pied de page ---------- */
.footer { margin-top: 0; padding: 22px 0 20px; background: linear-gradient(#24459a, #1a3378); color: #dbe4fb; border-top: 1px solid #5f84d6; font-size: 13.5px; }
.footer .container { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; }
.footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer a { color: #fff; font-weight: 600; }
.footer .contact { flex: 1 0 100%; margin: 4px 0 0; }
.footer .contact a { overflow-wrap: anywhere; }
.footer .legal { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; margin-top: 6px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: 12.5px; color: #b9c8ee; }
.footer select { padding: 3px 6px; font-size: 12.5px; }

/* ---------- Boutique : etal d'objets, comme une fenetre de marchand ---------- */
.shop-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 14px; background: var(--win-2); border: 1px solid var(--line); border-radius: 7px; }
.shop-bar .credits b { font-size: 19px; color: var(--navy); }
.shop-bar .push { margin-left: auto; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.shop-item { display: grid; grid-template-columns: 104px minmax(0, 1fr); background: var(--win); border: 1px solid var(--frame); border-radius: 7px; overflow: hidden; }
.shop-item .pic { display: grid; place-items: center; min-height: 124px; background: #fff; border-right: 1px solid var(--bar-line); }
.shop-item .pic img { width: auto; height: auto; max-width: 75px; max-height: 100px; }
.shop-item .what { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 11px; min-width: 0; background: linear-gradient(var(--bar-1), var(--win) 40px); }
.shop-item .what > b { font-size: 15.5px; line-height: 1.25; }
.shop-item .what > b a { color: #16275c; }
.shop-item .qty { color: var(--orange); white-space: nowrap; }
.shop-item .what p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.shop-item .buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; }
.shop-item .price b { font-size: 17px; }
.page-card .cart td, .page-card .shop-table td { vertical-align: top; }
.shop-item-image img { max-width: 75px; height: auto; }
.shop-item-cost .cost, .cart-sub-total, .remaining-balance, .cart-item-count { font-weight: 700; color: var(--navy); }

/* ====================================================================================================
   Bestiaire, objets, classements, War of Emperium, serveur
   ==================================================================================================== */
.filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; padding: 12px 14px; margin-bottom: 16px; background: var(--win-2); border: 1px solid var(--line); border-radius: 7px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font: 700 12px/1.3 var(--ui); color: #4a5a8a; }
.filters .grow { flex: 1 1 240px; }
.filters .grow input { width: 100%; }
.filters select { min-width: 150px; }
.filters .check { flex-direction: row; align-items: center; gap: 7px; padding: 0 4px 7px; font: 600 14px/1.3 var(--sans); color: var(--ink); cursor: pointer; }
.filters .check input { width: 17px; height: 17px; accent-color: #2a5ec8; }
.filters .reset { padding-bottom: 7px; font-weight: 600; font-size: 13.5px; }
.count { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; }
.count b { color: var(--ink); }

.pager { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 20px 0 0; }
.pager a { min-width: 34px; padding: 5px 10px; text-align: center; border: 1px solid #848fa8; border-radius: 5px; color: var(--ink); font-weight: 700; font-size: 13.5px; background: linear-gradient(#fff, #e4e9f4); }
.pager a:hover { background: linear-gradient(#f3f7ff, #c2d4f7); border-color: #5b7cc4; text-decoration: none; }
.pager a.current { background: #2a5ec8; border-color: #1d4498; color: #fff; }
.pager span { color: var(--ink-2); padding: 0 2px; }

.mob-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); gap: 12px; }
.mob-card { display: flex; flex-direction: column; background: var(--win); border: 1px solid var(--frame); border-radius: 7px; color: var(--ink); overflow: hidden; transition: box-shadow .1s ease, border-color .1s ease; }
.mob-card:hover { text-decoration: none; border-color: #3f6fd1; box-shadow: 0 0 0 2px #b9cff8; }
.mob-card .stage { height: 160px; display: flex; align-items: flex-end; justify-content: center; padding: 0 8px 12px; background: linear-gradient(to top, #6fa246 0, var(--grass) 26px, var(--sky-3) 26px, var(--sky-2) 100%); }
.mob-card .stage img { max-width: none; }
.mob-card .nosprite { align-self: center; color: #2c4a66; font-size: 12.5px; font-style: italic; }
.mob-card .info { padding: 8px 11px 10px; border-top: 1px solid var(--bar-line); background: linear-gradient(var(--bar-1), var(--win)); }
.mob-card b { display: block; font-size: 14.5px; line-height: 1.25; overflow-wrap: anywhere; }
.mob-card .meta { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-2); }
.mob-card .tag { color: var(--orange); font-weight: 700; }

.fiche-top { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 26px; align-items: start; }
.scene { margin: 0; border: 1px solid var(--frame); border-radius: 7px; overflow: hidden; background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 70%, var(--sky-3) 100%); }
.scene .ground { display: flex; align-items: flex-end; justify-content: center; min-height: 290px; padding: 28px 16px 0; background: linear-gradient(to top, #dcb669 0, var(--sand) 54px, transparent 54px); }
.scene .ground img { max-width: none; margin-bottom: 24px; }
.scene figcaption { padding: 7px 12px; background: var(--win); border-top: 1px solid var(--bar-line); font-size: 13px; color: var(--ink-2); }
.scene.item .ground { min-height: 240px; align-items: center; padding: 22px; background: var(--win); }
.scene.item .ground img { margin: 0; }
.scene.item .art { mix-blend-mode: multiply; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 20px; margin: 0; }
.facts > div { padding: 8px 0 7px; border-bottom: 1px solid var(--line); }
.facts dt { font: 700 11.5px/1.3 var(--ui); color: #5567a0; text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 1px 0 0; font-size: 17px; font-weight: 700; line-height: 1.25; }
.facts dd small { font-size: 12.5px; font-weight: 400; color: var(--ink-2); }
.stats6 { display: grid; grid-template-columns: repeat(6, 1fr); margin: 16px 0 0; border: 1px solid var(--frame); border-radius: 7px; background: var(--win-2); overflow: hidden; }
.stats6 div { padding: 7px 6px 6px; text-align: center; }
.stats6 div + div { border-left: 1px solid var(--line); }
.stats6 dt { font: 700 11.5px/1.3 var(--ui); color: #5567a0; }
.stats6 dd { margin: 0; font-size: 17px; font-weight: 700; }
.traits { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 5px 6px; }
.traits li { padding: 2px 8px; border: 1px solid #9db0d8; border-radius: 4px; font-size: 13px; font-weight: 600; background: var(--win-3); color: #23346a; }
.gamedesc { padding: 12px 14px; background: #fffef6; border: 1px solid #d9cfa6; border-radius: 6px; font-size: 14.5px; line-height: 1.5; }
.gamedesc p { margin: 0; min-height: .7em; }
.gamedesc .none { margin: 0; }

.list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 6px 12px; }
.list > li + li { border-top: 1px solid var(--line); }
.list > li:nth-child(even) { background: var(--win-2); }
.list > li:hover { background: var(--pick); }
.list a.name { color: var(--ink); font-weight: 700; }
.list .name { font-weight: 700; }
.list .grow { flex: 1; min-width: 0; }
.list .sub { display: block; font-size: 12.5px; font-weight: 400; color: var(--ink-2); }
.list .num { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list .num small { font-size: 12.5px; font-weight: 400; color: var(--ink-2); }
.list .thumb { width: 64px; height: 56px; display: flex; align-items: flex-end; justify-content: center; flex: none; }
.list.cols-drop { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0; }
.list.cols-drop > li { border-top: 0; border-bottom: 1px solid var(--line); }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; align-items: start; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th { padding: 8px 12px; text-align: left; font: 700 12.5px/1.3 var(--ui); color: #2a3a6b; background: var(--win-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th a { color: inherit; }
table.data th .dir { color: var(--orange); }
table.data td { padding: 6px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:nth-child(even) td { background: var(--win-2); }
table.data tbody tr:hover td { background: var(--pick); }
table.data .r { text-align: right; font-variant-numeric: tabular-nums; }
table.data .ic { width: 40px; padding-right: 0; }
table.data .ic img { max-width: none; }                       /* sinon img { max-width: 100% } ecrase l'icone a 0 px dans un tableau trop etroit (telephone) */
table.data td a.name { color: var(--ink); font-weight: 700; }
table.data .rank { width: 48px; font-weight: 700; font-size: 16px; color: var(--orange); }

/* onglets : ceux de la fenetre de discussion du jeu */
.tabs { display: flex; flex-wrap: wrap; gap: 3px; margin: 0 0 18px; border-bottom: 1px solid var(--frame); }
.tabs a { margin-bottom: -1px; padding: 6px 14px; border: 1px solid var(--frame); border-radius: 6px 6px 0 0; color: #2a3a6b; font-weight: 600; font-size: 14px; background: linear-gradient(var(--bar-2), var(--bar-3)); }
.tabs a:hover { text-decoration: none; background: linear-gradient(#fff, var(--bar-2)); }
.tabs a.on { background: var(--win); border-bottom-color: var(--win); color: var(--ink); font-weight: 700; }

.schedule { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 0 0 8px; padding: 0; list-style: none; }
.schedule li { padding: 10px 14px; background: var(--win-2); border: 1px solid var(--line); border-radius: 7px; }
.schedule b { display: block; font-size: 17px; text-transform: capitalize; color: #16275c; }
.schedule span { color: var(--ink-2); font-size: 14px; }
.schedule li.next { background: #fff3d6; border-color: #e5c275; }
.schedule li.next span { color: #6a4c05; }
.page .countdown { max-width: 340px; }
.realms { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px 22px; }
.realms h3 { margin: 0 0 6px; font-size: 16px; }
.status-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.status-list li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--win-2); border: 1px solid var(--line); border-radius: 7px; }
.status-list b { display: block; font-size: 16px; }
.status-list span.t { font-size: 13px; color: var(--ink-2); }
.status-list .dot { width: 14px; height: 14px; }
.bars { margin: 0; padding: 0; list-style: none; }
.bars li { display: grid; grid-template-columns: 170px minmax(0, 1fr) 46px; gap: 12px; align-items: center; padding: 4px 0; font-size: 14px; }
.bars .bar { height: 13px; border: 1px solid #5c6a8c; border-radius: 3px; background: #fff; overflow: hidden; box-shadow: inset 0 1px 2px rgba(20, 35, 80, .18); }
.bars .bar i { display: block; height: 100%; background: linear-gradient(#6aa2f7, #2f66d4); }
.bars .n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ====================================================================================================
   Personnages, espace « Mon compte », connexion / inscription, podium
   ==================================================================================================== */
.char { position: relative; display: inline-block; flex: none; }
.char img { position: absolute; image-rendering: pixelated; max-width: none; }

/* Déconnexion : un vrai bouton, texte rouge (elle était un lien gris transparent au bout des onglets) */
.account-tabs .out { margin-left: auto; color: var(--ko); border-color: #c99a94; background: linear-gradient(#fff, #f6e9e7); }
.account-tabs .out:hover { color: #fff; background: linear-gradient(#d9574a, #b8352a); border-color: #9c2a20; text-decoration: none; }

.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.char-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); background: var(--win); border: 1px solid var(--frame); border-radius: 7px; color: var(--ink); overflow: hidden; transition: box-shadow .1s ease, border-color .1s ease; }
a.char-card:hover { text-decoration: none; border-color: #3f6fd1; box-shadow: 0 0 0 2px #b9cff8; }
.char-card .stage { display: flex; align-items: flex-end; justify-content: center; min-height: 214px; padding: 16px 8px 0; border-right: 1px solid var(--bar-line); background: linear-gradient(to top, #dcb669 0, var(--sand) 34px, var(--sky-3) 34px, var(--sky-2) 100%); }
.char-card .stage .char { margin-bottom: 16px; }
.char-card .info { display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 12px; min-width: 0; }
.char-card b { font-size: 19px; line-height: 1.2; overflow-wrap: anywhere; color: #16275c; }
.char-card .meta { font-size: 13.5px; color: var(--ink-2); }
.char-card .live, .page-head h1 small.live { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 7px; border-radius: 4px; background: var(--ok); color: #fff; font: 700 11px/1.4 var(--ui); letter-spacing: .04em; text-transform: uppercase; }
.char-card.free { border-style: dashed; background: transparent; }
.char-card.free .stage { border-right-style: dashed; background: none; }
.char-card.free .char { opacity: .28; filter: grayscale(1); }
.char-card.free b { color: var(--ink-2); }

/* jauges : celles de la fenetre du personnage */
.xp { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 8px; height: 18px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.xp > span { font: 700 11.5px/1 var(--ui); }
.xp::before { content: ""; grid-column: 2; grid-row: 1; height: 14px; border: 1px solid #5c6a8c; border-radius: 3px; background: #fff; box-shadow: inset 0 1px 2px rgba(20, 35, 80, .18); }
.xp i { grid-column: 2; grid-row: 1; height: 10px; margin: 0 2px; max-width: calc(100% - 4px); border-radius: 1.5px; background: linear-gradient(#7fb6ff, #3a78e6); justify-self: start; min-width: 0; }
.xp em { grid-column: 2; grid-row: 1; justify-self: end; padding-right: 7px; font-style: normal; font-size: 10.5px; line-height: 14px; color: var(--ink); z-index: 1; }
.xp.max i { background: linear-gradient(#ffe08a, #f1b02c); }
.xp.wide { grid-template-columns: minmax(0, 1fr); height: 22px; }
.xp.wide::before, .xp.wide i, .xp.wide em { grid-column: 1; }
.xp.wide::before { height: 20px; }
.xp.wide i { height: 16px; }
.xp.wide em { line-height: 20px; font-size: 12px; }
.xp.hp i { background: linear-gradient(#7fe08a, #2fae45); }
.xp.sp i { background: linear-gradient(#7fb6ff, #2f66d4); }
.gauges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin-bottom: 18px; }
.gauges .k { display: block; margin-bottom: 4px; font-size: 13px; color: var(--ink-2); }
.gauges .k b { color: var(--ink); font-size: 16px; }

/* inventaire : la grille de la fenetre d'objets */
.bag { display: grid; grid-template-columns: repeat(auto-fill, 58px); gap: 5px; margin: 0 0 6px; padding: 8px; background: var(--win-2); border: 1px solid var(--line); border-radius: 6px; }
.bag .cell { position: relative; display: grid; place-items: center; width: 58px; height: 58px; background: #fff; border: 1px solid #b9c4dc; border-radius: 4px; }
.bag .cell:hover { border-color: #3f6fd1; box-shadow: 0 0 0 2px #b9cff8; z-index: 1; }
.bag .qty { position: absolute; right: 3px; bottom: 1px; font: 700 11.5px/1.2 var(--ui); color: var(--ink); text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 2px #fff; }
.bag .ref { position: absolute; left: 3px; top: 1px; font: 700 11px/1.2 var(--ui); color: var(--orange); text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.bag .unid img { filter: grayscale(1) opacity(.6); }
.bag-title { margin: 14px 0 6px; font: 700 12.5px/1.3 var(--ui); color: #4a5a8a; }
.bag-title small { font-weight: 400; }
.gear .slot { width: 118px; flex: none; font: 700 12px/1.3 var(--ui); color: #5567a0; }
.gear li.vide { opacity: .55; }
.list.actions > li { padding: 10px 12px; }
.list.actions .name { font-size: 15.5px; }

/* connexion / inscription */
.auth { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 32px; align-items: start; }
.auth-form { padding: 18px 20px 20px; background: var(--win-2); border: 1px solid var(--frame); border-radius: 7px; }
.auth-form h2 { display: block !important; margin: 0 0 4px !important; padding: 0 !important; background: none !important; border: 0 !important; font-size: 20px !important; }
.auth-form .lede { margin: 0 0 14px; color: var(--ink-2); }
.auth-form .field { display: block; margin: 0 0 12px; }
.auth-form .field > span:first-child { display: block; margin-bottom: 4px; font: 700 12.5px/1.3 var(--ui); color: #4a5a8a; }
.auth-form input[type=text], .auth-form input[type=password], .auth-form input[type=email] { width: 100%; padding: 8px 10px; font-size: 15px; }
.auth-form .hint { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.auth-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-form .choice { display: flex; gap: 8px; }
.auth-form .choice label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px; border: 1px solid #848fa8; border-radius: 6px; font-weight: 700; cursor: pointer; background: linear-gradient(#fff, #e4e9f4); }
.auth-form .choice input { accent-color: #2a5ec8; width: 16px; height: 16px; }
.auth-form .choice label:has(input:checked) { background: linear-gradient(#f3f7ff, #c2d4f7); border-color: #3f6fd1; }
.auth-form .submit { width: 100%; margin-top: 4px; padding: 10px 16px; font-size: 15px; }
.auth-form .err { margin: 0 0 14px; padding: 9px 12px; border: 1px solid #e3a69e; border-radius: 6px; color: #8f2318; font-weight: 700; background: #fdecea; }
.auth-form .alt { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.auth-form .security-code img { display: block; margin-bottom: 8px; border: 1px solid var(--frame); border-radius: 5px; }
/* min-width: 0 : la rangee de sprites (.cast, sans retour a la ligne) ne doit pas imposer sa largeur a la grille .auth
   (sur telephone, le formulaire debordait de l'ecran : 540 px pour 330). Les sprites en trop sont caches par .cast. */
.auth-form, .auth-side { min-width: 0; }
.auth-form .date-field { display: flex; flex-wrap: wrap; gap: 6px; }
.auth-form .date-field select { flex: 1 1 auto; min-width: 0; padding: 7px 8px; font-size: 15px; }
.auth-form .err .more { display: block; margin-top: 6px; font-weight: 600; }
.auth-side h3 { margin: 16px 0 8px; font-size: 16px; }
.auth-side ul { margin: 0; padding: 0; list-style: none; }
.auth-side li { position: relative; padding: 6px 0 6px 22px; border-bottom: 1px solid var(--line); }
.auth-side li::before { content: ""; position: absolute; left: 3px; top: 13px; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d4e4ff, #4f86ea 55%, #2450b6); }
.auth-side .cast { display: flex; align-items: flex-end; gap: 4px; min-height: 150px; padding: 14px 18px 0; border: 1px solid var(--frame); border-radius: 7px; overflow: hidden; background: linear-gradient(to top, #dcb669 0, var(--sand) 30px, var(--sky-3) 30px, var(--sky-1) 100%); }
.auth-side .cast .char { margin-bottom: 14px; }
.page-card:has(.auth) #submenu, .page-card:has(.auth) > h2 { display: none; }

/* scenes du bestiaire : le ciel prend la couleur de l'element du monstre */
.scene.el-fire   { background: linear-gradient(180deg, #e9783f 0%, #f4b56b 62%, #fbe3b4 100%); }
.scene.el-water  { background: linear-gradient(180deg, #2f7fc4 0%, #6cc3e6 62%, #cdeef2 100%); }
.scene.el-wind   { background: linear-gradient(180deg, #5fb99a 0%, #a8dcc0 62%, #e3f4e2 100%); }
.scene.el-earth  { background: linear-gradient(180deg, #8fa857 0%, #c5d190 62%, #edf0cf 100%); }
.scene.el-poison { background: linear-gradient(180deg, #7d5aa6 0%, #b598cf 62%, #e6daee 100%); }
.scene.el-holy   { background: linear-gradient(180deg, #e9c867 0%, #f6e3a6 62%, #fff8de 100%); }
.scene.el-dark   { background: linear-gradient(180deg, #171b33 0%, #343a66 62%, #6a6f99 100%); }
.scene.el-ghost  { background: linear-gradient(180deg, #7f8aa6 0%, #b6bdd0 62%, #e3e6ee 100%); }
.scene.el-undead { background: linear-gradient(180deg, #4c5a52 0%, #879588 62%, #c3ccbf 100%); }
.scene.el-dark .ground, .scene.el-undead .ground { background: linear-gradient(to top, #3a3f4d 0, #3a3f4d 54px, transparent 54px); }
.scene.el-water .ground { background: linear-gradient(to top, #d9c9a0 0, #d9c9a0 54px, transparent 54px); }
.scene.el-earth .ground, .scene.el-wind .ground { background: linear-gradient(to top, #6fa246 0, var(--grass) 54px, transparent 54px); }
.scene.card .ground { min-height: 0; padding: 16px; background: var(--win-2); }
.scene.card .ground img { margin: 0; max-width: 100%; height: auto; border: 1px solid var(--frame); border-radius: 5px; }

/* podium du classement */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 210px)); justify-content: center; align-items: end; gap: 0; margin: 0 0 22px; padding: 18px 16px 0; border: 1px solid var(--frame); border-radius: 7px; background: linear-gradient(var(--sky-2), var(--sky-3)); }
.podium .place { display: flex; flex-direction: column; align-items: center; text-align: center; }
.podium .place .char { margin-bottom: -2px; }
.podium .who { margin-bottom: 8px; line-height: 1.2; }
.podium .who b { display: block; font-size: 15.5px; overflow-wrap: anywhere; }
.podium .who span { font-size: 12.5px; color: #2c4a66; }
.podium .riser { width: 100%; display: grid; place-items: center; border: 1px solid #a3823a; border-bottom: 0; background: linear-gradient(#ffe08a, #f1b02c); color: #5a3c00; font: 700 30px/1 var(--sans); }
.podium .p1 { order: 2; } .podium .p1 .riser { height: 96px; border-radius: 6px 6px 0 0; }
.podium .p2 { order: 1; } .podium .p2 .riser { height: 66px; border-right: 0; border-radius: 6px 0 0 0; background: linear-gradient(#f4f6fa, #c3cbdb); border-color: #8a94aa; color: #39435c; }
.podium .p3 { order: 3; } .podium .p3 .riser { height: 46px; border-left: 0; border-radius: 0 6px 0 0; background: linear-gradient(#eccfae, #c98f52); border-color: #9a6a35; color: #532f0b; }

/* ---------- Ecrans larges et ultra-larges (34 pouces) ---------- */
@media (min-width: 1900px) {
	:root { --wrap: 1640px; }
	body { font-size: 16px; }
	.masthead { height: 430px; }
	.masthead .art { width: 1280px; height: 1536px; top: -150px; background-image: url("img/rachel-duo@2x.jpg"); background-size: 1280px 1536px; }
	.logo { bottom: 56px; }
	.logo img { height: 236px; }
	.logo span { margin-left: 22px; font-size: 17px; }
	.masthead:not(.home) { height: 210px; }
	.masthead:not(.home) .art { top: -190px; }
	.masthead:not(.home) .logo { bottom: 30px; }
	.masthead:not(.home) .logo img { height: 146px; }
	.nav .container { min-height: 50px; }
	.nav-item > a, .nav-item > span { font-size: 15.5px; padding: 0 18px; }
	.win-head { min-height: 32px; }
	.win-head h2, .win-head h3 { font-size: 14px; }
	.portal { grid-template-columns: 300px minmax(0, 1fr) 360px; gap: 18px; }
	.npc { min-height: 300px; padding-right: 300px; }
	.npc-art { width: 270px; }
	.page-head h1 { font-size: 29px; }
	.fiche-top { grid-template-columns: 420px minmax(0, 1fr); }
	.scene .ground { min-height: 340px; }
	table.data, .page-card table, .horizontal-table td, .vertical-table td, .generic-form-table td { font-size: 15.5px !important; }
}
@media (min-width: 2300px) {
	body.wide { --wrap: 2280px; }
	body.wide .portal { grid-template-columns: 310px minmax(0, 1.12fr) minmax(0, 1fr) 380px; }
	body.wide .col-a, body.wide .col-d { grid-row: 1; }
	body.wide .col-c { grid-column: 3; grid-row: 1; }
	body.wide .col-d { grid-column: 4; }
	/* les marges de l'ecran accueillent deux Kafra, a leur taille reelle, comme les illustrations de PNJ en jeu */
	body::before, body::after { content: ""; position: fixed; bottom: 0; z-index: 0; width: 392px; height: 470px; background: no-repeat bottom center; pointer-events: none; }
	body::before { left: max(12px, calc((100vw - var(--wrap)) / 2 - 430px)); background-image: url("img/kafra_3.png"); }
	body::after { right: max(12px, calc((100vw - var(--wrap)) / 2 - 420px)); width: 368px; background-image: url("img/kafra_7.png"); }
	body > * { position: relative; z-index: 1; }
	body > .nav { z-index: 50; }
}
@media (min-width: 2300px) and (max-width: 3000px) { body::before, body::after { display: none; } }

/* ---------- Ecrans plus petits ---------- */
@media (max-width: 1180px) {
	.portal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.col-b { grid-column: 1 / -1; grid-row: 1; }
	.col-a { grid-column: 1; grid-row: 2; }
	.col-d { grid-column: 2; grid-row: 2; }
	.col-c { grid-column: 1 / -1; grid-row: 3; }
	.masthead .art { right: -60px; }
	.install, .fiche-top { grid-template-columns: 1fr; }
	.scene { max-width: 460px; }
	.cols-2 { grid-template-columns: 1fr; }
	.auth { grid-template-columns: minmax(0, 1fr); gap: 22px; }
	.auth-form { max-width: 520px; }
	.nav-status span[data-online] { display: none; }
}
@media (max-width: 860px) {
	.masthead { height: 210px; }
	.masthead .art { right: -200px; opacity: .9; }
	.logo { bottom: 20px; }
	.logo img { height: 118px; }
	.logo span { margin-left: 11px; font-size: 12.5px; max-width: 26em; }
	.masthead:not(.home) { height: 104px; }
	.masthead:not(.home) .art { top: -86px; }
	.masthead:not(.home) .logo { bottom: 12px; }
	.masthead:not(.home) .logo img { height: 80px; }
	.nav-burger { display: grid; }
	.nav .container { align-items: center; }
	.nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; display: none; padding: 6px 12px 12px; background: #1f3f92; border-bottom: 1px solid #12285e; max-height: calc(100vh - 60px); max-height: calc(100dvh - 60px); overflow-y: auto; }
	#nav-toggle:checked ~ .nav-links { display: flex; }
	.nav-item { flex-direction: column; }
	.nav-item > a, .nav-item > span { padding: 10px 6px; }
	.nav-item > span { cursor: default; opacity: .75; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
	.nav-item > span::after { display: none; }
	.dropdown { position: static; opacity: 1; visibility: visible; box-shadow: none; border: 0; background: transparent; padding: 0 0 6px; }
	.dropdown a { color: #fff; padding: 9px 6px 9px 16px; }
	.dropdown a:hover, .dropdown a:focus { background: rgba(255, 255, 255, .15); }
	.dropdown a.out { color: #ffd4ce; border-top-color: rgba(255, 255, 255, .25); }
	.nav-right .btn { display: none; }
	.nav-right { margin-right: 10px; }
	.nav-links { order: 3; }
	.nav-right { order: 1; margin-left: auto; }
	.nav-burger { order: 2; }
}
@media (max-width: 700px) {
	.container { padding: 0 12px; }
	.portal { display: block; }
	.portal > * + * { margin-top: 14px; }
	.npc { padding-right: 0; min-height: 0; }
	.npc-art { position: static; display: block; width: 150px; margin: 10px auto -60px; }
	.container.page, .container.page-body { width: calc(100% - 16px); margin-top: 8px; padding: 0 14px 20px; }
	.page-head { margin: 0 -14px 16px; padding: 12px 14px 11px; }
	.page-head h1 { font-size: 22px; }
	.mob-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.mob-card .stage { height: 132px; }
	.mob-card .stage img { max-width: 100%; height: auto; }
	.stats6 { grid-template-columns: repeat(3, 1fr); }
	.stats6 div:nth-child(4) { border-left: 0; }
	.stats6 div:nth-child(n+4) { border-top: 1px solid var(--line); }
	.bars li { grid-template-columns: 110px minmax(0, 1fr) 40px; }
	.filters select { min-width: 0; width: 100%; }
	.filters label { flex: 1 1 140px; }
	.char-grid { grid-template-columns: 1fr; }
	.char-card { grid-template-columns: 112px minmax(0, 1fr); }
	.gauges { grid-template-columns: 1fr; }
	.gear .slot { width: 92px; font-size: 11px; }
	.auth-form .two { grid-template-columns: 1fr; }
	/* formulaires FluxCP en tableau (mot de passe, e-mail, sexe, ticket de support...) : une rangee par ligne,
	   l'intitule au-dessus du champ, au lieu de deux colonnes plus larges que l'ecran */
	.generic-form-table, .generic-form-table > tbody, .generic-form-table > tbody > tr, .generic-form-table > tbody > tr > th, .generic-form-table > tbody > tr > td,
	form .vertical-table, form .vertical-table > tbody, form .vertical-table > tbody > tr, form .vertical-table > tbody > tr > th, form .vertical-table > tbody > tr > td { display: block; width: auto !important; }
	.generic-form-table > tbody > tr > th, form .vertical-table > tbody > tr > th { white-space: normal; border-bottom: 0 !important; padding-bottom: 2px !important; }
	.generic-form-table td[align="right"] { text-align: left; }
	.generic-form-table input[type=text], .generic-form-table input[type=password], .generic-form-table input[type=email], .generic-form-table select,
	form .vertical-table input[type=text], form .vertical-table input[type=password], form .vertical-table input[type=email], form .vertical-table select, form .vertical-table textarea { width: 100%; font-size: 16px; }
	form .vertical-table textarea { min-height: 9em; }
	/* 16 px au moins : en dessous, Safari (iPhone) agrandit la page des qu'on touche un champ */
	input[type=text], input[type=password], input[type=email], input[type=number], select, textarea,
	.auth-form input[type=text], .auth-form input[type=password], .auth-form input[type=email], .auth-form .date-field select { font-size: 16px; }
	.account-tabs .out { margin-left: 0; }
	.podium { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.podium .who b { font-size: 13.5px; }
	.guide img { width: 110px; margin-bottom: -50px; }
	.portal { padding-top: 12px; padding-bottom: 28px; }
	.masthead .logo img, .masthead:not(.home) .logo img { height: 72px; }
	.masthead.home { height: 184px; }
	.masthead:not(.home) { height: 118px; }
	.masthead .art, .masthead:not(.home) .art { width: 420px; height: 504px; background-size: 420px 504px; right: -64px; top: -14px; opacity: 1; }
	.masthead:not(.home) .art { top: -46px; }
	.masthead .logo, .masthead:not(.home) .logo { top: 4px; bottom: auto; left: 2px; }
	.logo span { display: none; }
	.btn, .dropdown a, .npc-menu a, .tabs a { min-height: 40px; }
	.npc-menu a { padding: 8px 9px; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

/* ---- Jouer ensemble : largeurs ---- */
@media (min-width: 1900px) {
	.duo { grid-template-columns: minmax(0, 1fr) minmax(0, 712px); gap: 34px; }
}
@media (max-width: 1180px) {
	.duo { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 700px) {
	.trio { grid-template-columns: minmax(0, 1fr); }
	.bag.pass { grid-template-columns: repeat(auto-fill, 58px); width: auto; }
	.page code { white-space: normal; overflow-wrap: anywhere; }
	.duo .spec li { flex-wrap: wrap; }
	.duo .spec b { text-align: left; }
}

/* Fenetre « installez le jeu » avant le jeu dans le navigateur (site.js, 18/11/2026) : la Kafra, sur un fond assombri */
.modale { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(12, 20, 45, .55); }
.modale .win { width: 100%; max-width: 640px; box-shadow: 0 10px 40px rgba(8, 15, 40, .45); }
.modale .win-head h2 { flex: 1; }
.modale-x { width: 22px; height: 22px; margin-left: auto; padding: 0; font: 700 16px/1 var(--ui); color: #1b2a55; cursor: pointer; background: linear-gradient(#fdfdff, #d5e0f6); border: 1px solid var(--frame); border-radius: 4px; }
.modale-x:hover { background: linear-gradient(#fff, #c2d4f7); }
.modale-case { display: flex; align-items: center; gap: 7px; margin: 12px 0 0; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.modale-ouverte, .modale-ouverte body { overflow: hidden; }
@media (max-width: 700px) { .modale .npc { padding-right: 0; } .modale .npc-art { display: none; } }

/* ---------- Langue (18/11/2026) : drapeaux de l'en-tete, fenetre « English or French? » (site.js) ---------- */
.nav-lang { display: flex; align-items: center; gap: 5px; }
.nav-lang a { display: block; padding: 2px; line-height: 0; border: 1px solid transparent; border-radius: 3px; opacity: .7; }
.nav-lang a:hover, .nav-lang a:focus-visible { opacity: 1; }
.nav-lang a.on { opacity: 1; border-color: rgba(255, 255, 255, .8); }
.nav-lang img { display: block; width: 21px; height: 14px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3); }
.langue .win-head h2 span { font-weight: 400; }
.langue .npc-menu img { width: 24px; height: 16px; image-rendering: auto; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.langue .langue-note { margin: 12px 0 0; }
