/* =========================================================
   Fichier : ade_style.css
   Version : v1.9.9 (refactor mise à plat + dédoublonnage)
   Date    : 2025-10-26
   Description : Charte graphique officielle ADE (themes clair/sombre, degrade directionnel, responsive)
   Auteur  : L'Antre des Enfers - Projet Web
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600;700&family=Rajdhani:wght@500;600&family=Poppins:wght@300;400;600&display=swap');

/* ================= VARIABLES GLOBALES ================= */
:root {
  --bg: #000;
  --text: #E6E9FF;
  --accent1: #00B2FF;
  --accent2: #00E6B8;
  --accent3: #F58727;
  --gold: #FFC300;
  --container-w: 1300px;
}

/* ================= RESET DE BASE ================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  width: 100%;
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: clip; /* plus strict que hidden, empêche tout pixel de dépassement */
}

/* Calque d'arrière-plan animé */
#bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  filter: blur(12px);
  transition: opacity 1s ease, filter 1s ease;
  overflow: hidden;
}

/* ================= HEADER ================= */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.10);
  backdrop-filter: blur(8px);
  padding: 14px 20px;
  display: flex;
  justify-content: center;
  z-index: 1000;
  transition: all 0.3s ease;
}

/* HEADER COMPACT */
.site-header--compact {
  padding: 2px 16px;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
  transform: translateY(-2px);
}
.site-header--compact .nav__logo { width: 40px; height: 40px; transform: translateY(1px); }
.site-header--compact .nav__title { font-size: 0.95rem; filter: brightness(0.9); }

/* NAV */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(var(--container-w), 94vw);
}

/* Marque (logo + titre) — version desktop de base */
.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.nav__logo {
  width: 60px;
  height: 60px;
  transition: width 0.3s ease, height 0.3s ease, transform 0.3s ease;
}
.nav__title {
  font-family: 'Orbitron', sans-serif;
  background: linear-gradient(90deg, var(--accent1), var(--accent3), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.1rem;
  transition: font-size 0.3s ease, filter 0.3s ease;
}

/* Liens de navigation */
.nav__links { display: flex; gap: 16px; }
.nav__link {
  position: relative;
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-decoration: none;
  background-image: linear-gradient(90deg, var(--accent1), var(--accent3), var(--gold), var(--accent1));
  background-size: 0% 30px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.4s ease, text-shadow 0.3s ease;
  font-size: 20px;
}
.nav__link:hover { background-size: 100% 3px; text-shadow: 0 0 6px var(--accent1), 0 0 10px var(--accent3); }

/* Actions droite */
.nav__right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.nav__actions { display: flex; gap: 12px; align-items: center; }
.nav__actions img { width: 32px; height: 32px; filter: drop-shadow(0 0 6px rgba(0, 178, 255, 0.4)); }
.menu-toggle { display: none; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--text); }

/* ================= BOUTONS (Header & divers) ================= */
.btn-toggle-theme {
  border: 2px solid var(--accent1);
  border-radius: 50%;
  background: none;
  color: var(--accent1);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-sun, .icon-moon { opacity: 0; position: absolute; transition: opacity 0.3s ease; }
.icon-sun.active, .icon-moon.active { opacity: 1; }
.btn-account {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255, 255, 255, .25);
  color: var(--text); text-decoration: none;
}

/* ================= SECTIONS ================= */
.section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  z-index: 1;
  overflow: hidden;
}

.news-toggle { display: none; }

/* ================= TYPO ================= */
h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.4rem;
  background: linear-gradient(90deg, var(--accent1), var(--accent3), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  transition: text-shadow 0.4s ease, filter 0.4s ease;
}
p { font-size: 1.1rem; max-width: 700px; margin: 0 auto 20px; }

/* ================= BOUTONS GÉNÉRAUX ================= */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 10px;
  font-family: 'Rajdhani', sans-serif; text-transform: uppercase;
  cursor: pointer; transition: all 0.3s ease;
}
.btn-primary { background: linear-gradient(90deg, var(--accent1), var(--accent3)); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--accent2); color: var(--accent2); }

/* ================= FOOTER ================= */
.fixed-footer {
  position: fixed; bottom: 0; width: 100%;
  background: rgba(0, 0, 0, 0.4); color: var(--text);
  padding: 10px 0; font-size: 1.2rem; z-index: 999;
}
.foot {
  width: min(var(--container-w), 94vw);
  margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  justify-content: center;
  text-align: center;  
}
.foot__center { position: relative; width: 100%; display: flex; justify-content: center; align-items: center; }
.foot__links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; color: var(--text); text-decoration: none; font-size: 1.1rem; transition: color 0.3s ease, text-shadow 0.3s ease; }
.foot__link:hover { color: var(--accent1); text-shadow: 0 0 6px var(--accent1); }
.foot__socials {
  position: absolute;
  right: 14%;              /* même retrait que les icônes du header */
  bottom: 10px;             /* légèrement au-dessus du bord */
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
}
.social-icon img { width: 24px; height: 24px; opacity: 0.8; transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease; }
.social-icon img:hover { opacity: 1; transform: scale(1.1); filter: drop-shadow(0 0 6px var(--accent1)); }
.foot__copy { width: 100%; text-align: center; font-size: 0.8rem; margin-top: 6px; opacity: 0.8; }
.foot__links a,
.foot__links a:visited { color: var(--accent1); text-decoration: none; }
.foot__links a:hover { color: var(--accent3); text-shadow: 0 0 6px var(--accent3); }

/* ================= THEME LIGHT / DARK MASK ================= */
body.dark {
  background: linear-gradient(to right, #008B8B 0%, transparent 60%), url() center/cover no-repeat fixed;
  color: #111; --text: #111; --bg: #FFFFFF;
}
body.light {
  background: linear-gradient(to right, #50C878 0%, transparent 60%), url() center/cover no-repeat fixed;
  color: #E6E9FF; --text: #E6E9FF; --bg: #000;
}

/* Cartes news selon thème */
body.light .news-card { background: rgba(255, 255, 255, 0.9); color: #111; grid-template-columns: repeat(2, 1fr); box-shadow: 0 0 8px rgba(0,0,0,0.15); border-color: rgba(0,0,0,0.2); }
body.light .news-card h3 { color: #000; }
body.dark  .news-card { background: rgba(0, 0, 0, 0.55); color: var(--text); }d

/* Lisibilité titre + logo selon thème */
body.dark h1 { text-shadow: 0 0 8px rgba(0, 178, 255, 0.6); filter: brightness(1.2); }
body.light h1 { text-shadow: 0 0 3px rgba(0, 0, 0, 0.3); filter: brightness(0.9); }
body.dark .nav__title { text-shadow: 0 0 8px rgba(0, 178, 255, 0.6); filter: brightness(1.2); }
body.light .nav__title { text-shadow: 0 0 3px rgba(0, 0, 0, 0.3); filter: brightness(0.9); }

/* Transition d'image de fond */
body::before, body::after {
  content: ""; position: fixed; inset: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat; background-attachment: fixed;
  z-index: -1; opacity: 0; transition: opacity 1.2s ease-in-out, transform 3s ease;
}
body::after { transform: scale(1.05); }
body { background-repeat: no-repeat; background-size: cover; background-position: center; background-attachment: fixed; }

/* ================= MODALE MARKDOWN ================= */
.modal {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); background: rgba(0, 0, 0, 0.65); z-index: 9999; opacity: 0; transition: opacity 0.5s ease;
}
.modal.hidden { display: none; }
.modal.visible { opacity: 1; }
.modal-content {
  position: relative; width: 90%; max-width: 800px; max-height: 70vh; overflow-y: auto;
  padding: 24px 30px; border-radius: 14px; margin-top: 60px;
  transform: scale(0.95) translateY(-10px);
  transition: transform 0.35s ease, opacity 0.35s ease, background 0.3s ease, color 0.3s ease;
  box-shadow: 0 0 20px rgba(0,178,255,0.5); font-family: 'Poppins', sans-serif; opacity: 0;
}
.modal.visible .modal-content { transform: scale(1) translateY(0); opacity: 1; }
body.dark .modal-content  { background: rgba(15, 20, 25, 0.95); color: #E6E9FF; }
body.light .modal-content { background: rgba(255,255,255,0.96); color: #111; box-shadow: 0 0 18px rgba(0,230,184,0.4); }
.modal-close { position: absolute; top: 10px; right: 20px; background: none; border: none; color: var(--accent1); font-size: 28px; cursor: pointer; transition: transform 0.2s ease; }
.modal-close:hover { transform: scale(1.15); }

/* ================= BLOCS CONTENUS ================= */
/* Accueil */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 30px; }
.news-card { background: rgba(0,0,0,0.35); border: 2px solid transparent; border-image: linear-gradient(90deg, var(--accent1), var(--accent3)) 1; border-radius: 14px; padding: 20px; text-align: left; transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; }
.news-card:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(0,178,255,0.4); }

/* Serveurs (onglets) */
.tabs { display: flex; justify-content: center; gap: 10px; margin: 20px 0; }
.tab-btn { background: transparent; border: 2px solid var(--accent1); color: var(--accent1); padding: 10px 20px; border-radius: 8px; cursor: pointer; font-family: 'Rajdhani', sans-serif; text-transform: uppercase; transition: all 0.3s ease; }
.tab-btn:hover, .tab-btn.active { background: linear-gradient(90deg, var(--accent1), var(--accent3)); color: #fff; }
.tab-content { max-width: 900px; margin: 0 auto; text-align: left; line-height: 1.6; background: rgba(0,0,0,0.35); border-radius: 12px; padding: 20px 30px; box-shadow: 0 0 15px rgba(0,178,255,0.3); }

/* Règlement (cartes) */
.rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 30px; }
.rule-card { background: rgba(0,0,0,0.3); border-radius: 14px; padding: 20px; border: 2px solid transparent; transition: all 0.3s ease; cursor: pointer; text-align: left; }
.rule-card:hover { border-image: linear-gradient(90deg, var(--accent1), var(--accent3)) 1; box-shadow: 0 0 20px rgba(0,230,184,0.3); transform: translateY(-6px); }

/* Rendu Markdown Serveurs */
#serveurs-content{
  font-size:.9rem; line-height:1.35; max-width:1100px; margin:0 auto; padding:24px 32px; text-align:left;
  background:rgba(0,0,0,.45); border-radius:14px; box-shadow:0 0 0 1px rgba(0,178,255,.15) inset;
  max-height:calc(85vh - 200px); overflow-y:auto; transition:opacity .3s ease;
}
#serveurs-content::-webkit-scrollbar{ width:6px; }
#serveurs-content::-webkit-scrollbar-thumb{ background:var(--accent1); border-radius:3px; }
#serveurs-content{ scrollbar-width:thin; scrollbar-color:var(--accent1) transparent; }
#serveurs-content.loading{ opacity:.35; pointer-events:none; }
#serveurs-content h1, #serveurs-content h2, #serveurs-content h3{
  margin:14px 0 8px; font-family:'Orbitron',sans-serif;
  background:linear-gradient(90deg,var(--accent1),var(--accent3),var(--gold));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  text-shadow:0 0 6px rgba(0,178,255,.45);
}
#serveurs-content ul{ margin:6px 0 4px 0; padding:0; list-style:none; }
#serveurs-content li{ margin:4px 0; line-height:1.3; }
#serveurs-content a{
  display:inline-block; text-decoration:none; font-weight:600; color:var(--accent1);
  padding:6px 14px; margin:3px 6px; border:1px solid var(--accent1); border-radius:10px;
  background:rgba(0,0,0,.30); box-shadow:0 0 8px rgba(0,178,255,.28);
  transition:transform .25s ease, box-shadow .25s ease, color .25s ease, background .25s ease;
}
#serveurs-content a:hover{ background:linear-gradient(90deg,var(--accent1),var(--accent3)); color:#fff; box-shadow:0 0 12px var(--accent3); transform:translateY(-2px); }
#serveurs-content code{ background:rgba(0,0,0,.4); padding:2px 6px; border-radius:5px; font-family:'Rajdhani',monospace; color:var(--accent3); }
#serveurs-content hr{ border:0; height:1px; background:linear-gradient(90deg,var(--accent1),var(--accent3),transparent); margin:10px 0; opacity:.5; }
body.light #serveurs-content{ background:rgba(255,255,255,.82); color:#111; }
body.light #serveurs-content a{ background:rgba(255,255,255,.65); border-color:var(--accent2); color:#000; box-shadow:0 0 8px rgba(0,230,184,.28); }
body.light #serveurs-content a:hover{ background:linear-gradient(90deg,var(--accent2),var(--accent3)); color:#fff; box-shadow:0 0 10px var(--accent3); }
body.light .markdown-box { background: rgba(255, 255, 255, 0.85); color: #000; box-shadow: 0 0 4px rgba(0,0,0,0.15); border-color: rgba(0,0,0,0.2); }
body.light .markdown-box strong { color: #000; }
body.dark  .markdown-box { background: rgba(0, 0, 0, 0.65); color: var(--text); }
/* modale taille cohérente */
.modal-content{ max-width:1100px; font-size:.95rem; line-height:1.35; }
/* aligner labels */
#serveurs-content p { display:block; margin:4px 0; }
#serveurs-content p b { display:inline-block; min-width:70px; }

/* ================= BOUTONS FLOTTANTS (réseaux) ================= */
.social-buttons {
  position: fixed; bottom: 25px; right: 25px; display: flex; flex-direction: line; gap: 12px; z-index: 9999;
}
.social-btn {
  width: 35px; height: 35px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px);
  border: 2px solid var(--accent1); transition: all 0.3s ease;
  text-decoration: none; color: var(--text); box-shadow: 0 0 8px rgba(0,178,255,0.25);
}
.social-btn img { width: 28px; height: 28px; filter: drop-shadow(0 0 6px rgba(0,178,255,0.4)); transition: transform 0.25s ease, filter 0.25s ease; }
.social-btn:hover { transform: scale(1.1); box-shadow: 0 0 14px var(--accent1); }
.social-btn:hover img { filter: drop-shadow(0 0 10px var(--accent3)); }
.social-btn.discord { border-color: var(--accent2); }
.social-btn.youtube  { border-color: var(--accent3); }
.social-btn.account  { border-color: var(--gold); font-size: 24px; }

/* =========================================================
   SECTION REGLEMENT — Flammes fluides et naturelles
   ========================================================= */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 40px;
  perspective: 1000px;
}

.rule-card {
  position: relative;
  background: rgba(10, 10, 10, 0.55);
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 24px 20px;
  text-align: left;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 0 12px rgba(255, 80, 0, 0.25);
  transition: all 0.5s ease;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}
.rule-card:nth-child(2) { animation-delay: 0.2s; }
.rule-card:nth-child(3) { animation-delay: 0.4s; }

/* === Couche de chaleur === */
.rule-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 90%, rgba(255,120,0,0.2), transparent 70%);
  opacity: 0;
  transform: scale(1.2);
  transition: opacity 0.8s ease, transform 1.2s ease;
  z-index: 0;
}
.rule-card:hover::before {
  opacity: 0.9;
  transform: scale(1);
}

/* === Flammes principales === */
.rule-card::after {
  content: "";
  position: absolute;
  bottom: -10%;
  left: 0;
  width: 100%;
  height: 130%;
  opacity: 0;
  background: conic-gradient(
    from 180deg,
    rgba(255, 80, 0, 0.8),
    rgba(255, 140, 0, 0.7),
    rgba(255, 200, 0, 0.4),
    rgba(255, 50, 0, 0.6),
    rgba(255, 90, 0, 0.8)
  );
  filter: blur(28px);
  mix-blend-mode: screen;
  transition: opacity 0.8s ease;
  animation: flameFlow 2.8s infinite ease-in-out alternate;
  z-index: 1;
}
.rule-card:hover::after {
  opacity: 1;
}

/* === Survol général === */
.rule-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 0 25px rgba(255, 120, 0, 0.7), 0 0 40px rgba(255, 160, 0, 0.4);
}

/* === Titres === */
.rule-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 12px;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--accent1), var(--accent3), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 3;
}
.rule-card h3::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 30%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent3), transparent);
  border-radius: 2px;
  transition: width 0.6s ease;
}
.rule-card:hover h3::after {
  width: 100%;
}

.rule-card p {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
  z-index: 3;
  position: relative;
}

/* === Animations === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Flammes chaotiques — plus organiques */
@keyframes flameFlow {
  0%   { transform: translateY(0) scaleY(1) rotate(0deg); filter: hue-rotate(0deg) blur(28px); }
  25%  { transform: translateY(-6%) scaleY(1.05) rotate(2deg); filter: hue-rotate(10deg) blur(30px); }
  50%  { transform: translateY(-12%) scaleY(1.1) rotate(-1deg); filter: hue-rotate(-5deg) blur(26px); }
  75%  { transform: translateY(-8%) scaleY(1.08) rotate(3deg); filter: hue-rotate(8deg) blur(29px); }
  100% { transform: translateY(-14%) scaleY(1.15) rotate(-2deg); filter: hue-rotate(0deg) blur(28px); }
}

/* =========================================================
   RESPONSIVE UNIQUE — (max-width: 850px), (max-height: 768px)
   (regroupe tous les anciens @media)
   ========================================================= */
@media (max-width: 850px), (max-height: 768px) {
  /* NAV globale */
  .nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; }

  /* Burger visible */
  .menu-toggle {
    display: block; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--accent1); margin-left: 10px;
  }

  /* Panneau menu déroulant (ne traverse plus) */
  .nav__links {
    position: absolute; top: 65px; right: 15px;
    display: none; flex-direction: column; align-items: flex-end;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 255, 255, 0.25);
    border-radius: 12px; padding: 10px 18px;
    width: auto; max-width: 220px; gap: 10px;
    box-shadow: 0 0 14px rgba(0, 255, 255, 0.25); z-index: 9999;
  }
  .nav__links.show { display: flex; }
  .nav__links a { color: var(--accent1); text-align: right; font-size: 0.95rem; padding: 6px 0; text-decoration: none; width: 100%; }
  .nav__links a:hover { color: var(--gold); text-shadow: 0 0 6px var(--accent3); }

  /* Icônes/Actions droites */
  .nav__actions { flex-direction: row !important; justify-content: flex-end !important; align-items: center; gap: 8px; margin-right: 10px; }
  .nav__actions a img, .nav__actions img { width: 32px; height: 32px; }
  .btn-toggle-theme, .btn-account { font-size: 18px; }
  .btn-account { width: 32px; height: 32px; font-size: 20px; }

  /* Marque : logo + titre sur 2 lignes à droite du logo (ton correctif) */
  .nav__brand {
    display: flex; flex-direction: row; align-items: flex-start;
    max-width: 130px; line-height: 1.1; gap: 6px;
  }
  .nav__title {
    display: block; word-break: break-word; font-size: 14px; white-space: normal; margin-top: 2px;
  }
  .nav__logo { width: 48px; height: 48px; flex-shrink: 0; }

  /* Sections / titres */
  .section { padding: 60px 16px; }
  h1 { font-size: 1rem; word-break: break-word; }

  /* Tabs empilés */
  .tabs { flex-direction: column; align-items: stretch; }
  .tab-btn { width: 100%; text-align: center; }

  /* Footer */
  .foot { flex-direction: column; align-items: center; text-align: center; }
  .foot__center { flex-direction: column; gap: 6px; }
  .foot__links { flex-wrap: wrap; justify-content: center; gap: 10px; font-size: 13px; margin-bottom: 8px; }
  .foot__socials { position: static; justify-content: center; gap: 12px; margin-bottom: 5px; padding-bottom: 5px; }
  .foot__link { color: var(--accent2); font-size: 0.85rem; }
  .foot__copy { text-align: center; font-size: 11px; opacity: 0.7; }

  /* Boutons flottants */
  .social-buttons { right: 15px; bottom: 15px; gap: 10px; }
  .social-btn img { width: 15px; height: 15px; }
  
  .news-toggle {
    display: block; width: 100%; margin: 12px 0; padding: 10px 14px;
    font-size: 1rem; color: var(--accent1);
    background: rgba(0,0,0,.5); border: 1px solid var(--accent1);
    border-radius: 8px; cursor: pointer; text-transform: uppercase; text-align: center;
  }
  .news-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
  .news-grid:not(.active) .news-card { display: none; }
  .news-grid:not(.active) .news-card:first-child { display: block; } /* 1ʳᵉ visible */
  .news-grid.active .news-card { display: block; }
  }
  .rule-card { text-align: center; padding: 20px; }
  .rule-card h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
}



/* === SECTION REGLEMENT (ONGLETS + FLAMMES) — v2.3.0 === */
#reglement {
  position: relative;
  padding-top: 80px;
  text-align: center;
}

.reglement-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px auto;
  max-width: 1000px;
  transition: all 0.3s ease;
}

.tab-btn {
  background: rgba(0,0,0,0.4);
  border: 2px solid var(--accent1);
  color: var(--accent1);
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
  text-transform: uppercase;
  transition: all 0.3s ease;
}
.tab-btn:hover,
.tab-btn.active {
  background: linear-gradient(90deg, var(--accent1), var(--accent3));
  color: #fff;
  box-shadow: 0 0 10px rgba(0,178,255,0.4);
}

#reglement-content {
  max-width: 950px;
  margin: 25px auto 0;
  text-align: left;
  line-height: 1.6;
  background: rgba(0,0,0,0.45);
  border-radius: 12px;
  padding: 24px 32px;
  box-shadow: 0 0 15px rgba(0,178,255,0.3);
  transition: opacity 0.3s ease;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}
#reglement-content.loading { opacity: 0.3; pointer-events: none; }
body.light #reglement-content {
  background: rgba(255,255,255,0.9);
  color: #E6E9FF;
  box-shadow: 0 0 10px rgba(0,230,184,0.25);
}

/* === Flammes fluides === */
#reglement-content::after {
  content: "";
  position: absolute;
  bottom: -20%;
  left: 0%;
  width: 98%;
  height: 100%;
  opacity: 0.7;
  background: conic-gradient(
    from 180deg,
    rgba(255, 80, 0, 0.8),
    rgba(255, 140, 0, 0.7),
    rgba(255, 200, 0, 0.4),
    rgba(255, 50, 0, 0.6),
    rgba(255, 90, 0, 0.8)
  );
  filter: blur(36px);
  mix-blend-mode: screen;
  animation: flameFlow 3s infinite ease-in-out alternate;
  z-index: 0;
}

/* Animation des flammes */
@keyframes flameFlow {
  0%   { transform: translateY(0) scaleY(1) rotate(0deg); filter: hue-rotate(0deg) blur(36px); }
  25%  { transform: translateY(-6%) scaleY(1.05) rotate(2deg); filter: hue-rotate(10deg) blur(38px); }
  50%  { transform: translateY(-12%) scaleY(1.1) rotate(-1deg); filter: hue-rotate(-5deg) blur(34px); }
  75%  { transform: translateY(-8%) scaleY(1.08) rotate(3deg); filter: hue-rotate(8deg) blur(36px); }
  100% { transform: translateY(-14%) scaleY(1.15) rotate(-2deg); filter: hue-rotate(0deg) blur(36px); }
}

/* Menu hamburger mobile */
.tab-toggle {
  display: none;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--accent1);
  border-radius: 8px;
  color: var(--accent1);
  font-family: 'Rajdhani', sans-serif;
  text-transform: uppercase;
  padding: 10px 14px;
  width: 100%;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 400px;
  margin: 0 auto;
}
.tab-toggle:hover { background: rgba(0,0,0,0.8); color: var(--gold); }

/* Responsive mobile */
@media (max-width: 850px) {
  .tab-toggle { display: block; margin-top: 12px; }
  .reglement-tabs { display: none; flex-direction: column; align-items: stretch; gap: 8px; }
  .reglement-tabs.active {
    display: flex;
    background: rgba(0,0,0,0.85);
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(0,178,255,0.3);
  }
  .reglement-tabs .tab-btn { width: 100%; text-align: center; font-size: 0.95rem; }
  #reglement-content { padding: 18px 20px; font-size: 0.9rem; }
}

/* Apparition fluide */
@keyframes fadeInReglement {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
#reglement-content { animation: fadeInReglement 0.6s ease forwards; }

/* === Règlement : conteneur scrollable interne === */
#reglement-content {
  /* hauteur max en desktop : ~70% de la fenêtre */
  max-height: 70vh;
  overflow: auto;
  overscroll-behavior: contain;   /* pas de rebond sur la page */
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
  background: rgba(0, 0, 0, 0.7) !important; /* fond plus opaque */
  color: #E6E9FF !important;                 /* texte clair */
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);   /* légère ombre */  
}


body.light #reglement-content {
  background: rgba(255, 255, 255, 0.88) !important;
  color: #333 !important;
  font-weight: 600;
  text-shadow: none;
}

/* Variante mobile : prend (hauteur écran - header - footer - marges) */
@media (max-width: 850px) {
  #reglement-content {
    /* ajuste  var(--hdr) / var(--ftr) si besoin */
    --hdr: 72px;      /* hauteur approx. de .site-header */
    --ftr: 48px;      /* hauteur approx. du footer */
    --marg: 24px;     /* marge visuelle */
    max-height: calc(100dvh - var(--hdr) - var(--ftr) - var(--marg));
  }
}

/* Optionnel : onglets collants pour rester visibles pendant le scroll du contenu */
.reglement-tabs {
  position: sticky;
  top: calc( var(--hdr,72px) + 12px );
  z-index: 2;
}

/* Le fond “flammes” reste sous le texte et ne capte pas les clics */
#reglement-content::after {
  pointer-events: none;
  z-index: 0;
}
#reglement-content > * { position: relative; z-index: 1; }

/* Scrollbar (facultatif) */
#reglement-content::-webkit-scrollbar { width: 10px; }
#reglement-content::-webkit-scrollbar-track { background: rgba(0,0,0,0.25); border-radius: 10px; }
#reglement-content::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--accent1), var(--accent3)); border-radius: 10px; }
#reglement-content { scrollbar-width: thin; scrollbar-color: var(--accent3) rgba(0,0,0,0.25); }

/* === Correctif spécifique aux listes du règlement === */
#reglement-content ul,
#reglement-content ol {
  margin-left: 1.5rem;
  padding-left: 0.5rem;
  list-style: disc;
}

#reglement-content li {
  font-family: 'Poppins', sans-serif !important; /* uniforme avec le reste */
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.6;
}

body.light #reglement-content li {
  color: #222;
}

#reglement-content li::marker {
  color: var(--accent3);
}