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

html, body {
  width: 100%;
  overflow-x: hidden;
}

/* ==========================================================================
   PALETTES ET THÈMES
   ========================================================================== */
:root, [data-theme="dark"] {
  --bg-page: #103822;
  --bg-header: rgba(20, 68, 42, 0.95);
  --bg-card: #185233;
  --bg-card-alt: #1f6740;
  --bg-subtle: rgba(110, 231, 183, 0.08);
  --text-main: #f0fdf4;
  --text-muted: #86efac;
  --border-color: rgba(74, 222, 128, 0.28);
  --accent-color: #4ade80;
  --shadow-card: 0 10px 25px -5px rgba(8, 30, 18, 0.6), 0 0 1px 1px rgba(74, 222, 128, 0.18);
}

[data-theme="light"] {
  --bg-page: #3b1219;
  --bg-header: rgba(72, 22, 31, 0.95);
  --bg-card: #541b25;
  --bg-card-alt: #6a222f;
  --bg-subtle: rgba(253, 164, 175, 0.08);
  --text-main: #fff1f2;
  --text-muted: #fca5a5;
  --border-color: rgba(251, 113, 133, 0.28);
  --accent-color: #fb7185;
  --shadow-card: 0 10px 25px -5px rgba(35, 10, 15, 0.6), 0 0 1px 1px rgba(251, 113, 133, 0.18);
}

[data-theme="blue"] {
  --bg-page: #050e1d;
  --bg-header: rgba(8, 20, 42, 0.95);
  --bg-card: #0d1e38;
  --bg-card-alt: #12284b;
  --bg-subtle: rgba(59, 130, 246, 0.08);
  --text-main: #f0f6ff;
  --text-muted: #93b4e6;
  --border-color: rgba(96, 165, 250, 0.25);
  --accent-color: #3b82f6;
  --shadow-card: 0 10px 25px -5px rgba(2, 6, 14, 0.75), 0 0 1px 1px rgba(59, 130, 246, 0.18);
}

[data-theme="purple"] {
  --bg-page: #2e1045;
  --bg-header: rgba(58, 20, 87, 0.95);
  --bg-card: #431766;
  --bg-card-alt: #531c7e;
  --bg-subtle: rgba(240, 171, 252, 0.08);
  --text-main: #fdf4ff;
  --text-muted: #e879f9;
  --border-color: rgba(232, 121, 249, 0.28);
  --accent-color: #f0abfc;
  --shadow-card: 0 10px 25px -5px rgba(26, 7, 40, 0.6), 0 0 1px 1px rgba(240, 171, 252, 0.18);
}

[data-theme="cyan"] {
  --bg-page: rgb(32, 75, 82);
  --bg-header: rgba(40, 92, 100, 0.95);
  --bg-card: rgb(48, 108, 118);
  --bg-card-alt: rgb(58, 126, 137);
  --bg-subtle: rgba(207, 250, 254, 0.12);
  --text-main: #ffffff;
  --text-muted: #a5f3fc;
  --border-color: rgba(165, 243, 252, 0.35);
  --accent-color: #67e8f9;
  --shadow-card: 0 10px 25px -5px rgba(15, 45, 50, 0.55), 0 0 1px 1px rgba(103, 232, 249, 0.25);
}

[data-theme="yellow"] {
  --bg-page: #423800;
  --bg-header: rgba(82, 70, 0, 0.95);
  --bg-card: #5a4c00;
  --bg-card-alt: #736100;
  --bg-subtle: rgba(255, 238, 0, 0.12);
  --text-main: #fffde6;
  --text-muted: #fffa99;
  --border-color: rgba(255, 238, 0, 0.45);
  --accent-color: #ffee00;
  --shadow-card: 0 10px 25px -5px rgba(25, 21, 0, 0.6), 0 0 1px 1px rgba(255, 238, 0, 0.25);
}

[data-theme="amber"] {
  --bg-page: #452309;
  --bg-header: rgba(82, 41, 10, 0.95);
  --bg-card: #61330e;
  --bg-card-alt: #783f12;
  --bg-subtle: rgba(253, 230, 138, 0.08);
  --text-main: #fffbeb;
  --text-muted: #fde68a;
  --border-color: rgba(251, 191, 36, 0.28);
  --accent-color: #fb923c;
  --shadow-card: 0 10px 25px -5px rgba(45, 21, 4, 0.6), 0 0 1px 1px rgba(251, 146, 60, 0.18);
}

/* ==========================================================================
   SCROLLBAR INVERSÉE AUTOMATIQUE
   ========================================================================== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-page);
  filter: invert(1);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  filter: invert(1);
  border-radius: 5px;
}

/* ==========================================================================
   STRUCTURE
   ========================================================================== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  background: var(--bg-header);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap; /* Empêche le logo et la zone glitch de sauter à la ligne */
  gap: 12px;
}

.brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-color);
  text-decoration: none;
  display: inline-flex; /* Garde le titre et le glitch côte à côte */
  align-items: center;
  white-space: nowrap;  /* Force l'alignement sur une seule ligne */
  gap: 10px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-dot, .app-status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-badge {
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--bg-card-alt);
  color: var(--accent-color);
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.user-badge:hover {
  border-color: var(--accent-color);
}
.btn-header-admin {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-header-logout {
  text-decoration: none;
  font-size: 0.95rem;
}

.btn-header-login {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-header-login:hover {
  background: var(--bg-card-alt);
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-1px);
}

.btn-header-login:active {
  transform: translateY(1px);
}

.btn-header-login:visited {
  color: var(--text-main);
}

/* Layout adaptatif pour toutes les pages (index, admin, articles, etc.) */
.layout-wrapper {
  max-width: 1300px;
  margin: 20px auto;
  padding: 0 15px;
  display: grid;
  grid-template-columns: 220px 1fr 280px;
  gap: 20px;
  flex: 1;
  width: 100%;
  position: relative;
}

/* Navigation gauche */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-section-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin: 16px 0 6px 12px;
  font-weight: 700;
}
.nav-section-title:first-child { margin-top: 0; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-link:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.nav-link.active {
  background: var(--bg-card);
  color: var(--accent-color);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  font-weight: 600;
}

/* Contenu central */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.welcome-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: var(--shadow-card);
}

.welcome-banner h1 {
  font-size: 1.5rem;
  font-weight: 800;
}

/* Cartes d'annonces (utilisées par index et news.php) */
.news-container, .news-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.news-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
}

.news-version {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: monospace;
}

.news-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.news-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.news-body {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.6;
}

.news-gallery {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.news-image-wrapper {
  flex: 1 1 300px;
  max-width: 480px;
}

.news-image {
  width: 100%;
  height: auto;
  max-height: 280px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.news-image:hover {
  transform: scale(1.02);
  border-color: var(--accent-color);
}

/* Sidebar droite */
.sidebar-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.aside-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}

.aside-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.aside-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aside-link-item a, .aside-link-item div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.aside-link-item a:hover {
  border-color: var(--accent-color);
  transform: translateX(2px);
}

.link-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Bouton remonter en haut */
.btn-scroll-top {
  position: absolute;
  right: 15px;
  bottom: 10px;
  width: 60px;
  height: 60px;
  background: #ffffff;
  border: 4px solid #000000;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.btn-scroll-top:hover {
  transform: translateY(-3px);
}

.btn-scroll-top svg {
  width: 32px;
  height: 32px;
  stroke: #000000;
  stroke-width: 3;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   MEDIA QUERIES RESPONSIVES GLOBALES (Pour toutes les pages listées)
   ========================================================================== */
@media (max-width: 1024px) {
  .layout-wrapper {
    grid-template-columns: 1fr; /* Bascule la grille en une seule colonne sur tablettes et mobiles */
  }
  
  .sidebar-aside {
    order: 3;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding: 10px 15px;
  }
  
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
}
/* ==========================================================================
   GLITCH STYLE PROFIL DISCORD — V2 (Responsive et fluide)
   ========================================================================== */

.header-glitch {
  position: relative;
  display: inline-block;
  width: 120px;
  height: 28px;
  margin: 0;           /* Supprime toute marge parasite qui le pousserait en bas */
  vertical-align: middle;
  overflow: hidden;
  isolation: isolate;
  border-radius: 6px;
  flex-shrink: 0;      /* Évite qu'il ne s'écrase si l'écran rétrécit */
  background:
    repeating-linear-gradient(90deg, rgba(200, 185, 255, 0.85) 0 3px, transparent 3px 5px) 30% 12% / 55% 1px no-repeat,
    repeating-linear-gradient(90deg, rgba(170, 150, 255, 0.70) 0 2px, transparent 2px 4px) 8% 22% / 35% 1px no-repeat,
    linear-gradient(100deg, #0a00ff 0%, #2400ff 55%, #5200f0 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
  animation: dg-dashes 1.2s steps(1, end) infinite;
}

@media (max-width: 480px) {
  .header-glitch {
    max-width: 90px;
    margin-left: 6px;
  }
}

.header-glitch::before,
.header-glitch::after,
.glitch-green,
.glitch-pink {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0;
}

/* 1. Voile magenta / violet : bord gauche + haut, comme sur Discord */
.glitch-green {
  background:
    radial-gradient(ellipse 60% 120% at 0% 50%,  rgba(255, 43, 214, 0.95), transparent 70%),
    radial-gradient(ellipse 90% 70%  at 40% 0%,  rgba(255, 43, 214, 0.55), transparent 75%),
    linear-gradient(135deg, rgba(150, 0, 255, 0.75), rgba(40, 0, 255, 0) 75%);
  mix-blend-mode: screen;
  animation:
    dg-env-wash 5s steps(1, end) infinite,
    dg-jump-wash 0.9s steps(1, end) infinite;
}

/* 2. Gros carrés semi-transparents et blocs magenta / marine */
.header-glitch::before {
  background:
    linear-gradient(rgba(120, 160, 255, 0.55), rgba(120, 160, 255, 0.55)) 38% 20% / 12px 12px no-repeat,
    linear-gradient(rgba(120, 160, 255, 0.40), rgba(120, 160, 255, 0.40)) 70% 62% / 10px  9px no-repeat,
    linear-gradient(rgba(80, 140, 255, 0.85),  rgba(80, 140, 255, 0.85))  48% 55% /  9px  9px no-repeat,
    linear-gradient(rgba(190, 170, 255, 0.35), rgba(190, 170, 255, 0.35)) 12% 55% / 16px 10px no-repeat,
    linear-gradient(rgba(255, 43, 214, 0.75),  rgba(255, 43, 214, 0.75))   5% 70% / 14px  9px no-repeat,
    linear-gradient(rgba(255, 43, 214, 0.60),  rgba(255, 43, 214, 0.60))  55% 88% / 22px  7px no-repeat,
    linear-gradient(rgba(8, 0, 70, 0.55),      rgba(8, 0, 70, 0.55))      80% 25% / 18px 12px no-repeat,
    linear-gradient(rgba(8, 0, 70, 0.45),      rgba(8, 0, 70, 0.45))      28% 80% / 20px  8px no-repeat;
  animation:
    dg-env-blocks 5s steps(1, end) infinite,
    dg-jump-a 0.75s steps(1, end) infinite;
}

/* 3. Colonnes verticales (magenta, violet, cyan, fils blancs) + pointillés */
.header-glitch::after {
  background:
    linear-gradient(rgba(255, 255, 255, 0.90), rgba(255, 255, 255, 0.10)) 18% 0 /  1px 100% no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.05)) 56% 0 /  1px  60% no-repeat,
    linear-gradient(rgba(255, 43, 214, 0.95),  rgba(255, 43, 214, 0.20))   6% 0 /  4px 100% no-repeat,
    linear-gradient(rgba(255, 43, 214, 0.85),  rgba(255, 43, 214, 0.10))  44% 0 /  3px  70% no-repeat,
    linear-gradient(rgba(160, 90, 255, 0.85),  rgba(160, 90, 255, 0.10))  70% 30% / 3px  70% no-repeat,
    linear-gradient(rgba(0, 240, 255, 0.95),   rgba(0, 240, 255, 0.30))   85% 20% / 2px  80% no-repeat,
    repeating-linear-gradient(90deg, rgba(210, 195, 255, 0.95) 0 3px, transparent 3px 5px) 30% 12% / 55% 1px no-repeat,
    repeating-linear-gradient(90deg, rgba(210, 195, 255, 0.80) 0 2px, transparent 2px 4px) 12% 30% / 40% 1px no-repeat;
  animation:
    dg-env-streaks 5s steps(1, end) infinite,
    dg-jump-b 0.6s steps(1, end) infinite;
}

/* 4. Barres cyan tramées en damier (dithering) */
.glitch-pink {
  background: repeating-conic-gradient(#00f0ff 0 25%, transparent 0 50%) 0 0 / 2px 2px;
  -webkit-mask:
    linear-gradient(#000, #000) 78% 0   /  9px 100% no-repeat,
    linear-gradient(#000, #000) 30% 20% / 14px  60% no-repeat,
    linear-gradient(#000, #000) 92% 10% /  6px  50% no-repeat;
          mask:
    linear-gradient(#000, #000) 78% 0   /  9px 100% no-repeat,
    linear-gradient(#000, #000) 30% 20% / 14px  60% no-repeat,
    linear-gradient(#000, #000) 92% 10% /  6px  50% no-repeat;
  animation:
    dg-env-dither 5s steps(1, end) infinite,
    dg-jump-c 0.5s steps(1, end) infinite;
}

/* ---------- Pointillés du repos : apparaissent / disparaissent ---------- */
@keyframes dg-dashes {
  0%   { background-position: 30% 12%, 8% 22%, 0 0; }
  16%  { background-position: 45% 12%, -300px 22%, 0 0; }
  33%  { background-position: -300px 12%, 20% 22%, 0 0; }
  50%  { background-position: 30% 12%, 8% 22%, 0 0; }
  66%  { background-position: 60% 12%, 8% 22%, 0 0; }
  83%  { background-position: 30% 12%, -300px 22%, 0 0; }
}

/* ---------- Enveloppes d'intensité (par paliers, avec scintillement) ---------- */
@keyframes dg-env-wash {
  0%, 19% { opacity: 0; }
  20% { opacity: 0.30; }
  26% { opacity: 0.65; }
  32% { opacity: 0.90; }
  40% { opacity: 1; }
  48% { opacity: 0.80; }
  56% { opacity: 1; }
  64% { opacity: 0.70; }
  72% { opacity: 0.45; }
  80% { opacity: 0.25; }
  88% { opacity: 0.10; }
  92%, 100% { opacity: 0; }
}

@keyframes dg-env-blocks {
  0%, 22% { opacity: 0; }
  24% { opacity: 0.50; }
  30% { opacity: 0.90; }
  36% { opacity: 1; }
  44% { opacity: 0.60; }
  50% { opacity: 1; }
  58% { opacity: 0.80; }
  66% { opacity: 0.50; }
  74% { opacity: 0.30; }
  82% { opacity: 0.15; }
  88%, 100% { opacity: 0; }
}

@keyframes dg-env-streaks {
  0%, 26% { opacity: 0; }
  28% { opacity: 0.60; }
  34% { opacity: 1; }
  42% { opacity: 0.70; }
  50% { opacity: 1; }
  60% { opacity: 0.90; }
  68% { opacity: 0.55; }
  76% { opacity: 0.35; }
  84% { opacity: 0.12; }
  90%, 100% { opacity: 0; }
}

/* le damier cyan n'arrive qu'au pic et part en premier */
@keyframes dg-env-dither {
  0%, 34% { opacity: 0; }
  36% { opacity: 0.90; }
  42% { opacity: 0.30; }
  48% { opacity: 1; }
  54% { opacity: 0.50; }
  60% { opacity: 0.95; }
  66% { opacity: 0.40; }
  72%, 100% { opacity: 0; }
}

/* ---------- Sauts d'image (≈ 12 images/s, comme la vidéo) ---------- */
@keyframes dg-jump-wash {
  0%   { transform: translate(0, 0)     scaleX(1); }
  22%  { transform: translate(-3px, 0)  scaleX(1.1); }
  44%  { transform: translate(2px, 0)   scaleX(0.95); }
  66%  { transform: translate(0, 0)     scaleX(1.05); }
  88%  { transform: translate(-1px, 0)  scaleX(1); }
}

@keyframes dg-jump-a {
  0%   { transform: translate(0, 0)      scale(1, 1);     clip-path: inset(0 0 0 0); }
  11%  { transform: translate(-6px, 0)   scale(-1, 1);    clip-path: inset(0 0 30% 0); }
  22%  { transform: translate(5px, 2px)  scale(1, -1);    clip-path: inset(20% 0 0 0); }
  33%  { transform: translate(0, 0)      scale(1.2, 1);   clip-path: inset(0 0 0 25%); }
  44%  { transform: translate(9px, -1px) scale(-1, -1);   clip-path: inset(10% 20% 30% 0); }
  55%  { transform: translate(-4px, 1px) scale(1.4, 1);   clip-path: inset(0 0 55% 30%); }
  66%  { transform: translate(3px, 0)    scale(1, 1.3);   clip-path: inset(35% 0 0 10%); }
  77%  { transform: translate(-8px, 0)   scale(-1.2, 1);  clip-path: inset(0 15% 0 0); }
  88%  { transform: translate(0, 0)      scale(1, 1);     clip-path: inset(0 0 0 0); }
}

@keyframes dg-jump-b {
  0%   { transform: translateX(0);     clip-path: inset(0 0 0 0); }
  14%  { transform: translateX(8px);   clip-path: inset(0 0 40% 0); }
  28%  { transform: translateX(-10px) scaleX(-1); clip-path: inset(0 0 0 0); }
  42%  { transform: translateX(4px);   clip-path: inset(25% 0 0 0); }
  57%  { transform: translateX(-14px); clip-path: inset(0 30% 0 0); }
  71%  { transform: translateX(12px) scaleX(-1); clip-path: inset(0 0 20% 0); }
  85%  { transform: translateX(-3px);  clip-path: inset(0 0 0 20%); }
}

@keyframes dg-jump-c {
  0%   { transform: translate(0, 0);    clip-path: inset(0 0 0 0); }
  20%  { transform: translate(-12px, 0); clip-path: inset(0 0 45% 0); }
  40%  { transform: translate(7px, 0) scaleX(-1); clip-path: inset(30% 0 0 0); }
  60%  { transform: translate(-5px, 0); clip-path: inset(0 0 0 0); }
  80%  { transform: translate(14px, 0); clip-path: inset(10% 0 25% 0); }
}

/* Accessibilité : pas d'animation si désactivée dans le système */
@media (prefers-reduced-motion: reduce) {
  .header-glitch,
  .header-glitch::before,
  .header-glitch::after,
  .glitch-green,
  .glitch-pink {
    animation: none;
  }
}

/* ==========================================================================
   TEXTE ILLISIBLE CENTRÉ DANS LA ZONE GLITCH
   ========================================================================== */
 
.glitch-text {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, "Cascadia Code", "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: #ffffff;
  text-shadow: 1px 0 #ff2bd6, -1px 0 #00f0ff;
  opacity: 1;
  user-select: none;
  pointer-events: none;
}

/* ==========================================================================
   NAVIGATION MOBILE ACCORDÉON (Rétractable sur petit écran)
   ========================================================================== */

/* Masque le bouton de l'accordéon sur PC / grand écran */
.nav-mobile-summary {
  display: none;
}

@media (max-width: 1024px) {
  .sidebar-nav {
    width: 100%;
  }

  /* Style du bouton d'ouverture sur mobile */
  .nav-mobile-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
    box-shadow: var(--shadow-card);
    list-style: none; /* Masque la flèche native du navigateur */
  }

  .nav-mobile-summary::-webkit-details-marker {
    display: none; /* Masque la flèche native sur Safari/Chrome */
  }

  /* Animation de la petite flèche */
  .accordion-chevron {
    transition: transform 0.2s ease;
    font-size: 0.8rem;
  }

  .nav-mobile-accordion[open] .accordion-chevron {
    transform: rotate(180deg);
  }

  /* Conteneur des liens en mode déroulant */
  .nav-mobile-content {
    margin-top: 8px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow-card);
  }
}