@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --bg: #0e0e12;
  --panel: #16161c;
  --line: rgba(255, 255, 255, 0.08);
  --txt: #e8e8ec;
  --muted: #8a8a94;
  --accent: #7c5cff;
  --body: #0b0a12;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
}
/* Thème clair (choix manuel via le bouton dans la barre). */
:root[data-theme="light"] {
  --bg: #f4f3fa;
  --panel: #ffffff;
  --line: rgba(20, 18, 40, 0.12);
  --txt: #1a1725;
  --muted: #6b6880;
  --accent: #6d43ff;
  --body: #eceaf4;
  --surface: rgba(20, 18, 40, 0.04);
  --surface-2: rgba(20, 18, 40, 0.06);
}
.theme-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--txt); cursor: pointer; transition: color .15s, border-color .15s; }
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.theme-btn .th-moon { display: none; }
:root[data-theme="light"] .theme-btn .th-sun { display: none; }
:root[data-theme="light"] .theme-btn .th-moon { display: inline; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Sora', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--txt);
  background:
    linear-gradient(rgba(11, 10, 18, 0.91), rgba(11, 10, 18, 0.96)),
    url('temple.jpg') center center / cover no-repeat fixed;
  background-color: var(--body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
/* Thème clair : voile plus clair sur l'image de fond. */
:root[data-theme="light"] body {
  background:
    linear-gradient(rgba(236, 234, 244, 0.90), rgba(236, 234, 244, 0.95)),
    url('temple.jpg') center center / cover no-repeat fixed;
  background-color: var(--body);
}

/* ---------- Header ---------- */
header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
}
.brand {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent);
  text-decoration: none;
}
.logo {
  position: absolute;
  left: 16px;
  top: 13px;
  display: flex;
  align-items: center;
}
.logo img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: block;
}
.login-pill {
  position: absolute;
  right: 16px;
  top: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--txt);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.login-pill:hover { background: rgba(255, 255, 255, 0.04); }
.login-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.login-head {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  image-rendering: pixelated;
}
.login-pill.connected {
  border-color: rgba(124, 92, 255, 0.5);
}

/* Fenêtre de connexion Minecraft */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.auth-overlay.show { display: flex; }
.auth-modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 26px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  /* Thème Minecraft : léger relief biseauté. */
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.06),
    inset -2px -2px 0 rgba(0, 0, 0, 0.28),
    0 6px 0 rgba(0, 0, 0, 0.22);
}
.auth-modal h3 { font-size: 18px; margin-bottom: 10px; }
.auth-status { font-size: 14px; color: var(--txt); margin-bottom: 14px; }
.code-box {
  font-family: ui-monospace, monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  background: rgba(124, 92, 255, 0.1);
  border: 1px solid rgba(124, 92, 255, 0.35);
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 16px;
  user-select: all;
  /* Champ "bloc Minecraft" : léger creux. */
  box-shadow:
    inset 2px 2px 0 rgba(0, 0, 0, 0.22),
    inset -2px -2px 0 rgba(255, 255, 255, 0.06);
}
.auth-open { margin-bottom: 14px; }
.auth-warn { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.auth-hint { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.auth-cancel {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
}
.auth-cancel:hover { color: var(--txt); }

/* ---------- Barre de navigation ---------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px;
  flex-wrap: wrap;
}
.nav-link {
  padding: 9px 16px;
  border-radius: 3px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}
/* Thème Emeria : survol/actif = bouton pixel biseauté mauve (plus le cadre arrondi générique). */
.nav-link:hover {
  background: rgba(124, 92, 255, 0.12);
  color: var(--txt);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.08), inset -1px -1px 0 rgba(0, 0, 0, 0.28);
}
.nav-link.active {
  background: rgba(124, 92, 255, 0.22);
  color: #fff;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.12), inset -2px -2px 0 rgba(0, 0, 0, 0.32), 0 2px 0 rgba(0, 0, 0, 0.2);
}
.nav-link.nav-panel { color: var(--accent); border: 1px solid rgba(124, 92, 255, 0.4); }
.nav-link.nav-panel:hover { background: rgba(124, 92, 255, 0.18); }

/* ---------- Contenu ---------- */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 22px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-title {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 22px;
  color: var(--txt);
}
.hero-text {
  font-size: 16px;
  line-height: 1.75;
  color: var(--txt);
  margin-bottom: 18px;
}
.hero-text .soft { color: var(--muted); }
.panel {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px 30px 34px;
  margin-bottom: 30px;
}
.btn-accent {
  display: inline-block;
  padding: 14px 40px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  border: none;
  border-radius: 4px;
  background: var(--accent);
  cursor: pointer;
  text-decoration: none;
  /* Look "cubique" : biseau clair en haut/gauche, sombre en bas/droite + ombre d'épaisseur. */
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.28),
    inset -2px -2px 0 rgba(0, 0, 0, 0.32),
    0 4px 0 rgba(0, 0, 0, 0.35);
  transform: translateY(0);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s;
}
.btn-accent:hover { filter: brightness(1.1); }
/* Enfoncement comme un vrai bloc quand on clique. */
.btn-accent:active {
  transform: translateY(3px);
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.22),
    inset -2px -2px 0 rgba(0, 0, 0, 0.3),
    0 1px 0 rgba(0, 0, 0, 0.35);
}

/* Police du site = Sora PARTOUT, sauf les boutons qui gardent une police neutre. */
.btn-accent, .btn-lg, .btn-primary, .btn-secondary, .boutique-btn, .login-pill,
.cart-btn, .win-btn, .macos-btn, .sc-btn, .fo-editbtn, .sup-iconbtn, .sup-fab,
.theme-btn, .vote-btn, .tb-burger, .auth-cancel, .wiki-cat, .tab {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ======= Cadre "cubique Minecraft" commun à TOUS les boutons ======= */
/* Biseau clair en haut/gauche, sombre en bas/droite + épaisseur -> look bloc Minecraft. */
.boutique-btn, .login-pill, .cart-btn, .win-btn, .macos-btn,
.sc-btn, .fo-editbtn, .sup-iconbtn, .sup-fab, .theme-btn, .vote-btn, .tb-burger, .auth-cancel {
  border-radius: 4px !important;
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.22),
    inset -2px -2px 0 rgba(0, 0, 0, 0.30),
    0 4px 0 rgba(0, 0, 0, 0.30) !important;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
}
.boutique-btn:active, .login-pill:active, .cart-btn:active, .win-btn:active, .macos-btn:active,
.sc-btn:active, .fo-editbtn:active, .sup-iconbtn:active, .sup-fab:active, .theme-btn:active, .vote-btn:active, .tb-burger:active, .auth-cancel:active {
  transform: translateY(3px);
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.18),
    inset -2px -2px 0 rgba(0, 0, 0, 0.28),
    0 1px 0 rgba(0, 0, 0, 0.30) !important;
}
.btn-discord { display: inline-flex; align-items: center; gap: 11px; }
.btn-discord svg { flex-shrink: 0; }
.note {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 14px;
}

/* ---------- Mockup fenêtre macOS (page launcher) ---------- */
.macos-card {
  background: #ececec;
  color: #1d1d1f;
  border-radius: 12px;
  padding: 18px 20px;
  text-align: left;
  max-width: 540px;
  width: 100%;
  margin: 0 auto 8px;
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.4);
  font-family: -apple-system, 'SF Pro Text', system-ui, sans-serif;
}
.macos-card.small { max-width: 440px; padding: 13px 15px; margin: 8px auto 4px; }
.macos-card.small .macos-app { font-size: 12.5px; }
.macos-card.small .macos-sub { font-size: 11px; }
.macos-card.small .macos-btn { font-size: 12px; padding: 5px 11px; }
.macos-sec-title { font-size: 12px; color: #86868b; font-weight: 600; margin-bottom: 12px; }
.macos-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.macos-app { font-size: 14px; font-weight: 600; color: #1d1d1f; }
.macos-app .hl {
  background: rgba(255, 59, 48, 0.14);
  outline: 1.5px solid rgba(255, 59, 48, 0.55);
  border-radius: 5px;
  padding: 0 4px;
}
.macos-sub { font-size: 12px; color: #6e6e73; margin-top: 6px; line-height: 1.45; }
.macos-btn {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid rgba(0, 0, 0, 0.12);
  outline: 1.5px solid rgba(255, 59, 48, 0.55);
  border-radius: 7px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- Fenêtre Windows SmartScreen (recréée) ---------- */
.win-card {
  background: #4a6ba3;
  color: #fff;
  border-radius: 8px;
  padding: 20px 22px 18px;
  text-align: left;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.4);
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.win-title { font-size: 20px; font-weight: 600; margin: 0 0 14px; line-height: 1.2; }
.win-body { font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, 0.92); margin: 0 0 14px; }
.win-meta { font-size: 13px; line-height: 1.7; margin: 0 0 20px; }
.win-meta .k { color: rgba(255, 255, 255, 0.75); }
.win-actions { display: flex; gap: 10px; justify-content: flex-end; }
.win-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 2px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  font-family: inherit;
}
.win-btn.primary { outline: 2px solid #fff; outline-offset: 1px; }

/* ---------- Boutique ---------- */
.shop-main { max-width: 1000px; }
.shop-top {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; margin-bottom: 22px;
}
.shop-top h1 { font-size: 26px; font-weight: 700; }
.cart-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 15px; border: 1px solid var(--line); background: transparent;
  color: var(--txt); border-radius: 8px; cursor: pointer; font-size: 14px;
}
.cart-btn:hover { background: rgba(255,255,255,0.04); }
.cart-badge {
  background: var(--accent); color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 700; padding: 1px 7px; min-width: 18px; text-align: center;
}
.shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; width: 100%; }
.grade-col {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 22px 18px; display: flex; flex-direction: column; text-align: center;
}
.grade-name { font-size: 19px; font-weight: 700; color: var(--accent); margin-bottom: 16px; }
.grade-adv {
  list-style: none; text-align: left; font-size: 13px; color: var(--txt);
  display: flex; flex-direction: column; gap: 9px; margin-bottom: 20px; flex: 1;
}
.grade-adv li { line-height: 1.4; }
.grade-price { font-size: 22px; font-weight: 700; margin-bottom: 14px; }
.grade-add {
  padding: 11px; border: none; border-radius: 8px; background: var(--accent);
  color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; transition: filter .15s;
}
.grade-add:hover { filter: brightness(1.12); }
@media (max-width: 820px) { .shop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .shop-grid { grid-template-columns: 1fr; } }

/* Panier */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: none; align-items: center; justify-content: center; z-index: 60; padding: 20px;
}
.cart-overlay.show { display: flex; }
.cart-modal {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; max-width: 420px; width: 100%;
}
.cart-modal h3 { font-size: 18px; margin-bottom: 16px; }
.cart-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cart-row .rm { background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 16px; }
.cart-row .rm:hover { color: #ff8a8a; }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 16px; margin: 16px 0; }
.cart-empty { color: var(--muted); font-size: 14px; text-align: center; padding: 14px 0; }
.cart-code {
  font-family: ui-monospace, monospace; font-size: 15px; word-break: break-all;
  background: rgba(124,92,255,0.1); border: 1px solid rgba(124,92,255,0.35);
  border-radius: 10px; padding: 12px; margin-top: 12px; color: var(--accent); user-select: all;
}

/* ---------- Timeline (Histoire) ---------- */
.timeline {
  position: relative;
  width: 100%;
  margin: 14px auto 0;
  padding: 6px 0 10px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  opacity: 0.45;
  transform: translateX(-50%);
}
.tl-item {
  position: relative;
  width: 50%;
  padding: 12px 32px;
  box-sizing: border-box;
}
.tl-item:nth-child(odd) { left: 0; }
.tl-item:nth-child(even) { left: 50%; }
.tl-dot {
  position: absolute;
  top: 26px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.tl-item:nth-child(odd) .tl-dot { right: -6px; }
.tl-item:nth-child(even) .tl-dot { left: -6px; }
.tl-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  text-align: left;
  /* Thème Minecraft : léger relief biseauté. */
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.06),
    inset -2px -2px 0 rgba(0, 0, 0, 0.26),
    0 4px 0 rgba(0, 0, 0, 0.18);
}
.tl-date {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.25),
    inset -1px -1px 0 rgba(0, 0, 0, 0.3);
}
.tl-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.tl-card p { font-size: 14px; line-height: 1.65; color: var(--txt); }
.tl-card p + p { margin-top: 10px; }
.tl-card strong { color: var(--accent); }
@media (max-width: 640px) {
  .timeline::before { left: 18px; }
  .tl-item, .tl-item:nth-child(even) { width: 100%; left: 0; padding: 10px 0 10px 44px; }
  .tl-item .tl-dot,
  .tl-item:nth-child(odd) .tl-dot,
  .tl-item:nth-child(even) .tl-dot { left: 12px; right: auto; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(20px);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--txt);
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Footer ---------- */
footer {
  padding: 22px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- Mobile ---------- */
@media (max-width: 560px) {
  header {
    flex-direction: column;
    height: auto;
    gap: 10px;
    padding: 14px 0;
  }
  .brand { font-size: 24px; }
  .login-pill {
    position: static;
    right: auto;
    top: auto;
  }
  .logo {
    position: static;
    left: auto;
    top: auto;
  }
  .navbar { gap: 2px; padding: 8px 6px; }
  .nav-link { padding: 8px 12px; font-size: 13px; }
  main { padding: 34px 16px 60px; }
  .panel { padding: 24px 20px 26px; }
  .hero-text { font-size: 15px; }
  .btn-accent { padding: 13px 34px; }
}

/* ---------- En-tête de page commun (harmonisation) ---------- */
.page-head { width: 100%; max-width: 1000px; margin: 4px auto 22px; text-align: left; }
.page-head h1 { font-size: 34px; font-weight: 800; margin: 0 0 6px; color: var(--txt); }
.page-head p { color: var(--muted); margin: 0; font-size: 15px; line-height: 1.5; }

/* Carte "bientôt disponible" */
.soon-box {
  width: 100%; max-width: 1000px; margin: 0 auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 54px 30px; text-align: center;
}
.soon-box .soon-emoji { font-size: 34px; margin-bottom: 12px; }
.soon-box h2 { font-size: 20px; font-weight: 700; margin: 0 0 8px; color: var(--txt); }
.soon-box p { color: var(--muted); margin: 0 auto; max-width: 460px; line-height: 1.6; }
.soon-badge {
  display: inline-block; margin-bottom: 16px; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
  color: var(--accent); background: rgba(124,92,255,0.12); border: 1px solid rgba(124,92,255,0.35);
}

/* ---------- Boutique (sobre) ---------- */
.shop-sub { color: var(--muted); font-size: 15px; margin: -10px 0 22px; width: 100%; text-align: left; }
.grade-name {
  padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line);
}
/* Carte "À venir" */
.grade-soon { align-items: center; justify-content: center; min-height: 150px; }
.grade-soon .grade-name { border-bottom: none; margin-bottom: 8px; padding-bottom: 0; }
.grade-soon-txt { color: var(--muted); font-size: 14px; }

/* ---------- Barre de navigation unique (style EarthQuest) ---------- */
.topbar {
  display: flex; align-items: center; gap: 18px;
  max-width: 1240px; margin: 0 auto; padding: 12px 22px;
  height: auto; justify-content: flex-start;
}
.tb-bar { display: flex; align-items: center; gap: 11px; }
.tb-left { display: flex; align-items: center; gap: 11px; }
.topbar .logo { position: static; left: auto; top: auto; }
.topbar .brand { font-size: 20px; }
.tb-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  padding-left: 4px; white-space: nowrap;
}
.tb-collapse { display: flex; align-items: center; gap: 18px; flex: 1; }
.tb-nav { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; flex-wrap: wrap; }
.tb-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.topbar .login-pill { position: static; right: auto; top: auto; }

/* Bouton hamburger (mobile uniquement) */
.tb-burger {
  display: none; flex-direction: column; gap: 5px; width: 42px; height: 40px;
  align-items: center; justify-content: center; margin-left: auto;
  background: transparent; border: 1px solid var(--line); border-radius: 9px; cursor: pointer;
}
.tb-burger span { display: block; width: 20px; height: 2px; background: var(--txt); border-radius: 2px; }

.boutique-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 9px; font-size: 13.5px; font-weight: 700;
  color: #fff; background: var(--accent); text-decoration: none; transition: filter 0.15s;
  white-space: nowrap;
}
.boutique-btn:hover { filter: brightness(1.12); }

.discord-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 38px; border-radius: 9px;
  color: #fff; background: #5865f2; text-decoration: none; transition: filter 0.15s;
  flex-shrink: 0;
}
.discord-btn:hover { filter: brightness(1.12); }
@media (max-width: 760px) { .discord-btn { width: 100%; height: 44px; } }

/* Menu déroulant "À propos" */
.nav-dd { position: relative; }
.nav-dd-btn { background: transparent; border: none; cursor: pointer; font-family: inherit; }
.dd-caret { font-size: 10px; opacity: 0.8; }
.nav-dd-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 6px; min-width: 180px; z-index: 40; box-shadow: 0 12px 34px rgba(0,0,0,0.45);
}
/* Pont invisible : relie le bouton à la liste pour que le survol ne se coupe pas */
.nav-dd-menu::before {
  content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 8px;
}
.nav-dd:hover .nav-dd-menu, .nav-dd.open .nav-dd-menu { display: block; }
.nav-dd-menu a {
  display: block; padding: 9px 12px; border-radius: 7px;
  color: var(--muted); font-size: 13.5px; font-weight: 500; text-decoration: none;
}
.nav-dd-menu a:hover { background: rgba(255,255,255,0.05); color: var(--txt); }

/* ----- Mobile : menu hamburger ----- */
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; gap: 0; padding: 10px 16px; }
  .tb-bar { width: 100%; justify-content: space-between; }
  .tb-status { display: none; }
  .tb-burger { display: flex; }
  .tb-collapse {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    gap: 8px; padding-top: 12px;
  }
  .topbar.menu-open .tb-collapse { display: flex; }
  .tb-nav { flex-direction: column; align-items: stretch; gap: 2px; }
  .tb-nav .nav-link { padding: 12px 14px; border-radius: 9px; }
  .tb-right { flex-direction: column; align-items: stretch; gap: 8px; margin-left: 0; }
  .boutique-btn { justify-content: center; padding: 13px; }
  .topbar .login-pill { justify-content: center; padding: 13px; }
  /* Sur mobile : pas de "À propos", ses catégories directement dans le menu */
  .nav-dd-btn { display: none; }
  .nav-dd-menu {
    position: static; display: block; box-shadow: none; border: none;
    background: transparent; padding: 0; min-width: 0;
  }
  .nav-dd-menu a { padding: 12px 14px; border-radius: 9px; font-size: 13.5px; }
}

/* ---------- Règlement (RDE) — style épuré, à plat ---------- */
.rgl-head { margin-bottom: 26px; }
.rgl-head h2 { font-size: 28px; font-weight: 800; margin: 0 0 6px; }
.rgl-head p { color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 720px; }
.rules { width: 100%; text-align: left; display: flex; flex-direction: column; }
.rule-card {
  background: rgba(18, 18, 26, 0.72);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px 26px;
  margin-bottom: 18px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  /* Thème Minecraft subtil : léger biseau clair en haut, ombre d'épaisseur en bas. */
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.06),
    inset -2px -2px 0 rgba(0, 0, 0, 0.26),
    0 4px 0 rgba(0, 0, 0, 0.18);
}
:root[data-theme="light"] .rule-card {
  background: rgba(255, 255, 255, 0.80);
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.6),
    inset -2px -2px 0 rgba(0, 0, 0, 0.12),
    0 4px 0 rgba(0, 0, 0, 0.08);
}
.rule-card:first-child { padding-top: 24px; }
.rule-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.rule-num { flex-shrink: 0; color: #fff; font-weight: 800; font-size: 20px; line-height: 1; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.rule-head h2 { font-size: 21px; font-weight: 700; margin: 0; }
.rule-intro { color: var(--muted); font-size: 15px; line-height: 1.7; margin-bottom: 14px; }
.rule-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.rule-list li { display: flex; gap: 12px; line-height: 1.7; color: var(--txt); font-size: 15px; }
.rule-list .ra { flex-shrink: 0; color: var(--muted); font-weight: 700; min-width: 34px; }
.rule-note {
  color: var(--muted); font-size: 14px; font-style: italic; margin-top: 16px; line-height: 1.65;
}
.rule-sanction { margin-top: 16px; font-size: 14.5px; font-weight: 600; color: var(--muted); }

/* ===================== Support (widget + admin) ===================== */
.sup-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 900;
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 26px rgba(124, 92, 255, 0.45);
  transition: transform 0.15s, box-shadow 0.15s;
}
.sup-fab:hover { transform: translateY(-2px) scale(1.04); }

.sup-panel {
  position: fixed; right: 22px; bottom: 92px; z-index: 900;
  width: 360px; max-width: calc(100vw - 32px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateY(12px) scale(0.98); pointer-events: none;
  transition: opacity 0.16s, transform 0.16s;
}
.sup-panel.open { opacity: 1; transform: none; pointer-events: auto; }

.sup-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px;
  background: linear-gradient(135deg, #7c5cff 0%, #5a3fd6 100%); color: #fff;
}
.sup-avatar { width: 40px; height: 40px; border-radius: 10px; image-rendering: pixelated; }
.sup-head-txt { flex: 1; }
.sup-title { font-weight: 700; font-size: 15px; }
.sup-sub { font-size: 12px; opacity: 0.9; display: flex; align-items: center; gap: 6px; }
.sup-close {
  background: rgba(255, 255, 255, 0.15); border: none; color: #fff; cursor: pointer;
  width: 26px; height: 26px; border-radius: 8px; font-size: 16px; line-height: 1; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.sup-body { padding: 14px; }
.sup-notice {
  font-size: 12.5px; line-height: 1.6; color: var(--txt);
  background: rgba(124, 92, 255, 0.10); border: 1px solid rgba(124, 92, 255, 0.25);
  border-radius: 12px; padding: 11px 12px; margin-bottom: 12px;
}
.sup-notice a { color: var(--accent); font-weight: 600; }
.sup-input {
  width: 100%; box-sizing: border-box; margin-bottom: 9px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  color: var(--txt); font-size: 14px; padding: 10px 12px; font-family: inherit;
}
.sup-input:focus { outline: none; border-color: var(--accent); }
.sup-area { resize: vertical; min-height: 92px; }
.sup-send { width: 100%; justify-content: center; }
.sup-status2 { font-size: 12.5px; color: var(--muted); margin: 8px 2px 0; min-height: 16px; }
.sup-ok { font-size: 13px; line-height: 1.6; color: var(--txt); text-align: center; padding: 8px 2px; }

/* ---- Page admin ---- */
.sup-loading, .sup-empty, .sup-denied, .sup-count { color: var(--muted); font-size: 14px; margin: 8px 0 18px; }
.sup-denied { color: #ff8a8a; }
.sup-count { color: var(--txt); font-weight: 600; }
.sup-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 12px;
}
.sup-card.done { opacity: 0.6; }
.sc-head { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.sc-avatar { width: 40px; height: 40px; border-radius: 9px; image-rendering: pixelated; }
.sc-anon { background: var(--line); color: var(--muted); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.sc-who { flex: 1; display: flex; flex-direction: column; }
.sc-pseudo { font-weight: 700; color: var(--txt); }
.sc-date { font-size: 12px; color: var(--muted); }
.sc-status { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; text-transform: uppercase; }
.sc-status.open { background: rgba(124, 92, 255, 0.16); color: #b9a6ff; }
.sc-status.ok { background: rgba(63, 174, 106, 0.16); color: #6fd39a; }
.sc-msg { color: var(--txt); font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.sc-contact { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.sc-actions { margin-top: 12px; }
.sc-btn { border: none; cursor: pointer; font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 9px; }
.sc-resolve { background: var(--accent); color: #fff; }
.sc-reopen { background: var(--line); color: var(--txt); }

@media (max-width: 480px) {
  .sup-panel { right: 12px; left: 12px; width: auto; bottom: 84px; }
  .sup-fab { right: 16px; bottom: 16px; }
}

/* ---- Support : pièce jointe image ---- */
.sup-attach {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg); border: 1px dashed var(--line); color: var(--muted);
  border-radius: 10px; padding: 8px 12px; font-size: 13px; cursor: pointer;
  margin-bottom: 9px; width: 100%; justify-content: center;
}
.sup-attach:hover { border-color: var(--accent); color: var(--txt); }
.sup-preview:not(:empty) { margin-bottom: 10px; }
.sup-thumb { position: relative; display: inline-block; }
.sup-thumb img { max-width: 100%; max-height: 140px; border-radius: 10px; border: 1px solid var(--line); display: block; }
.sup-thumb-x {
  position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%;
  border: none; background: #e0413e; color: #fff; cursor: pointer; font-size: 16px; line-height: 1;
}
.sc-img { max-width: 100%; max-height: 300px; border-radius: 10px; border: 1px solid var(--line); margin-top: 10px; display: block; }

/* ===================== Support v2 : chat / conversation ===================== */
.sup-panel {
  display: flex; flex-direction: column;
  height: 560px; max-height: calc(100vh - 130px);
}
.sup-head { flex: 0 0 auto; }
.sup-notice {
  flex: 0 0 auto; margin: 12px 12px 0;
  font-size: 12px; line-height: 1.55; color: var(--txt);
  background: rgba(124, 92, 255, 0.10); border: 1px solid rgba(124, 92, 255, 0.25);
  border-radius: 10px; padding: 9px 11px;
}
.sup-notice a { color: var(--accent); font-weight: 600; }

.sup-messages {
  flex: 1 1 auto; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.sup-hello { color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; margin: auto 8px; }

.sup-b { max-width: 82%; padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.sup-b.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.sup-b.staff { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); color: var(--txt); border-bottom-left-radius: 5px; }
.sup-bwho { font-size: 11px; font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.sup-btxt { white-space: pre-wrap; word-break: break-word; }
.sup-bimg { max-width: 100%; max-height: 180px; border-radius: 9px; margin-top: 6px; display: block; }
.sup-bat { font-size: 10px; opacity: 0.6; margin-top: 3px; text-align: right; }
.sup-b.staff .sup-bat { text-align: left; }

.sup-composer { flex: 0 0 auto; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.sup-pseudo-inp {
  width: 100%; box-sizing: border-box; margin-bottom: 8px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px;
  color: var(--txt); font-size: 13px; padding: 8px 11px; font-family: inherit;
}
.sup-pseudo-inp:focus { outline: none; border-color: var(--accent); }
.sup-crow { display: flex; align-items: flex-end; gap: 7px; }
.sup-area {
  flex: 1 1 auto; box-sizing: border-box; resize: none; min-height: 40px; height: 40px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  color: var(--txt); font-size: 14px; padding: 10px 12px; font-family: inherit; line-height: 1.4;
}
.sup-area:focus { outline: none; border-color: var(--accent); }
.sup-iconbtn {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--bg); color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.sup-iconbtn:hover { color: var(--txt); border-color: var(--accent); }
.sup-sendbtn { background: var(--accent); color: #fff; border-color: var(--accent); }
.sup-status2 { font-size: 12px; color: var(--muted); margin: 6px 2px 0; min-height: 14px; }

/* ---- Admin : liste + fil ---- */
.sup-hint2 { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.conv-row {
  display: block; width: 100%; text-align: left; cursor: pointer; position: relative;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; margin-bottom: 10px; color: var(--txt); font-family: inherit;
}
.conv-row:hover { border-color: var(--accent); }
.conv-row.done { opacity: 0.55; }
.conv-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.conv-name { font-weight: 700; }
.conv-date { font-size: 12px; color: var(--muted); }
.conv-prev { font-size: 13px; color: var(--muted); margin-top: 4px; padding-right: 70px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-row .sc-status { position: absolute; right: 15px; bottom: 13px; }

.th-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.th-back { background: var(--panel); border: 1px solid var(--line); color: var(--txt); border-radius: 9px; padding: 8px 13px; cursor: pointer; font-size: 13px; }
.th-name { font-weight: 700; flex: 1; }
.th-msgs {
  display: flex; flex-direction: column; gap: 8px; padding: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  max-height: 460px; overflow-y: auto;
}
.th-reply { display: flex; align-items: flex-end; gap: 9px; margin-top: 12px; }
.th-reply .sup-area { min-height: 44px; height: 44px; }

.sup-resolved {
  align-self: center; text-align: center; max-width: 90%;
  font-size: 12.5px; line-height: 1.55; color: var(--muted);
  background: rgba(63, 174, 106, 0.12); border: 1px solid rgba(63, 174, 106, 0.3);
  border-radius: 10px; padding: 9px 12px; margin: 4px 0;
}

/* Fix mise en page liste conversations (date + statut côte à côte) */
.conv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: static; }
.conv-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.conv-row .sc-status { position: static; right: auto; bottom: auto; }

/* ---------- Wiki (catégories + contenu) ---------- */
main.wiki { max-width: min(1400px, 94vw); align-items: stretch; text-align: left; padding-top: 40px; }
main.wiki .page-head { text-align: left; }
.wiki-wrap { display: grid; grid-template-columns: 230px 1fr; gap: 30px; align-items: start; }
.wiki-cats { position: sticky; top: 90px; background: transparent; border: 0; border-radius: 0; padding: 4px 0; display: flex; flex-direction: column; gap: 8px; }
.wiki-cats-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 6px 10px 8px; }
/* Catégories en cadres transparents "Minecraft" (plus de barre séparatrice). */
.wiki-cat {
  text-align: left; background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line); color: var(--txt); font: inherit;
  font-size: 14.5px; font-weight: 600; padding: 10px 12px; border-radius: 4px; cursor: pointer;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.09), inset -2px -2px 0 rgba(0, 0, 0, 0.22), 0 3px 0 rgba(0, 0, 0, 0.22);
  transition: background .15s, color .15s, transform .08s ease, box-shadow .08s ease;
}
.wiki-cat:hover { background: rgba(255, 255, 255, .07); }
.wiki-cat.active { background: rgba(124, 92, 255, 0.16); color: var(--accent); border-color: rgba(124, 92, 255, 0.5); }
.wiki-cat:active { transform: translateY(2px); box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.06), inset -2px -2px 0 rgba(0, 0, 0, 0.2), 0 1px 0 rgba(0, 0, 0, 0.22); }
.wiki-content { min-width: 0; }
.wiki-sec[hidden] { display: none; }
.wiki-soon { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; text-align: center; }
.wiki-soon h2 { margin-bottom: 8px; }
.wiki-soon p { color: var(--muted); }
@media (max-width: 760px) {
  .wiki-wrap { grid-template-columns: 1fr; }
  .wiki-cats { position: static; flex-direction: row; flex-wrap: wrap; }
  .wiki-cat { flex: 1 1 auto; text-align: center; }
}

/* ---------- Wiki : catégorie Vote (liens simples, façon règlement) ---------- */
.vote-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.vote-list a { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 15.5px; }
.vote-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.vote-note { color: var(--muted); font-size: 14px; margin-top: 18px; }

/* ---------- Launcher : avertissements de sécurité par OS ---------- */
.secu-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 34px;
  margin-top: 8px; align-items: start;
}
.secu-title {
  font-size: 20px; font-weight: 700; color: var(--txt);
  margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.secu-os .hero-text { margin: 0 0 14px; }
.secu-img {
  display: block; width: 100%; height: auto; border-radius: 12px;
  border: 1px solid var(--line);
}
.secu-os .macos-card, .secu-os .win-card { margin-left: 0; margin-right: 0; }
.secu-os .macos-row { flex-direction: column; align-items: flex-start; gap: 12px; }
@media (max-width: 720px) { .secu-grid { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- Vote : classement des votes (mois en cours) ---------- */
.vlb { margin-top: 34px; max-width: 640px; margin-left: auto; margin-right: auto; }
.vlb .rgl-head { text-align: center; }
.vlb-head { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }
.vlb-top {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px; padding: 26px 24px; margin-bottom: 18px;
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255,255,255,0.02);
}
.vlb-top img { width: 72px; height: 72px; border-radius: 12px; image-rendering: pixelated; }
.vlb-top-name { font-size: 20px; font-weight: 700; color: var(--txt); }
.vlb-top-meta { font-size: 14px; color: var(--muted); }
.vlb-top-meta b { color: var(--accent); font-weight: 700; }
.vlb-list { display: flex; flex-direction: column; gap: 8px; }
.vlb-row {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px; border: 1px solid var(--line); border-radius: 12px;
}
.vlb-rank {
  flex-shrink: 0; width: 26px; text-align: center;
  font-weight: 700; font-size: 15px; color: var(--muted);
}
.vlb-row:nth-child(1) .vlb-rank,
.vlb-row:nth-child(2) .vlb-rank,
.vlb-row:nth-child(3) .vlb-rank { color: var(--accent); }
.vlb-row img { width: 30px; height: 30px; border-radius: 7px; image-rendering: pixelated; flex-shrink: 0; }
.vlb-name { flex: 1; font-weight: 600; color: var(--txt); font-size: 15px; }
.vlb-votes { font-weight: 700; color: var(--txt); font-size: 15px; }
.vlb-empty { color: var(--muted); font-size: 14px; }

/* ---------- Wiki : catégorie Commandes ---------- */
.cmd-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cmd-list li { font-size: 15px; color: var(--txt); line-height: 1.6; }
.cmd-list code {
  background: rgba(124, 92, 255, .16); color: var(--accent); border: 1px solid rgba(124, 92, 255, .3);
  border-radius: 7px; padding: 2px 9px; font-family: ui-monospace, monospace; font-weight: 600; margin-right: 6px;
}

/* Point de statut serveur (vert/rouge, coloré en JS via /api/status) — global */
.online-dot {
  display: inline-block; flex-shrink: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: #3fae6a; box-shadow: 0 0 0 4px rgba(63, 174, 106, 0.18);
}

/* Copyright fixe en bas à droite (toutes les pages) -> redirige vers /droits */
.emeria-copyright {
  position: fixed; left: 14px; bottom: 10px; z-index: 40;
  font-size: 11px; letter-spacing: .03em; color: var(--muted);
  text-decoration: none; opacity: .6; transition: opacity .15s;
}
.emeria-copyright:hover { opacity: 1; text-decoration: underline; }
@media (max-width: 680px) {
  .emeria-copyright { position: static; display: block; text-align: center; margin: 20px 0 8px; opacity: .75; }
}

/* ---------- Notifications (cloche du topbar) ---------- */
.notif-wrap { position: relative; display: inline-flex; }
.notif-btn { position: relative; }
.notif-badge {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: #e0413e; color: #fff; font-size: 10px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
  box-shadow: 0 0 0 2px var(--bg, #0b0b10);
}
.notif-badge[hidden] { display: none; }
.notif-menu {
  position: absolute; top: calc(100% + 8px); right: 0; width: 300px; max-width: 86vw;
  max-height: 380px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line);
  border-radius: 5px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); padding: 6px; z-index: 60;
}
.notif-head { font-size: 11px; font-weight: 800; color: var(--muted); padding: 6px 8px; text-transform: uppercase; letter-spacing: .05em; }
.notif-item { display: block; padding: 8px 10px; border-radius: 3px; text-decoration: none; color: var(--txt); }
.notif-item:hover { background: rgba(124, 92, 255, 0.12); }
.notif-t { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.notif-empty { font-size: 12.5px; color: var(--muted); padding: 10px; text-align: center; }
