/* ==========================================================
   HYCECREAM — mc.hycecream.com
   « Le site comme un écran de Minecraft » (refonte du 07/10/2026)
   Accueil = écran titre ; puis liste des serveurs, sélection d'un lieu (comme la liste des mondes),
   progrès, liste des joueurs (touche Tab). Règles = un livre, 404 = « Vous êtes mort ! »,
   navigation mobile = la barre d'inventaire, barre d'expérience = progression de la lecture.
   Tout est dessiné en CSS : aucune texture ni image de Mojang.
   Polices : Monocraft (interface, OFL) + Figtree (texte courant, OFL).
   Couleurs : la palette des codes « § » du chat Minecraft.
   ========================================================== */

@font-face {
    font-family: 'Monocraft';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/monocraft-latin.woff2?v=0744ce94e4') format('woff2');
}
@font-face {
    font-family: 'Monocraft';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/monocraft-bold-latin.woff2?v=439007c1ae') format('woff2');
}
@font-face {
    font-family: 'Figtree';
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url('/assets/fonts/figtree-latin.woff2?v=57fd1acf8d') format('woff2');
}

:root {
    --ui: 'Monocraft', ui-monospace, 'Cascadia Mono', Consolas, monospace;
    --text: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* codes couleur du chat (§) */
    --c-white: #ffffff;
    --c-gray: #aaaaaa;
    --c-yellow: #ffff55;
    --c-gold: #ffaa00;
    --c-green: #55ff55;
    --c-aqua: #55ffff;
    --c-red: #ff5555;
    --c-pink: #ff55ff;
    --c-blurple: #8891f7;

    --ink: #e8e8e8;
    --ink-2: #c8c8c8;
    --ink-3: #9e9e9e;

    /* boutons du menu (pierre), bouton « Jouer » du lanceur, Discord */
    --stone: #707070;
    --stone-hi: #a8a8a8;
    --stone-lo: #474747;
    --play: #3c8527;
    --play-hi: #5aa83d;
    --play-lo: #255a18;
    --discord: #5865f2;
    --discord-hi: #8891f7;
    --discord-lo: #3a44b3;

    --panel: rgba(8, 8, 12, .74);
    --edge: rgba(255, 255, 255, .1);
    --slot-line: #8b8b8b;

    --max-w: 1180px;
    --bar-h: 62px;
    --hotbar-h: 0px;
    --sh-w: 2px 2px 0 #3f3f3f;   /* ombre du texte blanc du jeu */
    --sh-y: 2px 2px 0 #3f3f15;   /* ombre du texte jaune */
    --sh-g: 2px 2px 0 #2a2a2a;   /* ombre du texte gris */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 1.25rem); scroll-padding-bottom: var(--hotbar-h); -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--text); font-size: 1.0625rem; line-height: 1.65;
    color: var(--ink); background: #101013;
    min-height: 100vh; display: flex; flex-direction: column;
    padding-bottom: var(--hotbar-h);
    -webkit-font-smoothing: antialiased; font-synthesis: none;
}
/* fond de toutes les pages : le monde flouté et assombri, comme derrière les menus du jeu */
body::before, body::after { content: ''; position: fixed; inset: 0; pointer-events: none; }
body::before { z-index: -2; background: #101013 url('/assets/img/fond-flou.webp?v=3c6411c1f9') center / cover no-repeat; }
body::after { z-index: -1; background: radial-gradient(ellipse at 50% 25%, rgba(10, 10, 14, .52), rgba(10, 10, 14, .84) 70%); }
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; }
ul[class], ol[class] { list-style: none; }
::selection { background: var(--c-yellow); color: #1a1a00; }
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

p { color: var(--ink-2); text-wrap: pretty; }
strong { color: var(--c-white); font-weight: 650; }
a { color: var(--c-yellow); text-decoration: none; }
p a, li a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 85, .45); }
a:hover { color: var(--c-white); }
code {
    font-family: var(--ui); font-size: .9em; color: var(--c-white);
    background: rgba(0, 0, 0, .6); padding: .05em .4em; border: 1px solid var(--edge);
    overflow-wrap: anywhere;
}
kbd { font-family: var(--ui); font-size: .85em; color: var(--c-white); background: var(--stone-lo); border: 2px solid #000; box-shadow: inset 1px 1px 0 var(--stone-hi); padding: 0 .4em; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--c-yellow); outline-offset: 3px; }
.px-icon { width: 24px; height: 24px; flex-shrink: 0; }

.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 3000; background: var(--c-yellow); color: #1a1a00; font-family: var(--ui); padding: .6rem 1rem; }
.skip-link:focus { top: .75rem; }

/* ---------- Titres : la police du jeu, avec son ombre décalée ---------- */
h1, h2 { font-family: var(--ui); font-weight: 700; color: var(--c-white); text-shadow: 3px 3px 0 #3f3f3f; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.12rem; font-weight: 700; line-height: 1.3; color: var(--c-white); }
.kicker { font-family: var(--ui); font-size: .95rem; color: var(--c-yellow); text-shadow: var(--sh-y); margin-bottom: .55rem; }
.screen-title { text-align: center; margin-bottom: 2rem; }
.screen-title p:not(.kicker) { margin: .75rem auto 0; max-width: 62ch; }

/* ==========================================================
   COMPOSANTS DU JEU
   ========================================================== */
/* boutons du menu : pierre grise, liseré clair en haut à gauche, sombre en bas, bord blanc au survol */
.mc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    min-height: 48px; padding: .55rem 1.4rem .65rem;
    font-family: var(--ui); font-size: 1rem; line-height: 1.2; color: var(--c-white); text-shadow: var(--sh-w);
    background: var(--stone); border: 2px solid #000;
    box-shadow: inset 2px 2px 0 var(--stone-hi), inset -2px -4px 0 var(--stone-lo);
    cursor: pointer; text-align: center; text-decoration: none; user-select: none;
}
.mc-btn:hover { color: var(--c-white); outline: 2px solid var(--c-white); outline-offset: -2px; }
.mc-btn:active { box-shadow: inset -2px -2px 0 var(--stone-hi), inset 2px 3px 0 var(--stone-lo); }
.mc-btn:focus-visible { outline: 2px solid var(--c-yellow); outline-offset: 2px; }
.mc-btn .px-icon { width: 20px; height: 20px; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .45)); }
.mc-btn--play { background: var(--play); box-shadow: inset 2px 2px 0 var(--play-hi), inset -2px -4px 0 var(--play-lo); }
.mc-btn--play:active { box-shadow: inset -2px -2px 0 var(--play-hi), inset 2px 3px 0 var(--play-lo); }
.mc-btn--discord { background: var(--discord); box-shadow: inset 2px 2px 0 var(--discord-hi), inset -2px -4px 0 var(--discord-lo); }
.mc-btn--discord:active { box-shadow: inset -2px -2px 0 var(--discord-hi), inset 2px 3px 0 var(--discord-lo); }
.mc-btn--sm { min-height: 40px; padding: .4rem .9rem .5rem; font-size: .88rem; }
.mc-btn--square { width: 48px; padding: 0; }
.mc-btn[aria-pressed="true"], .mc-btn[aria-selected="true"], .mc-btn.active {
    background: #858585; outline: 2px solid var(--c-white); outline-offset: -2px;
}
.mc-btn.copied { background: var(--play); box-shadow: inset 2px 2px 0 var(--play-hi), inset -2px -4px 0 var(--play-lo); }

/* panneau : le fond noir translucide des menus */
.panel { background: var(--panel); border: 2px solid #000; box-shadow: inset 0 0 0 2px var(--edge); padding: clamp(1.25rem, 3vw, 2rem); }
.panel + .panel { margin-top: 1.25rem; }
.panel > h2 { display: flex; align-items: center; gap: .7rem; font-size: clamp(1.3rem, 2.5vw, 1.7rem); margin-bottom: 1rem; }
.panel > h2 .px-icon { width: 28px; height: 28px; color: var(--c-yellow); filter: drop-shadow(2px 2px 0 #3f3f15); }
.panel > p + p { margin-top: .8rem; }

/* barres de connexion de la liste des serveurs : vertes en ligne, rouges hors ligne, qui défilent en attendant */
.ping { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; flex-shrink: 0; }
.ping i { display: block; width: 3px; background: #555; }
.ping i:nth-child(1) { height: 4px; } .ping i:nth-child(2) { height: 6px; } .ping i:nth-child(3) { height: 9px; }
.ping i:nth-child(4) { height: 11px; } .ping i:nth-child(5) { height: 14px; }
[data-state="online"] .ping i { background: var(--c-green); box-shadow: 1px 1px 0 #153f15; }
[data-state="offline"] .ping i { background: var(--c-red); box-shadow: 1px 1px 0 #3f1515; }
[data-state="offline"] .ping i:nth-child(n+2) { background: #555; box-shadow: none; }
[data-state="unknown"] .ping i { animation: ping-wait 1.5s steps(1) infinite; }
[data-state="unknown"] .ping i:nth-child(2) { animation-delay: .15s; } [data-state="unknown"] .ping i:nth-child(3) { animation-delay: .3s; }
[data-state="unknown"] .ping i:nth-child(4) { animation-delay: .45s; } [data-state="unknown"] .ping i:nth-child(5) { animation-delay: .6s; }
@keyframes ping-wait { 0% { background: var(--c-gray); } 40% { background: #555; } }

/* couleurs des codes « § » (message d'accueil du serveur) */
.mc-0 { color: #000; } .mc-1 { color: #0000aa; } .mc-2 { color: #00aa00; } .mc-3 { color: #00aaaa; }
.mc-4 { color: #aa0000; } .mc-5 { color: #aa00aa; } .mc-6 { color: #ffaa00; } .mc-7 { color: #aaaaaa; }
.mc-8 { color: #555555; } .mc-9 { color: #5555ff; } .mc-a { color: #55ff55; } .mc-b { color: #55ffff; }
.mc-c { color: #ff5555; } .mc-d { color: #ff55ff; } .mc-e { color: #ffff55; } .mc-f { color: #ffffff; }
.mc-l { font-weight: 700; } .mc-o { font-style: italic; } .mc-n { text-decoration: underline; } .mc-m { text-decoration: line-through; }

/* ==========================================================
   BARRE DU HAUT, BARRE D'EXPÉRIENCE, BARRE D'INVENTAIRE
   ========================================================== */
.topbar {
    position: sticky; top: 0; z-index: 1000; height: var(--bar-h);
    background: rgba(0, 0, 0, .66); border-bottom: 2px solid #000;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.topbar-inner { height: 100%; display: flex; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--ui); font-weight: 700; font-size: 1.12rem; color: var(--c-white); text-shadow: var(--sh-w); }
.brand img { width: 34px; height: 34px; }
.brand:hover { color: var(--c-yellow); text-shadow: var(--sh-y); }
.status-chip {
    display: inline-flex; align-items: center; gap: .55rem; white-space: nowrap;
    font-family: var(--ui); font-size: .8rem; color: var(--ink-2); text-shadow: var(--sh-g);
    padding: .3rem .65rem; background: rgba(0, 0, 0, .5); border: 1px solid var(--edge);
}
.status-chip[hidden] { display: none; }
.navlinks { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
.navlinks a:not(.mc-btn) { font-family: var(--ui); font-size: .92rem; color: var(--c-white); text-shadow: var(--sh-w); padding: .45rem .7rem; }
.navlinks a:not(.mc-btn):hover, .navlinks a[aria-current="page"] { color: var(--c-yellow); text-shadow: var(--sh-y); }
.navlinks .mc-btn { margin-left: .6rem; }

/* barre d'expérience = avancement dans la page */
.xp { position: fixed; left: 0; right: 0; top: var(--bar-h); z-index: 999; height: 5px; background: rgba(0, 0, 0, .75); pointer-events: none; }
.xp span { display: block; height: 100%; background: linear-gradient(#c6ff5e, #7ed321 60%, #5aa316); transform-origin: left; transform: scaleX(var(--progress, 0)); }

.hotbar { display: none; }

.back-to-top { position: fixed; right: 1.25rem; bottom: calc(var(--hotbar-h) + 1.25rem); z-index: 950; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.back-to-top.visible { opacity: 1; visibility: visible; }

/* ==========================================================
   ACCUEIL — L'ÉCRAN TITRE
   ========================================================== */
.title-screen {
    position: relative; isolation: isolate; overflow: hidden;
    min-height: calc(100svh - var(--bar-h) - var(--hotbar-h));
    display: grid; grid-template-rows: 1fr auto; padding-top: clamp(2rem, 6vh, 4rem);
}
/* le panorama défile lentement, comme le fond de l'écran titre du jeu */
.panorama { position: absolute; inset: 0; z-index: -2; overflow: hidden; container-type: size; background: #6f9ff5; }
.panorama img {
    position: absolute; top: 0; left: 0; height: 100%; width: auto; max-width: none; min-width: 100%; object-fit: cover;
    transform: translateX(calc(-50% + 50cqw)); animation: panorama 140s ease-in-out infinite; will-change: transform;
}
@keyframes panorama {
    0%, 100% { transform: translateX(calc(-50% + 50cqw)); }
    25% { transform: translateX(0); }
    75% { transform: translateX(calc(-100% + 100cqw)); }
}
.title-screen::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(ellipse 42% 30% at 50% 30%, rgba(0, 0, 0, .42), transparent 80%),   /* voile derrière le logo */
        radial-gradient(ellipse 60% 55% at 50% 50%, rgba(0, 0, 0, .3), transparent 75%),
        linear-gradient(180deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, .1) 35%, rgba(0, 0, 0, .1) 60%, rgba(0, 0, 0, .7));
}
.title-center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }

.logo { position: relative; display: flex; flex-direction: column; align-items: center; margin-bottom: 1.5rem; text-shadow: none; }
.logo h1 { font-size: inherit; line-height: 1; text-shadow: none; }
.logo-word {
    display: block; font-family: var(--ui); font-weight: 700; line-height: 1; text-transform: uppercase; letter-spacing: .04em;
    font-size: clamp(2.5rem, 8.6vw, 6.4rem); color: #ececec;
    /* lettres de pierre en relief : chaque ombre est une couche plus sombre, comme le logo du jeu */
    text-shadow: 0 .04em 0 #b4b4b4, 0 .08em 0 #8a8a8a, 0 .12em 0 #666, 0 .16em 0 #444, 0 .2em 0 #222, .06em .3em .3em rgba(0, 0, 0, .65);
}
.logo-word--top { font-size: clamp(1.4rem, 4.2vw, 3rem); margin-bottom: .35em; }
.edition {
    display: inline-block; margin-top: 1.4rem; padding: .3rem 1rem .38rem;
    font-family: var(--ui); font-weight: 700; font-size: clamp(.72rem, 1.5vw, .95rem); letter-spacing: .24em; color: var(--c-white);
    background: linear-gradient(#5d5d5d, #393939); border: 2px solid #000; box-shadow: inset 0 2px 0 #8c8c8c, 0 6px 14px rgba(0, 0, 0, .5);
    text-shadow: var(--sh-w);
}
/* le texte jaune en biais qui pulse (cliquer pour en changer) */
.splash {
    position: absolute; right: -10%; top: 54%; z-index: 1;
    font-family: var(--ui); font-weight: 700; font-size: clamp(.85rem, 1.9vw, 1.3rem); color: var(--c-yellow); text-shadow: var(--sh-y);
    background: none; border: 0; padding: .2rem .4rem; cursor: pointer; white-space: nowrap;
    transform: rotate(-17deg); animation: splash .45s ease-in-out infinite alternate;
}
.splash:focus-visible { outline-offset: 0; }
@keyframes splash { from { scale: 1; } to { scale: 1.08; } }

.title-address {
    display: inline-flex; align-items: center; gap: .9rem; margin-bottom: .9rem; padding: .5rem .55rem .5rem 1rem;
    font-family: var(--ui); font-size: clamp(1rem, 2.4vw, 1.2rem); color: var(--c-white); text-shadow: var(--sh-w);
    background: rgba(0, 0, 0, .78); border: 2px solid #a0a0a0; cursor: pointer;
}
.title-address:hover { border-color: var(--c-white); }
.title-address .copy-label { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; color: var(--c-yellow); text-shadow: var(--sh-y); padding: .25rem .55rem; border: 1px solid rgba(255, 255, 85, .45); }
.title-address .copy-label .px-icon { width: 16px; height: 16px; }
.title-address.copied { border-color: var(--c-green); }
.title-address.copied .copy-label { color: var(--c-green); border-color: rgba(85, 255, 85, .5); text-shadow: 2px 2px 0 #153f15; }
.title-status { display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 1.6em; margin-bottom: 1.5rem; font-family: var(--ui); font-size: .88rem; color: var(--c-white); text-shadow: var(--sh-w); }

.title-menu { display: grid; grid-template-columns: 48px 1fr 1fr 48px; gap: .55rem; width: min(100%, 460px); }
.title-menu > * { grid-column: 1 / -1; }
.title-menu .half { grid-column: auto; }
.title-menu .mc-btn--square { grid-column: auto; }
.title-foot { display: flex; justify-content: space-between; gap: 1rem; padding-top: 2.5rem; padding-bottom: .9rem; font-family: var(--ui); font-size: .8rem; color: var(--c-white); text-shadow: var(--sh-w); }

/* ==========================================================
   ÉCRANS DE L'ACCUEIL
   ========================================================== */
.screen { padding: clamp(3.5rem, 8vw, 5.5rem) 0 0; }
.screen:last-of-type { padding-bottom: clamp(3.5rem, 8vw, 5.5rem); }
#lieux, #progres, #joueurs, #faq { content-visibility: auto; contain-intrinsic-size: auto 760px; }

/* ---------- Jouer en multijoueur : la liste des serveurs ---------- */
.server-list { max-width: 900px; margin: 0 auto; padding: .8rem; background: rgba(0, 0, 0, .58); border-top: 2px solid #000; border-bottom: 2px solid #000; box-shadow: 0 2px 0 rgba(255, 255, 255, .08), 0 -2px 0 rgba(255, 255, 255, .08); }
.server {
    width: 100%; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: .15rem 1rem; align-items: start;
    padding: .5rem; text-align: left; cursor: pointer; background: none; border: 2px solid var(--slot-line);
}
.server:hover { border-color: var(--c-white); background: rgba(255, 255, 255, .05); }
.server:focus-visible { outline-offset: 2px; }
.server img { grid-row: 1 / 4; width: 64px; height: 64px; background: rgba(0, 0, 0, .4); }
.server-name { font-family: var(--ui); font-size: 1.05rem; color: var(--c-white); text-shadow: var(--sh-w); }
.server-side { grid-column: 3; grid-row: 1; display: flex; align-items: center; gap: .6rem; font-family: var(--ui); font-size: .92rem; color: var(--c-gray); text-shadow: var(--sh-g); }
.server-motd { grid-column: 2 / -1; font-family: var(--ui); font-size: .95rem; line-height: 1.4; color: var(--c-gray); text-shadow: var(--sh-g); }
.server-hint { grid-column: 2 / -1; display: flex; align-items: center; gap: .4rem; margin-top: .25rem; font-family: var(--ui); font-size: .78rem; color: #8f8f8f; }
.server-hint .px-icon { width: 16px; height: 16px; }
.server.copied { border-color: var(--c-green); }
.server.copied .server-hint { color: var(--c-green); }

.join-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.25rem; max-width: 900px; margin: 1.25rem auto 0; align-items: start; }
.tab-list { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin-bottom: 1.25rem; }
.tab-list[hidden] { display: none; }
.tab-list .mc-btn { flex-direction: column; gap: 0; line-height: 1.25; }
.tab-list .mc-btn small { font-size: .7rem; color: #e0e0e0; }
.tab-panel[hidden] { display: none; }
.tab-panel + .tab-panel { margin-top: 1.5rem; }
.js-tabs .tab-panel + .tab-panel { margin-top: 0; }
.tab-title { font-family: var(--ui); color: var(--c-yellow); text-shadow: var(--sh-y); margin-bottom: .9rem; font-weight: 400; font-size: 1rem; }
.js-tabs .tab-title { display: none; }
.steps { counter-reset: step; display: grid; gap: .9rem; }
.steps li { counter-increment: step; position: relative; padding-left: 2.6rem; color: var(--ink-2); }
.steps li::before {
    content: counter(step); position: absolute; left: 0; top: -.05rem;
    width: 1.85rem; height: 1.85rem; display: grid; place-items: center;
    font-family: var(--ui); font-weight: 700; font-size: .9rem; color: var(--c-white); text-shadow: var(--sh-w);
    background: #8b8b8b; border: 2px solid #000; box-shadow: inset 2px 2px 0 #c6c6c6, inset -2px -2px 0 #555;
}
.inline-copy { font-family: var(--ui); font-size: .9em; color: var(--c-white); background: rgba(0, 0, 0, .65); border: 1px solid var(--slot-line); padding: .05em .45em; cursor: pointer; }
.inline-copy:hover { border-color: var(--c-white); }
.inline-copy.copied { border-color: var(--c-green); color: var(--c-green); }
.hint { margin-top: 1.1rem; font-size: .93rem; color: var(--ink-3); }

/* fiche technique façon écran de débogage (F3) : chaque ligne sur son fond gris */
.f3-title { font-family: var(--ui); font-size: .85rem; color: var(--c-gray); margin-bottom: .6rem; }
.f3 { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-family: var(--ui); font-size: .9rem; line-height: 1.5; }
.f3 > * { background: rgba(80, 80, 80, .6); color: #e0e0e0; padding: 0 .35rem; text-shadow: 1px 1px 0 #383838; }
.f3 .v-green { color: var(--c-green); } .f3 .v-gold { color: var(--c-gold); } .f3 .v-aqua { color: var(--c-aqua); } .f3 .v-red { color: var(--c-red); }
.f3 button { font: inherit; border: 0; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.f3 button:hover { background: rgba(120, 120, 120, .75); }
.f3 button.copied { color: var(--c-green); }
.f3-note { margin-top: .8rem; font-size: .85rem; color: var(--ink-3); }

/* ---------- Lieux : la liste des mondes (liste à gauche, aperçu à droite) ---------- */
.places { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 1.25rem; align-items: start; }
.place-list { display: flex; flex-direction: column; gap: .4rem; padding: .6rem; background: rgba(0, 0, 0, .58); border-top: 2px solid #000; border-bottom: 2px solid #000; }
.place-list[hidden] { display: none; }
.places:not(.js-places) { grid-template-columns: minmax(0, 1fr); }
.place-item {
    display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: .1rem .85rem; align-items: center;
    padding: .4rem; text-align: left; cursor: pointer; background: none; border: 2px solid transparent;
}
.place-item:hover { border-color: var(--slot-line); }
.place-item[aria-selected="true"] { border-color: var(--c-white); background: rgba(255, 255, 255, .06); }
.place-item img { grid-row: 1 / 3; width: 96px; height: 54px; object-fit: cover; background: #222; }
.pi-name { font-family: var(--ui); font-size: .95rem; color: var(--c-white); text-shadow: var(--sh-w); }
.pi-coords { font-family: var(--ui); font-size: .78rem; color: var(--c-gray); text-shadow: var(--sh-g); }
.place-views { display: grid; gap: 2rem; }
.js-places .place-views { gap: 0; }
.place-view[hidden] { display: none; }
.pv-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #0b0b0e; border: 2px solid #000; box-shadow: 0 0 0 2px var(--edge); cursor: zoom-in; }
.pv-media img { width: 100%; height: 100%; object-fit: cover; }
.pv-zoom { position: absolute; right: .6rem; top: .6rem; display: grid; place-items: center; width: 40px; height: 40px; color: var(--c-white); background: rgba(0, 0, 0, .65); border: 2px solid #000; }
.pv-media:hover .pv-zoom { border-color: var(--c-white); }
.pv-body { padding-top: 1.1rem; }
.pv-body h3 { font-family: var(--ui); font-size: clamp(1.25rem, 2.4vw, 1.55rem); text-shadow: var(--sh-w); }
.pv-coords { display: inline-block; margin: .45rem 0 .7rem; font-family: var(--ui); font-size: .88rem; color: #e0e0e0; background: rgba(80, 80, 80, .6); padding: 0 .35rem; text-shadow: 1px 1px 0 #383838; }
.pv-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }

/* ---------- Progrès : les notifications du jeu ---------- */
.toasts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.toast-card {
    display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: .15rem .9rem; align-content: start;
    padding: .85rem 1rem 1.05rem; background: #212121; border: 2px solid #000;
    box-shadow: inset 0 0 0 2px #5a5a5a, inset 0 0 0 4px #161616;
}
.toast-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 48px; height: 48px; color: var(--c-white); background: #8b8b8b; border: 2px solid #000; box-shadow: inset 2px 2px 0 #c6c6c6, inset -2px -2px 0 #555; }
.toast-icon .px-icon { width: 26px; height: 26px; filter: drop-shadow(2px 2px 0 #3f3f3f); }
.toast-label { font-family: var(--ui); font-size: .8rem; color: var(--c-yellow); text-shadow: var(--sh-y); align-self: end; }
.toast-card.challenge .toast-label { color: var(--c-pink); text-shadow: 2px 2px 0 #3f153f; }
.toast-card h3 { font-family: var(--ui); font-weight: 400; font-size: 1rem; text-shadow: var(--sh-w); }
.toast-card p { grid-column: 1 / -1; margin-top: .6rem; font-size: .96rem; }
.toasts.reveal .toast-card { opacity: 0; transform: translateX(40px); transition: opacity .45s, transform .45s cubic-bezier(.2, .9, .3, 1.15); }
.toasts.reveal .toast-card.in { opacity: 1; transform: none; }

/* ---------- Joueurs : la liste affichée avec la touche Tab ---------- */
.tablist { max-width: 780px; margin: 0 auto; padding: .9rem 1.1rem 1rem; text-align: center; font-family: var(--ui); background: rgba(0, 0, 0, .7); border: 2px solid #000; }
.tablist-head { color: var(--c-white); text-shadow: var(--sh-w); }
.tablist-head .sub { display: block; margin-top: .1rem; font-size: .85rem; color: var(--c-gray); text-shadow: var(--sh-g); }
.tablist-players { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px; margin-top: .9rem; text-align: left; }
.tablist-players:empty { display: none; }
.tablist-players li { display: flex; align-items: center; gap: .5rem; padding: .15rem .35rem; background: rgba(255, 255, 255, .12); color: var(--c-white); text-shadow: var(--sh-w); font-size: .9rem; }
.tablist-players li .ping { margin-left: auto; }
.tablist-players img, .head-fallback { width: 20px; height: 20px; image-rendering: pixelated; flex-shrink: 0; }
.head-fallback { display: grid; place-items: center; background: #555; color: var(--c-gold); font-size: .7rem; text-shadow: none; }
.tablist-empty { margin-top: .9rem; padding: .55rem .8rem; background: rgba(255, 255, 255, .07); font-size: .9rem; color: var(--c-gray); text-shadow: var(--sh-g); }
.tablist-empty[hidden] { display: none; }
.tablist-foot { margin-top: .9rem; font-size: .9rem; color: var(--c-gray); text-shadow: var(--sh-g); }
.tablist-foot .d { color: var(--c-blurple); text-shadow: 2px 2px 0 #20244a; }
.tablist-foot .n { color: var(--c-white); text-shadow: var(--sh-w); }
.community-text { max-width: 60ch; margin: 1.5rem auto 0; text-align: center; }
.community-text .mc-btn { margin-top: 1.1rem; }

/* ---------- FAQ : des boutons qui se déplient ---------- */
.faq { display: grid; gap: .55rem; max-width: 900px; margin: 0 auto; }
.faq summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    min-height: 48px; padding: .6rem 1.1rem .7rem;
    font-family: var(--ui); font-size: .95rem; color: var(--c-white); text-shadow: var(--sh-w);
    background: var(--stone); border: 2px solid #000; box-shadow: inset 2px 2px 0 var(--stone-hi), inset -2px -4px 0 var(--stone-lo);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex-shrink: 0; font-weight: 700; color: var(--c-yellow); text-shadow: var(--sh-y); }
.faq details[open] summary::after { content: '−'; }
.faq summary:hover { outline: 2px solid var(--c-white); outline-offset: -2px; }
.faq details > p { padding: 1rem 1.2rem; background: var(--panel); border: 2px solid #000; border-top: 0; }

/* ---------- Dernier appel ---------- */
.final { max-width: 720px; margin: 0 auto; text-align: center; }
.final img { margin: 0 auto 1rem; }
.final p { margin: .7rem auto 1.4rem; max-width: 50ch; }
.final .row { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }

/* ==========================================================
   PAGES INTÉRIEURES
   ========================================================== */
.page-head { padding: clamp(2.5rem, 6vw, 3.75rem) 0 1.75rem; text-align: center; }
.page-head p:not(.kicker) { margin: .8rem auto 0; max-width: 62ch; }
.page-body { padding-bottom: 4rem; }

/* ---------- Guide ---------- */
.guide-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.toc { position: sticky; top: calc(var(--bar-h) + 1.25rem); display: flex; flex-direction: column; gap: .45rem; }
.toc .mc-btn { justify-content: flex-start; font-size: .88rem; }
.intro-text { margin-bottom: 1.2rem; }
.note { margin: 1rem 0; padding: .85rem 1rem; background: rgba(255, 170, 0, .08); border: 2px solid #000; box-shadow: inset 0 0 0 1px rgba(255, 170, 0, .35); }
.note strong { color: var(--c-gold); }
.note-info { background: rgba(85, 255, 85, .05); box-shadow: inset 0 0 0 1px rgba(85, 255, 85, .3); }
.note-info strong { color: var(--c-green); }
.cmd-group { margin-top: 1.5rem; }
.cmd-group > h3 { font-family: var(--ui); font-weight: 400; font-size: 1rem; color: var(--c-yellow); text-shadow: var(--sh-y); margin-bottom: .75rem; }
.cmd-list { display: grid; gap: .65rem; }
.cmd { display: grid; grid-template-columns: minmax(0, 19rem) minmax(0, 1fr); gap: .4rem 1.1rem; align-items: start; }
/* une commande ressemble à la ligne de saisie du chat ; clic = copie */
.cmd-code {
    justify-self: start; max-width: 100%;
    font-family: var(--ui); font-size: .92rem; color: var(--c-white); text-shadow: var(--sh-w);
    background: rgba(0, 0, 0, .72); border: 0; border-left: 3px solid #666;
    padding: .45rem .7rem; cursor: pointer; text-align: left; white-space: nowrap;
}
.cmd.key .cmd-code { border-left-color: var(--c-gold); }
.cmd-code:hover { background: #000; border-left-color: var(--c-yellow); }
button.cmd-code:hover::after, button.cmd-code:focus-visible::after { content: '_'; color: var(--c-gray); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.cmd-code.copied { border-left-color: var(--c-green); }
span.cmd-code { cursor: default; color: var(--ink-2); }
.cmd-desc { padding-top: .3rem; font-size: .98rem; }
.cmd-desc small { display: block; margin-top: .25rem; font-size: .88rem; color: var(--ink-3); }
.steps-box { margin-top: 1rem; padding: 1rem 1.1rem; background: rgba(0, 0, 0, .42); border: 2px solid #000; }
.steps-box > h3 { margin-bottom: .75rem; }
.sign-preview { display: inline-grid; gap: .05rem; margin-top: .6rem; padding: .6rem 1.4rem; min-width: 190px; text-align: center; font-family: var(--ui); line-height: 1.5; color: #1a1206; background: #b8925a; border: 3px solid #6b4f2c; box-shadow: inset 0 0 0 2px #c9a46a; }
.sign-preview .empty { color: #6b4f2c; }
.connection { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0; }
.connection-item { flex: 1 1 200px; display: flex; flex-direction: column; gap: .15rem; padding: .7rem .9rem; text-align: left; cursor: pointer; background: rgba(0, 0, 0, .62); border: 2px solid var(--slot-line); }
.connection-item:hover { border-color: var(--c-white); }
.connection-item.copied { border-color: var(--c-green); }
.connection-label { font-family: var(--ui); font-size: .78rem; color: var(--c-gray); }
.connection-value { font-family: var(--ui); font-size: 1.15rem; color: var(--c-white); text-shadow: var(--sh-w); }
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-bottom: 1rem; padding: .75rem 1rem; background: rgba(0, 0, 0, .42); border: 2px solid #000; }
.legend p { display: flex; align-items: center; gap: .5rem; font-size: .94rem; }
.badge { font-family: var(--ui); font-size: .78rem; padding: 0 .4rem; background: rgba(0, 0, 0, .65); white-space: nowrap; }
.badge-required { color: var(--c-gold); text-shadow: 2px 2px 0 #3f2a00; }
.badge-recommended { color: var(--c-green); text-shadow: 2px 2px 0 #153f15; }
.badge-optional { color: var(--c-gray); text-shadow: var(--sh-g); }
.mod-group { margin-top: 1.75rem; }
.mod-group > h3 { display: flex; align-items: center; gap: .55rem; font-family: var(--ui); font-weight: 400; font-size: 1rem; color: var(--c-yellow); text-shadow: var(--sh-y); }
.mod-group > p { margin-top: .4rem; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .85rem; margin-top: .8rem; }
/* une fiche de mod = l'info-bulle d'un objet dans l'inventaire (fond violet sombre, liseré violet) */
.mod-card { display: flex; flex-direction: column; padding: 1rem 1.1rem; background: rgba(16, 0, 16, .9); border: 2px solid #100010; box-shadow: inset 0 0 0 2px #3a1083; }
.mod-card.required { box-shadow: inset 0 0 0 2px #7a5200; }
.mod-header { display: flex; align-items: center; gap: .6rem; margin-bottom: .55rem; }
.mod-header .px-icon { color: var(--c-aqua); }
.mod-header h3 { font-family: var(--ui); font-weight: 400; font-size: 1rem; text-shadow: var(--sh-w); }
.mod-header .badge { margin-left: auto; }
.mod-card > p { flex: 1; font-size: .95rem; color: #b9b9c4; }
.mod-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.mod-link { font-family: var(--ui); font-size: .8rem; color: var(--c-aqua); padding: .3rem .6rem; background: rgba(0, 0, 0, .45); border: 1px solid rgba(85, 255, 255, .35); }
.mod-link:hover { color: var(--c-white); border-color: var(--c-white); }
.plugins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .7rem; }
.plugin-item { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem; color: inherit; background: rgba(0, 0, 0, .45); border: 2px solid #000; box-shadow: inset 0 0 0 1px var(--edge); }
a.plugin-item:hover { color: inherit; box-shadow: inset 0 0 0 2px var(--c-white); }
.plugin-item .px-icon { width: 28px; height: 28px; margin-bottom: .35rem; color: var(--c-yellow); filter: drop-shadow(2px 2px 0 #3f3f15); }
.plugin-item h3 { font-family: var(--ui); font-weight: 400; font-size: .98rem; text-shadow: var(--sh-w); }
.plugin-item p { font-size: .9rem; color: var(--ink-3); }
.plugin-item .more { margin-top: auto; padding-top: .45rem; font-family: var(--ui); font-size: .78rem; color: var(--c-yellow); }
.help-box { text-align: center; }
.help-box > h2 { justify-content: center; }
.help-box > p { margin: 0 auto 1.25rem; max-width: 52ch; }

/* ---------- Carte ---------- */
.map-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: 2rem 0 1rem; }
.map-head p { margin-top: .5rem; max-width: 64ch; }
.map-chips { display: flex; gap: .45rem; overflow-x: auto; padding: 4px 4px 1rem; margin: 0 -4px; scrollbar-width: none; }
.map-chips::-webkit-scrollbar { display: none; }
.map-chips .mc-btn { white-space: nowrap; flex-shrink: 0; }
.map-frame { position: relative; height: calc(100svh - var(--bar-h) - 14rem); min-height: 440px; margin-bottom: 1rem; overflow: hidden; background: #0b0b0e; border: 2px solid #000; box-shadow: 0 0 0 2px var(--edge); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-poster { position: absolute; inset: 0; }
.map-poster img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.5) saturate(.9); }
.map-poster-content { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; padding: 1.5rem; text-align: center; }
.map-poster-content p { font-family: var(--ui); font-size: .88rem; color: #e6e6e6; text-shadow: var(--sh-w); }
/* chargement : l'écran « Chargement du terrain » du jeu, sur fond de terre */
.map-loader {
    position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
    font-family: var(--ui); color: var(--c-white); text-shadow: var(--sh-w);
    background: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, .55)), #3b2a1c url('/assets/img/terre.png?v=4cd40c7b95') 0 0 / 64px 64px repeat;
    image-rendering: pixelated; transition: opacity .4s;
}
.map-loader[hidden] { display: none; }
.map-loader.done { opacity: 0; pointer-events: none; }
.loading-bar { width: min(320px, 70%); height: 12px; padding: 2px; border: 2px solid var(--c-white); }
.loading-bar span { display: block; height: 100%; background: var(--c-white); transform-origin: left; animation: loading 2.4s ease-in-out infinite; }
@keyframes loading { from { transform: scaleX(.05); } to { transform: scaleX(1); } }
.map-tips { display: flex; flex-wrap: wrap; gap: .45rem 1.4rem; margin-bottom: 3rem; font-size: .92rem; color: var(--ink-3); }
.tips-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .tips-mouse { display: none; } .tips-touch { display: flex; } }

/* ---------- Règles : un livre du jeu ---------- */
.book {
    position: relative; max-width: 660px; margin: 0 auto; padding: 3rem clamp(1.5rem, 6vw, 3.25rem) 2.5rem;
    color: #2b2112; background: #f3e7c5;
    border: 3px solid #000;
    box-shadow: inset 0 0 0 5px #d9c393, inset 0 0 0 8px #f3e7c5, inset 0 0 0 10px #a07c45, 8px 8px 0 rgba(0, 0, 0, .5);
}
.book-page { position: absolute; top: 1.2rem; right: 1.8rem; font-family: var(--ui); font-size: .8rem; color: #6b5636; }
.book-title { margin-bottom: 1.6rem; text-align: center; font-family: var(--ui); font-weight: 700; font-size: 1.15rem; color: #2b2112; }
.rule-list { display: grid; gap: 1.2rem; counter-reset: rule; }
.rule-item { counter-increment: rule; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: .8rem; }
.rule-item::before { content: counter(rule) '.'; font-family: var(--ui); font-weight: 700; font-size: 1.25rem; line-height: 1.3; color: #8b1d1d; }
.rule-item h2 { margin-bottom: .2rem; font-size: 1.05rem; color: #2b2112; text-shadow: none; }
.rule-item p { font-size: 1rem; color: #43351f; }
.book-sign { margin-top: 2rem; text-align: right; font-family: var(--ui); font-size: .85rem; color: #6b5636; }
.rules-after { max-width: 660px; margin: 1.75rem auto 0; }
.warning-box > h2 { color: var(--c-gold); text-shadow: 3px 3px 0 #3f2a00; }
.warning-box > h2 .px-icon { color: var(--c-gold); filter: drop-shadow(2px 2px 0 #3f2a00); }

/* ---------- 404 : « Vous êtes mort ! » ---------- */
.dead { position: relative; isolation: isolate; min-height: calc(100svh - var(--bar-h) - var(--hotbar-h)); display: grid; place-items: center; padding: 3rem 1rem; text-align: center; }
.dead::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(96, 0, 0, .55), rgba(170, 0, 0, .4)); }
.dead h1 { font-size: clamp(2.3rem, 7vw, 4.2rem); text-shadow: 4px 4px 0 #3f3f3f; }
.dead .death-msg { margin-top: 1.1rem; font-family: var(--ui); font-size: .95rem; color: var(--c-white); text-shadow: var(--sh-w); }
.dead .score { margin: .6rem 0 2.25rem; font-family: var(--ui); color: var(--c-white); text-shadow: var(--sh-w); }
.dead .score span { color: var(--c-yellow); text-shadow: var(--sh-y); }
.dead-menu { display: grid; gap: .6rem; width: min(100%, 400px); margin: 0 auto; }

/* ==========================================================
   PIED DE PAGE : de la terre sous une bande d'herbe
   ========================================================== */
.footer { position: relative; margin-top: auto; padding-top: 3.25rem; background: #2a1e14 url('/assets/img/terre.png?v=4cd40c7b95') 0 0 / 64px 64px repeat; image-rendering: pixelated; }
.footer::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 24px; background: url('/assets/img/herbe.png?v=999d8de04d') 0 0 / 64px 24px repeat-x; }
.footer::after { content: ''; position: absolute; inset: 24px 0 0; background: rgba(14, 9, 5, .76); }
.footer > * { position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem 3rem; }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; }
.footer-brand p { max-width: 38ch; font-size: .95rem; color: #ddd0bd; }
.footer-col { display: flex; flex-direction: column; gap: .45rem; }
.footer-title { margin-bottom: .3rem; font-family: var(--ui); color: var(--c-yellow); text-shadow: var(--sh-y); }
.footer-col a { width: fit-content; font-family: var(--ui); font-size: .88rem; color: var(--c-white); text-shadow: var(--sh-w); }
.footer-col a:hover { color: var(--c-yellow); text-shadow: var(--sh-y); }
.copy-chip { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .75rem; font-family: var(--ui); font-size: .9rem; color: var(--c-white); text-shadow: var(--sh-w); background: rgba(0, 0, 0, .6); border: 2px solid var(--slot-line); cursor: pointer; }
.copy-chip:hover { border-color: var(--c-white); }
.copy-chip.copied { border-color: var(--c-green); }
.copy-chip .px-icon { width: 16px; height: 16px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 2.5rem; padding: 1rem 5.5rem 1.4rem 1.5rem; border-top: 2px solid rgba(0, 0, 0, .55); font-family: var(--ui); font-size: .78rem; color: #d2c3ae; }
.footer-bottom p { color: inherit; }
.footer-bottom a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Notification « progrès » (après une copie) ---------- */
.mc-toast {
    position: fixed; right: 1rem; top: calc(var(--bar-h) + 1rem); z-index: 3000;
    display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 .8rem; align-items: center;
    width: min(330px, calc(100vw - 2rem)); padding: .65rem .9rem;
    background: #212121; border: 2px solid #000; box-shadow: inset 0 0 0 2px #5a5a5a, 0 10px 26px rgba(0, 0, 0, .5);
    transform: translateX(calc(100% + 2rem)); transition: transform .35s cubic-bezier(.2, .9, .3, 1.1);
    pointer-events: none;
}
.mc-toast.show { transform: none; }
.mc-toast .ti { grid-row: 1 / 3; display: grid; place-items: center; width: 40px; height: 40px; color: var(--c-green); background: #8b8b8b; border: 2px solid #000; box-shadow: inset 2px 2px 0 #c6c6c6, inset -2px -2px 0 #555; }
.mc-toast .ti .px-icon { filter: drop-shadow(2px 2px 0 #153f15); }
.mc-toast .tt { font-family: var(--ui); font-size: .82rem; color: var(--c-yellow); text-shadow: var(--sh-y); }
.mc-toast .tm { font-family: var(--ui); font-size: .92rem; color: var(--c-white); text-shadow: var(--sh-w); overflow-wrap: anywhere; }
.mc-toast.error .ti { color: var(--c-red); }

/* ---------- Visionneuse d'images ---------- */
.lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: var(--ink); background: rgba(0, 0, 0, .92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(0, 0, 0, .6); }
.lightbox figure { display: flex; flex-direction: column; align-items: center; gap: .9rem; max-width: 100%; padding: 4rem 4.75rem; }
.lightbox img { width: auto; height: auto; max-width: min(1600px, 100%); max-height: calc(100vh - 11rem); border: 2px solid #000; }
.lightbox figcaption { max-width: 70ch; text-align: center; font-family: var(--ui); font-size: .9rem; color: var(--c-white); text-shadow: var(--sh-w); }
.lb-btn { position: absolute; }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1000px) {
    .join-grid { grid-template-columns: minmax(0, 1fr); }
    .places { grid-template-columns: minmax(0, 1fr); }
    .places .place-views { order: -1; }   /* sur écran étroit : l'aperçu d'abord, la liste ensuite */
    .toasts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .guide-layout { grid-template-columns: minmax(0, 1fr); }
    .toc {
        top: var(--bar-h); z-index: 900; flex-direction: row; overflow-x: auto; scrollbar-width: none;
        margin: 0 -1.5rem; padding: .6rem 1.5rem; background: rgba(0, 0, 0, .82); border-bottom: 2px solid #000;
    }
    .toc::-webkit-scrollbar { display: none; }
    .toc .mc-btn { flex-shrink: 0; white-space: nowrap; min-height: 40px; padding: .35rem .8rem .45rem; font-size: .82rem; }
    .toc .mc-btn .px-icon { display: none; }
    .guide-content > .panel[id] { scroll-margin-top: 3.75rem; }   /* s'ajoute à scroll-padding-top : hauteur du sommaire collé */
    .cmd { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
}

/* mobile : la navigation passe dans la barre d'inventaire, en bas */
@media (max-width: 860px) {
    :root { --bar-h: 56px; --hotbar-h: calc(74px + env(safe-area-inset-bottom)); }
    .navlinks { display: none; }
    .status-chip { margin-left: auto; }
    .xp { top: auto; bottom: var(--hotbar-h); height: 5px; }
    .hotbar {
        display: flex; justify-content: center;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
        height: var(--hotbar-h); padding: 8px .5rem calc(8px + env(safe-area-inset-bottom));
        background: rgba(0, 0, 0, .82); border-top: 2px solid #000;
        backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    }
    .slot {
        position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        width: 54px; height: 58px; margin-left: -2px;
        color: var(--c-white); font-family: var(--ui); font-size: .66rem; line-height: 1; text-shadow: 1px 1px 0 #3f3f3f;
        background: rgba(139, 139, 139, .3); border: 2px solid #373737; box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .35);
    }
    .slot:first-child { margin-left: 0; }
    .slot .px-icon { width: 24px; height: 24px; filter: drop-shadow(2px 2px 0 #3f3f3f); }
    /* l'emplacement sélectionné : le cadre blanc épais du jeu */
    .hotbar:not(.js) .slot[aria-current="page"], .slot.is-current {
        z-index: 1; color: var(--c-yellow); text-shadow: 1px 1px 0 #3f3f15;
        background: rgba(139, 139, 139, .5); border-color: var(--c-white); box-shadow: 0 0 0 2px #000, inset 0 0 0 2px #000;
    }
    .mc-toast { top: auto; bottom: calc(var(--hotbar-h) + 1rem); transform: translateY(calc(100% + var(--hotbar-h) + 2rem)); }
    .mc-toast.show { transform: none; }
    .back-to-top { display: none; }
    .title-foot { font-size: .72rem; }
}

@media (max-width: 640px) {
    body { font-size: 1rem; }
    .container { padding: 0 1rem; }
    .brand { font-size: 1rem; gap: .5rem; }
    .brand img { width: 30px; height: 30px; }
    .logo-word--top { margin-bottom: .45em; }
    /* écran étroit : le texte jaune passe sous le bandeau, il ne doit rien masquer */
    .splash { position: relative; right: auto; top: auto; margin-top: .9rem; font-size: .88rem; transform: rotate(-5deg); }
    .title-address { gap: .6rem; padding-left: .8rem; }
    .title-foot { flex-direction: column; gap: .15rem; padding-top: 1.75rem; }
    .server { grid-template-columns: 48px minmax(0, 1fr); gap: .1rem .75rem; }
    .server img { grid-row: 1 / 3; width: 48px; height: 48px; }
    .server-side { grid-column: 2; grid-row: 2; }
    .server-motd, .server-hint { grid-column: 1 / -1; }
    .server-motd { margin-top: .4rem; }
    .toasts { grid-template-columns: minmax(0, 1fr); }
    .cmd-code { white-space: normal; overflow-wrap: anywhere; }
    .place-item { grid-template-columns: 80px minmax(0, 1fr); }
    .place-item img { width: 80px; height: 45px; }
    .footer-grid { gap: 1.75rem 1.25rem; }
    .footer-bottom { padding-inline: 1rem; }
    .toc { margin: 0 -1rem; padding: .6rem 1rem; }
    .map-frame { height: 62vh; min-height: 340px; }
    .lightbox figure { padding: 4rem .75rem 5.5rem; }
    .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; }
    .lb-prev { left: calc(50% - 56px); }
    .lb-next { right: calc(50% - 56px); }
    .book-page { top: .9rem; right: 1.2rem; }
}

@media (max-width: 380px) {
    .status-chip [data-status-pill-text] { display: none; }
    .slot { width: 46px; font-size: .58rem; }
    .title-menu { grid-template-columns: 44px 1fr 1fr 44px; }
    .title-menu .mc-btn--square { width: 44px; }
    .title-menu .mc-btn { padding-inline: .6rem; font-size: .92rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .panorama img { animation: none; }
}
