/* Nyvora - boutique. Couleurs tirees de l'icone (cristal violet et bleu, lueur cyan). */
@import url("https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400;600;700&family=Silkscreen:wght@400;700&family=Rubik:wght@400;500;600&display=swap");

:root {
  --bg: #090a17;
  --bg-2: #0e1024;
  --panel: #14173a;
  --panel-2: #1b1f4a;
  --line: #2a2f6b;
  --text: #ecebff;
  --muted: #9da2d6;
  --violet: #8a5cff;
  --violet-deep: #5b2fd6;
  --blue: #3d6bff;
  --cyan: #45e3ff;
  --gold: #ffcf4a;
  --xp: #80ff20;
  --danger: #ff5c7a;
  --ok: #5dff9a;
  --pixel: "Pixelify Sans", ui-monospace, monospace;
  --body: "Rubik", system-ui, sans-serif;
  /* Chiffres : le 5 de Pixelify ressemble a un S */
  --num: "Silkscreen", var(--pixel);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--body);
  /* Halo du cristal en haut, grille de blocs tres discrete */
  background-image:
    radial-gradient(900px 420px at 50% -120px, rgba(138, 92, 255, .22), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--cyan); }
img { image-rendering: auto; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

h1, h2, h3, .pixel { font-family: var(--pixel); font-weight: 600; letter-spacing: .02em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1; margin: 0; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); margin: 0 0 .4em; }
h3 { font-size: 1.25rem; margin: 0 0 .3em; }
p { margin: 0 0 1em; }
.eur { font-family: var(--body); font-weight: 600; }
.muted { color: var(--muted); }
.tag {
  display: inline-block; font: 600 .78rem var(--pixel); letter-spacing: .08em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: .6rem;
}

/* --- En-tete --- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(9, 10, 23, .86);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid #000;
  box-shadow: 0 1px 0 var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 36px; height: 36px; }
.brand span { font: 700 1.35rem var(--pixel); letter-spacing: .06em; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  color: var(--muted); text-decoration: none; font: 500 1rem var(--pixel);
  padding: 6px 12px; border: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); border-color: var(--line); background: var(--panel); }
.pb-chip {
  display: none; align-items: center; gap: 6px; font: 400 .9rem var(--num);
  background: #000; border: 2px solid var(--line); padding: 4px 10px; color: var(--xp); text-decoration: none;
}
.pb-chip.on { display: inline-flex; }
.btn.menu-btn { display: none; }

/* --- Boutons facon interface Minecraft (relief clair en haut, sombre en bas) --- */
.btn {
  --c: var(--violet);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1.05rem var(--pixel); color: #fff; text-decoration: none; cursor: pointer;
  background: var(--c); border: 2px solid #000;
  padding: 10px 20px; min-height: 46px;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .35), inset -2px -4px 0 rgba(0, 0, 0, .38);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .35);
  transition: filter .12s, transform .06s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(2px); box-shadow: inset 2px 3px 0 rgba(0, 0, 0, .38), inset -2px -1px 0 rgba(255, 255, 255, .2); }
.btn.ghost { --c: #24285c; }
.btn.cyan { --c: #1aa6c4; }
.btn.gold { --c: #c98f12; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: .95rem; }
.btn[disabled], .btn.disabled { --c: #2a2d4f; color: #8186b8; cursor: not-allowed; filter: none; transform: none; }

/* --- Accueil --- */
.hero { padding: 72px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 span { color: var(--violet); text-shadow: 4px 4px 0 #000, 0 0 28px rgba(138, 92, 255, .5); }
.hero .lead { font-size: 1.15rem; color: #cfd0f5; max-width: 34ch; margin: 18px 0 26px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Entree de la liste multijoueur : icone 64 px en taille reelle */
.serverlist { background: rgba(0, 0, 0, .55); border: 2px solid #000; box-shadow: 0 0 0 2px var(--line), 0 18px 50px rgba(0, 0, 0, .5); }
.serverlist .title { font: 600 .9rem var(--pixel); color: var(--muted); text-align: center; padding: 10px; border-bottom: 2px solid #000; background: rgba(255, 255, 255, .03); }
.server-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 14px; border: 2px solid transparent; }
.server-row.selected { border-color: #a0a0a0; background: rgba(0, 0, 0, .35); }
.server-row img { width: 64px; height: 64px; image-rendering: pixelated; }
.server-row .name { font: 600 1.05rem var(--pixel); color: #fff; }
.server-row .motd { font: 400 .98rem/1.35 var(--pixel); color: #aaa; }
.motd .aqua { color: #55ffff; font-weight: 700; }
.motd .gray { color: #aaaaaa; }
.motd .dark { color: #555; }
.server-row .right { text-align: right; font: 400 .95rem var(--pixel); color: #aaa; }
.bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; margin-left: 6px; vertical-align: -2px; }
.bars i { width: 3px; background: #2bdc2b; display: block; }
.bars i:nth-child(1) { height: 4px; } .bars i:nth-child(2) { height: 7px; } .bars i:nth-child(3) { height: 10px; } .bars i:nth-child(4) { height: 12px; } .bars i:nth-child(5) { height: 14px; }
.serverlist .foot { display: flex; gap: 8px; padding: 12px 14px; border-top: 2px solid #000; }
.serverlist .foot .btn { flex: 1; }
.ip { font: 600 1rem var(--pixel); color: var(--cyan); }

.section { padding: 64px 0; }
.section.alt { background: rgba(255, 255, 255, .02); border-top: 2px solid #000; border-bottom: 2px solid #000; }
.head { max-width: 640px; margin-bottom: 30px; }

.worlds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.world.faction { --c: #8a5cff; } .world.mine { --c: #45e3ff; } .world.nether { --c: #ff6a3d; }
.mt { margin-top: 18px; }
.head.tight { margin-bottom: 10px; }
.world { background: var(--panel); border: 2px solid #000; box-shadow: inset 0 0 0 2px var(--line); }
.world .strip { height: 10px; background: var(--c); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35); }
.world .body { padding: 20px 22px 22px; }
.world ul { margin: 12px 0 0; padding: 0; list-style: none; }
.world li { padding-left: 18px; position: relative; color: #cfd0f5; margin: 6px 0; }
.world li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; background: var(--c); }

.honest { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.list-card { background: var(--panel); border: 2px solid #000; padding: 22px; box-shadow: inset 0 0 0 2px var(--line); }
.list-card ul { margin: 0; padding: 0; list-style: none; }
.list-card li { display: flex; gap: 10px; margin: 8px 0; color: #d7d8fb; }
.list-card li b { font-family: var(--pixel); width: 1.2em; flex: none; }
.yes b { color: var(--ok); }
.no b { color: var(--danger); }

/* Barre d'objectif facon barre d'XP */
.goal { background: var(--panel); border: 2px solid #000; padding: 26px; box-shadow: inset 0 0 0 2px var(--line); }
.xp-level { font: 700 1.5rem var(--num); color: var(--xp); text-shadow: 2px 2px 0 #000; text-align: center; }
.xp { height: 18px; background: #1c1c1c; border: 2px solid #000; margin: 6px 0 14px; position: relative; overflow: hidden; }
.xp::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(5.5% - 2px), rgba(0, 0, 0, .55) calc(5.5% - 2px) 5.5%);
}
.xp i { display: block; height: 100%; width: 0; background: var(--xp); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .25); transition: width 1.2s ease-out; }

/* --- Pages internes --- */
.page-head { padding: 52px 0 18px; }
.page-head p { color: var(--muted); max-width: 60ch; }
.tabs { display: flex; gap: 8px; margin: 18px 0 26px; flex-wrap: wrap; }
.tabs button { font: 600 1rem var(--pixel); color: var(--muted); background: var(--panel); border: 2px solid #000; box-shadow: inset 0 0 0 2px var(--line); padding: 8px 18px; cursor: pointer; }
.tabs button[aria-selected="true"] { color: #fff; background: var(--violet-deep); box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .25), inset -2px -3px 0 rgba(0, 0, 0, .35); }
.panel { display: none; }
.panel.on { display: block; }

.packs, .grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grades { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--panel); border: 2px solid #000; box-shadow: inset 0 0 0 2px var(--line); padding: 22px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.card .big { font: 700 2rem/1 var(--num); color: var(--xp); text-shadow: 2px 2px 0 #000; }
.card .big small { font-size: 1rem; color: var(--muted); text-shadow: none; }
.card .price { font: 400 1.05rem var(--num); }
.card .btn { margin-top: auto; }
.ribbon { position: absolute; top: -2px; right: -2px; background: var(--gold); color: #1b1300; font: 700 .8rem var(--num); padding: 4px 8px; border: 2px solid #000; }
.badge { font: 700 2.4rem/1 var(--pixel); text-shadow: 2px 2px 0 #000; color: var(--c); }
.grade-name { font: 700 1.5rem var(--pixel); }
.note { font-size: .9rem; color: var(--muted); }

.cat { margin: 0 0 30px; }
.cat h3 { display: flex; align-items: baseline; gap: 10px; }
.cat h3 small { font: 400 .9rem var(--body); color: var(--muted); }

/* Cases d'inventaire */
.inventory { display: inline-grid; grid-template-columns: repeat(9, 64px); gap: 6px; padding: 10px; background: #c6c6c6; border: 2px solid #000; box-shadow: inset 2px 2px 0 #fff, inset -2px -2px 0 #555; max-width: 100%; }
.slot.empty { cursor: default; }
.slot.empty:hover { background: #8b8b8b; }
.slot {
  width: 64px; height: 64px; position: relative; cursor: pointer;
  background: #8b8b8b; border: 0; padding: 0;
  box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff;
  display: grid; place-items: center;
  font: 700 1.7rem var(--pixel); color: var(--c); text-shadow: 2px 2px 0 rgba(0, 0, 0, .55);
}
.slot:hover, .slot:focus-visible { background: #a7a7a7; outline: none; }
.slot.owned::after { content: "\2714"; position: absolute; right: 3px; bottom: 1px; font-size: .8rem; color: #5dff9a; text-shadow: 1px 1px 0 #000; }
.slot.active { box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff, 0 0 0 2px var(--cyan); }

/* Info-bulle facon objet Minecraft */
.mc-tip {
  position: fixed; z-index: 50; pointer-events: none; max-width: 280px;
  background: rgba(16, 0, 16, .94); padding: 8px 10px; font: 400 .98rem/1.35 var(--pixel);
  border: 2px solid; border-image: linear-gradient(#5000ff, #28007f) 1;
  box-shadow: 0 0 0 2px rgba(16, 0, 16, .94);
  display: none;
}
.mc-tip .t { color: var(--c); }
.mc-tip .d { color: #aaa; margin-top: 4px; }
.mc-tip .p { color: var(--gold); margin-top: 6px; }

/* Fenetre de confirmation */
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); display: none; place-items: center; z-index: 60; padding: 16px; }
.modal-back.on { display: grid; }
.modal { width: min(440px, 100%); background: var(--panel-2); border: 2px solid #000; box-shadow: inset 0 0 0 2px var(--line), 0 30px 80px rgba(0, 0, 0, .6); padding: 24px; }
.modal .row { display: flex; gap: 10px; margin-top: 18px; }
.modal .row .btn { flex: 1; }

/* --- Formulaires --- */
.auth { width: min(460px, 100%); margin: 48px auto 72px; }
.steps { display: flex; gap: 8px; margin-bottom: 18px; font: 600 .95rem var(--pixel); color: var(--muted); }
.steps span { flex: 1; text-align: center; padding: 6px; border: 2px solid #000; background: var(--panel); }
.steps span.on { color: #fff; background: var(--violet-deep); }
label { display: block; font: 600 .95rem var(--pixel); margin: 14px 0 6px; color: #d7d8fb; }
input[type="text"], input[type="password"] {
  width: 100%; font: 500 1.05rem var(--body); color: #fff; background: #000;
  border: 2px solid #a0a0a0; padding: 11px 12px;
}
input:focus { border-color: var(--cyan); outline: none; }
.code-input { font: 700 2rem var(--num) !important; letter-spacing: .55em; text-align: center; text-transform: uppercase; padding-left: .55em !important; }
.msg { margin-top: 14px; padding: 10px 12px; border: 2px solid #000; font-size: .95rem; display: none; }
.msg.on { display: block; }
.msg.err { background: #2b0c18; color: #ffb3c2; box-shadow: inset 0 0 0 2px #6b1c33; }
.msg.ok { background: #0c2b1a; color: #b3ffd2; box-shadow: inset 0 0 0 2px #1c6b3d; }
.hint { font-size: .92rem; color: var(--muted); margin-top: 10px; }
.timer { font: 400 1rem var(--num); color: var(--gold); }

/* --- Compte --- */
.account { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; margin-bottom: 64px; }
.side { position: sticky; top: 84px; }
.slot-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.chip {
  font: 500 .95rem var(--pixel); color: var(--text); background: var(--panel-2); border: 2px solid #000;
  box-shadow: inset 0 0 0 2px var(--line); padding: 6px 12px; cursor: pointer;
}
.chip.on { background: #0b3341; box-shadow: inset 0 0 0 2px var(--cyan); color: #fff; }
.chip .sym { color: var(--c); margin-right: 6px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { font: 600 .9rem var(--pixel); color: var(--muted); }
.plus { color: var(--ok); font-family: var(--num); }
.minus { color: var(--danger); font-family: var(--num); }
.empty { color: var(--muted); padding: 14px 0; }

/* --- Textes legaux --- */
.legal { max-width: 760px; padding-bottom: 72px; }
.legal h2 { font-size: 1.4rem; margin-top: 30px; }
.todo { background: #3a2a00; color: #ffd98a; padding: 0 4px; }

/* --- Pied de page --- */
.foot-site { border-top: 2px solid #000; box-shadow: 0 -1px 0 var(--line); padding: 34px 0; margin-top: auto; background: rgba(0, 0, 0, .25); }
.foot-site .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; }
.foot-site nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-site a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.foot-site a:hover { color: var(--text); }
.foot-site .legal-note { color: #6c70a3; display: block; width: 100%; }
.studio { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.studio img { width: 40px; height: 40px; }
.studio span { font: 700 1rem var(--pixel); letter-spacing: .12em; color: #f2f2f2; line-height: 1.1; }
.studio span small { display: block; font: 400 .72rem var(--body); letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.studio:hover span { color: #ff3b3b; }
.btn.discord { --c: #5865f2; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #000; border: 2px solid var(--line); padding: 10px 16px; font: 500 1rem var(--pixel); z-index: 70; display: none; }
.toast.on { display: block; }

/* --- Mobile --- */
@media (max-width: 900px) {
  .hero .wrap, .honest, .account { grid-template-columns: 1fr; }
  .worlds, .grades { grid-template-columns: 1fr; }
  .packs { grid-template-columns: 1fr 1fr; }
  .side { position: static; }
}
@media (max-width: 720px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; background: var(--bg-2); border-bottom: 2px solid #000; padding: 10px 16px; align-items: stretch; }
  .nav.open { display: flex; }
  .btn.menu-btn { display: inline-flex; margin-left: auto; }
  .top .pb-chip { margin-left: 0; }
  .hero { padding-top: 40px; }
  .packs { grid-template-columns: 1fr; }
  .server-row { grid-template-columns: 48px 1fr; }
  .server-row img { width: 48px; height: 48px; }
  .server-row .right { grid-column: 1 / -1; text-align: left; }
  .inventory { grid-template-columns: repeat(5, 56px); }
  .slot.empty { display: none; }
  .slot { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
