﻿/* ====================================================
   TAROT LEAGUE — CSS Principal
   Thème : Sombre, rouge profond, or
   ==================================================== */

:root {
  /* Tapis vert — couleur principale du site */
  --green-felt:   #1e5c38;
  --green-dark:   #133d25;
  --green-light:  #2a7a4a;
  --green-glow:   rgba(30, 92, 56, 0.5);
  --green-subtle: rgba(30, 92, 56, 0.15);

  /* Fond : légère teinte verte profonde au lieu de bleu-nuit */
  --bg-deep:      #080f0a;
  --bg-dark:      #0d160f;
  --bg-card:      #121d14;
  --bg-card-hover:#192618;
  --bg-nav:       rgba(8, 15, 10, 0.96);

  --red-main:     #c0392b;
  --red-dark:     #96281b;
  --red-glow:     rgba(192, 57, 43, 0.35);

  --gold:         #f0c040;
  --gold-dark:    #c8a020;
  --gold-light:   #ffe080;
  --gold-glow:    rgba(240, 192, 64, 0.25);

  --text-primary: #edf5ef;
  --text-secondary:#8faa96;
  --text-muted:   #4a6050;

  /* Bordures teintées vert-or */
  --border:       rgba(30, 92, 56, 0.35);
  --border-hover: rgba(240, 192, 64, 0.45);

  --bronze:  #cd7f32;
  --silver:  #a8a9ad;
  --gold-r:  #ffd700;
  --platinum:#e5e4e2;
  --diamond: #b9f2ff;
  --master:  #ff6b6b;

  --radius:  10px;
  --radius-lg: 18px;
  --shadow:  0 4px 24px rgba(0,0,0,0.6);
  --shadow-gold: 0 0 20px rgba(240, 192, 64, 0.2);
  --shadow-green: 0 0 30px rgba(30, 92, 56, 0.3);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--red-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-main); }

/* ===== UTILS ===== */
.hidden { display: none !important; }
.text-gold { color: var(--gold); }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
.link-gold { color: var(--gold); font-size: 0.9rem; }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1900px;
  margin: 0 auto;
  padding: 0 60px;
  height: 160px;
  display: flex;
  align-items: center;
  gap: 60px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: 'Cinzel', serif;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-primary);
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.8; }

.logo-icon { font-size: 2.6rem; }
.logo-ranked { color: var(--gold); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  flex: 1;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 1.5rem;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--radius);
  transition: all 0.2s;
  letter-spacing: 0.5px;
}
.nav-link:hover { color: var(--text-primary); background: rgba(30, 92, 56, 0.2); }
.nav-link.active { color: var(--gold); background: rgba(30, 92, 56, 0.25); border-bottom: 4px solid var(--green-light); }

.nav-auth {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}
/* Boutons navbar ×2.5 */
.nav-auth .btn-primary,
.nav-auth .btn-secondary {
  font-size: 1.5rem;
  padding: 16px 36px;
  border-radius: 12px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--red-main), var(--red-dark));
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 22px;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #d44, var(--red-main));
  box-shadow: 0 4px 16px var(--red-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 10px 22px;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { color: var(--gold); border-color: var(--gold); }

.btn-large { padding: 14px 32px; font-size: 1rem; border-radius: 12px; }
.btn-full { width: 100%; margin-top: 8px; }

.btn-icon {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.btn-icon:hover { color: var(--red-main); border-color: var(--red-main); }

.btn-download {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #000;
  font-weight: 700;
  font-size: 1.1rem;
}
.btn-download:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  box-shadow: 0 4px 20px var(--gold-glow);
}

/* ===== BOUTON CTA FLOTTANT (Jouer / Télécharger) ===== */
.btn-floating-cta {
  position: fixed;
  right: 28px;
  top: 20%;
  z-index: 500;
  padding: 34px 33px;
  min-width: 260px;
  text-align: center;
  background: linear-gradient(135deg, var(--green-dark), var(--green-felt));
  border: 1px solid var(--green-light);
  border-radius: var(--radius);
  color: #fff;
  font-family: 'Open Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.6px;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(30, 92, 56, 0.55);
  transition: box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-floating-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(240, 192, 64, 0.35), 0 4px 18px rgba(30, 92, 56, 0.6);
  border-color: var(--gold);
  color: var(--gold);
}

/* ===== USER PROFILE NAV ===== */
.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-rank-badge {
  font-size: 0.9rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  color: var(--gold);
  letter-spacing: 0.5px;
}
/* Pseudo cliquable → Mon Compte */
.user-name-btn {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.user-name-btn:hover {
  color: var(--gold);
  background: var(--bg-card);
}
/* Bouton déconnexion navbar — icône SVG power, style premium */
.btn-logout-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  line-height: 1;
  background: linear-gradient(145deg, #5c0f0a 0%, var(--red-dark) 60%, var(--red-main) 100%);
  border: 1px solid rgba(220, 60, 50, 0.65);
  border-radius: 50%;
  color: #ffccc8;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(192, 57, 43, 0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.btn-logout-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255,255,255,0.15) 0%, transparent 65%);
  pointer-events: none;
}
.btn-logout-nav:hover {
  background: linear-gradient(145deg, var(--red-dark) 0%, var(--red-main) 50%, #e74c3c 100%);
  border-color: #e74c3c;
  color: #fff;
  box-shadow: 0 0 18px rgba(231, 76, 60, 0.75), 0 3px 12px rgba(192, 57, 43, 0.5);
  transform: scale(1.08) translateY(-1px);
}
.btn-logout-nav:active {
  transform: scale(1);
  box-shadow: 0 0 10px rgba(192, 57, 43, 0.5);
}

/* ===== PAGES ===== */
#main-content { padding-top: 64px; }  /* mobile : navbar 64px */
.page { display: none; }
.page.active { display: block; }

/* ===== DESKTOP STANDARD — 901px à 1920px ===== */
@media (min-width: 901px) and (max-width: 1920px) {
  /* Navbar réduite pour les écrans < 1440p */
  .nav-inner      { height: 72px; padding: 0 32px; gap: 24px; }
  .nav-logo       { font-size: 1.6rem; gap: 10px; }
  .logo-icon      { font-size: 1.8rem; }
  .nav-link       { font-size: 1rem; padding: 8px 14px; }
  .nav-auth       { gap: 12px; }
  .nav-auth .btn-primary,
  .nav-auth .btn-secondary { font-size: 0.9rem; padding: 10px 20px; border-radius: 8px; }
  /* Contenu visible sous la navbar 72px */
  #main-content   { padding-top: 72px; }
  .hero           { margin-top: -8px; }
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(30, 92, 56, 0.28) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(192,57,43,0.14) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 80% 20%, rgba(240,192,64,0.07) 0%, transparent 50%),
    var(--bg-deep);
}

.hero-overlay {
  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='%23f0c040' 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");
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 1100px;
  padding: 0 48px;
}

.hero-badge {
  display: inline-block;
  background: rgba(30, 92, 56, 0.3);
  border: 1px solid rgba(42, 122, 74, 0.7);
  color: #6ee89a;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  padding: 12px 36px;
  border-radius: 40px;
  margin-bottom: 56px;
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(7rem, 14vw, 14rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 8px;
  text-shadow: 0 0 80px rgba(192,57,43,0.5);
  margin-bottom: 48px;
}

.hero-subtitle {
  font-size: 2.3rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 80px;
}

.hero-buttons {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Boutons hero — taille doublée */
.hero-buttons .btn-large {
  padding: 22px 52px;
  font-size: 1.5rem;
  border-radius: 14px;
}

/* Corner suit symbols decoration */
.hero-cards { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.card-float {
  position: absolute;
  font-size: 10rem;
  opacity: 0.12;
  animation: float 8s ease-in-out infinite;
  line-height: 1;
}
/* ♦ carreau — coin haut gauche (rouge) */
.card-1 { top: 5%; left: 4%; animation-delay: 0s; color: #e74c3c; }
/* ♠ pique — coin haut droit (blanc/défaut) */
.card-2 { top: 5%; right: 4%; animation-delay: 2s; }
/* ♣ trèfle — coin bas gauche (blanc/défaut) */
.card-3 { bottom: 5%; left: 4%; animation-delay: 4s; }
/* ♥ coeur — coin bas droit (rouge) */
.card-4 { bottom: 5%; right: 4%; animation-delay: 6s; color: #e74c3c; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* ===== STATS BANNER ===== */
.stats-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: linear-gradient(135deg, var(--bg-card), rgba(30,92,56,0.12));
  border-top: 1px solid rgba(30,92,56,0.4);
  border-bottom: 1px solid rgba(30,92,56,0.4);
  padding: 28px 24px;
}

.stat-item {
  text-align: center;
  padding: 0 48px;
}
.stat-number {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
}
.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}
.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
}
/* Indicateur statut serveur */
.stat-server-online {
  color: var(--gold) !important;
  text-shadow: 0 0 12px rgba(240,192,64,0.4);
}
.stat-server-offline {
  color: var(--red-main) !important;
}
/* Petite pastille live animée */
#stat-server::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
  vertical-align: middle;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

/* ===== SECTIONS ===== */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 24px;
}
.section-dark {
  max-width: 100%;
  background: var(--bg-dark);
  padding: 72px 0;
}
.section-dark > .section-header,
.section-dark > .features-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-dark .section-header {
  padding-bottom: 0;
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 48px;
}
.section-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}
.section-header h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--green-felt), var(--green-light));
  margin-top: 10px;
  border-radius: 2px;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 8px;
}

/* ===== RANKS GRID ===== */
.ranks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.rank-card {
  background: linear-gradient(160deg, var(--bg-card), rgba(30,92,56,0.08));
  border: 1px solid rgba(30,92,56,0.35);
  border-radius: var(--radius-lg);
  padding: 28px 16px;
  text-align: center;
  transition: all 0.2s;
  cursor: default;
}
.rank-card:hover {
  transform: translateY(-4px);
  border-color: var(--green-light);
  box-shadow: 0 6px 24px rgba(30,92,56,0.25);
}
.rank-icon { font-size: 2.5rem; margin-bottom: 12px; }
.rank-name { font-family: 'Cinzel', serif; font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.rank-rp { font-size: 0.85rem; color: var(--text-secondary); }

.rank-bronze      .rank-name { color: var(--bronze); }
.rank-silver      .rank-name { color: var(--silver); }
.rank-gold        .rank-name { color: var(--gold-r); }
.rank-platinum    .rank-name { color: var(--platinum); }
.rank-diamond     .rank-name { color: var(--diamond); }
.rank-master      .rank-name { color: var(--master); }
.rank-grandmaster .rank-name { color: #c084fc; }
.rank-legend      .rank-name { color: #facc15; }

/* Grand Maître — bordure violette */
.rank-grandmaster {
  border-color: rgba(192,132,252,0.4);
  background: linear-gradient(160deg, var(--bg-card), rgba(192,132,252,0.06));
}
.rank-grandmaster:hover { border-color: #c084fc; box-shadow: 0 6px 24px rgba(192,132,252,0.2); }

/* Légende — bordure dorée brillante */
.rank-legend {
  border-color: rgba(250,204,21,0.4);
  background: linear-gradient(160deg, var(--bg-card), rgba(250,204,21,0.06));
}
.rank-legend:hover { border-color: #facc15; box-shadow: 0 6px 24px rgba(250,204,21,0.25); }

/* Grille 8 rangs — 4 colonnes par défaut, 8 max */
.ranks-grid-8 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) { .ranks-grid-8 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .ranks-grid-8 { grid-template-columns: repeat(2, 1fr); } }

/* ===== FEATURES GRID ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  background: linear-gradient(160deg, var(--bg-card), rgba(30,92,56,0.1));
  border: 1px solid rgba(30,92,56,0.3);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: all 0.2s;
}
.feature-card:hover { border-color: var(--green-light); transform: translateY(-3px); box-shadow: 0 6px 24px rgba(30,92,56,0.2); }
.feature-icon { font-size: 2.2rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; color: var(--gold); }
.feature-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* ===== PODIUM ===== */
.podium {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: flex-end;
}
.podium-loading { color: var(--text-secondary); font-style: italic; }

.podium-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}
.podium-empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.4; }
.podium-empty-text { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.podium-empty-sub  { font-size: 0.85rem; opacity: 0.7; }

.podium-item {
  background: linear-gradient(160deg, var(--bg-card), rgba(30,92,56,0.1));
  border: 1px solid rgba(30,92,56,0.35);
  border-radius: var(--radius-lg);
  padding: 32px 32px 24px;
  text-align: center;
  flex: 1;
  max-width: 280px;
  transition: all 0.2s;
}
.podium-item:hover { transform: translateY(-3px); border-color: var(--green-light); box-shadow: 0 8px 28px rgba(30,92,56,0.2); }

.podium-item.pos-1 {
  border-color: rgba(255, 215, 0, 0.45);
  background: linear-gradient(160deg, rgba(30,92,56,0.18), var(--bg-card));
  box-shadow: 0 0 30px rgba(255,215,0,0.12), 0 0 20px rgba(30,92,56,0.15);
  padding-top: 48px;
}
.podium-item.pos-2 { border-color: rgba(168,169,173,0.35); }
.podium-item.pos-3 { border-color: rgba(205,127,50,0.35); }

.podium-rank { font-size: 2rem; margin-bottom: 12px; }
.podium-name { font-family: 'Cinzel', serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.podium-rp { font-size: 1.5rem; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.podium-rp-label { font-size: 0.8rem; color: var(--text-secondary); }
.podium-rank-name { font-size: 0.85rem; color: var(--text-secondary); margin-top: 10px; }

/* ===== PAGE HERO SMALL ===== */
.page-hero {
  text-align: center;
  padding: 120px 24px 8px;
  background: radial-gradient(ellipse 70% 100% at 50% 0%, rgba(30,92,56,0.2) 0%, transparent 70%);
  border-bottom: 1px solid rgba(30,92,56,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}
.page-hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.page-hero p { color: var(--text-secondary); font-size: 1rem; }

/* ===== NEWS ===== */
#page-news .section { max-width: 1800px; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: all 0.2s;
}
.news-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.news-featured {
  grid-column: 1 / -1;
  border-color: rgba(192,57,43,0.3);
  background: linear-gradient(135deg, rgba(192,57,43,0.08), var(--bg-card));
  padding: 48px;
}
.news-tag {
  display: inline-block;
  background: var(--red-main);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.news-tag-blue { background: #2563eb; }
.news-tag-green { background: #16a34a; }
.news-tag-purple { background: #7c3aed; }
.news-date { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.news-title { font-family: 'Cinzel', serif; font-size: 1.3rem; font-weight: 600; margin-bottom: 14px; line-height: 1.3; }
.news-featured .news-title { font-size: 2rem; }
.news-excerpt { font-size: 1rem; color: var(--text-secondary); line-height: 1.7; }
.news-meta { display: flex; gap: 20px; margin-top: 20px; font-size: 0.9rem; color: var(--text-secondary); }

/* ===== FORUM ===== */
.forum-layout { display: grid; grid-template-columns: 1fr 280px; gap: 28px; }

/* --- Barre du haut --- */
.forum-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  min-height: 42px;
  gap: 12px;
}

/* Breadcrumb */
.forum-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.forum-breadcrumb-home {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}
.forum-breadcrumb-home:hover { color: var(--gold); border-color: var(--gold); }
.forum-breadcrumb-sep { color: var(--text-muted); font-size: 1.1rem; }
.forum-breadcrumb-current { font-weight: 700; color: var(--text-primary); }

/* --- Grille des sections --- */
.forum-sections-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.forum-section-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, var(--bg-card), rgba(30,92,56,0.1));
  border: 1px solid rgba(30,92,56,0.3);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.forum-section-card:hover {
  border-color: var(--green-light);
  background: linear-gradient(135deg, var(--bg-card-hover), rgba(30,92,56,0.18));
  transform: translateX(4px);
  box-shadow: -4px 0 0 var(--green-felt), 0 4px 20px rgba(30,92,56,0.2);
}

.forum-section-icon {
  font-size: 2rem;
  width: 52px;
  height: 52px;
  background: rgba(30,92,56,0.2);
  border: 1px solid rgba(30,92,56,0.4);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.forum-section-card:hover .forum-section-icon {
  background: rgba(30,92,56,0.35);
  border-color: var(--green-light);
}

.forum-section-info { flex: 1; }
.forum-section-name {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.forum-section-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.forum-section-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  min-width: 110px;
}
.forum-section-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: right;
}
.forum-section-count strong { color: var(--text-primary); }
.forum-section-last {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
}
.forum-section-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-left: 8px;
  transition: transform 0.2s, color 0.2s;
}
.forum-section-card:hover .forum-section-arrow { transform: translateX(4px); color: var(--gold); }

/* Topic épinglé global */
.forum-pinned-global {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(192,57,43,0.07);
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 16px;
}
.forum-pinned-global .thread-icon { font-size: 1.2rem; flex-shrink: 0; }
.forum-pinned-global .thread-content { flex: 1; }
.forum-pinned-global .thread-title { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); margin-bottom: 2px; }
.forum-pinned-global .thread-meta { font-size: 0.75rem; color: var(--text-secondary); }
.forum-pinned-global .thread-stats { font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; }

/* --- Header de section (vue topics) --- */
.forum-section-header-bar {
  background: linear-gradient(135deg, rgba(30,92,56,0.15), var(--bg-card));
  border: 1px solid rgba(30,92,56,0.35);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.forum-section-header-icon { font-size: 2rem; }
.forum-section-header-info h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.forum-section-header-info p { font-size: 0.85rem; color: var(--text-secondary); }

/* --- Liste de topics --- */
.forum-threads {
  background: var(--bg-card);
  border: 1px solid rgba(30,92,56,0.3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}
.thread-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(30,92,56,0.15);
  transition: background 0.15s;
  cursor: pointer;
}
.thread-item:last-child { border-bottom: none; }
.thread-item:hover { background: rgba(30,92,56,0.08); }
.thread-pinned { background: rgba(192,57,43,0.05); }
.thread-icon { font-size: 1.4rem; flex-shrink: 0; }
.thread-content { flex: 1; }
.thread-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--text-primary);
  transition: color 0.15s;
}
.thread-item:hover .thread-title { color: var(--gold); }
.thread-meta { font-size: 0.8rem; color: var(--text-secondary); }
.thread-stats { font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; text-align: right; }
.thread-stats-new span { color: var(--green-light); font-weight: 700; }
.thread-stats-red span { color: var(--red-main); }

/* Lien dans la sidebar */
.forum-topic-link { color: var(--text-secondary); font-size: 0.85rem; }
.forum-topic-link:hover { color: var(--gold); }
.sidebar-last-topic { margin: 0; }

.forum-notice {
  background: rgba(30,92,56,0.08);
  border: 1px solid rgba(30,92,56,0.25);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* FORUM — Bouton retour aux topics */
.forum-back-topics-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  padding: 6px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  margin-bottom: 16px;
  transition: color 0.2s, border-color 0.2s;
}
.forum-back-topics-btn:hover { color: var(--gold); border-color: var(--gold); }

/* FORUM — Header thread (VUE 3) */
.forum-thread-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.forum-thread-title { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin: 0 0 6px; }
.forum-thread-meta  { font-size: 0.82rem; color: var(--text-secondary); }

/* FORUM — Post (OP + réponses) */
.forum-post {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.forum-post:last-child { border-bottom: none; }
.forum-post-op {
  background: rgba(30,92,56,0.07);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 4px;
  border: 1px solid rgba(30,92,56,0.2);
}
.forum-post-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-felt), var(--green-dark));
  border: 2px solid var(--green-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem; color: #fff;
  flex-shrink: 0;
}
.forum-post-content { flex: 1; }
.forum-post-author  { font-size: 0.9rem; margin-bottom: 3px; display: flex; align-items: center; gap: 8px; }
.forum-post-badge {
  background: var(--green-felt);
  color: #fff;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.forum-post-time { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.forum-post-body { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; white-space: pre-wrap; }
.forum-post-op-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }

/* FORUM — Header du post (auteur + actions) */
.forum-post-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 6px; }

/* FORUM — Badge "modifié" */
.forum-post-edited { font-size: 0.72rem; color: var(--text-muted); font-style: italic; }

/* FORUM — Boutons d'action (modifier / supprimer) */
.forum-post-actions { display: flex; gap: 6px; flex-shrink: 0; }
.forum-action-btn {
  background: none; border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-muted); font-size: 0.75rem; padding: 3px 9px;
  border-radius: 4px; cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.forum-action-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); border-color: rgba(255,255,255,0.3); }
.forum-delete-btn:hover { color: #e74c3c; border-color: #e74c3c; background: rgba(231,76,60,0.08); }
.forum-edit-btn:hover   { color: var(--green-light); border-color: var(--green-light); }
/* Badge "🔒 non modifiable" sur les posts expirés */
.forum-post-expired {
  font-size: 0.72rem; color: var(--text-muted); font-style: italic;
  display: flex; align-items: center; gap: 4px; padding: 3px 8px;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 4px; cursor: default;
}
/* Cadenas dans la liste threads (auteur mais délai dépassé) */
.thread-item-locked {
  font-size: 0.85rem; color: var(--text-muted); opacity: 0.45;
  position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
  cursor: default;
}

/* FORUM — Formulaire d'édition inline */
.forum-post-edit-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.forum-edit-title {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.2);
  color: var(--text-primary); border-radius: 6px; padding: 8px 12px; font-size: 0.9rem;
}
.forum-edit-textarea {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.2);
  color: var(--text-primary); border-radius: 6px; padding: 10px 12px;
  font-size: 0.9rem; min-height: 100px; resize: vertical; font-family: inherit;
}
.forum-edit-textarea:focus, .forum-edit-title:focus {
  outline: none; border-color: var(--green-light); background: rgba(255,255,255,0.08);
}
.forum-edit-form-actions { display: flex; gap: 8px; }

/* FORUM — Bouton supprimer dans la liste des threads */
.thread-item { position: relative; }
.thread-item-delete-btn {
  background: none; border: none; font-size: 1rem; cursor: pointer;
  color: var(--text-muted); padding: 4px 8px; border-radius: 4px;
  transition: all 0.2s; position: absolute; top: 50%; right: 8px;
  transform: translateY(-50%); line-height: 1;
}
.thread-item-delete-btn:hover { color: #e74c3c; background: rgba(231,76,60,0.1); }

/* FORUM — Message hors ligne */
.forum-offline-msg {
  display: flex; align-items: center; gap: 16px;
  background: rgba(231,76,60,0.1); border: 1px solid rgba(231,76,60,0.3);
  border-radius: 10px; padding: 20px 24px; margin: 16px 0;
}
.forum-offline-icon { font-size: 2rem; flex-shrink: 0; }
.forum-offline-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }
.forum-offline-text strong { color: #e74c3c; }

/* FORUM — Badges rôle (admin / mod) sur les posts */
.forum-role-badge {
  font-size: 0.68rem; font-weight: 700; padding: 2px 7px;
  border-radius: 4px; letter-spacing: 0.4px;
}
.forum-role-admin { background: rgba(212,175,55,0.2); color: var(--gold); border: 1px solid rgba(212,175,55,0.4); }
.forum-role-mod   { background: rgba(30,92,56,0.4);   color: var(--green-light); border: 1px solid rgba(76,175,80,0.4); }

/* FORUM — Badges thread (épinglé / fermé) dans le header */
.forum-thread-badge {
  font-size: 0.75rem; font-weight: 700; padding: 3px 9px;
  border-radius: 4px; flex-shrink: 0;
}
.forum-badge-pinned { background: rgba(212,175,55,0.15); color: var(--gold); border: 1px solid rgba(212,175,55,0.3); }
.forum-badge-closed { background: rgba(231,76,60,0.15);  color: #e74c3c;      border: 1px solid rgba(231,76,60,0.3);  }

/* FORUM — Tags dans la liste des threads */
.thread-list-tag {
  display: inline-block; font-size: 0.65rem; font-weight: 700;
  padding: 1px 6px; border-radius: 3px; margin-right: 6px; vertical-align: middle;
}
.tag-pinned { background: rgba(212,175,55,0.15); color: var(--gold); }
.tag-closed { background: rgba(231,76,60,0.15);  color: #e74c3c; }
.thread-closed { opacity: 0.75; }

/* FORUM — Panneau de modération (dans le header du thread) */
.forum-mod-panel {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 6px 12px; flex-wrap: wrap;
}
.forum-mod-panel-label { font-size: 0.75rem; font-weight: 700; color: var(--gold); white-space: nowrap; }
.forum-mod-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-secondary); font-size: 0.78rem; padding: 4px 10px;
  border-radius: 5px; cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.forum-mod-btn:hover        { background: rgba(255,255,255,0.12); color: var(--text-primary); }
.forum-mod-btn-close:hover  { color: #e74c3c; border-color: #e74c3c; background: rgba(231,76,60,0.1); }
.forum-mod-btn-open:hover   { color: var(--green-light); border-color: var(--green-light); }

/* FORUM — Bannière "sujet fermé" sous les posts */
.forum-closed-banner {
  background: rgba(231,76,60,0.1); border: 1px solid rgba(231,76,60,0.3);
  color: #e74c3c; border-radius: 8px; padding: 12px 16px;
  font-size: 0.85rem; font-weight: 600; text-align: center; margin: 12px 0;
}

/* FORUM — États vides / chargement */
.forum-replies-loading { color: var(--text-muted); font-size: 0.85rem; padding: 16px 0; text-align: center; }
.forum-no-replies { color: var(--text-muted); font-size: 0.85rem; padding: 16px 0; text-align: center; font-style: italic; }
.forum-empty { color: var(--text-muted); font-size: 0.9rem; padding: 32px 0; text-align: center; }

/* FORUM — Formulaire de réponse */
.forum-reply-box {
  margin-top: 28px;
  background: var(--bg-card);
  border: 1px solid rgba(30,92,56,0.35);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.forum-reply-box-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.forum-reply-box-user { font-weight: 700; font-size: 0.9rem; color: var(--green-light); }
.forum-reply-box textarea {
  width: 100%; box-sizing: border-box;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9rem;
  padding: 12px;
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
}
.forum-reply-box textarea:focus { outline: none; border-color: var(--green-light); }
.forum-reply-box-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px;
}
.forum-reply-char-count { font-size: 0.75rem; color: var(--text-muted); }

/* ============================================================
   FORUM — IMAGES PIÈCES JOINTES
   ============================================================ */

/* Zone d'attachement */
.forum-img-attach {
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.forum-img-attach-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.forum-img-attach-btn:hover { border-color: var(--green-light); color: var(--text-primary); }

/* Prévisualisation avant envoi (thumbnails) */
.forum-img-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.forum-img-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
}
.forum-img-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.forum-img-thumb-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.forum-img-thumb-remove:hover { background: #e74c3c; }

/* Images dans les posts */
.forum-post-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.forum-post-img {
  max-width: 240px;
  max-height: 200px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: zoom-in;
  transition: opacity 0.2s, transform 0.2s;
}
.forum-post-img:hover { opacity: 0.9; transform: scale(1.02); }

/* ============================================================
   FORUM — LIGHTBOX
   ============================================================ */
.forum-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.forum-lightbox.hidden { display: none; }

.forum-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
}
.forum-lightbox-img {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  z-index: 1;
}
.forum-lightbox-close,
.forum-lightbox-prev,
.forum-lightbox-next {
  position: absolute;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s;
}
.forum-lightbox-close:hover,
.forum-lightbox-prev:hover,
.forum-lightbox-next:hover { background: rgba(0,0,0,0.8); }

.forum-lightbox-close {
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  font-size: 1.2rem;
}
.forum-lightbox-prev {
  left: 16px; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  font-size: 2rem;
}
.forum-lightbox-next {
  right: 16px; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  font-size: 2rem;
}
.forum-lightbox-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  z-index: 2;
}

/* FORUM — Message connexion requis */
.forum-reply-login {
  margin-top: 20px;
  padding: 14px 20px;
  background: rgba(30,92,56,0.07);
  border: 1px solid rgba(30,92,56,0.2);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.forum-reply-login a { color: var(--green-light); text-decoration: underline; }

/* MODAL — select dans formulaire */
.modal-body select {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
}
.modal-body select:focus { outline: none; border-color: var(--green-light); }
.modal-body textarea {
  width: 100%; box-sizing: border-box;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
}
.modal-body textarea:focus { outline: none; border-color: var(--green-light); }

/* SIDEBAR */
.forum-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card {
  background: linear-gradient(160deg, var(--bg-card), rgba(30,92,56,0.08));
  border: 1px solid rgba(30,92,56,0.3);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.sidebar-card h3 { font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--green-light); margin-bottom: 16px; }
.sidebar-stats { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.sidebar-stats li { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--text-secondary); }
.sidebar-stats strong { color: var(--text-primary); }
.active-members { display: flex; flex-direction: column; gap: 8px; }
.member-chip {
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ===== LEADERBOARD ===== */
#page-leaderboard .section { max-width: 1800px; }

.leaderboard-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}
.lb-season-info { display: flex; align-items: center; gap: 12px; }
.season-badge {
  background: linear-gradient(135deg, var(--red-main), var(--red-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 20px;
}
.lb-update-info { font-size: 0.8rem; color: var(--text-muted); }

.lb-search input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 1rem;
  font-family: 'Open Sans', sans-serif;
  width: 340px;
  transition: border-color 0.2s;
}
.lb-search input:focus { outline: none; border-color: var(--gold); }

.leaderboard-table-wrap {
  background: linear-gradient(180deg, rgba(30,92,56,0.08), var(--bg-card));
  border: 1px solid rgba(30,92,56,0.35);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.leaderboard-table { width: 100%; border-collapse: collapse; }
.leaderboard-table thead { background: rgba(30,92,56,0.15); border-bottom: 1px solid rgba(30,92,56,0.35); }
.leaderboard-table th {
  padding: 18px 28px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}
.leaderboard-table td {
  padding: 20px 28px;
  font-size: 1rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.leaderboard-table tbody tr { transition: background 0.15s; }
.leaderboard-table tbody tr:hover { background: var(--bg-card-hover); }
.leaderboard-table tbody tr:last-child td { border-bottom: none; }

.lb-pos-1 td:first-child { color: var(--gold-r); font-weight: 700; font-size: 1.1rem; }
.lb-pos-2 td:first-child { color: var(--silver); font-weight: 700; }
.lb-pos-3 td:first-child { color: var(--bronze); font-weight: 700; }

.lb-rp { color: var(--gold); font-weight: 700; }
.lb-win-ratio { color: var(--text-secondary); }

.lb-loading { text-align: center; color: var(--text-secondary); font-style: italic; padding: 40px; }

/* Message hors-ligne leaderboard */
.lb-offline-msg {
  display: flex; align-items: center; gap: 16px;
  background: rgba(231,76,60,0.08); border: 1px solid rgba(231,76,60,0.25);
  border-radius: 10px; padding: 20px 24px; margin: 12px 0;
  color: var(--text-secondary);
}
.lb-offline-msg strong { color: #e74c3c; }

/* Stats non disponibles (contrats, historique) */
.stats-unavailable {
  color: var(--text-muted); font-size: 0.85rem; font-style: italic;
  text-align: center; padding: 24px 16px;
  background: rgba(255,255,255,0.02); border-radius: 8px;
  border: 1px dashed rgba(255,255,255,0.1);
}

/* Pseudos cliquables dans le leaderboard */
.lb-player-link {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.15s;
}
.lb-player-link:hover {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lb-rank-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
}
.lb-rank-bronze  { color: var(--bronze); border-color: var(--bronze); }
.lb-rank-silver  { color: var(--silver); border-color: var(--silver); }
.lb-rank-gold    { color: var(--gold-r); border-color: var(--gold-r); }
.lb-rank-platinum{ color: var(--platinum); }
.lb-rank-diamond { color: var(--diamond); border-color: var(--diamond); }
.lb-rank-master  { color: var(--master); border-color: var(--master); }

.lb-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ===== BOUTIQUE ===== */
.shop-section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}
.shop-section-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.shop-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.shop-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  border-color: var(--border-hover);
}
.shop-item-preview {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 3px solid;
  font-size: 3.5rem;
  line-height: 1;
}
.shop-preview-icon {
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}
.shop-item-info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.shop-item-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.shop-item-price {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold);
}
.shop-item-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  width: fit-content;
}
.badge-included { background: rgba(30,92,56,0.4); color: #6fcf97; border: 1px solid #6fcf97; }
.badge-new      { background: rgba(240,192,64,0.2); color: var(--gold); border: 1px solid var(--gold); }
.badge-premium  { background: rgba(142,68,173,0.2); color: #c39bd3; border: 1px solid #8e44ad; }
.btn-shop-soon {
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: not-allowed;
  width: 100%;
}
.btn-shop-owned {
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(30,92,56,0.25);
  border: 1px solid var(--green-light);
  border-radius: var(--radius);
  color: #6fcf97;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: default;
  width: 100%;
}

/* --- Section dons --- */
.donation-section {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}
.donation-heart {
  font-size: 3rem;
  color: #e74c3c;
  line-height: 1;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px rgba(231,76,60,0.5));
}
.donation-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.donation-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.donation-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}
.donation-chip {
  padding: 10px 22px;
  border: 1px solid var(--border-hover);
  border-radius: 30px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
}
.donation-chip-highlight {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(240,192,64,0.1);
}
.donation-soon {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* ===== DOWNLOAD ===== */
.download-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; }
.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.download-featured {
  border-color: rgba(30,92,56,0.45);
  background: linear-gradient(135deg, rgba(30,92,56,0.12), var(--bg-card));
}
.download-os { font-size: 2.5rem; margin-bottom: 8px; }
.download-version { font-family: 'Cinzel', serif; font-size: 1.5rem; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.download-size { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; }
.download-desc { color: var(--text-secondary); line-height: 1.6; margin-bottom: 24px; }
.download-requirements { background: var(--bg-dark); border-radius: var(--radius); padding: 20px; margin-bottom: 28px; }
.download-requirements strong { font-size: 0.85rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.download-requirements ul { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.download-requirements li { font-size: 0.9rem; color: var(--text-secondary); padding-left: 16px; position: relative; }
.download-requirements li::before { content: '›'; position: absolute; left: 0; color: var(--gold); }
.download-sidebar { display: flex; flex-direction: column; gap: 20px; }

.changelog { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.changelog li {
  font-size: 0.85rem;
  padding: 6px 12px 6px 28px;
  border-radius: var(--radius);
  position: relative;
  background: var(--bg-dark);
}
.changelog li::before { position: absolute; left: 8px; font-weight: 700; font-size: 0.7rem; }
.changelog .fix { color: #4ade80; }
.changelog .fix::before { content: 'FIX'; color: #4ade80; }
.changelog .new { color: var(--gold); }
.changelog .new::before { content: 'NEW'; color: var(--gold); }

.howto-list { list-style: none; counter-reset: howto; display: flex; flex-direction: column; gap: 10px; }
.howto-list li {
  counter-increment: howto;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: 32px;
  position: relative;
  line-height: 1.5;
}
.howto-list li::before {
  content: counter(howto);
  position: absolute;
  left: 0;
  width: 22px; height: 22px;
  background: var(--red-main);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  padding: 20px;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px var(--red-glow);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 48px 56px 0;
}
.modal-header h2 { font-family: 'Cinzel', serif; font-size: 2.4rem; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 40px 56px 56px; }

/* ===== MODAL PRIVACY ===== */
.modal-privacy-content { max-width: 720px; }
.modal-rules-content { max-width: 780px; }
.modal-body-scroll code { background: rgba(255,255,255,0.08); padding: 2px 8px; border-radius: 4px; font-size: 0.88rem; color: var(--gold); }
.modal-body-scroll { max-height: 65vh; overflow-y: auto; padding-right: 12px; }
.modal-body-scroll::-webkit-scrollbar { width: 6px; }
.modal-body-scroll::-webkit-scrollbar-track { background: transparent; }
.modal-body-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.privacy-updated { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 28px; font-style: italic; }
.modal-body-scroll h3 { font-family: 'Cinzel', serif; font-size: 1rem; color: var(--gold); margin: 24px 0 10px; }
.modal-body-scroll h3:first-of-type { margin-top: 0; }
.modal-body-scroll p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 10px; }
.modal-body-scroll ul { padding-left: 20px; margin-bottom: 10px; }
.modal-body-scroll li { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 4px; }

.form-group { margin-bottom: 32px; }
.form-group label { display: block; font-size: 1.2rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 14px; }
.form-group input {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius);
  padding: 22px 28px;
  font-size: 1.4rem;
  font-family: 'Open Sans', sans-serif;
  transition: border-color 0.2s;
}
.form-group input:focus { outline: none; border-color: var(--gold); }
.form-group input::placeholder { color: var(--text-muted); }

.form-error {
  background: rgba(192,57,43,0.15);
  border: 1px solid rgba(192,57,43,0.4);
  color: #ff8878;
  border-radius: var(--radius);
  padding: 18px 24px;
  font-size: 1.2rem;
  margin-bottom: 20px;
}
.modal-switch { text-align: center; font-size: 1.2rem; color: var(--text-secondary); margin-top: 24px; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  color: var(--text-primary);
  padding: 14px 22px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  z-index: 3000;
  animation: toastIn 0.3s ease;
}
.toast.success { border-color: #4ade80; color: #4ade80; }
.toast.error   { border-color: var(--red-main); color: #ff8878; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== PAGE PROFIL JOUEUR ===== */

/* Barre retour */
.profile-back-bar {
  padding: 16px 24px 0;
  max-width: 1200px;
  margin: 0 auto;
}
.btn-back {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: 'Open Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-back:hover { color: var(--gold); border-color: var(--gold); }

/* Header profil */
.profile-header {
  background:
    radial-gradient(ellipse 100% 200% at 50% 0%, rgba(30,92,56,0.25) 0%, transparent 70%),
    linear-gradient(180deg, rgba(30,92,56,0.1) 0%, transparent 100%);
  border-bottom: 1px solid rgba(30,92,56,0.3);
  padding: 40px 24px 48px;
}
.profile-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 36px;
}

/* Avatar */
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-dark), var(--green-felt));
  border: 3px solid rgba(240,192,64,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold);
  box-shadow: 0 0 30px rgba(30,92,56,0.4), 0 0 0 4px rgba(240,192,64,0.08);
  flex-shrink: 0;
}

.profile-info { flex: 1; }
.profile-rank-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  background: rgba(30,92,56,0.3);
  border: 1px solid var(--green-light);
  color: var(--green-light);
  margin-bottom: 10px;
}
.profile-username {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.1;
}
.profile-rp-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.profile-rp-value {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
}
.profile-rp-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.profile-position {
  margin-left: auto;
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(30,92,56,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 14px;
}

/* Section principale */
.profile-section { padding-top: 40px; }

/* Stats générales */
.profile-stats-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 48px;
}
.profile-stat-card {
  background: linear-gradient(160deg, var(--bg-card), rgba(30,92,56,0.1));
  border: 1px solid rgba(30,92,56,0.3);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  transition: all 0.2s;
}
.profile-stat-card:hover { transform: translateY(-3px); border-color: var(--green-light); box-shadow: 0 6px 20px rgba(30,92,56,0.2); }
.profile-stat-win { border-color: rgba(74, 222, 128, 0.25); }
.profile-stat-win .profile-stat-value { color: #4ade80; }
.profile-stat-loss { border-color: rgba(192, 57, 43, 0.25); }
.profile-stat-loss .profile-stat-value { color: #ff8878; }
.profile-stat-icon { font-size: 1.6rem; margin-bottom: 10px; }
.profile-stat-value {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}
.profile-stat-label { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }

/* Blocs sections */
.profile-block { margin-bottom: 48px; }
.profile-block-title {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(30,92,56,0.4);
  display: flex;
  align-items: center;
  gap: 10px;
}
.profile-block-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.2em;
  background: linear-gradient(180deg, var(--green-felt), var(--green-light));
  border-radius: 2px;
}

/* Progression de rang */
.rank-progress-track { background: var(--bg-card); border: 1px solid rgba(30,92,56,0.3); border-radius: var(--radius-lg); padding: 28px 32px; }
.rank-progress-ranks {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 4px;
}
.rp-rank-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
  flex: 1;
  text-align: center;
}
.rp-rank-step.reached { color: var(--text-secondary); }
.rp-rank-step.current { color: var(--gold); }
.rp-rank-step.current .rp-rank-icon { transform: scale(1.3); filter: drop-shadow(0 0 6px rgba(240,192,64,0.6)); }
.rp-rank-icon { font-size: 1.3rem; display: block; margin-bottom: 2px; }

.rank-progress-bar-wrap { margin-top: 8px; }
.rank-progress-bar-bg {
  height: 10px;
  background: var(--bg-dark);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(30,92,56,0.3);
}
.rank-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-felt), var(--green-light), var(--gold));
  border-radius: 5px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(42,122,74,0.5);
}
.rank-progress-info {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.rank-progress-info span:first-child { color: var(--gold); font-weight: 700; }
.rank-progress-info span:last-child { color: var(--text-muted); }

/* Stats par contrat */
.contract-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.contract-card {
  background: linear-gradient(160deg, var(--bg-card), rgba(30,92,56,0.08));
  border: 1px solid rgba(30,92,56,0.3);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  transition: all 0.2s;
}
.contract-card:hover { border-color: var(--green-light); transform: translateY(-2px); }
.contract-name {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.contract-coeff { font-size: 0.7rem; color: var(--text-muted); font-family: 'Open Sans', sans-serif; font-weight: 400; }
.contract-stats { display: flex; justify-content: space-between; margin-bottom: 14px; }
.contract-stat { text-align: center; }
.contract-stat-val { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); display: block; }
.contract-stat-lbl { font-size: 0.7rem; color: var(--text-secondary); text-transform: uppercase; }
.contract-bar-bg { height: 6px; background: var(--bg-dark); border-radius: 3px; overflow: hidden; }
.contract-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--green-felt), var(--green-light));
  transition: width 0.7s ease;
}
.contract-winrate { text-align: right; font-size: 0.78rem; color: var(--text-secondary); margin-top: 6px; }
.contract-winrate strong { color: var(--gold); }

/* Historique */
.history-table-wrap {
  background: linear-gradient(180deg, rgba(30,92,56,0.06), var(--bg-card));
  border: 1px solid rgba(30,92,56,0.3);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.history-table { width: 100%; border-collapse: collapse; }
.history-table thead { background: rgba(30,92,56,0.15); border-bottom: 1px solid rgba(30,92,56,0.3); }
.history-table th { padding: 12px 18px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); text-align: left; font-weight: 700; }
.history-table td { padding: 14px 18px; font-size: 0.88rem; border-bottom: 1px solid rgba(255,255,255,0.03); }
.history-table tbody tr:last-child td { border-bottom: none; }
.history-table tbody tr { transition: background 0.15s; }
.history-table tbody tr:hover { background: rgba(30,92,56,0.08); }

.hist-win  { color: #4ade80; font-weight: 700; }
.hist-loss { color: #ff8878; font-weight: 700; }
.hist-rp-pos { color: #4ade80; font-weight: 700; }
.hist-rp-neg { color: #ff8878; font-weight: 700; }
.hist-role-taker { color: var(--gold); }
.hist-role-def   { color: var(--text-secondary); }

/* RESPONSIVE profil */
@media (max-width: 900px) {
  .profile-stats-row { grid-template-columns: repeat(3, 1fr); }
  .contract-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-position { display: none; }
  .history-table th:nth-child(5),
  .history-table td:nth-child(5) { display: none; }
  /* Forum responsive */
  .forum-section-meta { display: none; }
  .forum-topbar { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .profile-header-inner { flex-direction: column; text-align: center; gap: 20px; }
  .profile-rp-line { justify-content: center; }
  .profile-stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .profile-stat-card { padding: 16px 12px; }
  .contract-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rank-progress-track { padding: 20px 16px; }
  .profile-back-bar { padding: 12px 16px 0; }
  .history-table th:nth-child(6),
  .history-table td:nth-child(6) { display: none; }
  /* Forum mobile */
  .forum-section-card { padding: 16px; gap: 12px; }
  .forum-section-icon { width: 42px; height: 42px; font-size: 1.5rem; border-radius: 10px; }
  .forum-section-name { font-size: 0.95rem; }
  .forum-section-desc { display: none; }
  .forum-section-header-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .thread-item { padding: 14px 16px; }
}

/* ===== MON COMPTE ===== */

/* Header avec avatar lumineux (compte propre) */
.account-header {
  position: relative;
}
.account-avatar {
  position: relative;
}
.account-avatar::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(var(--gold), var(--green-light), var(--gold));
  z-index: -1;
  animation: rotate-glow 4s linear infinite;
  opacity: 0.8;
}
@keyframes rotate-glow {
  to { transform: rotate(360deg); }
}

/* Date d'inscription sous le pseudo */
.account-joined {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Layout 2 colonnes : progression + paramètres */
.account-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 0;
}

/* Panneau paramètres */
.account-settings-block {
  /* hérite de .profile-block */
}
.account-settings {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.account-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.account-setting-row:last-of-type {
  border-bottom: none;
}
.account-setting-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
.account-setting-icon {
  font-size: 1rem;
}
.account-setting-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  word-break: break-all;
}
.account-setting-private {
  display: flex;
  align-items: center;
  gap: 8px;
}
.account-setting-id {
  font-family: monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Aperçu email actuel dans le modal changement email */
.current-email-preview {
  padding: 10px 14px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

/* Séparateur "ou" dans les modals */
.modal-divider {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 24px 0 18px;
  color: var(--text-muted);
  font-size: 1.2rem;
}
.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Bouton connexion démo */
.btn-demo {
  display: block;
  width: 100%;
  padding: 18px 36px;
  background: transparent;
  border: 1px dashed var(--green-light);
  border-radius: var(--radius);
  color: var(--green-light);
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-align: center;
  margin-bottom: 8px;
}
.btn-demo:hover {
  background: var(--green-subtle);
  color: var(--gold);
  border-color: var(--gold);
}

/* Bouton principal dans les modals (Se connecter, S'inscrire…) */
.modal .btn-primary {
  font-size: 1.4rem;
  padding: 22px 40px;
}
.modal .btn-full { margin-top: 16px; }

/* Zone email (display + formulaire) */
.account-email-row { align-items: flex-start; }
.account-email-zone {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  flex: 1;
}

/* Bouton modifier email */
.btn-edit-email {
  background: none;
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 2px 8px;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn-edit-email:hover {
  border-color: var(--green-light);
  color: var(--green-light);
}

/* Formulaire inline changement email */
.email-edit-form {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.setting-input {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 13px;
  color: var(--text-primary);
  font-family: 'Open Sans', sans-serif;
  font-size: 0.88rem;
  transition: border-color 0.2s;
  outline: none;
}
.setting-input:focus { border-color: var(--green-light); }
.setting-input::placeholder { color: var(--text-muted); }
.email-edit-error {
  font-size: 0.82rem;
  color: #ff8878;
  padding: 6px 10px;
  background: rgba(255, 136, 120, 0.1);
  border-radius: 6px;
}
.email-edit-actions {
  display: flex;
  gap: 8px;
}
.btn-setting-save  { flex: 1; padding: 8px 16px; font-size: 0.85rem; }
.btn-setting-cancel { flex: 0 0 auto; padding: 8px 16px; font-size: 0.85rem; }

/* Bouton œil pour révéler l'email */
.btn-reveal {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 2px 6px;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn-reveal:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Boutons actions compte */
.account-settings-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.btn-settings {
  width: 100%;
  text-align: center;
  font-size: 0.88rem;
}
.btn-danger {
  width: 100%;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--red-main);
  border-radius: var(--radius);
  color: var(--red-main);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-align: center;
}
.btn-danger:hover {
  background: var(--red-main);
  color: #fff;
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-logo {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 2px;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.85rem; color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--text-secondary); }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }

/* ====================================================
   RESPONSIVE — Mobile first
   Breakpoints : 480px | 768px | 1024px | 1200px
   ==================================================== */

/* ===== HAMBURGER (toujours défini, caché sur desktop) ===== */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius);
  z-index: 1100;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}
/* Animation hamburger → X */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Auth mobile (caché sur desktop) */
.nav-auth-mobile { display: none; }
.btn-full-mobile { width: 100%; margin-bottom: 8px; text-align: center; }

/* ===== TABLETTE — ≤ 1024px ===== */
@media (max-width: 1024px) {
  .nav-inner { gap: 20px; }
  .nav-link { padding: 8px 12px; font-size: 0.85rem; }
  .section { padding: 56px 20px; }
  .ranks-grid { grid-template-columns: repeat(3, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .leaderboard-table th,
  .leaderboard-table td { padding: 12px 14px; }
}

/* ===== MOBILE LARGE — ≤ 900px ===== */
@media (max-width: 900px) {

  /* --- Navbar mobile — reset taille bureau → taille mobile --- */
  .nav-hamburger { display: flex; }
  .nav-inner {
    height: 64px;
    padding: 0 16px;
    gap: 16px;
    max-width: 100%;
  }
  .nav-logo { font-size: 1.3rem; gap: 10px; }
  .logo-icon { font-size: 1.5rem; }
  .nav-auth .btn-primary,
  .nav-auth .btn-secondary {
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 8px;
  }

  /* Sur mobile : masquer Connexion/Inscription */
  .nav-auth { display: flex; }
  #btn-login, #btn-register { display: none; }
  #user-profile { display: none !important; }

  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
    padding: 20px 24px 28px;
    gap: 12px;
    z-index: 999;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-link { font-size: 1rem; padding: 12px 16px; border-radius: var(--radius); border-bottom: none; }
  .nav-link.active { border-bottom: none; border-left: 4px solid var(--green-light); padding-left: 12px; }
  .nav-auth-mobile { display: flex; flex-direction: column; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

  /* --- Stats banner --- */
  .stats-banner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .stat-divider { display: none; }
  .stat-item {
    padding: 20px 16px;
    border: 1px solid var(--border);
    border-width: 0 1px 1px 0;
  }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(4) { border-right: none; }

  /* --- Layouts --- */
  .forum-layout { grid-template-columns: 1fr; }
  .download-layout { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .news-featured { grid-column: 1; }

  /* --- Leaderboard --- */
  .leaderboard-controls { flex-direction: column; align-items: stretch; gap: 12px; }
  .lb-search input { width: 100%; }
  /* Masquer colonnes moins importantes */
  .leaderboard-table th:nth-child(5),
  .leaderboard-table td:nth-child(5),
  .leaderboard-table th:nth-child(6),
  .leaderboard-table td:nth-child(6) { display: none; }

  /* --- Forum --- */
  .forum-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .forum-sidebar { display: none; } /* Simplifié sur tablette */

  /* --- Podium --- */
  .podium { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .podium-item { min-width: 140px; flex: 1; max-width: 220px; }

  /* --- Mon Compte --- */
  .account-two-col { grid-template-columns: 1fr; }
}

/* ===== MOBILE — ≤ 600px ===== */
@media (max-width: 600px) {

  /* --- Navbar --- */
  .nav-inner { padding: 0 12px; gap: 12px; }
  .logo-text { font-size: 1rem; }

  /* --- Formulaire email mobile --- */
  .account-email-zone { align-items: flex-start; }
  .email-edit-actions { flex-direction: column; }

  /* --- Hero --- */
  .hero { min-height: 100vh; padding: 24px 16px; }
  .hero-content { padding: 0 12px; max-width: 100%; }
  .hero-badge { font-size: 0.85rem; padding: 8px 20px; margin-bottom: 28px; }
  .hero-title { font-size: clamp(3rem, 14vw, 5rem); letter-spacing: 3px; margin-bottom: 24px; }
  .hero-subtitle { font-size: 1.1rem; margin-bottom: 40px; }
  .hero-buttons { flex-direction: column; align-items: center; gap: 14px; }
  .hero-buttons .btn-large { width: 100%; max-width: 340px; padding: 16px 32px; font-size: 1rem; }

  /* --- Stats --- */
  .stats-banner { grid-template-columns: 1fr 1fr; }
  .stat-number { font-size: 1.4rem; }

  /* --- Bouton CTA flottant — caché sur mobile --- */
  .btn-floating-cta { display: none; }

  /* --- Sections --- */
  .section { padding: 44px 16px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 28px; }
  .section-header h2 { font-size: 1.5rem; }
  .section-header a,
  .section-header .btn-secondary { font-size: 0.85rem; padding: 6px 14px; }

  /* --- Ranks --- */
  .ranks-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rank-card { padding: 20px 12px; }
  .rank-icon { font-size: 2rem; }

  /* --- Features --- */
  .features-grid { grid-template-columns: 1fr; }

  /* --- Podium --- */
  .podium { flex-direction: column; align-items: center; gap: 12px; }
  .podium-item { max-width: 100%; width: 100%; }
  .podium-item.pos-1 { order: -1; } /* 1er en premier sur mobile */

  /* --- News --- */
  .news-card { padding: 20px; }
  .news-title { font-size: 1.1rem; }

  /* --- Leaderboard --- */
  /* Masquer encore plus de colonnes sur très petit écran */
  .leaderboard-table th:nth-child(7),
  .leaderboard-table td:nth-child(7) { display: none; }
  .leaderboard-table th,
  .leaderboard-table td { padding: 10px 10px; font-size: 0.82rem; }
  .leaderboard-table th:nth-child(2),
  .leaderboard-table td:nth-child(2) { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lb-rank-badge { font-size: 0.68rem; padding: 2px 7px; }
  .lb-pagination { flex-wrap: wrap; gap: 10px; }

  /* --- Forum threads --- */
  .thread-item { padding: 14px 16px; gap: 10px; }
  .thread-stats { display: none; }
  .forum-categories { gap: 6px; }
  .forum-cat { padding: 6px 12px; font-size: 0.8rem; }

  /* --- Download --- */
  .download-card { padding: 24px 20px; }

  /* --- Page hero --- */
  .page-hero { padding: 60px 16px 36px; }

  /* --- Modals — reset taille bureau → taille mobile --- */
  .modal { margin: 0 12px; max-width: calc(100vw - 24px); }
  .modal-header { padding: 20px 20px 0; }
  .modal-header h2 { font-size: 1.3rem; }
  .modal-close { font-size: 1.2rem; }
  .modal-body { padding: 20px 20px 24px; }
  .form-group { margin-bottom: 16px; }
  .form-group label { font-size: 0.85rem; margin-bottom: 6px; }
  .form-group input { padding: 11px 14px; font-size: 0.95rem; }
  .form-error { padding: 10px 12px; font-size: 0.82rem; }
  .modal-switch { font-size: 0.85rem; margin-top: 14px; }
  .modal-divider { font-size: 0.8rem; gap: 10px; margin: 12px 0 10px; }
  .btn-demo { padding: 10px 20px; font-size: 0.88rem; }
  .modal .btn-primary { font-size: 0.95rem; padding: 13px 24px; }
  .modal .btn-full { margin-top: 10px; }

  /* --- Toast --- */
  .toast { left: 16px; right: 16px; bottom: 16px; font-size: 0.85rem; }

  /* --- Footer --- */
  .footer-inner { flex-direction: column; text-align: center; gap: 16px; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 16px; }

  /* --- Mon Compte mobile --- */
  .account-setting-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .account-setting-value { text-align: left; }
}

/* ===== TRÈS PETIT MOBILE — ≤ 380px ===== */
@media (max-width: 380px) {
  .hero-title { font-size: 2.5rem; }
  .ranks-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-logo .logo-text { font-size: 1rem; }
  .leaderboard-table th:nth-child(4),
  .leaderboard-table td:nth-child(4) { font-size: 0.78rem; }
}

/* ===== HERO DESKTOP STANDARD — 901px à 1920px ===== */
@media (min-width: 901px) and (max-width: 1920px) {
  .hero-badge    { font-size: 1rem; padding: 8px 24px; letter-spacing: 3px; margin-bottom: 28px; }
  .hero-title    { font-size: clamp(3.5rem, 7.5vw, 7rem); letter-spacing: 5px; margin-bottom: 28px; }
  .hero-subtitle { font-size: 1.4rem; margin-bottom: 40px; }
  .hero-buttons  { gap: 20px; }
}

/* ===== GRAND ÉCRAN ≥ 1921px (vrais 1440p et plus) ===== */
@media (min-width: 1921px) {
  /* Contenu visible sous la grande navbar 160px */
  #main-content { padding-top: 160px; }
  .hero         { margin-top: -96px; }
  .section {
    max-width: 1600px;
    padding: 80px 40px;
  }
  .section-dark > .section-header,
  .section-dark > .features-grid {
    max-width: 1600px;
  }
  .forum-layout { grid-template-columns: 1fr 320px; gap: 36px; }
  .shop-grid    { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

/* ===== ULTRA-LARGE ≥ 2400px (4K / 1440p sans DPI) ===== */
@media (min-width: 2400px) {
  .section {
    max-width: 2100px;
    padding: 96px 48px;
  }
  .section-dark > .section-header,
  .section-dark > .features-grid {
    max-width: 2100px;
  }
  .forum-layout { grid-template-columns: 1fr 380px; gap: 48px; }
}
