/* Saturnia BaseWars - feuille de style */
:root {
  --bg: #00081a;
  --card: #030d24;
  --primary: #a855f7;
  --accent: #06b6d4;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: #1e293b;
  --glow: rgba(139, 92, 246, 0.3);
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: #0a0a1a linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 50%, #16213e 100%) fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
main { flex: 1; padding-top: 64px; }

.orbitron { font-family: 'Orbitron', monospace; }
.neon { color: var(--primary); text-shadow: 0 0 10px rgba(139, 92, 246, 0.8); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.i { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(0, 8, 26, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid var(--glow); }
.brand span { font-size: 1.25rem; font-weight: 700; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { display: flex; align-items: center; gap: 8px; font-weight: 500; transition: color .3s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a.discord { color: var(--accent); }
.nav-links a.discord:hover { color: #67e8f9; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 8px; }
.menu-btn .i { width: 24px; height: 24px; }
.menu-btn .close { display: none; }

@media (max-width: 767px) {
  .menu-btn { display: block; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 16px 16px; background: rgba(0, 8, 26, 0.97); border-bottom: 1px solid var(--border); }
  .nav-links a { padding: 10px 0; }
  .nav.open .nav-links { display: flex; }
  .nav.open .menu-btn .open { display: none; }
  .nav.open .menu-btn .close { display: block; }
}

/* ---------- Cartes / boutons ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--glow);
  border-radius: var(--radius);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
  transition: border-color .3s, box-shadow .3s;
}
.card:hover { border-color: rgba(139, 92, 246, 0.6); box-shadow: 0 0 30px rgba(139, 92, 246, 0.3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 32px; border: 0; border-radius: 10px; cursor: pointer;
  font-family: 'Orbitron', monospace; font-weight: 600; font-size: 1.05rem;
  color: var(--text); transition: transform .3s, opacity .3s;
}
.btn:hover { transform: scale(1.05); opacity: .9; }
.btn-primary { background: var(--primary); }
.btn-accent { background: var(--accent); }
.btn-sm { padding: 10px 20px; font-size: .95rem; }

/* ---------- Accueil ---------- */
.hero {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 48px 0;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
}
.hero-logo {
  width: 256px; height: 256px; margin: 0 auto 32px;
  border-radius: 50%; object-fit: cover;
  border: 4px solid rgba(168, 85, 247, 0.3);
  animation: float 3s ease-in-out infinite, pulse-glow 2s ease-in-out infinite;
}
.hero h1 { font-size: clamp(2rem, 6vw, 3.75rem); font-weight: 900; margin-bottom: 24px; line-height: 1.15; }
.hero h2 { font-size: clamp(1.2rem, 3vw, 1.5rem); font-weight: 600; color: var(--accent); margin-bottom: 32px; }
.hero .lead { max-width: 900px; margin: 0 auto 48px; font-size: 1.15rem; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 900px; margin: 0 auto 48px; }
.feature { padding: 24px; }
.feature .i { width: 48px; height: 48px; margin: 0 auto 16px; display: block; }
.feature h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.feature p { color: var(--muted); }

.server-info { max-width: 900px; margin: 0 auto 32px; padding: 32px; background: rgba(3, 13, 36, 0.5); }
.server-info > h3 { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin-bottom: 24px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; text-align: left; }
.info-grid h4 { display: flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.info-grid p { color: var(--muted); }
.mono { font-family: Consolas, 'Courier New', monospace; background: var(--border); padding: 8px; border-radius: 6px; word-break: break-all; }

.cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.cta .btn-primary { animation: pulse-glow 2s ease-in-out infinite; }

@media (max-width: 767px) {
  .hero-logo { width: 192px; height: 192px; }
  .features, .info-grid { grid-template-columns: 1fr; }
  .server-info { padding: 24px; }
  .cta .btn { width: 100%; }
}

/* ---------- Fenêtre "Rejoindre" ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.75); }
.modal.open { display: flex; }
.modal-box { position: relative; width: 100%; max-width: 480px; padding: 24px; text-align: left; }
.modal-box:hover { box-shadow: 0 0 20px rgba(139, 92, 246, 0.1); border-color: var(--glow); }
.modal-box h3 { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; padding-right: 32px; }
.modal-box h3 .i { width: 24px; height: 24px; }
.modal-box > p { color: var(--muted); margin-bottom: 20px; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: 0; color: var(--muted); cursor: pointer; }
.modal-close:hover { color: var(--text); }
.ip-box { background: rgba(30, 41, 59, 0.3); padding: 16px; border-radius: 10px; margin-bottom: 16px; }
.ip-box h4 { display: flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.ip-row { display: flex; gap: 8px; }
.ip-row code { flex: 1; background: var(--bg); color: var(--primary); padding: 8px; border-radius: 6px; font-family: Consolas, 'Courier New', monospace; }
.copy-btn { background: none; border: 1px solid rgba(168, 85, 247, 0.3); color: var(--text); border-radius: 6px; padding: 0 12px; cursor: pointer; }
.copy-btn:hover { background: rgba(168, 85, 247, 0.15); }
.modal-box .btn { width: 100%; }
.modal-box .btn:hover { transform: none; }
.hint { font-size: .8rem; color: var(--muted); text-align: center; margin-top: 8px; }

.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  background: var(--card); border: 1px solid var(--glow); border-radius: 10px;
  padding: 14px 18px; max-width: calc(100% - 48px);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast strong { display: block; }
.toast span { color: var(--muted); font-size: .9rem; }

/* ---------- Règlement ---------- */
.rules { padding: 80px 0; background: rgba(3, 13, 36, 0.2); }
.rules-head { text-align: center; margin-bottom: 64px; }
.rules-head h1 { font-size: clamp(1.6rem, 5vw, 3rem); font-weight: 900; margin-bottom: 24px; display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; line-height: 1.2; }
.rules-head h1 .i { width: 48px; height: 48px; }
.rules-head p { font-size: 1.2rem; color: var(--muted); max-width: 760px; margin: 0 auto; }
.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; max-width: 1100px; margin: 0 auto; }
.rule-card { padding: 32px; }
.rule-card.wide { grid-column: 1 / -1; }
.rule-card h2 { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; font-weight: 700; color: var(--accent); margin-bottom: 24px; }
.rule-card h2 .i { width: 24px; height: 24px; }
.rule-card ol { list-style: none; counter-reset: r; display: grid; gap: 16px; }
.rule-card.wide ol { grid-template-columns: 1fr 1fr; column-gap: 24px; }
.rule-card li { counter-increment: r; display: flex; gap: 12px; }
.rule-card li::before { content: counter(r) "."; color: var(--primary); font-weight: 700; }
.note { max-width: 1100px; margin: 48px auto 0; padding: 32px; text-align: center; background: rgba(168, 85, 247, 0.1); border: 1px solid rgba(168, 85, 247, 0.3); border-radius: var(--radius); }
.note h2 { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 1.25rem; font-weight: 700; color: var(--primary); margin-bottom: 16px; }
.note p { color: var(--muted); margin-bottom: 24px; }

@media (max-width: 1023px) {
  .rules-grid, .rule-card.wide ol { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .rules { padding: 48px 0; }
  .rule-card, .note { padding: 24px; }
  .rules-head h1 .i { width: 36px; height: 36px; }
}

/* ---------- Pied de page ---------- */
.footer { background: rgba(3, 13, 36, 0.3); border-top: 1px solid var(--border); padding: 48px 0; text-align: center; }
.footer .brand { justify-content: center; margin-bottom: 24px; }
.footer .brand img { width: 32px; height: 32px; }
.footer p { color: var(--muted); }
.socials { display: flex; justify-content: center; gap: 24px; margin-top: 24px; }
.socials a { color: var(--muted); transition: color .3s; }
.socials a:hover { color: var(--accent); }
.socials .i { width: 32px; height: 32px; }
.copyright { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--border); font-size: .875rem; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse-glow { 0%, 100% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.5); } 50% { box-shadow: 0 0 40px rgba(139, 92, 246, 0.8); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
