/* ============================================================
   MAIN.CSS — Hub de France Legends RP
   Structure :
   1. Variables & Reset
   2. Header
   3. Main Content & Hero
   4. Nav Cards
   5. Section Divider
   6. Bottom Grid (Discord + Tree)
   7. Discord Widget
   8. Site Tree
   9. Panels
   10. Footer
   11. Theme Switcher
   12. Mentions & Tooltip & Timestamp
   13. Boutons génériques
   14. Statuts (Procès)
   15. Responsive
   ============================================================ */


/* ============================================================
   1. Variables & Reset
   ============================================================ */

:root {
  /* ── Light Blue (default) ── */
  --bg-page:       #f5f6fa;
  --bg-card:       #ffffff;
  --bg-header:     #1a237e;
  --bg-header-nav: rgba(255,255,255,0.08);
  --bg-panel:      #ffffff;
  --bg-sidebar:    #f0f2ff;

  --color-text:         #1a1b2e;
  --color-text-muted:   #5c6070;
  --color-accent:       #3f51b5;
  --color-accent-hover: #303f9f;
  --color-accent-soft:  rgba(63,81,181,0.10);
  --color-border:       #dde1f5;
  --color-tag-bg:       #e8eaf6;
  --color-tag-text:     #3f51b5;

  --color-header-text:  #ffffff;
  --color-header-sub:   rgba(255,255,255,0.55);
  --color-nav-link:     rgba(255,255,255,0.75);
  --color-nav-active:   #ffffff;
  --color-nav-active-bg: rgba(255,255,255,0.15);

  /* Statuts */
  --color-statut-text-encours: #856404;
  --color-statut-bg-encours:   #fff3cd;
  --color-statut-text-termine: #41464b;
  --color-statut-bg-termine:   #e2e3e5;
  --color-statut-text-archive: #0f5132;
  --color-statut-bg-archive:   #d1e7dd;

  /* Misc */
  --font-main:    'Sora', 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Consolas', monospace;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --box-shadow:    0 1px 4px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
  --box-shadow-hover: 0 4px 12px rgba(0,0,0,0.12), 0 8px 28px rgba(0,0,0,0.08);
  --transition:    background 0.4s, color 0.4s, border-color 0.4s;

  /* Breakpoints */
  --bp-xs: 480px;   /* petits smartphones */
  --bp-sm: 768px;   /* tablettes verticales */
  --bp-md: 1024px;  /* tablettes horizontales / petits laptops */
  --bp-lg: 1280px;  /* laptops */
  --bp-xl: 1440px;  /* grands écrans */
}

/* ── Dark Red theme ── */
[data-theme="red-dark"] {
  --bg-page:       #0e0b0b;
  --bg-card:       #1a1212;
  --bg-header:     #1f0a0a;
  --bg-header-nav: rgba(255,255,255,0.06);
  --bg-panel:      #1a1212;
  --bg-sidebar:    #150e0e;

  --color-text:         #f0e6e6;
  --color-text-muted:   #9a8080;
  --color-accent:       #c0392b;
  --color-accent-hover: #e74c3c;
  --color-accent-soft:  rgba(192,57,43,0.15);
  --color-border:       #3a1f1f;
  --color-tag-bg:       #2a1010;
  --color-tag-text:     #e57373;

  --color-header-text:  #f5e6e6;
  --color-header-sub:   rgba(255,200,200,0.50);
  --color-nav-link:     rgba(255,210,210,0.70);
  --color-nav-active:   #ffffff;
  --color-nav-active-bg: rgba(192,57,43,0.30);

  --color-statut-text-encours: #d4a017;
  --color-statut-bg-encours:   #2a2000;
  --color-statut-text-termine: #aaaaaa;
  --color-statut-bg-termine:   #1e1e1e;
  --color-statut-text-archive: #66bb6a;
  --color-statut-bg-archive:   #0a2010;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.6;
  background-color: var(--bg-page);
  color: var(--color-text);
  transition: var(--transition);
  min-height: 100vh;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}


/* ============================================================
   2. Header
   ============================================================ */

.site-header {
  background-color: var(--bg-header);
  transition: var(--transition);
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: 8px;
  padding-bottom: 0px;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 40px;
  height: 100px;
  padding: 0 32px;
}

/* Brand */
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-logo {
  display: flex;
  align-items: center;
}

.brand-img {
  height: 52px;
  width: auto;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--color-header-sub);
  text-transform: uppercase;
  line-height: 1;
  transition: var(--transition);
}

.brand-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-header-text);
  letter-spacing: -0.3px;
  line-height: 1.2;
  transition: var(--transition);
}

/* Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto; /*overflow si trop petit*/
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-nav-link);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
  background: var(--bg-header-nav);
  color: var(--color-nav-active);
  text-decoration: none;
}

.nav-link.active {
  background: var(--color-nav-active-bg);
  color: var(--color-nav-active);
}

/* Stripe décorative sous le header */
.header-stripe {
  height: 10px; /* plus visible */
  background: linear-gradient(
    90deg,
    var(--color-accent) 0%,
    var(--color-accent-hover) 40%,
    transparent 100%
  );
  opacity: 0.95;
  transition: var(--transition);
}

/* ============================================================
   3. Main Content & Hero
   ============================================================ */

.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

.hero-section {
  margin-bottom: 36px;
  padding-bottom: 28px;
  transition: var(--transition);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
  transition: var(--transition);
}

.hero-title {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.5px;
  transition: var(--transition);
}

.hero-desc {
  margin: 0;
  font-size: 15px;
  color: var(--color-text-muted);
  max-width: 580px;
  line-height: 1.7;
  transition: var(--transition);
}


/* ============================================================
   4. Nav Cards
   ============================================================ */

.nav-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.nav-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 18px;
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow);
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s, background var(--transition);
  position: relative;
  overflow: hidden;
}

.nav-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-accent);
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-card:hover {
  box-shadow: var(--box-shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
  border-color: var(--color-accent);
}

.nav-card:hover::before {
  opacity: 1;
}

.nav-card-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.nav-card-body {
  flex: 1;
}

.nav-card-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-tag-text);
  background: var(--color-tag-bg);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
  transition: var(--transition);
}

.nav-card-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  transition: var(--transition);
}

.nav-card-desc {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
  transition: var(--transition);
}

.nav-card-arrow {
  font-size: 18px;
  color: var(--color-accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.nav-card:hover .nav-card-arrow {
  opacity: 1;
  transform: translateX(0);
}


/* ============================================================
   5. Section Divider
   ============================================================ */

.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 24px;
  transition: var(--transition);
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--color-border);
  transition: var(--transition);
}

.section-divider span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}


/* ============================================================
   6. Bottom Grid
   ============================================================ */

.bottom-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  align-items: start;
}


/* ============================================================
   7. Discord Widget
   ============================================================ */

.panel--discord {
    height: 256px;
}

.panel--discord .panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.discord-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: var(--color-accent);
  transition: var(--transition);
}

.discord-widget {
  margin-top: 12px;
  padding: 14px;
  background: var(--bg-sidebar);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.discord-widget p {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--color-text);
  transition: var(--transition);
}

.discord-widget p:last-child {
  margin-bottom: 0;
}

.discord-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.discord-online::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #43b581;
  flex-shrink: 0;
}

.discordJoinBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-accent);
  color: #ffffff !important;
  padding: 7px 14px;
  border-radius: var(--border-radius);
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  transition: filter 0.2s, background 0.4s;
  margin-top: 8px;
  border: none;
}

.discordJoinBtn:hover {
  filter: brightness(1.1);
}

.discordJoinBtn--error {
  background: #9a0000;
}

/* Loading dots */
.discord-loading {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.loading-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.4;
  animation: loadingPulse 1.2s ease-in-out infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingPulse {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50%       { opacity: 1;   transform: scale(1);   }
}


/* ============================================================
   8. Site Tree
   ============================================================ */

.site-tree {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 13px;
}

.tree-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition);
}

.tree-item:last-child {
  border-bottom: none;
}

.tree-root {
  padding-bottom: 8px;
}

.tree-label {
  font-weight: 600;
  color: var(--color-text);
}

.tree-connector {
  color: var(--color-text-muted);
  padding-left: 8px;
  flex-shrink: 0;
}

.tree-link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  flex: 1;
  display: inline-block;  /* empêche le décalage de baseline au hover */
  vertical-align: middle;
  position: relative;     /* isole du top:2px du .btn:active global */
  top: 0 !important;
}

.tree-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px; /* underline ne pousse pas le texte */
}

.tree-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  padding: 2px 7px;
  border-radius: 4px;
  transition: var(--transition);
}

.tree-badge--encours {
  background: var(--color-statut-bg-encours);
  color: var(--color-statut-text-encours);
}

.hub-structure {
  margin-top: 10px;
}

.tree {
  margin-top: 12px;
  padding-left: 10px;
}

.tree-item {
  margin-bottom: 5px;
  padding-left: 18px;
  display: flex;
  gap: 12px;
}

.tree-content {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: transform 0.18s ease;
}

.tree-content:hover {
  transform: translateX(4px);
}

.tree-icon {
  font-size: 20px;
  opacity: 0.95;
  flex-shrink: 0;
}

.tree-title-root {
  font-weight: 700;
  font-size: 15px;
  color: var(--color-text);
}

.tree-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--color-accent);
  text-decoration: none;
}

.tree-title:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

.tree-desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Badges */
.tree-badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 8px;
  font-weight: 700;
  margin-left: 8px;
}

.badge-inst {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.badge-commu {
  background: rgba(255,200,0,0.12);
  color: #c59a00;
}

.badge-off {
  background: rgba(0,180,255,0.10);
  color: #0094c7;
}

/* ============================================================
   9. Panels
   ============================================================ */

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow);
  padding: 20px;
  transition: var(--transition);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition);
}

.panel-icon {
  font-size: 18px;
  line-height: 1;
}

.panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  transition: var(--transition);
}


/* ============================================================
   10. Footer
   ============================================================ */

.site-footer {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 14px;
  border-radius: 20px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.85;
  z-index: 1000;
}


/* ============================================================
   11. Theme Switcher
   ============================================================ */

#themeBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--box-shadow);
  transition: box-shadow 0.2s, transform 0.2s, background var(--transition), border-color var(--transition);
  user-select: none;
  z-index: 200;
}

#themeBtn:hover {
  box-shadow: var(--box-shadow-hover);
  transform: scale(1.08);
}

#themePanel {
  position: fixed;
  bottom: 70px;
  right: 20px;
  background: var(--bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 14px 16px;
  box-shadow: var(--box-shadow-hover);
  z-index: 200;
  display: none;
  min-width: 170px;
  transition: var(--transition);
}

#themePanel.open {
  display: block;
}

.theme-panel-title {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.theme-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.theme-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s;
  width: 100%;
  text-align: left;
}

.theme-opt:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
}

.theme-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.theme-name {
  font-size: 12px;
  font-weight: 500;
}


/* ============================================================
   12. Mentions, Tooltip & Timestamp
   ============================================================ */

.mention {
  padding: 1px 3px;
  color: var(--color-accent);
  font-weight: 600;
  background-color: var(--color-accent-soft);
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
  font-size: 0.95em;
  transition: var(--transition);
}

.tooltip {
  position: relative;
}

.tooltip[data-tooltip]:after {
  content: attr(data-tooltip);
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  position: absolute;
  white-space: nowrap;
  z-index: 1002;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background-color: var(--bg-panel);
  padding: 7px 12px;
  color: var(--color-text);
  box-shadow: var(--box-shadow-hover);
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translate(-50%, -6px);
  opacity: 0;
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
  pointer-events: none;
}

.tooltip[data-tooltip]:hover:after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.timestamp {
  background: var(--color-tag-bg);
  border-radius: 4px;
  padding: 1px 5px;
  border: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--color-text-muted);
  transition: var(--transition);
}


/* ============================================================
   13. Boutons génériques
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--color-accent);
  color: #ffffff;
  border: none;
  border-radius: var(--border-radius);
  padding: 8px 18px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--box-shadow);
  transition: filter 0.2s, transform 0.1s, background var(--transition);
  user-select: none;
}

.btn:hover {
  filter: brightness(1.1);
  text-decoration: none;
  color: #ffffff;
}

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

.btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}


/* ============================================================
   14. Statuts (Procès)
   ============================================================ */

.proces-statut {
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.statut-encours { background: var(--color-statut-bg-encours); color: var(--color-statut-text-encours); }
.statut-termine { background: var(--color-statut-bg-termine); color: var(--color-statut-text-termine); }
.statut-archive { background: var(--color-statut-bg-archive); color: var(--color-statut-text-archive); }


/* ============================================================
   15. Responsive
   ============================================================ */

/* Grand écran */
@media (min-width: 1440px) {
  .main-content { max-width: 1280px; }
}

/* Tablette paysage */
@media (max-width: 1024px) {
  .header-inner { padding: 0 20px; gap: 20px; }
  .main-content { padding: 32px 20px 80px; }
  .nav-cards    { grid-template-columns: 1fr 1fr; }
  .bottom-grid  { grid-template-columns: 1fr 1fr; }
}

/* Tablette portrait */
@media (max-width: 768px) {
  .header-inner { height: auto; padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .header-nav   { margin-left: 0; width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .nav-link     { white-space: nowrap; }
  .main-content { padding: 24px 16px 80px; }
  .nav-cards    { grid-template-columns: 1fr; }
  .bottom-grid  { grid-template-columns: 1fr; }
  .hero-title   { font-size: 24px; }
}

/* Téléphone */
@media (max-width: 480px) {
  .brand-title  { font-size: 15px; }
  .brand-sub    { display: none; }
  .hero-title   { font-size: 20px; }
  .hero-desc    { font-size: 13px; }
  .site-footer  { display: none; }
}


/* ============================================================
   16. Nav décorative (non-cliquable)
   ============================================================ */

.header-nav .nav-link:not([href]) {
  cursor: default;
  pointer-events: none;
}


/* ============================================================
   17. Info Grid (pages index-truc)
   ============================================================ */

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.info-body {
  padding-top: 14px;
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.7;
  transition: var(--transition);
}

.info-body p {
  margin: 0 0 12px;
  color: var(--color-text-muted);
}

.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
  transition: var(--transition);
}

.info-list li::before {
  content: '›';
  color: var(--color-accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* Contacts */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition);
}

.contact-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-role {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.contact-name {
  font-size: 14px;
  font-weight: 600;
}

.contact-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Liens directs */
.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-sidebar);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.2s, background var(--transition);
}

.link-item:hover {
  border-color: var(--color-accent);
  text-decoration: none;
}

.link-item-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.link-item-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  flex: 1;
}

.link-item-arrow {
  color: var(--color-accent);
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.6;
}

/* bottom-grid à 1 colonne pour les pages info */
.bottom-grid--single {
  grid-template-columns: 340px;
}

/* ── Responsive info-grid ── */
@media (max-width: 1024px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .info-grid { grid-template-columns: 1fr; }
  .bottom-grid--single { grid-template-columns: 1fr; }
}

/* ============================================================
   18. Site status badge (online / offline / checking)
   ============================================================ */

.site-status {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 1px 7px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.3s, color 0.3s;
  border: 1px solid transparent;
}

.site-status--checking {
  background: var(--color-tag-bg);
  color: var(--color-text-muted);
  border-color: var(--color-border);
  animation: statusPulse 1.2s ease-in-out infinite;
}

.site-status--online {
  background: rgba(67, 181, 129, 0.15);
  color: #43b581;
  border-color: rgba(67, 181, 129, 0.35);
}

.site-status--offline {
  background: rgba(192, 57, 43, 0.12);
  color: #e57373;
  border-color: rgba(192, 57, 43, 0.30);
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1;   }
}

/* Header agrandi 
.site-header {
  override : hauteur augmentée 
}*/

.header-inner {
  height: 76px; /* était 64px */
}

.brand-img {
  height: 48px; /* était 36px */
}


/* ============================================================
   SCROLLBAR
   ============================================================ */

body {
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) transparent;
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 10px;
  transition: filter 0.2s;
}

::-webkit-scrollbar-thumb:hover {
  filter: brightness(1.2);
}


/* ============================================================
   TRANSITIONS DE PAGE
   ============================================================ */

/* Overlay qui couvre toute la page pendant la transition */
#page-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-header);
  pointer-events: none;

  /* État initial : invisible */
  opacity: 0;
  transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

#page-transition-overlay.fade-in {
  opacity: 1;
  pointer-events: all;
}

/* Contenu de la page : sort en douceur */
body.page-leaving #page-transition-overlay {
  opacity: 1;
}

/* Entrée de page : le body arrive avec un léger slide-up */
@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-content {
  animation: pageEnter 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ============================================================
   MODE SOMBRE AUTOMATIQUE (prefers-color-scheme)
   Appliqué uniquement si data-theme="auto" sur <html>
   ============================================================ */

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg-page:       #0e0b0b;
    --bg-card:       #1a1212;
    --bg-header:     #1f0a0a;
    --bg-header-nav: rgba(255,255,255,0.06);
    --bg-panel:      #1a1212;
    --bg-sidebar:    #150e0e;

    --color-text:         #f0e6e6;
    --color-text-muted:   #9a8080;
    --color-accent:       #c0392b;
    --color-accent-hover: #e74c3c;
    --color-accent-soft:  rgba(192,57,43,0.15);
    --color-border:       #3a1f1f;
    --color-tag-bg:       #2a1010;
    --color-tag-text:     #e57373;

    --color-header-text:   #f5e6e6;
    --color-header-sub:    rgba(255,200,200,0.50);
    --color-nav-link:      rgba(255,210,210,0.70);
    --color-nav-active:    #ffffff;
    --color-nav-active-bg: rgba(192,57,43,0.30);

    --color-statut-text-encours: #d4a017;
    --color-statut-bg-encours:   #2a2000;
    --color-statut-text-termine: #aaaaaa;
    --color-statut-bg-termine:   #1e1e1e;
    --color-statut-text-archive: #66bb6a;
    --color-statut-bg-archive:   #0a2010;
  }
}

@media (prefers-color-scheme: light) {
  [data-theme="auto"] {
    --bg-page:       #f5f6fa;
    --bg-card:       #ffffff;
    --bg-header:     #1a237e;
    --bg-header-nav: rgba(255,255,255,0.08);
    --bg-panel:      #ffffff;
    --bg-sidebar:    #f0f2ff;

    --color-text:         #1a1b2e;
    --color-text-muted:   #5c6070;
    --color-accent:       #3f51b5;
    --color-accent-hover: #303f9f;
    --color-accent-soft:  rgba(63,81,181,0.10);
    --color-border:       #dde1f5;
    --color-tag-bg:       #e8eaf6;
    --color-tag-text:     #3f51b5;

    --color-header-text:   #ffffff;
    --color-header-sub:    rgba(255,255,255,0.55);
    --color-nav-link:      rgba(255,255,255,0.75);
    --color-nav-active:    #ffffff;
    --color-nav-active-bg: rgba(255,255,255,0.15);
  }
}


/* ============================================================
   RESPONSIVE — Améliorations mobile
   ============================================================ */

/* Empêche le zoom iOS sur les inputs */
input, select, textarea {
  font-size: 16px;
}

/* Nav scrollable sans barre sur mobile */
.header-nav {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar {
  display: none;
}

/* Info-grid : 1 colonne sur petit écran */
@media (max-width: 600px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .nav-cards {
    grid-template-columns: 1fr;
  }

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

  .bottom-grid--single {
    grid-template-columns: 1fr;
  }

  /* Hero plus compact */
  .hero-title {
    font-size: 22px;
  }

  .hero-eyebrow {
    font-size: 10px;
  }

  /* Boutons d'erreur 404 en colonne */
  .error-actions {
    flex-direction: column;
    align-items: center;
  }

  /* Bloc terminal 404 sur petit écran */
  .error-code-block {
    font-size: 11px;
    padding: 10px 12px;
  }
}

/* Téléphone très petit */
@media (max-width: 360px) {
  .header-inner {
    padding: 0 12px;
    gap: 8px;
  }

  .brand-title {
    font-size: 14px;
  }

  .main-content {
    padding: 20px 12px 80px;
  }

  .panel {
    padding: 14px;
  }

  .contact-role {
    font-size: 9px;
  }
}

/* Touch : agrandir les zones cliquables */
@media (hover: none) {
  .nav-card {
    padding: 16px 14px;
  }

  .link-item {
    padding: 12px 14px;
  }

  .theme-opt {
    padding: 10px 12px;
  }

  #themeBtn {
    width: 46px;
    height: 46px;
  }
}


/* ============================================================
   19. Accordion (Procès & Membres)
   ============================================================ */

.proces-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.proces-item {
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

/* En-tête cliquable */
.proces-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-sidebar);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
  flex-wrap: wrap;
}

.proces-header:hover {
  background: var(--color-accent-soft);
}

.proces-numero {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  min-width: 180px;
  flex-shrink: 0;
}

.proces-parties {
  flex: 1;
  font-size: 14px;
  color: var(--color-text);
  transition: var(--transition);
}

.proces-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-muted);
  min-width: 90px;
  text-align: right;
  flex-shrink: 0;
  transition: var(--transition);
}

/* Flèche */
.proces-arrow {
  color: var(--color-accent);
  transition: transform 0.3s;
  margin-left: auto;
  font-size: 12px;
  flex-shrink: 0;
}

.proces-item.open .proces-arrow {
  transform: rotate(180deg);
}

/* Corps */
.proces-body {
  display: none;
  padding: 16px;
  background: var(--bg-panel);
  border-top: 1px solid var(--color-border);
  flex-direction: column;
  gap: 16px;
  transition: var(--transition);
}

.proces-item.open .proces-body {
  display: flex;
}

/* Sections internes */
.proces-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.proces-section h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 6px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Tableau */
.proces-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.proces-table td {
  padding: 7px 12px;
  color: var(--color-text);
  vertical-align: top;
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.proces-table td:first-child {
  font-weight: 600;
  width: 35%;
  color: var(--color-accent);
  background: var(--bg-sidebar);
  font-family: var(--font-mono);
  font-size: 12px;
  transition: var(--transition);
}

/* Contrôles (tout déplier / tout replier) */
.proces-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

/* Responsive accordéon */
@media (max-width: 768px) {
  .proces-header { gap: 8px; }
  .proces-numero { min-width: unset; width: 100%; }
  .proces-table td:first-child { width: 45%; }
}

@media (max-width: 480px) {
  .proces-table { display: block; }
  .proces-table tr { display: flex; flex-direction: column; margin-bottom: 8px; }
  .proces-table td:first-child { width: 100%; padding-bottom: 2px; }
}


/* ============================================================
   RESPONSIVE+ — Compatibilité universelle tous appareils
   Cascade mobile-first, du plus petit au plus grand.
   Breakpoints couverts :
     320px  — iPhone SE 1ère gen, très vieux Android
     360px  — Android compact (Galaxy A series…)
     375px  — iPhone 6/7/8/SE2/SE3/12 mini
     390px  — iPhone 14/15
     412px  — Galaxy S21/S22, Pixel 6
     480px  — grands téléphones / phablets
     600px  — petites tablettes portrait
     768px  — iPad mini portrait, tablettes 7"
     1024px — iPad 10" paysage, tablettes 10"
     1280px — laptops
     1440px — grands écrans (déjà géré section 15)
   ============================================================ */

/* ── 0. Bases globales ── */

/* Empêche le débordement horizontal sans casser les scrolls internes */
html {
  overflow-x: clip;
}

/* Images & médias toujours fluides */
img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* Safe area : header */
.site-header {
  padding-left:  env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Safe area : footer flottant */
.site-footer {
  bottom: calc(14px + env(safe-area-inset-bottom));
}

/* ── 1. #themeBtn & #themePanel — règle unique, cascade propre ──
   Ordre : base → safe-area (grand écran) → 768px → 600px → 480px → 360px
   Chaque palier surclasse le précédent, pas de conflit. */

/* Base (bureau) */
#themeBtn {
  bottom: calc(20px + env(safe-area-inset-bottom));
  right:  calc(20px + env(safe-area-inset-right));
}
#themePanel {
  bottom: calc(70px + env(safe-area-inset-bottom));
  right:  calc(20px + env(safe-area-inset-right));
  max-width: 220px;
}

/* Tablette portrait ≤ 768px : bouton légèrement remonté */
@media (max-width: 768px) {
  #themeBtn {
    bottom: calc(16px + env(safe-area-inset-bottom));
    right:  calc(16px + env(safe-area-inset-right));
    width: 40px;
    height: 40px;
  }
  #themePanel {
    bottom: calc(64px + env(safe-area-inset-bottom));
    right:  calc(16px + env(safe-area-inset-right));
  }
}

/* Téléphone ≤ 600px : panel centré horizontalement */
@media (max-width: 600px) {
  #themeBtn {
    bottom: calc(14px + env(safe-area-inset-bottom));
    right:  calc(14px + env(safe-area-inset-right));
    width: 40px;
    height: 40px;
    font-size: 17px;
  }
  #themePanel {
    /* Centré sur l'écran, jamais hors bord */
    left:      50%;
    right:     auto;
    transform: translateX(-50%);
    bottom:    calc(62px + env(safe-area-inset-bottom));
    min-width: 190px;
    max-width: calc(100vw - 32px);
  }
}

/* Petit téléphone ≤ 480px */
@media (max-width: 480px) {
  #themeBtn {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
  #themePanel {
    min-width: 180px;
  }
}

/* Très petit ≤ 360px */
@media (max-width: 360px) {
  #themeBtn {
    bottom: calc(10px + env(safe-area-inset-bottom));
    right:  calc(10px + env(safe-area-inset-right));
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  #themePanel {
    bottom: calc(54px + env(safe-area-inset-bottom));
    min-width: 160px;
  }
}

/* ── 2. Footer flottant — évite débordement sur petits écrans ── */
@media (max-width: 400px) {
  .site-footer {
    white-space: normal;
    text-align: center;
    width: calc(100% - 32px);
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
  }
}

/* ── 3. Bottom-grid — colonne gauche fluide entre 769–1024px ── */
@media (max-width: 1024px) and (min-width: 769px) {
  .bottom-grid {
    grid-template-columns: minmax(260px, 340px) 1fr;
  }
}

/* ── 4. Discord panel — hauteur auto sur mobile ── */
@media (max-width: 600px) {
  .panel--discord {
    height: auto;
    min-height: 180px;
  }
}

/* ── 5. Tooltips — jamais hors écran sur mobile ── */
@media (max-width: 600px) {
  .tooltip[data-tooltip]:after {
    white-space: normal;
    max-width: min(240px, 80vw);
    left: 0;
    right: auto;
    transform: none;
  }
  .tooltip[data-tooltip]:hover:after {
    transform: none;
  }
}

/* ── 6. Tableau procès — scroll horizontal sur mobile ── */
@media (max-width: 600px) {
  .proces-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── 7. Accessibilité : focus clavier visible ── */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── 8. Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:        0.01ms !important;
    animation-iteration-count: 1      !important;
    transition-duration:       0.01ms !important;
  }
}

/* ── 9. Impression ── */
@media print {
  .site-header,
  .site-footer,
  #themeBtn,
  #themePanel,
  #page-transition-overlay {
    display: none !important;
  }
  .main-content {
    padding: 20px;
    max-width: 100%;
    animation: none;
  }
  body {
    background: white;
    color: black;
  }
}/* ============================================================
   MAIN.CSS — Hub de France Legends RP
   Structure :
   1. Variables & Reset
   2. Header
   3. Main Content & Hero
   4. Nav Cards
   5. Section Divider
   6. Bottom Grid (Discord + Tree)
   7. Discord Widget
   8. Site Tree
   9. Panels
   10. Footer
   11. Theme Switcher
   12. Mentions & Tooltip & Timestamp
   13. Boutons génériques
   14. Statuts (Procès)
   15. Responsive
   ============================================================ */


/* ============================================================
   1. Variables & Reset
   ============================================================ */

:root {
  /* ── Light Blue (default) ── */
  --bg-page:       #f5f6fa;
  --bg-card:       #ffffff;
  --bg-header:     #1a237e;
  --bg-header-nav: rgba(255,255,255,0.08);
  --bg-panel:      #ffffff;
  --bg-sidebar:    #f0f2ff;

  --color-text:         #1a1b2e;
  --color-text-muted:   #5c6070;
  --color-accent:       #3f51b5;
  --color-accent-hover: #303f9f;
  --color-accent-soft:  rgba(63,81,181,0.10);
  --color-border:       #dde1f5;
  --color-tag-bg:       #e8eaf6;
  --color-tag-text:     #3f51b5;

  --color-header-text:  #ffffff;
  --color-header-sub:   rgba(255,255,255,0.55);
  --color-nav-link:     rgba(255,255,255,0.75);
  --color-nav-active:   #ffffff;
  --color-nav-active-bg: rgba(255,255,255,0.15);

  /* Statuts */
  --color-statut-text-encours: #856404;
  --color-statut-bg-encours:   #fff3cd;
  --color-statut-text-termine: #41464b;
  --color-statut-bg-termine:   #e2e3e5;
  --color-statut-text-archive: #0f5132;
  --color-statut-bg-archive:   #d1e7dd;

  /* Misc */
  --font-main:    'Sora', 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Consolas', monospace;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --box-shadow:    0 1px 4px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
  --box-shadow-hover: 0 4px 12px rgba(0,0,0,0.12), 0 8px 28px rgba(0,0,0,0.08);
  --transition:    background 0.4s, color 0.4s, border-color 0.4s;
}

/* ── Dark Red theme ── */
[data-theme="red-dark"] {
  --bg-page:       #0e0b0b;
  --bg-card:       #1a1212;
  --bg-header:     #1f0a0a;
  --bg-header-nav: rgba(255,255,255,0.06);
  --bg-panel:      #1a1212;
  --bg-sidebar:    #150e0e;

  --color-text:         #f0e6e6;
  --color-text-muted:   #9a8080;
  --color-accent:       #c0392b;
  --color-accent-hover: #e74c3c;
  --color-accent-soft:  rgba(192,57,43,0.15);
  --color-border:       #3a1f1f;
  --color-tag-bg:       #2a1010;
  --color-tag-text:     #e57373;

  --color-header-text:  #f5e6e6;
  --color-header-sub:   rgba(255,200,200,0.50);
  --color-nav-link:     rgba(255,210,210,0.70);
  --color-nav-active:   #ffffff;
  --color-nav-active-bg: rgba(192,57,43,0.30);

  --color-statut-text-encours: #d4a017;
  --color-statut-bg-encours:   #2a2000;
  --color-statut-text-termine: #aaaaaa;
  --color-statut-bg-termine:   #1e1e1e;
  --color-statut-text-archive: #66bb6a;
  --color-statut-bg-archive:   #0a2010;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.6;
  background-color: var(--bg-page);
  color: var(--color-text);
  transition: var(--transition);
  min-height: 100vh;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}


/* ============================================================
   2. Header
   ============================================================ */

.site-header {
  background-color: var(--bg-header);
  transition: var(--transition);
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: 8px;
  padding-bottom: 0px;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 40px;
  height: 90px;
  padding: 0 32px;
}

/* Brand */
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-logo {
  display: flex;
  align-items: center;
}

.brand-img {
  height: 52px;
  width: auto;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--color-header-sub);
  text-transform: uppercase;
  line-height: 1;
  transition: var(--transition);
}

.brand-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-header-text);
  letter-spacing: -0.3px;
  line-height: 1.2;
  transition: var(--transition);
}

/* Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-nav-link);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  margin-bottom: 2px;
}

.nav-link:hover {
  background: var(--bg-header-nav);
  color: var(--color-nav-active);
  text-decoration: none;
}

.nav-link.active {
  background: var(--color-nav-active-bg);
  color: var(--color-nav-active);
}

/* Stripe décorative sous le header */
.header-stripe {
  height: 10px; /* plus visible */
  background: linear-gradient(
    90deg,
    var(--color-accent) 0%,
    var(--color-accent-hover) 40%,
    transparent 100%
  );
  opacity: 0.95;
  transition: var(--transition);
}

/* ============================================================
   3. Main Content & Hero
   ============================================================ */

.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

.hero-section {
  margin-bottom: 36px;
  padding-bottom: 28px;
  transition: var(--transition);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
  transition: var(--transition);
}

.hero-title {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.5px;
  transition: var(--transition);
}

.hero-desc {
  margin: 0;
  font-size: 15px;
  color: var(--color-text-muted);
  max-width: 580px;
  line-height: 1.7;
  transition: var(--transition);
}


/* ============================================================
   4. Nav Cards
   ============================================================ */

.nav-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.nav-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 18px;
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow);
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s, background var(--transition);
  position: relative;
  overflow: hidden;
}

.nav-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-accent);
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-card:hover {
  box-shadow: var(--box-shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
  border-color: var(--color-accent);
}

.nav-card:hover::before {
  opacity: 1;
}

.nav-card-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.nav-card-body {
  flex: 1;
}

.nav-card-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-tag-text);
  background: var(--color-tag-bg);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
  transition: var(--transition);
}

.nav-card-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  transition: var(--transition);
}

.nav-card-desc {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
  transition: var(--transition);
}

.nav-card-arrow {
  font-size: 18px;
  color: var(--color-accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.nav-card:hover .nav-card-arrow {
  opacity: 1;
  transform: translateX(0);
}


/* ============================================================
   5. Section Divider
   ============================================================ */

.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 24px;
  transition: var(--transition);
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--color-border);
  transition: var(--transition);
}

.section-divider span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}


/* ============================================================
   6. Bottom Grid
   ============================================================ */

.bottom-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  align-items: start;
}


/* ============================================================
   7. Discord Widget
   ============================================================ */

.panel--discord {
    height: 256px;
}

.panel--discord .panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.discord-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: var(--color-accent);
  transition: var(--transition);
}

.discord-widget {
  margin-top: 12px;
  padding: 14px;
  background: var(--bg-sidebar);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.discord-widget p {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--color-text);
  transition: var(--transition);
}

.discord-widget p:last-child {
  margin-bottom: 0;
}

.discord-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.discord-online::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #43b581;
  flex-shrink: 0;
}

.discordJoinBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-accent);
  color: #ffffff !important;
  padding: 7px 14px;
  border-radius: var(--border-radius);
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  transition: filter 0.2s, background 0.4s;
  margin-top: 8px;
  border: none;
}

.discordJoinBtn:hover {
  filter: brightness(1.1);
}

.discordJoinBtn--error {
  background: #9a0000;
}

/* Loading dots */
.discord-loading {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.loading-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.4;
  animation: loadingPulse 1.2s ease-in-out infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingPulse {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50%       { opacity: 1;   transform: scale(1);   }
}


/* ============================================================
   8. Site Tree
   ============================================================ */

.site-tree {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 13px;
}

.tree-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition);
}

.tree-item:last-child {
  border-bottom: none;
}

.tree-root {
  padding-bottom: 8px;
}

.tree-label {
  font-weight: 600;
  color: var(--color-text);
}

.tree-connector {
  color: var(--color-text-muted);
  padding-left: 8px;
  flex-shrink: 0;
}

.tree-link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  flex: 1;
  display: inline-block;  /* empêche le décalage de baseline au hover */
  vertical-align: middle;
  position: relative;     /* isole du top:2px du .btn:active global */
  top: 0 !important;
}

.tree-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px; /* underline ne pousse pas le texte */
}

.tree-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  padding: 2px 7px;
  border-radius: 4px;
  transition: var(--transition);
}

.tree-badge--encours {
  background: var(--color-statut-bg-encours);
  color: var(--color-statut-text-encours);
}

.hub-structure {
  margin-top: 10px;
}

.tree {
  margin-top: 12px;
  padding-left: 10px;
}

.tree-item {
  margin-bottom: 5px;
  padding-left: 18px;
  display: flex;
  gap: 12px;
}

.tree-content {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: transform 0.18s ease;
}

.tree-content:hover {
  transform: translateX(4px);
}

.tree-icon {
  font-size: 20px;
  opacity: 0.95;
  flex-shrink: 0;
}

.tree-title-root {
  font-weight: 700;
  font-size: 15px;
  color: var(--color-text);
}

.tree-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--color-accent);
  text-decoration: none;
}

.tree-title:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

.tree-desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Badges */
.tree-badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 8px;
  font-weight: 700;
  margin-left: 8px;
}

.badge-inst {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.badge-commu {
  background: rgba(255,200,0,0.12);
  color: #c59a00;
}

.badge-off {
  background: rgba(0,180,255,0.10);
  color: #0094c7;
}

/* ============================================================
   9. Panels
   ============================================================ */

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow);
  padding: 20px;
  transition: var(--transition);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition);
}

.panel-icon {
  font-size: 18px;
  line-height: 1;
}

.panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  transition: var(--transition);
}


/* ============================================================
   10. Footer
   ============================================================ */

.site-footer {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 14px;
  border-radius: 20px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.85;
  z-index: 1000;
}


/* ============================================================
   11. Theme Switcher
   ============================================================ */

#themeBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--box-shadow);
  transition: box-shadow 0.2s, transform 0.2s, background var(--transition), border-color var(--transition);
  user-select: none;
  z-index: 200;
}

#themeBtn:hover {
  box-shadow: var(--box-shadow-hover);
  transform: scale(1.08);
}

#themePanel {
  position: fixed;
  bottom: 70px;
  right: 20px;
  background: var(--bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 14px 16px;
  box-shadow: var(--box-shadow-hover);
  z-index: 200;
  display: none;
  min-width: 170px;
  transition: var(--transition);
}

#themePanel.open {
  display: block;
}

.theme-panel-title {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.theme-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.theme-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s;
  width: 100%;
  text-align: left;
}

.theme-opt:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
}

.theme-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.theme-name {
  font-size: 12px;
  font-weight: 500;
}


/* ============================================================
   12. Mentions, Tooltip & Timestamp
   ============================================================ */

.mention {
  padding: 0 3px;
  color: var(--color-accent);
  font-weight: 600;
  background-color: var(--color-accent-soft);
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
  font-size: 0.95em;
  transition: var(--transition);
}

.tooltip {
  position: relative;
}

.tooltip[data-tooltip]:after {
  content: attr(data-tooltip);
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  position: absolute;
  white-space: nowrap;
  z-index: 1002;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background-color: var(--bg-panel);
  padding: 7px 12px;
  color: var(--color-text);
  box-shadow: var(--box-shadow-hover);
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translate(-50%, -6px);
  opacity: 0;
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
  pointer-events: none;
}

.tooltip[data-tooltip]:hover:after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.timestamp {
  background: var(--color-tag-bg);
  border-radius: 4px;
  padding: 1px 5px;
  border: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--color-text-muted);
  transition: var(--transition);
}


/* ============================================================
   13. Boutons génériques
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--color-accent);
  color: #ffffff;
  border: none;
  border-radius: var(--border-radius);
  padding: 8px 18px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--box-shadow);
  transition: filter 0.2s, transform 0.1s, background var(--transition);
  user-select: none;
}

.btn:hover {
  filter: brightness(1.1);
  text-decoration: none;
  color: #ffffff;
}

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

.btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}


/* ============================================================
   14. Statuts (Procès)
   ============================================================ */

.proces-statut {
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.statut-encours { background: var(--color-statut-bg-encours); color: var(--color-statut-text-encours); }
.statut-termine { background: var(--color-statut-bg-termine); color: var(--color-statut-text-termine); }
.statut-archive { background: var(--color-statut-bg-archive); color: var(--color-statut-text-archive); }


/* ============================================================
   15. Responsive
   ============================================================ */

/* Grand écran */
@media (min-width: 1440px) {
  .main-content { max-width: 1280px; }
}

/* Tablette paysage */
@media (max-width: 1024px) {
  .header-inner { padding: 0 20px; gap: 20px; }
  .main-content { padding: 32px 20px 80px; }
  .nav-cards    { grid-template-columns: 1fr 1fr; }
  .bottom-grid  { grid-template-columns: 1fr 1fr; }
}

/* Tablette portrait */
@media (max-width: 768px) {
  .header-inner { height: auto; padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .header-nav   { margin-left: 0; width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .nav-link     { white-space: nowrap; }
  .main-content { padding: 24px 16px 80px; }
  .nav-cards    { grid-template-columns: 1fr; }
  .bottom-grid  { grid-template-columns: 1fr; }
  .hero-title   { font-size: 24px; }
}

/* Téléphone */
@media (max-width: 480px) {
  .brand-title  { font-size: 15px; }
  .brand-sub    { display: none; }
  .hero-title   { font-size: 20px; }
  .hero-desc    { font-size: 13px; }
  .site-footer  { display: none; }
}


/* ============================================================
   16. Nav décorative (non-cliquable)
   ============================================================ */

.header-nav .nav-link:not([href]) {
  cursor: default;
  pointer-events: none;
}


/* ============================================================
   17. Info Grid (pages index-truc)
   ============================================================ */

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.info-body {
  padding-top: 14px;
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.7;
  transition: var(--transition);
}

.info-body p {
  margin: 0 0 12px;
  color: var(--color-text-muted);
}

.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
  transition: var(--transition);
}

.info-list li::before {
  content: '›';
  color: var(--color-accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* Contacts */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition);
}

.contact-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-role {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.contact-name {
  font-size: 14px;
  font-weight: 600;
}

.contact-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Liens directs */
.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-sidebar);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.2s, background var(--transition);
}

.link-item:hover {
  border-color: var(--color-accent);
  text-decoration: none;
}

.link-item-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.link-item-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  flex: 1;
}

.link-item-arrow {
  color: var(--color-accent);
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.6;
}

/* bottom-grid à 1 colonne pour les pages info */
.bottom-grid--single {
  grid-template-columns: 340px;
}

/* ── Responsive info-grid ── */
@media (max-width: 1024px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .info-grid { grid-template-columns: 1fr; }
  .bottom-grid--single { grid-template-columns: 1fr; }
}

/* ============================================================
   18. Site status badge (online / offline / checking)
   ============================================================ */

.site-status {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 1px 7px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.3s, color 0.3s;
  border: 1px solid transparent;
}

.site-status--checking {
  background: var(--color-tag-bg);
  color: var(--color-text-muted);
  border-color: var(--color-border);
  animation: statusPulse 1.2s ease-in-out infinite;
}

.site-status--online {
  background: rgba(67, 181, 129, 0.15);
  color: #43b581;
  border-color: rgba(67, 181, 129, 0.35);
}

.site-status--offline {
  background: rgba(192, 57, 43, 0.12);
  color: #e57373;
  border-color: rgba(192, 57, 43, 0.30);
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1;   }
}

/* Header agrandi 
.site-header {
  override : hauteur augmentée 
}*/

.header-inner {
  height: 76px; /* était 64px */
}

.brand-img {
  height: 48px; /* était 36px */
}


/* ============================================================
   SCROLLBAR
   ============================================================ */

body {
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) transparent;
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 10px;
  transition: filter 0.2s;
}

::-webkit-scrollbar-thumb:hover {
  filter: brightness(1.2);
}


/* ============================================================
   TRANSITIONS DE PAGE
   ============================================================ */

/* Overlay qui couvre toute la page pendant la transition */
#page-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-header);
  pointer-events: none;

  /* État initial : invisible */
  opacity: 0;
  transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

#page-transition-overlay.fade-in {
  opacity: 1;
  pointer-events: all;
}

/* Contenu de la page : sort en douceur */
body.page-leaving #page-transition-overlay {
  opacity: 1;
}

/* Entrée de page : le body arrive avec un léger slide-up */
@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-content {
  animation: pageEnter 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ============================================================
   MODE SOMBRE AUTOMATIQUE (prefers-color-scheme)
   Appliqué uniquement si data-theme="auto" sur <html>
   ============================================================ */

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg-page:       #0e0b0b;
    --bg-card:       #1a1212;
    --bg-header:     #1f0a0a;
    --bg-header-nav: rgba(255,255,255,0.06);
    --bg-panel:      #1a1212;
    --bg-sidebar:    #150e0e;

    --color-text:         #f0e6e6;
    --color-text-muted:   #9a8080;
    --color-accent:       #c0392b;
    --color-accent-hover: #e74c3c;
    --color-accent-soft:  rgba(192,57,43,0.15);
    --color-border:       #3a1f1f;
    --color-tag-bg:       #2a1010;
    --color-tag-text:     #e57373;

    --color-header-text:   #f5e6e6;
    --color-header-sub:    rgba(255,200,200,0.50);
    --color-nav-link:      rgba(255,210,210,0.70);
    --color-nav-active:    #ffffff;
    --color-nav-active-bg: rgba(192,57,43,0.30);

    --color-statut-text-encours: #d4a017;
    --color-statut-bg-encours:   #2a2000;
    --color-statut-text-termine: #aaaaaa;
    --color-statut-bg-termine:   #1e1e1e;
    --color-statut-text-archive: #66bb6a;
    --color-statut-bg-archive:   #0a2010;
  }
}

@media (prefers-color-scheme: light) {
  [data-theme="auto"] {
    --bg-page:       #f5f6fa;
    --bg-card:       #ffffff;
    --bg-header:     #1a237e;
    --bg-header-nav: rgba(255,255,255,0.08);
    --bg-panel:      #ffffff;
    --bg-sidebar:    #f0f2ff;

    --color-text:         #1a1b2e;
    --color-text-muted:   #5c6070;
    --color-accent:       #3f51b5;
    --color-accent-hover: #303f9f;
    --color-accent-soft:  rgba(63,81,181,0.10);
    --color-border:       #dde1f5;
    --color-tag-bg:       #e8eaf6;
    --color-tag-text:     #3f51b5;

    --color-header-text:   #ffffff;
    --color-header-sub:    rgba(255,255,255,0.55);
    --color-nav-link:      rgba(255,255,255,0.75);
    --color-nav-active:    #ffffff;
    --color-nav-active-bg: rgba(255,255,255,0.15);
  }
}


/* ============================================================
   RESPONSIVE — Améliorations mobile
   ============================================================ */

/* Empêche le zoom iOS sur les inputs */
input, select, textarea {
  font-size: 16px;
}

/* Nav scrollable sans barre sur mobile */
.header-nav {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar {
  display: none;
}

/* Info-grid : 1 colonne sur petit écran */
@media (max-width: 600px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .nav-cards {
    grid-template-columns: 1fr;
  }

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

  .bottom-grid--single {
    grid-template-columns: 1fr;
  }

  /* Hero plus compact */
  .hero-title {
    font-size: 22px;
  }

  .hero-eyebrow {
    font-size: 10px;
  }

  /* Boutons d'erreur 404 en colonne */
  .error-actions {
    flex-direction: column;
    align-items: center;
  }

  /* Bloc terminal 404 sur petit écran */
  .error-code-block {
    font-size: 11px;
    padding: 10px 12px;
  }
}

/* Téléphone très petit */
@media (max-width: 360px) {
  .header-inner {
    padding: 0 12px;
    gap: 8px;
  }

  .brand-title {
    font-size: 14px;
  }

  .main-content {
    padding: 20px 12px 80px;
  }

  .panel {
    padding: 14px;
  }

  .contact-role {
    font-size: 9px;
  }
}

/* Touch : agrandir les zones cliquables */
@media (hover: none) {
  .nav-card {
    padding: 16px 14px;
  }

  .link-item {
    padding: 12px 14px;
  }

  .theme-opt {
    padding: 10px 12px;
  }

  #themeBtn {
    width: 46px;
    height: 46px;
  }
}


/* ============================================================
   19. Accordion (Procès & Membres)
   ============================================================ */

.proces-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.proces-item {
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

/* En-tête cliquable */
.proces-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-sidebar);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
  flex-wrap: wrap;
}

.proces-header:hover {
  background: var(--color-accent-soft);
}

.proces-numero {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  min-width: 180px;
  flex-shrink: 0;
}

.proces-parties {
  flex: 1;
  font-size: 14px;
  color: var(--color-text);
  transition: var(--transition);
}

.proces-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-muted);
  min-width: 90px;
  text-align: right;
  flex-shrink: 0;
  transition: var(--transition);
}

/* Flèche */
.proces-arrow {
  color: var(--color-accent);
  transition: transform 0.3s;
  margin-left: auto;
  font-size: 12px;
  flex-shrink: 0;
}

.proces-item.open .proces-arrow {
  transform: rotate(180deg);
}

/* Corps */
.proces-body {
  display: none;
  padding: 16px;
  background: var(--bg-panel);
  border-top: 1px solid var(--color-border);
  flex-direction: column;
  gap: 16px;
  transition: var(--transition);
}

.proces-item.open .proces-body {
  display: flex;
}

/* Sections internes */
.proces-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.proces-section h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 6px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Tableau */
.proces-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.proces-table td {
  padding: 7px 12px;
  color: var(--color-text);
  vertical-align: top;
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.proces-table td:first-child {
  font-weight: 600;
  width: 35%;
  color: var(--color-accent);
  background: var(--bg-sidebar);
  font-family: var(--font-mono);
  font-size: 12px;
  transition: var(--transition);
}

/* Contrôles (tout déplier / tout replier) */
.proces-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

/* Responsive accordéon */
@media (max-width: 768px) {
  .proces-header { gap: 8px; }
  .proces-numero { min-width: unset; width: 100%; }
  .proces-table td:first-child { width: 45%; }
}

@media (max-width: 480px) {
  .proces-table { display: block; }
  .proces-table tr { display: flex; flex-direction: column; margin-bottom: 8px; }
  .proces-table td:first-child { width: 100%; padding-bottom: 2px; }
}


/* ============================================================
   RESPONSIVE+ — Compatibilité universelle tous appareils
   Cascade mobile-first, du plus petit au plus grand.
   Breakpoints couverts :
     320px  — iPhone SE 1ère gen, très vieux Android
     360px  — Android compact (Galaxy A series…)
     375px  — iPhone 6/7/8/SE2/SE3/12 mini
     390px  — iPhone 14/15
     412px  — Galaxy S21/S22, Pixel 6
     480px  — grands téléphones / phablets
     600px  — petites tablettes portrait
     768px  — iPad mini portrait, tablettes 7"
     1024px — iPad 10" paysage, tablettes 10"
     1280px — laptops
     1440px — grands écrans (déjà géré section 15)
   ============================================================ */

/* ── 0. Bases globales ── */

/* Empêche le débordement horizontal sans casser les scrolls internes */
html {
  overflow-x: clip;
}

/* Images & médias toujours fluides */
img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* Safe area : header */
.site-header {
  padding-left:  env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Safe area : footer flottant */
.site-footer {
  bottom: calc(14px + env(safe-area-inset-bottom));
}

/* ── 1. #themeBtn & #themePanel — règle unique, cascade propre ──
   Ordre : base → safe-area (grand écran) → 768px → 600px → 480px → 360px
   Chaque palier surclasse le précédent, pas de conflit. */

/* Base (bureau) */
#themeBtn {
  bottom: calc(20px + env(safe-area-inset-bottom));
  right:  calc(20px + env(safe-area-inset-right));
}
#themePanel {
  bottom: calc(70px + env(safe-area-inset-bottom));
  right:  calc(20px + env(safe-area-inset-right));
  max-width: 220px;
}

/* Tablette portrait ≤ 768px : bouton légèrement remonté */
@media (max-width: 768px) {
  #themeBtn {
    bottom: calc(16px + env(safe-area-inset-bottom));
    right:  calc(16px + env(safe-area-inset-right));
    width: 40px;
    height: 40px;
  }
  #themePanel {
    bottom: calc(64px + env(safe-area-inset-bottom));
    right:  calc(16px + env(safe-area-inset-right));
  }
}

/* Téléphone ≤ 600px : panel centré horizontalement */
@media (max-width: 600px) {
  #themeBtn {
    bottom: calc(14px + env(safe-area-inset-bottom));
    right:  calc(14px + env(safe-area-inset-right));
    width: 40px;
    height: 40px;
    font-size: 17px;
  }
  #themePanel {
    /* Centré sur l'écran, jamais hors bord */
    left:      50%;
    right:     auto;
    transform: translateX(-50%);
    bottom:    calc(62px + env(safe-area-inset-bottom));
    min-width: 190px;
    max-width: calc(100vw - 32px);
  }
}

/* Petit téléphone ≤ 480px */
@media (max-width: 480px) {
  #themeBtn {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
  #themePanel {
    min-width: 180px;
  }
}

/* Très petit ≤ 360px */
@media (max-width: 360px) {
  #themeBtn {
    bottom: calc(10px + env(safe-area-inset-bottom));
    right:  calc(10px + env(safe-area-inset-right));
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  #themePanel {
    bottom: calc(54px + env(safe-area-inset-bottom));
    min-width: 160px;
  }
}

/* ── 2. Footer flottant — évite débordement sur petits écrans ── */
@media (max-width: 400px) {
  .site-footer {
    white-space: normal;
    text-align: center;
    width: calc(100% - 32px);
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
  }
}

/* ── 3. Bottom-grid — colonne gauche fluide entre 769–1024px ── */
@media (max-width: 1024px) and (min-width: 769px) {
  .bottom-grid {
    grid-template-columns: minmax(260px, 340px) 1fr;
  }
}

/* ── 4. Discord panel — hauteur auto sur mobile ── */
@media (max-width: 600px) {
  .panel--discord {
    height: auto;
    min-height: 180px;
  }
}

/* ── 5. Tooltips — jamais hors écran sur mobile ── */
@media (max-width: 600px) {
  .tooltip[data-tooltip]:after {
    white-space: normal;
    max-width: min(240px, 80vw);
    left: 0;
    right: auto;
    transform: none;
  }
  .tooltip[data-tooltip]:hover:after {
    transform: none;
  }
}

/* ── 6. Tableau procès — scroll horizontal sur mobile ── */
@media (max-width: 600px) {
  .proces-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── 7. Accessibilité : focus clavier visible ── */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── 8. Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:        0.01ms !important;
    animation-iteration-count: 1      !important;
    transition-duration:       0.01ms !important;
  }
}

/* ── 9. Impression ── */
@media print {
  .site-header,
  .site-footer,
  #themeBtn,
  #themePanel,
  #page-transition-overlay {
    display: none !important;
  }
  .main-content {
    padding: 20px;
    max-width: 100%;
    animation: none;
  }
  body {
    background: white;
    color: black;
  }
}

/* RESPONSIVE HEADER GRADIENT LINEAR*/

/* Responsive pour la stripe */
.header-stripe {
  margin-top: 0; /* valeur desktop */
}

/* ≤ 768px : tablettes + téléphones */
@media (max-width: 768px) {
  .header-stripe {
    margin-top: 30px;
  }
}

/* ≤ 480px : petits téléphones */
@media (max-width: 480px) {
  .header-stripe {
    margin-top: 35px;
  }
}

/* Search */

.search {
  font-family: var(--font-mono);
  letter-spacing: 1px;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  padding: 0.25px 5px;
  border-radius: var(--border-radius);
  transition: filter 0.2s, transform 0.1s, background var(--transition);
  border: none;
}

.search-btn {
  font-family: var(--font-mono);
  padding: 5px 10px;
  border-radius: var(--border-radius);
  transition: filter 0.2s, transform 0.1s, background var(--transition);
  border: none;
}
