/* ═══════════════════════════════════════════════════════
   THYRANDEL — Celtic Mystic Fantasy MMORPG
   ═══════════════════════════════════════════════════════ */

/* ── Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg-primary:    #07060d;
  --bg-secondary:  #0f0e18;
  --bg-card:       #13121f;
  --bg-card-hover: #1a1930;
  --border-subtle: #1f1e30;
  --border-gold:   #c9a84c;
  --gold:          #c9a84c;
  --gold-light:    #e8d59e;
  --gold-dim:      #8a7233;
  --mystic:        #7b4fbf;
  --mystic-dim:    #5a3a8a;
  --celtic-green:  #3a7a52;
  --celtic-teal:   #2a8a7a;
  --blood:         #8a2a2a;
  --text-primary:  #e8e4d9;
  --text-secondary:#9a9688;
  --text-dim:      #5a574e;
  --font-display:  'Cinzel', serif;
  --font-body:     'Inter', sans-serif;
  --font-lore:     'Crimson Text', serif;
  --shadow-glow:   0 0 30px rgba(201,168,76,0.15);
  --shadow-card:   0 4px 24px rgba(0,0,0,0.5);
  --radius:        8px;
  --radius-lg:     12px;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-light); }

img { max-width: 100%; display: block; }

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── Background particles ──────────────────────────────── */
#particles-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════
   HEADER / NAVBAR
   ═══════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(7,6,13,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background .3s;
}

.site-header.scrolled {
  background: rgba(7,6,13,0.95);
  box-shadow: 0 2px 20px rgba(0,0,0,0.6);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  height: 70px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-right: 2rem;
  text-decoration: none;
}

.nav-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--bg-primary);
  font-weight: 900;
  font-family: var(--font-display);
  box-shadow: 0 0 12px rgba(201,168,76,0.3);
}

.nav-logo .logo-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: .5rem;
  list-style: none;
  flex: 1;
}

.nav-links a {
  position: relative;
  display: flex;
  align-items: center;
  padding: .5rem .15rem;
  color: var(--text-dim);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  transition: color .3s;
  text-transform: uppercase;
  font-family: var(--font-display);
  background: none !important;
  border: none !important;
  border-bottom: none !important;
  outline: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
}

.nav-links a:hover {
  color: var(--gold-light);
}

.nav-links a.active {
  color: var(--gold);
}

/* Right section */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
}

.lang-btn {
  padding: .45rem .85rem;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-body);
  transition: all .2s;
}

.lang-btn:hover {
  color: var(--text-secondary);
}

.lang-btn.active {
  background: var(--gold);
  color: var(--bg-primary);
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: .5rem;
  background: none;
  border: none;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--gold);
  transition: all .3s;
}

/* ═══════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(123,79,191,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(201,168,76,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(58,122,82,0.08) 0%, transparent 50%),
    var(--bg-primary);
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
}

.hero-badge {
  display: inline-block;
  padding: .4rem 1.25rem;
  border: 1px solid var(--gold-dim);
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: .85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  background: rgba(201,168,76,0.06);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: .5rem;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--gold), var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-family: var(--font-lore);
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 2.2rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all .25s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--bg-primary);
  box-shadow: 0 4px 20px rgba(201,168,76,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(201,168,76,0.45);
  color: var(--bg-primary);
}

.btn-secondary {
  background: rgba(201,168,76,0.08);
  color: var(--gold);
  border: 1px solid var(--gold-dim);
}

.btn-secondary:hover {
  background: rgba(201,168,76,0.15);
  transform: translateY(-2px);
  color: var(--gold-light);
}

.btn-discord {
  background: #5865F2;
  color: #fff;
  box-shadow: 0 4px 20px rgba(88,101,242,0.3);
}

.btn-discord:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(88,101,242,0.45);
  color: #fff;
}

.btn-icon {
  font-size: 1.2rem;
}

/* ── Celtic divider ────────────────────────────────────── */
.celtic-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3rem auto;
  max-width: 400px;
}

.celtic-divider::before,
.celtic-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.celtic-divider .diamond {
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════ */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-header p {
  color: var(--text-secondary);
  font-family: var(--font-lore);
  font-size: 1.2rem;
  margin-top: .5rem;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════
   NEWS / EVENTS GRID (Accueil)
   ═══════════════════════════════════════════════════════ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .3s;
}

.news-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.news-card-img {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--mystic-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: .8;
}

.news-card-body {
  padding: 1.5rem;
}

.news-card .tag {
  display: inline-block;
  padding: .25rem .8rem;
  border-radius: 4px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.tag-update { background: rgba(201,168,76,0.15); color: var(--gold); }
.tag-event  { background: rgba(123,79,191,0.15); color: #a87ee6; }
.tag-news   { background: rgba(58,122,82,0.15); color: #5cc47a; }
.tag-patch  { background: rgba(42,138,122,0.15); color: #4ec9b0; }

.news-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: .5rem;
  color: var(--text-primary);
}

.news-card p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.news-card .meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 1rem;
  font-size: .9rem;
  color: var(--text-dim);
}

/* ═══════════════════════════════════════════════════════
   EVENTS TIMELINE
   ═══════════════════════════════════════════════════════ */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all .3s;
}

.event-item:hover {
  border-color: var(--mystic-dim);
  background: var(--bg-card-hover);
}

.event-date {
  text-align: center;
  min-width: 60px;
  flex-shrink: 0;
}

.event-date .day {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.event-date .month {
  font-size: .88rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dim);
}

.event-divider {
  width: 1px;
  height: 40px;
  background: var(--border-subtle);
}

.event-info h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: .2rem;
}

.event-info p {
  font-size: 1rem;
  color: var(--text-secondary);
}

.event-info .event-time {
  font-size: .9rem;
  color: var(--mystic);
  margin-top: .3rem;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════
   WIKI — TABS
   ═══════════════════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: .25rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.tab-btn {
  padding: .85rem 1.75rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-secondary);
}

.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn .3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Class Cards ───────────────────────────────────────── */
.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.class-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all .3s;
  position: relative;
  overflow: hidden;
}

.class-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--class-color, var(--gold));
}

.class-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  border-color: var(--class-color, var(--gold-dim));
}

.class-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.class-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .3rem;
}

.class-card .class-role {
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--class-color, var(--gold));
  margin-bottom: 1rem;
}

.class-card p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-family: var(--font-lore);
}

.class-card .class-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.class-stat {
  text-align: center;
}

.class-stat .stat-bar {
  display: flex;
  gap: 2px;
  margin-bottom: .3rem;
  justify-content: center;
}

.class-stat .stat-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-subtle);
}

.class-stat .stat-bar span.filled {
  background: var(--class-color, var(--gold));
}

.class-stat .stat-label {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
}

/* ═══════════════════════════════════════════════════════
   COMMUNITY — Rankings
   ═══════════════════════════════════════════════════════ */
.community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.ranking-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ranking-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.ranking-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.ranking-header .header-icon {
  font-size: 1.3rem;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
}

.ranking-table th {
  padding: .75rem 1.5rem;
  font-size: .88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.ranking-table td {
  padding: .8rem 1.5rem;
  font-size: 1rem;
  border-bottom: 1px solid rgba(31,30,48,0.5);
}

.ranking-table tr:last-child td {
  border-bottom: none;
}

.ranking-table tr:hover td {
  background: rgba(201,168,76,0.03);
}

.ranking-table .rank {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-dim);
  width: 50px;
}

.ranking-table .rank-1 { color: #ffd700; }
.ranking-table .rank-2 { color: #c0c0c0; }
.ranking-table .rank-3 { color: #cd7f32; }

.ranking-table .player-name,
.ranking-table .guild-name {
  font-weight: 500;
  color: var(--text-primary);
}

.ranking-table .guild-tag {
  color: var(--mystic);
  font-size: .92rem;
}

.ranking-table .score {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--gold);
  text-align: right;
}

.ranking-table .player-class {
  font-size: .92rem;
  color: var(--text-dim);
}

/* ── Discord Banner ────────────────────────────────────── */
.discord-banner {
  background: linear-gradient(135deg, #5865F2 0%, #4752c4 100%);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.discord-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='0.03' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
}

.discord-banner > * {
  position: relative;
  z-index: 1;
}

.discord-banner h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .5rem;
}

.discord-banner p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
}

.discord-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.discord-stat {
  text-align: center;
}

.discord-stat .number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
}

.discord-stat .label {
  font-size: .92rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ═══════════════════════════════════════════════════════
   DOWNLOAD SECTION
   ═══════════════════════════════════════════════════════ */
.download-section {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.download-box {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
}

.download-box h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: .5rem;
}

.download-box p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.download-info {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  font-size: .95rem;
  color: var(--text-dim);
}

.download-info span {
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 2rem 2rem;
  text-align: center;
  background: var(--bg-secondary);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.footer-links a {
  font-size: .95rem;
  color: var(--text-dim);
  transition: color .2s;
}

.footer-links a:hover {
  color: var(--gold);
}

.site-footer .copyright {
  font-size: .9rem;
  color: var(--text-dim);
}

/* ═══════════════════════════════════════════════════════
   SPA PAGE SECTIONS & TRANSITIONS
   ═══════════════════════════════════════════════════════ */
[data-page] {
  display: none;
}

[data-page].active {
  display: block;
  animation: spaFadeIn .6s cubic-bezier(.22,.61,.36,1) both;
}

[data-page].page-fade-out {
  display: block;
  animation: spaFadeOut .35s cubic-bezier(.55,.06,.68,.19) forwards;
}

@keyframes spaFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(.98);
    filter: blur(6px) brightness(1.3);
  }
  60% {
    filter: blur(0) brightness(1.08);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0) brightness(1);
  }
}

@keyframes spaFadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0) brightness(1);
  }
  to {
    opacity: 0;
    transform: translateY(-12px) scale(.98);
    filter: blur(6px) brightness(1.3);
  }
}

.page-content {
  flex: 1;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .4s ease, transform .4s ease;
}

body.page-loaded .page-content {
  opacity: 1;
  transform: translateY(0);
}

/* ── Magic Transition Overlay ─────────────────────────── */
.magic-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}

.magic-overlay.active {
  opacity: 1;
}

/* Radial mystic glow */
.magic-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(201,168,76,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 30% 40%, rgba(123,79,191,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(58,122,82,0.08) 0%, transparent 50%);
  animation: mysticPulse .7s ease-in-out;
}

@keyframes mysticPulse {
  0%   { opacity: 0; transform: scale(.9); }
  40%  { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.1); }
}



/* ═══════════════════════════════════════════════════════
   i18n — FR by default, EN when body.lang-en
   ═══════════════════════════════════════════════════════ */
[data-lang-en] { display: none !important; }
[data-lang-fr] { display: inline; }

body.lang-en [data-lang-fr] { display: none !important; }
body.lang-en [data-lang-en] { display: inline !important; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .community-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0; right: 0;
    background: rgba(7,6,13,0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 1rem;
    gap: .25rem;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: .75rem 1rem;
    width: 100%;
  }


  .hero h1 { font-size: 2.2rem; }
  .hero-subtitle { font-size: 1.1rem; }
  .news-grid { grid-template-columns: 1fr; }

  .download-box { padding: 2rem 1.25rem; }
  .download-info {
    flex-direction: column;
    align-items: center;
    gap: .75rem;
  }

  .discord-banner { padding: 2rem 1.25rem; }
  .discord-stats { gap: 1.25rem; }

  .class-grid { grid-template-columns: 1fr; }

  .ranking-table td,
  .ranking-table th {
    padding: .6rem .75rem;
    font-size: .9rem;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }

  .section { padding: 3rem 1.25rem; }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .event-item {
    flex-direction: column;
    text-align: center;
    gap: .75rem;
  }

  .event-divider {
    width: 40px;
    height: 1px;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 1rem;
    height: 56px;
  }

  .nav-logo .logo-text { display: none; }

  .nav-links {
    top: 56px;
  }

  .hero h1 { font-size: 1.8rem; }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .event-item { padding: .85rem 1rem; }

  .ranking-table td,
  .ranking-table th {
    padding: .5rem .5rem;
    font-size: .82rem;
  }

  .ranking-table .guild-name,
  .ranking-table .player-name {
    font-size: .85rem;
  }

  .discord-banner h3 { font-size: 1.4rem; }
  .discord-stat .number { font-size: 1.4rem; }
}
