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

:root {
  --accent: #4ade80;
  --accent-dark: #16a34a;
  --gold: #fbbf24;
  --text: #f1f5f9;
  --muted: #9aa5b8;
  --bg: #07090f;
  --panel: rgba(18, 22, 33, 0.72);
}

html { scroll-behavior: smooth; }

body {
  font-family: "Poppins", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.c1 { color: #fff; }
.c2 {
  background: linear-gradient(180deg, #86efac, var(--accent) 55%, var(--accent-dark));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hidden { display: none !important; }

/* ============ NAVIGATION ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 30px;
  background: linear-gradient(180deg, rgba(5,7,12,.85), rgba(5,7,12,0));
  transition: background .3s, backdrop-filter .3s;
}
.nav.scrolled {
  background: rgba(7, 9, 15, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav-logo {
  display: flex; align-items: center;
  font-weight: 900; font-size: 18px; letter-spacing: 1px; text-decoration: none;
}
#nav-logo-img { max-height: 34px; }
.nav-links { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13.5px;
  padding: 9px 16px; border-radius: 10px; transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255,255,255,.07); }
#nav-discord { color: #a5b4fc; }
.nav-dl {
  background: var(--accent) !important; color: #052e16 !important; font-weight: 800 !important;
}
.nav-dl:hover { filter: brightness(1.08); }

/* Groupe gauche : logo + bouton Discord */
.nav-left { display: flex; align-items: center; gap: 14px; }
.nav-discord-btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: #5865F2; color: #fff !important;
  font-weight: 800; font-size: 13.5px; padding: 9px 16px; border-radius: 10px;
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.4);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.15s;
}
.nav-discord-btn:hover { transform: translateY(-1px); box-shadow: 0 7px 22px rgba(88, 101, 242, 0.55); filter: brightness(1.06); }
.nav-discord-btn svg { display: block; }
@media (max-width: 560px) {
  .nav-discord-btn { padding: 8px 12px; }
  .nav-discord-btn span, .nav-left { gap: 8px; }
}

/* Bouton central « Vers le site » (page serveurs) : parfaitement centré */
.nav-center-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px;
  padding: 10px 26px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background 0.18s, border-color 0.18s, transform 0.15s, box-shadow 0.2s;
}
.nav-center-btn:hover {
  transform: translate(-50%, -50%) translateY(-2px);
  background: rgba(74, 222, 128, 0.14);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(74, 222, 128, 0.25);
}
@media (max-width: 640px) {
  .nav { padding: 12px 16px; }
  .nav-left { gap: 8px; }
  #nav-logo-img { max-height: 28px; }
  /* Discord en icône seule pour gagner de la place */
  .nav-discord-btn { padding: 9px 11px; gap: 0; font-size: 0; }
  .nav-discord-btn svg { width: 19px; height: 15px; }
  .nav-center-btn { padding: 8px 16px; font-size: 13px; }
  .nav-dl { padding: 9px 13px; font-size: 12.5px; }
}
@media (max-width: 400px) {
  /* Trop étroit pour le bouton central : on le masque, le logo ramène à l'accueil */
  .nav-center-btn { display: none; }
}

/* ============ PANNEAUX SERVEURS ============ */
.panels { display: flex; min-height: 100vh; width: 100%; }
.panels.full { height: 100vh; }
.panels-loading { margin: auto; color: var(--muted); font-size: 14px; }

/* Au survol d'un serveur, tout le panneau prend sa couleur d'accent */
.panel-srv { --srv-hover: var(--accent); }
.panel-srv:hover { --srv-color: var(--srv-hover); }

.panel-srv {
  position: relative; flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 110px 26px 60px; text-align: center;
  cursor: pointer; overflow: hidden;
  border-right: 1px solid rgba(255,255,255,.06);
  transition: flex .55s cubic-bezier(.4,0,.2,1);
}
.panel-srv:last-child { border-right: none; }
.panels:hover .panel-srv { flex: .85; }
.panels .panel-srv:hover { flex: 1.6; }

.panel-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  transform: scale(1.06);
  filter: brightness(.42) saturate(.85);
  transition: transform .8s ease, filter .5s ease;
}
.panel-bg video, .panel-bg img { width: 100%; height: 100%; object-fit: cover; }
.panel-srv:hover .panel-bg { transform: scale(1); filter: brightness(.62) saturate(1); }

.panel-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(7,9,15,.72) 0%, rgba(7,9,15,.25) 45%, rgba(7,9,15,.92) 100%);
}
.panel-glow {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 2;
  background: var(--srv-color, var(--accent));
  opacity: 0; transition: opacity .35s;
  box-shadow: 0 0 22px var(--srv-color, var(--accent));
}
.panel-srv:hover .panel-glow { opacity: 1; }

.panel-content { position: relative; z-index: 3; max-width: 420px; }
.panel-logo {
  max-height: 130px; max-width: 84%;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.75));
  transition: transform .4s ease;
}
.panel-srv:hover .panel-logo { transform: translateY(-6px) scale(1.04); }
.panel-title {
  font-size: 30px; font-weight: 900; letter-spacing: 1px;
  text-shadow: 0 4px 18px rgba(0,0,0,.8);
}
.panel-sub {
  color: #cbd5e1; font-size: 14px; margin-top: 8px; line-height: 1.55;
  text-shadow: 0 2px 10px rgba(0,0,0,.9);
}
.panel-version {
  display: inline-block; margin-top: 12px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .5px;
  border: 1px solid rgba(255,255,255,.22); border-radius: 20px;
  padding: 4px 14px; color: #e2e8f0;
  background: rgba(0,0,0,.35); backdrop-filter: blur(6px);
}

.panel-players {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin-top: 26px; font-size: 14px; font-weight: 600;
}
.panel-players .num { font-size: 30px; font-weight: 900; line-height: 1; }
.panel-players .lbl { color: var(--muted); font-size: 12.5px; }
.pdot { width: 9px; height: 9px; border-radius: 50%; background: #6b7280; }
.pdot.on { background: #4ade80; box-shadow: 0 0 10px rgba(74,222,128,.9); animation: pulse 2.2s infinite; }
.pdot.off { background: #ef4444; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,.5); }
  70%  { box-shadow: 0 0 0 9px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

.panel-btn {
  display: inline-block; margin-top: 22px; cursor: pointer;
  border: 2px solid var(--srv-color, var(--accent));
  color: var(--srv-color, var(--accent));
  background: rgba(0,0,0,.4); backdrop-filter: blur(8px);
  font-family: inherit; font-weight: 800; font-size: 14px; letter-spacing: 1px;
  padding: 12px 34px; border-radius: 30px;
  transition: background .2s, color .2s, transform .15s, box-shadow .25s;
}
.panel-btn:hover {
  background: var(--srv-color, var(--accent)); color: #06110a;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--srv-color, var(--accent)) 40%, transparent);
}
.panel-btn.closed { border-color: #64748b; color: #94a3b8; cursor: default; }
.panel-btn.closed:hover { background: rgba(0,0,0,.4); color: #94a3b8; transform: none; box-shadow: none; }
.panel-maint {
  display: block; margin-top: 12px; font-size: 12px; font-weight: 700;
  color: var(--gold); letter-spacing: 1px;
}

@media (max-width: 900px) {
  .panels { flex-direction: column; }
  .panel-srv { min-height: 78vh; border-right: none; border-bottom: 1px solid rgba(255,255,255,.06); }
  .panels:hover .panel-srv, .panels .panel-srv:hover { flex: 1; }
}

/* ============ ACTUALITÉS ============ */
.news-section { max-width: 1100px; margin: 0 auto; padding: 80px 24px 40px; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 { font-size: 30px; font-weight: 900; }
.section-head p { color: var(--muted); font-size: 14px; margin-top: 6px; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.news-card {
  background: var(--panel); border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px; padding: 24px;
  transition: transform .18s, border-color .2s;
}
.news-card:hover { transform: translateY(-4px); border-color: rgba(74,222,128,.35); }
.news-card .n-date {
  font-size: 11.5px; font-weight: 700; letter-spacing: 1px;
  color: var(--accent); text-transform: uppercase;
}
.news-card .n-title { font-size: 18px; font-weight: 800; margin: 6px 0 10px; }
.news-card .n-content { color: #cbd5e1; font-size: 14px; line-height: 1.65; }

/* ============ BANDEAU LAUNCHER ============ */
.cta { padding: 30px 24px 70px; }
.cta-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(22,163,74,.16), rgba(18,22,33,.75) 60%);
  border: 1px solid rgba(74,222,128,.2);
  border-radius: 20px; padding: 34px 40px;
}
.cta-inner h2 { font-size: 24px; font-weight: 900; margin-bottom: 8px; }
.cta-inner p { color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 560px; }
.btn-download {
  display: inline-block; text-decoration: none; white-space: nowrap;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #052e16; font-weight: 800; font-size: 15px;
  padding: 15px 32px; border-radius: 12px;
  transition: transform .15s, box-shadow .2s;
}
.btn-download:hover { transform: translateY(-3px); box-shadow: 0 12px 34px rgba(74,222,128,.32); }

/* ============ PIED DE PAGE ============ */
footer {
  padding: 26px 20px 34px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px;
}
footer b { font-weight: 900; }
.foot-note { font-size: 11px; opacity: .6; }

/* ============ TOAST ============ */
#toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(90px);
  background: var(--accent); color: #052e16; font-weight: 700; font-size: 14px;
  padding: 12px 26px; border-radius: 30px; z-index: 400;
  transition: transform .3s ease; pointer-events: none;
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.err { background: #f87171; color: #450a0a; }

/* ============ PAGES SECONDAIRES (boutique, admin, compte) ============ */
body:not(.home) {
  background:
    radial-gradient(ellipse at 20% 0%, #1b1436 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, #0d2a1c 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
}
.wrap { max-width: 1060px; margin: 0 auto; padding: 34px 20px; }
h2 { font-weight: 800; }

/* ============ ACTUALITÉS (version enrichie) ============ */
.news-section { padding-top: 90px; }
.section-head h2 {
  display: inline-block; position: relative; padding-bottom: 10px;
}
.section-head h2::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 54px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}

.news-grid { grid-auto-rows: min-content; }
.news-card {
  position: relative; overflow: hidden; padding: 0;
  display: flex; flex-direction: column;
  animation: fadeUp .5s ease-out both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.news-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
  border-color: rgba(74,222,128,.25);
  background: linear-gradient(120deg, rgba(22,163,74,.12), var(--panel) 55%);
}
.news-card .n-img {
  background-size: cover; background-position: center;
  min-height: 170px;
}
.news-card.featured .n-img { flex: 0 0 42%; min-height: 220px; }
.news-card .n-body { padding: 24px 26px; flex: 1; }
.news-card.featured .n-title { font-size: 23px; }
.n-badge {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  background: rgba(74,222,128,.15); color: var(--accent);
  border: 1px solid rgba(74,222,128,.35); border-radius: 20px;
  font-size: 11px; font-weight: 700; padding: 4px 12px;
  backdrop-filter: blur(6px);
}
.news-card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(0,0,0,.4); }

@media (max-width: 760px) {
  .news-card.featured { flex-direction: column; }
  .news-card.featured .n-img { flex: none; width: 100%; }
}
