/* ==========================================================================
   NOCTALIA — Feuille de style principale
   ========================================================================== */

/* --- Reset & base --------------------------------------------------------- */
/* --- Empêche les navigateurs mobiles de "gonfler" automatiquement le texte
   (font-boosting), ce qui casse la mise en page sur les pages avec beaucoup
   de petit texte (ex: tableau de bord admin) alors que les autres pages
   (grand texte) n'étaient pas affectées. --- */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #1a1a1a;
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
}

header {
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
  padding: 1.25rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: end;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-self: center;
}

.nav-links a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-links a.active {
  color: #818cf8;
}

.logo {

/* --- Header & navigation --------------------------------------------------- */
  height: 34px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  justify-self: start;
}

.logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
  border-radius: 50%;
}

.discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.discord-btn:hover {
  background: rgba(88, 101, 242, 0.3);
  color: #ffffff;
}

.discord-btn svg {
  width: 22px;
  height: 18px;
  fill: currentColor;
}

/* --- Sélecteur de langue --------------------------------------------------- */
.lang-switch {
  position: relative;
  flex-shrink: 0;
}

.lang-switch-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s;
}

.lang-switch-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lang-switch-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #1f1f24;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.35rem;
  min-width: 160px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 60;
}

.lang-switch.open .lang-switch-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lang-switch-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.6rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.lang-switch-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.lang-switch-option.active {
  background: rgba(99, 102, 241, 0.25);
  color: #ffffff;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  cursor: pointer;
  z-index: 30;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 20px;
  background: #ffffff;
  border-radius: 2px;
}


/* --- Navigation mobile (bottom bar) ---------------------------------------- */
.mobile-bottom-nav {
  display: none;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #9ca3af;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  flex: 1;
  padding: 0.35rem 0;
}

.mobile-nav-item.active {
  color: #818cf8;
}

.mobile-nav-icon {
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-icon svg {
  display: block;
}

.auth-btn {
  background: #3b5bfd;
  color: white;
  border: none;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}

.auth-btn:hover {
  background: #2f4bdb;
}

.auth-btn.is-profile {
  background: none;
  padding: 0;
}

.auth-btn.is-profile:hover {
  background: none;
}

/* --- User Status Widget (Pseudo + Logout) ----------------------------------- */
.user-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-name {
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
}

.logout-btn:hover {
  opacity: 0.85;
}


/* --- Section Hero ----------------------------------------------------------- */
.hero-section {
  position: relative;
  background: linear-gradient(180deg, rgba(15,15,20,0.55) 0%, rgba(15,15,20,0.45) 25%, rgba(15,15,20,0.8) 65%, rgba(15,15,20,0.96) 85%, #1a1a1a 100%), url('gallery/map-1.jpg');
  background-size: cover;
  background-position: center;
  padding: 10rem 4rem 3rem 8rem;
  text-align: left;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.server-badge {
  display: inline-block;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid #22c55e;
  color: #22c55e;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-desc {
  font-size: 16px;
  color: #d1d5db;
  margin-bottom: 2rem;
  max-width: 600px;
}

.btn-shop {
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  color: white;
  border: none;
  padding: 0.9rem 2.2rem;
  border-radius: 14px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 20px rgba(99,102,241,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-shop:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(99,102,241,0.45);
}

/* ===== Page Boutique ===== */
.boutique-page {
  display: none;
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
  text-align: center;
}

.boutique-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 0.4rem 1.1rem;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.boutique-title {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 1rem;
}

.boutique-title span {
  color: #818cf8;
}

.boutique-desc {
  color: #9ca3af;
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

.boutique-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* --- Section "Comment rejoindre" (PC / Mobile / Console) ------------------ */
.join-section {
  max-width: 720px;
  margin: 3rem auto 0;
  text-align: center;
}

.join-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 0.4rem 1.1rem;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.join-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.join-title span {
  color: #818cf8;
}

.join-desc {
  color: #9ca3af;
  font-size: 15px;
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.join-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(40, 40, 40, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.4rem;
  margin: 0 auto 1.75rem;
  max-width: 480px;
}

.join-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 600;
  padding: 0.65rem 0.5rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.join-tab svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.join-tab:hover {
  color: #e5e7eb;
}

.join-tab.active {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}

.join-panel {
  display: none;
  text-align: left;
  background: rgba(40, 40, 40, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.75rem;
}

.join-panel.active {
  display: block;
}

.join-steps {
  list-style: none;
  counter-reset: join-step;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.join-steps li {
  display: flex;
  gap: 0.9rem;
  counter-increment: join-step;
}

.join-steps li::before {
  content: counter(join-step);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.join-steps strong {
  display: block;
  font-size: 15px;
  margin-bottom: 0.2rem;
}

.join-steps p {
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.join-steps code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 13px;
  color: #e5e7eb;
}

@media (max-width: 600px) {
  .join-tabs { max-width: 100%; }
  .join-tab span { display: none; }
  .join-panel { padding: 1.25rem; }
}

.boutique-card {
  background: rgba(40, 40, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.75rem 1.25rem;
  position: relative;
  text-align: center;
  transition: border-color 0.2s;
}

.boutique-card.featured {
  border-color: #818cf8;
}

.boutique-card-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  text-transform: uppercase;
}

.boutique-card.featured .boutique-card-tag {
  background: #6366f1;
  color: #ffffff;
}

.boutique-icon {
  font-size: 36px;
  margin-bottom: 0.75rem;
}

.boutique-icon img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.boutique-amount {
  font-size: 26px;
  font-weight: 800;
}

.boutique-unit {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}

.boutique-price {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 1.1rem;
}

.boutique-price sup {
  font-size: 13px;
  color: #9ca3af;
  font-weight: 600;
}

.boutique-add-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 0.7rem;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.boutique-add-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.boutique-parents-note {
  margin: 2.5rem auto 0;
  max-width: 720px;
  background: rgba(129, 140, 248, 0.06);
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  text-align: left;
}

.boutique-parents-note-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #a5b4fc;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.boutique-parents-note p {
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

.boutique-faq {
  margin: 2.5rem auto 0;
  max-width: 720px;
  background: rgba(129, 140, 248, 0.06);
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  text-align: left;
}

.boutique-faq-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #a5b4fc;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0 0 1rem 0;
}

.boutique-faq-item {
  margin: 0;
}

.boutique-faq-q {
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 0.35rem 0;
}

.boutique-faq-a {
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

.boutique-faq-divider {
  height: 1px;
  background: rgba(129, 140, 248, 0.15);
  margin: 1rem 0;
}

.boutique-security {
  margin: 1.25rem auto 0;
  max-width: 720px;
  background: rgba(129, 140, 248, 0.06);
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  text-align: left;
}

.boutique-security-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #a5b4fc;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0 0 0.6rem 0;
}

.boutique-security p {
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

/* ===== Page Wiki ===== */

/* --- Page Wiki --------------------------------------------------------------- */
.wiki-page {
  display: none;
  max-width: 1100px;
  margin: 0 auto;
  padding: 6.5rem 1.5rem 5rem;
  position: relative;
}

.wiki-page-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  height: 100svh; /* hauteur stable sur mobile : ne bouge plus quand la barre d'adresse apparaît/disparaît au scroll */
  z-index: -1;
  background-size: cover;
  background-position: center;
  opacity: 0.32;
  transition: background-image 0.4s ease;
}

.wiki-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.wiki-header h1 {
  font-size: 32px;
  font-weight: 800;
}

.wiki-admin-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.wiki-admin-link {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.wiki-btn {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.wiki-btn:hover {
  background: rgba(99, 102, 241, 0.28);
}

.wiki-btn.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.wiki-btn.danger:hover {
  background: rgba(239, 68, 68, 0.22);
}

.wiki-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.wiki-search-input {
  width: 100%;
  padding: 0.8rem 1.1rem;
  background: rgba(40, 40, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #ffffff;
  font-size: 14px;
  margin-bottom: 0.75rem;
}

.wiki-search-results {
  display: none;
  background: rgba(30, 30, 30, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.wiki-search-results.active {
  display: block;
}

.wiki-search-result-item {
  padding: 0.7rem 1.1rem;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wiki-search-result-item:last-child {
  border-bottom: none;
}

.wiki-search-result-item:hover {
  background: rgba(99, 102, 241, 0.15);
}

.wiki-back-link {
  display: inline-block;
  color: #9ca3af;
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 1rem;
  cursor: pointer;
}

.wiki-back-link:hover {
  color: #ffffff;
}

.wiki-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.wiki-cat-card {
  background: rgba(40, 40, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.wiki-cat-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
}

.wiki-cat-card-icon {
  font-size: 34px;
  margin-bottom: 0.6rem;
}

.wiki-cat-card-title {
  font-size: 14px;
  font-weight: 700;
}

.wiki-cat-card-link {
  color: #9ca3af;
  font-size: 12px;
  margin-top: 0.3rem;
}

.wiki-sidebar {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.wiki-nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(40, 40, 40, 0.5);
  border: 1px solid transparent;
  color: #d1d5db;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, border-color 0.2s;
}

.wiki-nav-item:hover {
  background: rgba(60, 60, 60, 0.6);
}

.wiki-nav-item.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.4);
  color: #ffffff;
}

.wiki-content {
  flex: 1;
  background: rgba(40, 40, 40, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 2rem;
  min-height: 300px;
}

.wiki-content-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.wiki-content-title h2 {
  font-size: 22px;
  font-weight: 800;
}

.wiki-block-text {
  color: #d1d5db;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.wiki-block-text strong {
  color: #ffffff;
  font-weight: 800;
}

.wiki-blocks-render {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .wiki-blocks-render {
    gap: 0.75rem;
  }
}

.wiki-block-width-full {
  width: 100%;
}

.wiki-block-width-half {
  width: calc(50% - 0.625rem);
}

@media (max-width: 640px) {
  .wiki-block-text.wiki-block-width-half {
    width: 100%;
  }
  .wiki-block-image.wiki-block-width-half {
    width: calc(50% - 0.375rem);
  }
}

.wiki-block-image {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1rem 0.75rem;
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.wiki-block-image:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.06);
}

.wiki-block-image img {
  max-width: 70%;
  float: none;
  margin: 0 auto 0.6rem;
  display: block;
  border-radius: 8px;
}

.wiki-block-image figcaption {
  color: #e5e7eb;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0;
}

.wiki-item-card {
  cursor: pointer;
}

.wiki-item-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 480px;
  margin: 0 auto;
}

.wiki-item-detail-image {
  width: 100%;
}

.wiki-item-detail-text {
  width: 100%;
  text-align: left;
}

.wiki-empty {
  color: #6b7280;
  font-size: 14px;
  text-align: center;
  padding: 2rem 0;
}

/* Formulaire d'édition */
.wiki-edit-form {
  display: none;
}

.wiki-edit-form input[type="text"] {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: rgba(60, 60, 60, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #ffffff;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 0.75rem;
}

.wiki-icon-title-row {
  display: flex;
  gap: 0.5rem;
}

.wiki-icon-title-row input:first-child {
  width: 70px;
  flex-shrink: 0;
  text-align: center;
}

/* Onglets de langue (éditeur wiki admin) */
.wiki-lang-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.wiki-lang-tab-btn {
  background: rgba(60, 60, 60, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.wiki-lang-tab-btn:hover {
  background: rgba(80, 80, 80, 0.6);
  color: #e5e7eb;
}

.wiki-lang-tab-btn.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.5);
  color: #ffffff;
}

.wiki-lang-tab-btn.has-content:not(.active) {
  color: #a5b4fc;
}

.wiki-lang-tab-hint {
  color: #9ca3af;
  font-size: 12.5px;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

/* Bandeau affiché quand la traduction demandée n'existe pas encore */
.wiki-translation-notice {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 1.25rem;
}

.wiki-block-editor-item {
  background: rgba(30, 30, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.9rem;
  box-sizing: border-box;
}

.wiki-block-editor-item textarea {
  width: 100%;
  min-height: 90px;
  padding: 0.6rem 0.8rem;
  background: rgba(60, 60, 60, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #ffffff;
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}

.wiki-block-editor-item img {
  max-width: 100%;
  max-height: 160px;
  border-radius: 6px;
  margin-top: 0.5rem;
  display: block;
}

.wiki-block-editor-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.6rem;
  gap: 0.5rem;
}

.wiki-block-editor-actions .left {
  display: flex;
  gap: 0.4rem;
}

.wiki-mini-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #d1d5db;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
}

.wiki-mini-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.wiki-add-block-row {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

.wiki-form-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

.map-showcase {
  max-width: 640px;
  margin: 0 auto 3rem;
}


/* --- Carrousel de la galerie -------------------------------------------------- */
.carousel-title {
  font-size: 14px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  text-align: center;
}

.carousel {
  background: rgba(20, 20, 20, 0.6);
  padding: 0;
  border-radius: 16px;
  margin-bottom: 0;
  height: 360px;
  position: relative;
  overflow: hidden;
  border: 3px solid #818cf8;
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.35), 0 10px 30px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .wiki-layout {
    flex-direction: column;
  }

  .wiki-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .wiki-nav-item {
    flex: 1 1 auto;
  }

  .map-showcase {
    margin-bottom: 2rem;
  }

  .carousel {
    height: 260px;
  }
}

@media (max-width: 600px) {
  .boutique-grid {
    grid-template-columns: 1fr;
  }

  .boutique-title {
    font-size: 30px;
  }

  .wiki-cat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .wiki-cat-card {
    padding: 1.1rem 0.6rem;
  }

  .wiki-cat-card-icon {
    font-size: 28px;
  }
}

.server-address {
  background: rgba(20, 20, 25, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 0.6rem 0.6rem 0.6rem 1.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 3rem;
}

.server-address input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: 'Monaco', monospace;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  width: 130px;
  cursor: text;
}

.copy-ip-btn {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.copy-ip-btn:hover {
  background: rgba(99, 102, 241, 0.3);
  color: #fff;
}

.content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
  z-index: 1;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 2;
}

.carousel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #0f0f0f;
}

.carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 5;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  padding: 0;
}

.carousel-dot.active {
  background: #ffffff;
}

.server-status {
  background: rgba(40, 40, 40, 0.5);
  padding: 2rem;
  border-radius: 12px;
  margin-top: 2rem;
}

.status-title {
  font-size: 14px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.status-item:last-child {
  border-bottom: none;
}

.status-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.status-bar {
  flex: 1;
  margin: 0 1rem;
  height: 6px;
  background: rgba(99, 102, 241, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.status-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #818cf8 100%);
  border-radius: 3px;
}

.status-count {
  font-size: 14px;
  color: #9ca3af;
  min-width: 60px;
  text-align: right;
}

/* --- Top votants (page d'accueil, sous l'état des serveurs) ---------------- */

.top-voters {
  background: rgba(40, 40, 40, 0.5);
  padding: 2rem;
  border-radius: 12px;
  margin-top: 1.25rem;
}

.top-voters-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.top-voters-loading,
.top-voters-empty {
  color: #9ca3af;
  font-size: 14px;
  padding: 0.5rem 0;
}

.top-voter-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.top-voter-rank {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #d1d5db;
}

.top-voter-item:nth-child(1) .top-voter-rank {
  background: rgba(234, 179, 8, 0.18);
  color: #eab308;
}

.top-voter-item:nth-child(2) .top-voter-rank {
  background: rgba(203, 213, 225, 0.18);
  color: #cbd5e1;
}

.top-voter-item:nth-child(3) .top-voter-rank {
  background: rgba(217, 119, 6, 0.18);
  color: #d97706;
}

.top-voter-name {
  flex: 1;
  font-weight: 600;
  font-size: 15px;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-voter-count {
  flex-shrink: 0;
  font-size: 13px;
  color: #9ca3af;
}

@media (max-width: 768px) {
  header {
    display: flex;
    justify-content: flex-start;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    position: fixed;
    background: rgba(18, 18, 20, 0.85);
    backdrop-filter: blur(10px);
  }

  .menu-toggle {
    display: none;
  }

  .logo {
    order: 1;
  }

  .header-right {
    order: 2;
    margin-left: auto;
    gap: 0.5rem;
  }

  .logo {
    height: 28px;
  }

  .nav-links {
    display: none !important;
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(18, 18, 20, 0.97);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    justify-content: space-around;
    padding: 0.4rem 0 calc(0.4rem + env(safe-area-inset-bottom));
    z-index: 50;
  }

  body {
    padding-bottom: 66px;
  }

  .auth-btn {
    padding: 0.45rem 0.8rem;
    font-size: 12px;
  }

  .discord-btn {
    width: 32px;
    height: 32px;
  }

  .lang-switch-toggle {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  .lang-switch-menu {
    left: 0;
    right: auto;
    max-width: calc(100vw - 24px);
  }

  .hero-section {
    padding: 5.5rem 1.25rem 3.5rem;
    min-height: 430px;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #1a1a1a;
    background-position: center;
  }

  .server-badge {
    background: rgba(10, 20, 15, 0.75);
    font-size: 11px;
    padding: 0.4rem 0.8rem;
    margin-bottom: 1rem;
  }

  .hero-title {
    font-size: 26px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  }

  .hero-desc {
    font-size: 14px;
  }

  .server-address {
    flex-wrap: nowrap;
    padding: 0.4rem 0.4rem 0.4rem 0.9rem;
    gap: 0.5rem;
  }

  .server-address input {
    width: 95px;
    font-size: 12px;
  }

  .copy-ip-btn {
    padding: 0.4rem 0.65rem;
    font-size: 12px;
    white-space: nowrap;
  }

  .btn-shop {
    padding: 0.7rem 1.6rem;
    font-size: 15px;
    margin-bottom: 1.5rem;
  }
}

.login-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-modal.active {
  display: flex;
}

.login-box {
  background: rgba(30, 30, 30, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 2rem;
  border-radius: 12px;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.login-box h2 {
  font-size: 24px;
  margin-bottom: 1rem;
}

.login-box p {
  color: #9ca3af;
  margin-bottom: 1.5rem;
  font-size: 14px;
}

.login-input {
  width: 100%;
  padding: 0.75rem;
  background: rgba(60, 60, 60, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #ffffff;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.login-input::placeholder {
  color: #6b7280;
}

.login-btn {
  width: 100%;
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.login-btn:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
}

.login-close {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 24px;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}

.user-profile-name {
  color: #b0b8d4;
  font-size: 13px;
  font-weight: 500;
}

.user-profile-name.admin-frame {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(99, 102, 241, 0.14));
  border: 1px solid rgba(167, 139, 250, 0.5);
  color: #c4b5fd;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.08) inset;
}

.logout-btn {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

/* Icônes SVG inline (remplacent les emoji, rendu identique sur tous les appareils) */
.icon-inline {
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.15em;
  margin-right: 0.4em;
  fill: currentColor;
  flex-shrink: 0;
  display: inline-block;
}

/* --- Modale "connexion requise" (remplace les alert() natifs du navigateur) --- */
.site-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.site-modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.site-modal {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(180deg, rgba(30,30,35,0.98), rgba(20,20,24,0.98));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  padding: 2rem 1.75rem 1.75rem;
  text-align: center;
  transform: scale(0.92);
  transition: transform .2s ease;
}
.site-modal-overlay.is-open .site-modal { transform: scale(1); }
.site-modal-logo { width: 56px; height: 56px; margin: 0 auto 1.1rem; display: block; border-radius: 14px; }
.site-modal-title { font-size: 19px; font-weight: 800; margin-bottom: 0.6rem; }
.site-modal-text { color: #9ca3af; font-size: 14px; line-height: 1.55; margin-bottom: 1.6rem; }
.site-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.site-modal-actions .btn-shop { width: 100%; padding: 0.75rem; }
.site-modal-actions .btn-outline {
  width: 100%; padding: 0.7rem; border-radius: 10px; font-weight: 600; font-size: 14px;
  border: 1px solid rgba(255,255,255,0.15); color: #e5e7eb; background: transparent; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.site-modal-actions .btn-outline:hover { border-color: #818cf8; background: rgba(99,102,241,0.1); }
