:root {
  --bg: #1a170e;
  --bg-soft: #2a2a18;
  --panel: #3a3a22;
  --muted: #e5d7b1;
  --neon1: #d99e1e;
  --neon2: #a86d07;
  --white: #ffffff;
  --accent-glow: rgba(217, 158, 30, 0.3);
  --glass: rgba(42, 42, 24, 0.7);
  --glass-border: rgba(217, 158, 30, 0.15);
  --max-width: 1200px;
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* BASE */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--muted);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  user-select: none;
}
main { flex: 1; }
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 2rem; }
.accent { color: var(--neon1); }

/* PRELOADER */
#preloader { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); z-index: 9999; }
.preloader-box { width: 300px; text-align: center; }
.progress { height: 6px; background: rgba(255,255,255,0.05); border-radius: 10px; overflow: hidden; margin-top: 1rem; }
.progress > span { display: block; height: 100%; width: 0; background: var(--neon1); animation: progress 1.8s linear forwards; }
@keyframes progress { to { width: 100%; } }

/* HEADER */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; }
.brand-logo { width: 45px; height: 45px; border-radius: var(--radius); box-shadow: 0 0 15px var(--accent-glow); }
.brand-text { color: var(--neon1); font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.navbar { display: flex; gap: 0.5rem; }
.navbar a { color: var(--muted); text-decoration: none; padding: 0.6rem 1rem; border-radius: 8px; font-weight: 600; transition: var(--transition); }
.navbar a:hover, .navbar a.active { color: var(--white); background: rgba(217, 158, 30, 0.1); }
.navbar a.active { color: var(--neon1); }

/* BOUTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.8rem 1.5rem; border-radius: 10px; font-weight: 700;
  text-decoration: none; transition: var(--transition); border: none; gap: 8px; cursor: pointer;
}
.btn-primary { background: linear-gradient(135deg, var(--neon1), var(--neon2)); color: #1a170e; box-shadow: 0 4px 15px rgba(168, 109, 7, 0.4); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(168, 109, 7, 0.6); }
.btn-secondary { background: rgba(255, 255, 255, 0.05); color: var(--neon1); border: 1px solid var(--glass-border); }

/* ELEMENTS GENERAUX */
section.container { margin-bottom: 5rem; padding-top: 2rem; }
h1, h2 { color: var(--white); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2rem; }
.card { 
  background: linear-gradient(145deg, rgba(58, 58, 34, 0.4), rgba(26, 23, 14, 0.6)); 
  border: 1px solid var(--glass-border); padding: 2.5rem; border-radius: var(--radius); transition: var(--transition);
}
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem; margin-top: 2rem; }

/* HOME / HERO */
.page-home .hero { padding: 6rem 0; text-align: center; }
.hero-title { font-size: clamp(2.5rem, 8vw, 4.5rem); font-weight: 900; color: var(--white); line-height: 1.1; margin-bottom: 1.5rem; }
.hero-sub { font-size: 1.25rem; max-width: 700px; margin: 0 auto 2.5rem; opacity: 0.8; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.news-item h4 { color: var(--neon1); margin-bottom: 0.5rem; }

/* STAFF PAGE */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2.5rem; margin-top: 2rem; }
.member.card { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: inherit; padding: 2.5rem 1.5rem; }
.member.card:hover { transform: translateY(-10px); border-color: var(--neon1); box-shadow: 0 10px 30px rgba(168, 109, 7, 0.2); }
.member-avatar { width: 110px; height: 110px; border-radius: 50%; margin-bottom: 1.5rem; border: 3px solid var(--neon1); padding: 4px; background: var(--bg); object-fit: cover; transition: var(--transition); }
.member.card:hover .member-avatar { transform: scale(1.1); box-shadow: 0 0 20px var(--accent-glow); }
.member h3 { color: var(--white); margin-bottom: 0.5rem; font-size: 1.4rem; }
.member p { color: var(--neon1); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

/* CONTACT PAGE */
.contact-card { max-width: 800px; margin: 0 auto; }
.contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-form label { display: flex; flex-direction: column; gap: 0.5rem; color: var(--white); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; }
.contact-form input, .contact-form textarea {
  background: rgba(0,0,0,0.2); border: 1px solid var(--glass-border); padding: 1rem; border-radius: 8px; color: var(--white); font-family: inherit; transition: var(--transition);
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--neon1); background: rgba(0,0,0,0.4); }
.contact-actions { display: flex; gap: 1rem; }
.contact-actions .btn { flex: 1; }
.notice { background: rgba(46, 204, 113, 0.1); color: #2ecc71; padding: 1rem; border-radius: 8px; text-align: center; margin-bottom: 2rem; border: 1px solid rgba(46, 204, 113, 0.2); }

/* RULES SIDEBAR */
.rules-wrap { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; align-items: flex-start; }
.rules-sidebar { position: sticky; top: 100px; }
.rules-sidebar nav ul { list-style: none; }
.rules-sidebar nav a { display: block; padding: 0.8rem 1rem; border-radius: 8px; color: var(--muted); text-decoration: none; transition: var(--transition); }
.rules-sidebar nav a:hover, .rules-sidebar nav a.active { background: rgba(217, 158, 30, 0.1); color: var(--neon1); }

/* FOOTER */
.site-footer { padding: 1.5rem 0; border-top: 1px solid var(--glass-border); background: rgba(0,0,0,0.2); margin-top: auto; text-align: center; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.copyright small { font-size: 0.85rem; opacity: 0.7; }
.power { color: var(--muted); font-size: 0.8rem; }
.power a { color: var(--neon1); text-decoration: none; font-weight: 600; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .brand-text, .navbar { display: none; }
  .rules-wrap { grid-template-columns: 1fr; }
  .container { padding: 1.5rem; }
  .contact-actions { flex-direction: column; }
}


.acceuil.card { display: flex; flex-direction: column; text-decoration: none; color: inherit; padding: 2.5rem 1.5rem; }
.acceuil.card:hover { transform: translateY(-10px); border-color: var(--neon1); box-shadow: 0 10px 30px rgba(168, 109, 7, 0.2); }
.acceuil.card:hover .acceuil-avatar { transform: scale(1.1); box-shadow: 0 0 20px var(--accent-glow); }

@media (max-width: 900px) {
  /* Réactivation des éléments */
  .brand-text, .navbar { display: flex !important; }

  .site-header {
    height: auto;
    background: var(--bg);
    padding-bottom: 10px;
  }

  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 1rem;
    gap: 1.5rem;
  }

  /* Logo plus grand et centré */
  .brand {
    flex-direction: column;
    gap: 0.5rem;
  }
  .brand-logo {
    width: 60px;
    height: 60px;
  }
  .brand-text {
    font-size: 1.6rem !important;
    letter-spacing: 2px;
  }

  /* NAVBAR STYLE "TABLEAU DE BORD" */
  .navbar {
    display: grid !important; /* On passe en grille */
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes égales */
    gap: 8px;
    width: 100%;
    padding: 0 5px;
  }

  .navbar a {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 12px 5px;
    font-size: 0.75rem;
    text-transform: uppercase;
    text-align: center;
    border-radius: 8px;
    font-weight: 700;
  }

  .navbar a.active {
    background: rgba(217, 158, 30, 0.15);
    border-color: var(--neon1);
  }

  /* BOUTON REJOINDRE */
  .header-actions {
    width: 100%;
  }
  .header-actions .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    text-transform: uppercase;
  }

  /* CORRECTION DU CONTENU DE PAGE */
  .hero-title {
    font-size: 1.8rem !important;
    margin-top: 1rem;
  }
  
  .hero-sub {
    font-size: 0.95rem;
    padding: 0 1rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    padding: 0 2rem;
  }

  /* Les cartes (Pourquoi nous rejoindre) */
  .cards, .team-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  
  .card {
    padding: 1.5rem !important;
  }
}

/* --- CUSTOM SCROLLBAR --- */

/* Taille de la scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

/* Fond de la scrollbar (Track) */
::-webkit-scrollbar-track {
  background: var(--bg);
}

/* Partie mobile de la barre (Thumb) */
::-webkit-scrollbar-thumb {
  background: var(--bg-soft);
  border-radius: 100vh;
  border: 2px solid var(--bg); /* Crée un effet de marge interne */
  transition: var(--transition);
}

/* Au survol ou clic */
::-webkit-scrollbar-thumb:hover {
  background: var(--neon2);
}

::-webkit-scrollbar-thumb:active {
  background: var(--neon1);
}

/* Compatibilité pour Firefox (standard) */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-soft) var(--bg);
}

#scroll-progress {
  position: fixed;
  top: 80px; /* Juste sous le header */
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--neon2), var(--neon1));
  box-shadow: 0 0 10px var(--accent-glow);
  z-index: 999; /* Sous le header mais au-dessus du contenu */
  transition: width 0.1s ease-out;
}