/* ============================================================
   1. VARIABLES & RESET
   Couleurs, ombres, base HTML/body communes à tout le site.
   ============================================================ */
:root {
  --gold: #f3c23c;
  --gold-light: #ffe36a;
  --gold-dark: #b87812;

  --purple: #8b4dff;
  --purple-light: #bd7cff;
  --magenta: #e84cff;
  --cyan: #28dcff;
  --cyan-light: #9af3ff;

  --white: #ffffff;
  --black: #07050d;
  --ink: #181321;
  --muted: #777182;

  --line: rgba(139, 77, 255, 0.22);
  --header-h: 82px;

  --shadow: 0 18px 60px rgba(26, 8, 60, 0.22);
  --cosmic-shadow:
    0 20px 60px rgba(72, 25, 145, 0.18),
    0 0 35px rgba(40, 220, 255, 0.05);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column; /* colonne body -> main -> footer, pour le sticky footer ci-dessous */
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(139,77,255,0.06), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(40,220,255,0.05), transparent 25%),
    var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Sticky footer : main grandit pour remplir l'écran, et son dernier enfant
   (la dernière section de la page) absorbe l'espace restant. Résultat :
   le footer reste toujours collé en bas, même sur une page très courte.
   Attention : ne jamais mettre de <script> en dernier enfant de <main>, sinon
   c'est lui qui "grandit" et le fond blanc du body apparaît sous la section.
   Les scripts de page passent par render_page_end([...]). */
main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

main > *:last-child {
  flex: 1 0 auto;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

/* ============================================================
   2. EN-TÊTE / NAVIGATION
   Le logo est un lien vers l'accueil, rien d'autre. Les actions
   (Jouer / Discord / Compte) vivent dans .header-right. Sur mobile,
   .nav-panel (liens + actions) devient un seul tiroir déroulant.
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(7,5,13,0.94), rgba(12,8,22,0.88));
  border-bottom: 1px solid rgba(139,77,255,0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  background: rgba(7,5,13,0.97);
  box-shadow:
    0 8px 30px rgba(0,0,0,0.32),
    0 1px 0 rgba(139,77,255,0.16);
}

.navbar {
  width: 100%;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  gap: 20px;
}

/* --- Logo : toujours visible, ne sert qu'au retour à l'accueil --- */
.brand {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.brand:hover {
  transform: translateY(-1px) scale(1.03);
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(40,220,255,0.08));
}

/* --- Panneau central : liens de nav + actions. Sur desktop c'est une
   simple ligne flex ; sur mobile (voir media query plus bas) ça devient
   le tiroir qui s'ouvre sous le bandeau. --- */
.nav-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 20px;
  min-width: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  position: relative;
  padding: 12px 16px;
  color: rgba(255,255,255,0.82);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow:
    0 0 6px rgba(243,194,60,0.95),
    0 0 14px rgba(243,194,60,0.75),
    0 0 28px rgba(243,194,60,0.42);
}

.nav-link:hover,
.nav-link.active {
  color: var(--purple-light);
  text-shadow:
    0 0 7px rgba(139, 77, 255,0.75),
    0 0 16px rgba(139, 77, 255,0.35);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  box-shadow:
    0 0 7px rgba(243,194,60,1),
    0 0 16px rgba(243,194,60,0.85),
    0 0 30px rgba(243,194,60,0.50);
}

/* --- Sous-menus (Info / Serveur / Roleplay) --- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown .nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Chevron dessiné en CSS : le caractère "⌄" du HTML est masqué (font-size: 0). Le glyphe
   était placé en bas de sa ligne, et différemment selon la police du client : la rotation
   tournait autour du centre de la boîte de texte, pas de la flèche. Ici le dessin remplit
   exactement la boîte, donc il pivote sur lui-même. */
.arrow {
  flex: 0 0 auto;
  width: 10px;
  height: 6px;
  font-size: 0;
  overflow: hidden;
  background: currentColor;
  clip-path: polygon(0 0, 50% 60%, 100% 0, 100% 40%, 50% 100%, 0 40%);
  transition: transform 0.25s ease;
}

.nav-dropdown:hover .arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  min-width: 210px;
  padding: 8px;
  background: rgba(12, 12, 12, 0.96);
  border: 1px solid rgba(139, 77, 255, 0.28);
  border-radius: 14px;
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.35),
    0 0 25px rgba(214, 163, 45, 0.08);
  backdrop-filter: blur(15px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 100;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.dropdown-menu a {
  position: relative;
  display: block;
  padding: 11px 14px;
  color: rgba(255, 255, 255, 0.75);
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease, padding-left 0.2s ease;
}

.dropdown-menu a::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 10px;
  background: var(--gold);
  transform: translateY(-50%);
  transition: height 0.2s ease;
}

.dropdown-menu a:hover {
  color: var(--purple-light);
  background: rgba(139, 77, 255,0.07);
  padding-left: 20px;
  text-shadow: 0 0 10px rgba(139, 77, 255,0.35);
}

.dropdown-menu a:hover::before {
  height: 18px;
}

/* --- Actions à droite : Jouer, Discord, Compte (dans cet ordre) --- */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.play-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 112px;
  height: 44px;
  padding: 0 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 227, 106, 0.72);
  border-radius: 13px;
  color: #160d00;
  background: linear-gradient(135deg, #f0b72f, #ffe36a 52%, #e9a91d);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 8px 24px rgba(243,194,60,0.22),
    inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.play-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,0.55) 45%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 0.55s ease;
}

.play-button:hover {
  transform: translateY(-2px) scale(1.025);
  background: linear-gradient(135deg, #ffe36a, #f5c33c);
  box-shadow:
    0 10px 30px rgba(243,194,60,0.36),
    0 0 26px rgba(232,76,255,0.10);
}

.play-button:hover::before {
  transform: translateX(130%);
}

.play-button:active {
  transform: translateY(0) scale(0.99);
}

.play-icon,
.play-button > span:last-child {
  position: relative;
  z-index: 1;
}

.play-icon {
  font-size: 0.68rem;
}

.discord-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  color: rgba(255, 255, 255, 0.88);
  background: linear-gradient(135deg, rgba(139,77,255,0.12), rgba(40,220,255,0.05));
  border: 1px solid rgba(139, 77, 255, 0.24);
  border-radius: 11px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.discord-header:hover {
  color: var(--black);
  background: linear-gradient(135deg, rgba(139,77,255,0.92), rgba(40,220,255,0.82));
  border-color: rgba(40,220,255,0.55);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139,77,255,0.25);
}

.discord-symbol {
  font-size: 0.95rem;
  transition: transform 0.25s ease;
}

.discord-header:hover .discord-symbol {
  transform: rotate(12deg) scale(1.1);
}

/* Bouton Compte / Connexion : même gabarit que Discord, teinte dorée pour
   le distinguer. Le texte/lien changent selon l'état de connexion — voir
   site.js (pages statiques) ou src/core/layout.php (pages PHP, rendu
   directement côté serveur via data-rendered="server"). */
.account-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  color: rgba(255, 255, 255, 0.88);
  background: linear-gradient(135deg, rgba(214,163,45,0.16), rgba(255,227,106,0.05));
  border: 1px solid rgba(214, 163, 45, 0.32);
  border-radius: 11px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.account-header:hover {
  color: var(--black);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(214,163,45,0.25);
}

.account-icon {
  font-size: 0.95rem;
}

/* --- Bouton hamburger (mobile uniquement, voir media query plus bas) --- */
.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 10px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 5px 0;
  border-radius: 99px;
  background: var(--white);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* --- En-tête / nav : version mobile ---
   En dessous de 820px, .nav-panel quitte la ligne du bandeau et devient
   un tiroir déroulant (ouvert/fermé via le hamburger). Les liens et les
   actions (Jouer/Discord/Compte) s'y empilent verticalement. Les sous-menus
   (Info/Serveur/Roleplay) ne dépendent plus du survol (inutilisable au
   doigt) : un tap sur la flèche les déplie en accordéon (voir site.js). */
@media (max-width: 820px) {
  :root {
    --header-h: 68px;
  }

  .container {
    width: min(100% - 28px, 1160px);
  }

  .navbar {
    padding: 0 14px;
  }

  .brand {
    width: 44px;
    height: 44px;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-panel {
    position: absolute;
    left: 14px;
    right: 14px;
    top: calc(100% + 10px);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(12,8,22,0.98), rgba(19,11,32,0.98));
    border-color: rgba(139,77,255,0.18);
    box-shadow:
      0 20px 50px rgba(0,0,0,0.35),
      0 0 30px rgba(139,77,255,0.08);
    max-height: calc(100svh - var(--header-h) - 24px);
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav-panel.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-link {
    padding: 13px 14px;
    border-radius: 12px;
  }

  .nav-link::after {
    left: 8px;
    right: auto;
    bottom: 9px;
    width: 34px;
    height: 3px;
  }

  .nav-link:hover,
  .nav-link.active {
    color: var(--cyan-light);
    background: rgba(40,220,255,0.07);
    text-shadow: 0 0 10px rgba(40,220,255,0.45);
  }

  /* Sous-menus en accordéon plutôt qu'en survol flottant */
  .dropdown-menu {
    position: static;
    min-width: 0;
    margin: 0 0 4px 10px;
    padding: 0;
    background: none;
    border: 0;
    border-left: 2px solid rgba(139,77,255,0.25);
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;

    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
  }

  .dropdown-menu > * {
    min-height: 0;
  }

  .nav-dropdown.open .dropdown-menu {
    grid-template-rows: 1fr;
  }

  .dropdown-menu a {
    padding: 10px 14px;
    font-size: 0.86rem;
  }

  .arrow {
    margin-left: auto;
  }

  .nav-dropdown.open .arrow {
    transform: rotate(180deg);
  }

  /* Actions (Jouer/Discord/Compte) : empilées en pleine largeur en bas du tiroir */
  .header-right {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .play-button,
  .discord-header,
  .account-header {
    width: 100%;
    min-width: 0;
  }

  .hero-content {
    padding-top: calc(var(--header-h) + 30px);
  }

  .section {
    padding: 78px 0;
  }
}

/* Au-dessus de 820px : nav desktop classique, tiroir mobile désactivé. */
@media (min-width: 821px) {
  .menu-toggle {
    display: none !important;
  }

  .nav-panel {
    position: static;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    max-height: none;
    overflow: visible;
  }
}

/* ============================================================
   3. BOUTONS GÉNÉRIQUES (.btn)
   Boutons d'appel à l'action utilisés dans les sections (pas le header).
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

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

.btn-primary {
  color: var(--black);
  background: var(--gold);
  box-shadow: 0 10px 32px rgba(214,163,45,0.28);
}

.btn-primary:hover {
  background: var(--gold-light);
  box-shadow: 0 14px 42px rgba(214,163,45,0.38);
}

/* Variante de .btn-primary pour les fonds clairs (sections .light) */
.btn-primary-light {
  color: var(--white);
  background: var(--purple);
  box-shadow: 0 10px 32px rgba(139,77,255,0.28);
}

.btn-primary-light:hover {
  background: var(--purple-light);
  box-shadow: 0 14px 42px rgba(139,77,255,0.38);
}

.btn-ghost {
  color: var(--white);
  background: linear-gradient(135deg, rgba(139,77,255,0.08), rgba(40,220,255,0.04));
  border-color: rgba(255,255,255,0.18);
}

.btn-ghost:hover {
  border-color: rgba(139,77,255,0.72);
  background: rgba(214,163,45,0.12);
}

.btn-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.20);
}

.btn-secondary:hover {
  color: var(--black);
  background: var(--gold-light);
  border-color: var(--gold);
  box-shadow: 0 12px 35px rgba(214, 163, 45, 0.30);
}

/* ============================================================
   4. HERO
   Bannière plein écran en tête de page (accueil, présentation, communication...).
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(72,25,145,0.20), transparent 38%),
    #07050d;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -15%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 32%, rgba(232,76,255,0.10), transparent 18%),
    radial-gradient(circle at 28% 55%, rgba(40,220,255,0.07), transparent 22%),
    radial-gradient(circle at 74% 58%, rgba(139,77,255,0.10), transparent 24%);
  filter: blur(18px);
  opacity: 0.9;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("/assets/images/landing-sec-bg.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
  z-index: -3;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 42%, rgba(139,77,255,0.12), transparent 42%),
    linear-gradient(90deg, rgba(7,5,13,0.76) 0%, rgba(7,5,13,0.22) 52%, rgba(7,5,13,0.72) 100%),
    linear-gradient(180deg, rgba(7,5,13,0.30) 0%, rgba(7,5,13,0.04) 45%, rgba(7,5,13,0.78) 100%);
}

.hero-content {
  padding: calc(var(--header-h) + 56px) 0 90px;
  text-align: center;
  color: var(--white);
}

.title-logo {
  width: min(690px, 80vw);
  margin: 0 auto 24px;
  filter:
    drop-shadow(0 14px 28px rgba(0,0,0,0.50))
    drop-shadow(0 0 28px rgba(139,77,255,0.16))
    drop-shadow(0 0 18px rgba(40,220,255,0.08));
  animation: floatLogo 5.5s ease-in-out infinite;
}

.hero-kicker {
  margin: 0 0 10px;
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.hero h1 {
  max-width: 850px;
  margin: 0 auto;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 48%, #ffdc55);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 28px rgba(139,77,255,0.16);
}

.hero-text {
  max-width: 700px;
  margin: 20px auto 0;
  color: rgba(255,255,255,0.82);
  font-size: clamp(1rem, 2vw, 1.16rem);
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.72);
  display: grid;
  justify-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-cue i {
  width: 18px;
  height: 28px;
  border: 1px solid rgba(139,77,255,0.48);
  border-radius: 999px;
  position: relative;
  box-shadow: 0 0 18px rgba(139,77,255,0.08);
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--purple);
  animation: scrollDot 1.8s ease-in-out infinite;
}

@media (max-width: 820px) {
  .title-logo {
    width: min(620px, 94vw);
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 3.4rem);
  }

  .hero-text {
    font-size: 0.98rem;
  }
}

/* ============================================================
   5. SECTIONS GÉNÉRIQUES
   Fond clair/sombre partagé par toutes les pages de contenu.
   ============================================================ */
.section {
  position: relative;
  padding: 110px 0;
}

.light {
  background:
    radial-gradient(circle at 20% 15%, rgba(139,77,255,0.08), transparent 30%),
    var(--white);
}

.dark {
  color: var(--white);
  background:
    radial-gradient(circle at 75% 15%, rgba(214,163,45,0.12), transparent 30%),
    #101010;
}

/* Variante sans halo pour les sections courtes qui s'enchaînent (staff.html) :
   un halo répété sur plusieurs petites sections d'affilée crée des taches
   visibles au lieu d'un dégradé propre. */
.dark-flat {
  color: var(--white);
  background:
    radial-gradient(circle 260px at 50% 50%, rgba(214,163,45,0.08), transparent),
    #0c0c0c;
}

.staff-page .section + .section {
  border-top: 1px solid rgba(214,163,45,0.10);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.dark .eyebrow,
.dark-flat .eyebrow {
  color: var(--gold-light);
}

.section h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.lead {
  color: rgba(255,255,255,0.72);
  max-width: 650px;
  font-size: 1.05rem;
  margin: 20px 0 0;
}

@media (max-width: 820px) {
  .section {
    padding: 78px 0;
  }
}

/* ============================================================
   6. COMPOSANTS DE CONTENU
   Cartes, tags, mises en page en colonnes réutilisées sur les pages.
   ============================================================ */
.section-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;
}

.section-heading {
  padding: 12px 30px 12px 0;
}

.section-heading > p:not(.eyebrow) {
  color: var(--muted);
  max-width: 620px;
  margin: 18px 0 0;
}

.feature-card {
  padding: 28px;
  border: 1px solid rgba(24,24,24,0.08);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(248,245,255,0.90));
  box-shadow:
    0 18px 44px rgba(45,18,90,0.08),
    0 0 0 1px rgba(139,77,255,0.025);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.feature-card:hover {
  transform: translateY(-7px);
  border-color: rgba(139,77,255,0.38);
  box-shadow:
    0 18px 44px rgba(45,18,90,0.10),
    0 0 28px rgba(139,77,255,0.08);
}

.card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(139,77,255,0.15), rgba(40,220,255,0.08));
  border: 1px solid rgba(139,77,255,0.14);
  color: var(--purple);
  box-shadow: 0 0 24px rgba(139,77,255,0.06);
  font-size: 1.2rem;
  margin-bottom: 26px;
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.split-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.tag-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 26px 0 30px;
}

.tag {
  padding: 8px 12px;
  border: 1px solid rgba(139,77,255,0.30);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(139,77,255,0.10), rgba(40,220,255,0.05));
  color: #6f36c9;
  font-size: 0.82rem;
  font-weight: 800;
}

.dark .tag,
.dark-flat .tag {
  color: var(--gold-light);
}

.roleplay-quote {
  position: relative;
  padding: 34px 34px 34px 44px;
  border-left: 4px solid var(--gold);
  background: rgba(214,163,45,0.07);
  border-radius: 0 22px 22px 0;
}

.roleplay-quote span {
  position: absolute;
  left: 18px;
  top: 16px;
  color: var(--gold);
  font-size: 3rem;
  line-height: 1;
}

.roleplay-quote p {
  margin: 0;
  font-weight: 700;
}

/* Section avec image de fond (ex. section Roleplay de la page Présentation) */
.roleplay-bg-section {
  position: relative;
  overflow: hidden;
}

.roleplay-bg-section .section-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("/assets/images/world-admin-shop.jpg");
  background-position: center;
  background-size: cover;
}

.roleplay-bg-section .section-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(10,10,10,0.84);
}

.roleplay-bg-section .container {
  position: relative;
  z-index: 2;
}

#roleplay .btn {
  margin-top: 26px;
}

/* --- Page Présentation (info/deitycube.html) --- */
.hero-info .hero-bg {
  background-image: url("/assets/images/world-panorama.jpg");
}

.hero-info .hero-content {
  max-width: 780px;
}

.hero-info .roleplay-quote {
  max-width: 620px;
  margin: 26px auto 0;
  text-align: left;
}

.hero-info .roleplay-quote p {
  color: rgba(255,255,255,0.92);
  font-style: italic;
}

.hero-info .roleplay-quote cite {
  display: block;
  margin-top: 10px;
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 800;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.photo-panel {
  position: relative;
  min-height: 340px;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(214,163,45,0.18);
  box-shadow: var(--shadow);
}

.photo-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Cartes d'équipe (page Présentation + page Staff) --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 44px;
}

.team-single {
  max-width: 360px;
  margin: 44px auto 0;
}

.team-stack {
  max-width: 360px;
  margin: 44px auto 0;
  display: grid;
  gap: 20px;
}

.team-card {
  padding: 30px 26px;
  border: 1px solid rgba(214,163,45,0.16);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  text-align: center;
}

.deity-title {
  display: block;
  margin-bottom: 8px;
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.team-card h3 {
  padding-top: 16px;
  margin: 0 0 8px;
  font-size: 1.3rem;
  color: var(--white);
}

.team-card p {
  margin: 0;
  color: rgba(255,255,255,0.66);
  font-size: 0.92rem;
}

.team-card.vacant {
  border-style: dashed;
  border-color: rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.02);
}

.team-card.vacant h3 {
  color: rgba(255,255,255,0.55);
  font-style: italic;
}

.team-note {
  max-width: 620px;
  margin: 22px auto 0;
  color: rgba(255,255,255,0.58);
  font-size: 0.88rem;
  text-align: center;
}

.team-more {
  display: flex;
  width: fit-content;
  margin: 34px auto 0;
}

/* --- Galerie photo (grille façon mosaïque, réutilisée par les annonces) --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 190px;
  gap: 14px;
  margin-top: 44px;
}

.gallery-item {
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(24,24,24,0.08);
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

@media (max-width: 980px) {
  .section-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-heading {
    grid-column: 1 / -1;
    padding-right: 0;
  }

  .split-layout {
    grid-template-columns: 1fr;
    gap: 38px;
  }

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

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item.wide {
    grid-column: span 2;
  }
}

@media (max-width: 820px) {
  .section-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    grid-column: auto;
  }

  .feature-card {
    padding: 24px;
  }
}

@media (max-width: 650px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }

  .gallery-item.tall,
  .gallery-item.wide {
    grid-row: span 1;
    grid-column: span 1;
  }
}

/* --- Page Téléchargement (serveur/telechargement.html, liens remplis par telechargement.js) --- */
.hero-download .hero-bg {
  background-image: url("/assets/images/world-panorama-montagne.jpg");
}

.download-meta {
  margin: 16px 0 0;
  color: rgba(255,255,255,0.62);
  font-size: 0.88rem;
}

/* Étapes : le numéro remplace l'icône, le lien reste en bas de carte quelle que soit la hauteur du texte. */
.step-card {
  display: flex;
  flex-direction: column;
}

.step-card .card-icon {
  font-weight: 900;
}

.step-link {
  margin-top: auto;
  padding-top: 18px;
  color: #6f36c9;
  font-size: 0.9rem;
  font-weight: 800;
}

.step-link:hover {
  color: var(--purple);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 44px;
}

/* Sous-grille : les 7 blocs de chaque carte (en-tête, titre, compatibilité, fichier, bouton,
   instructions, empreinte) partagent les mêmes lignes d'une carte à l'autre, pour que les boutons
   restent alignés même quand un texte passe sur deux lignes. */
.download-card {
  display: grid;
  grid-row: span 7;
  grid-template-rows: subgrid;
  row-gap: 0;
  padding: 28px 26px;
  border: 1px solid rgba(214,163,45,0.16);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  transition: border-color 0.28s ease, box-shadow 0.28s ease;
}

.download-card.recommended {
  border-color: rgba(243,194,60,0.55);
  box-shadow: 0 0 36px rgba(214,163,45,0.14);
}

.download-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.download-card .card-icon {
  margin-bottom: 22px;
  color: var(--gold-light);
  background: rgba(214,163,45,0.10);
  border-color: rgba(214,163,45,0.22);
}

.download-card h3 {
  margin: 0;
  font-size: 1.3rem;
}

.download-compat {
  margin: 4px 0 0;
  color: rgba(255,255,255,0.62);
  font-size: 0.9rem;
}

.download-file {
  margin: 18px 0 0;
  color: rgba(255,255,255,0.78);
  font-size: 0.82rem;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}

.download-button {
  margin-top: 14px;
}

/* Pas de href tant que le manifeste n'est pas chargé (ou plateforme absente) : bouton inactif. */
.download-button:not([href]) {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.download-help {
  margin: 16px 0 0;
  color: rgba(255,255,255,0.62);
  font-size: 0.86rem;
}

.download-command {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.35);
  color: var(--cyan-light);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.download-hash {
  align-self: end;
  padding-top: 18px;
  font-size: 0.82rem;
}

.download-hash summary {
  cursor: pointer;
  color: rgba(255,255,255,0.62);
  font-weight: 700;
}

.download-hash summary:hover {
  color: var(--gold-light);
}

.download-hash code {
  display: block;
  margin-top: 8px;
  color: rgba(255,255,255,0.78);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

/* visibility plutôt que display:none : un bloc retiré décalerait les lignes de la sous-grille. */
.download-card.unavailable .download-file,
.download-card.unavailable .download-hash {
  visibility: hidden;
}

.download-status {
  margin: 26px 0 0;
  padding: 14px 18px;
  border: 1px solid rgba(214,163,45,0.30);
  border-radius: 14px;
  background: rgba(214,163,45,0.08);
  color: rgba(255,255,255,0.86);
}

.download-note {
  max-width: 720px;
  margin: 30px 0 0;
  color: rgba(255,255,255,0.58);
  font-size: 0.88rem;
}

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 860px;
  margin-top: 40px;
}

.faq-list details {
  border: 1px solid rgba(24,24,24,0.08);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(248,245,255,0.90));
  box-shadow: 0 12px 32px rgba(45,18,90,0.06);
  transition: border-color 0.28s ease;
}

.faq-list details[open] {
  border-color: rgba(139,77,255,0.32);
}

.faq-list summary {
  position: relative;
  padding: 18px 52px 18px 22px;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--purple);
  font-size: 1.3rem;
  font-weight: 700;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--muted);
}

.faq-list a {
  color: #6f36c9;
  font-weight: 700;
}

.faq-list code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(139,77,255,0.08);
  color: var(--ink);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

/* ============================================================
   7. ANNONCES
   Filtres, cartes du journal, mosaïque "à la une".
   ============================================================ */
.hero-communication,
.hero-devlog {
  background: #07050d;
}

.hero-communication .hero-bg {
  background-image: url("/assets/images/world-savane.jpg");
}

.hero-devlog .hero-bg {
  background-image: url("/assets/images/world-nain-table.jpg");
}

.hero-communication .hero-overlay,
.hero-devlog .hero-overlay {
  background:
    linear-gradient(90deg, rgba(7,5,13,0.76) 0%, rgba(7,5,13,0.22) 52%, rgba(7,5,13,0.72) 100%),
    linear-gradient(180deg, rgba(7,5,13,0.30) 0%, rgba(7,5,13,0.04) 45%, rgba(7,5,13,0.78) 100%);
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.filter-pill {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.72);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter-pill:hover {
  border-color: rgba(214,163,45,0.4);
  color: var(--white);
}

.filter-pill.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
}

.announcements-feed {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.announcement-card {
  border: 1px solid rgba(214,163,45,0.14);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  overflow: hidden;
}

.announcement-body {
  padding: 26px 28px;
}

.announcement-image {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.announcement-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.82rem;
}

.announcement-meta time {
  color: rgba(255,255,255,0.5);
}

.announcement-tag {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-annonce {
  background: rgba(214,163,45,0.16);
  color: var(--gold-light);
}

.tag-evenement {
  background: rgba(232,76,255,0.16);
  color: var(--magenta);
}

.tag-maintenance {
  background: rgba(40,220,255,0.14);
  color: var(--cyan-light);
}

/* Catégories du devlog */
.tag-serveur {
  background: rgba(139,77,255,0.18);
  color: var(--purple-light);
}

.tag-mods {
  background: rgba(96,220,130,0.14);
  color: #8ff0a8;
}

.tag-site {
  background: rgba(40,220,255,0.14);
  color: var(--cyan-light);
}

.tag-roleplay {
  background: rgba(232,76,255,0.16);
  color: var(--magenta);
}

.announcement-card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: var(--white);
}

.announcement-card p {
  margin: 0;
  color: rgba(255,255,255,0.68);
  font-size: 0.95rem;
  line-height: 1.6;
}

.announcement-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.announcement-link {
  color: var(--gold-light);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.announcement-link:hover {
  border-color: var(--gold-light);
}

.announcement-copy {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: transparent;
  color: rgba(255,255,255,0.62);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.announcement-copy:hover {
  border-color: rgba(214,163,45,0.5);
  color: var(--white);
}

.announcement-copy.copied {
  border-color: var(--gold);
  background: rgba(214,163,45,0.14);
  color: var(--gold-light);
}

.announcements-empty {
  margin-top: 34px;
  padding: 40px;
  text-align: center;
  color: rgba(255,255,255,0.5);
  border: 1px dashed rgba(255,255,255,0.16);
  border-radius: 20px;
}

/* --- Mosaïque "à la une" (recyclée du gabarit .gallery-grid) --- */
.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 190px;
  gap: 14px;
  margin-top: 44px;
}

.mosaic-item {
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(214,163,45,0.14);
  color: var(--white);
}

.mosaic-item.featured {
  grid-column: span 2;
  grid-row: span 2;
}

.mosaic-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

a.mosaic-item:hover img {
  transform: scale(1.06);
}

.mosaic-fallback-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0.10), transparent), #101010;
}

.mosaic-item.tag-annonce .mosaic-fallback-bg {
  background: linear-gradient(160deg, rgba(214,163,45,0.35), #101010);
}

.mosaic-item.tag-evenement .mosaic-fallback-bg {
  background: linear-gradient(160deg, rgba(232,76,255,0.30), #101010);
}

.mosaic-item.tag-maintenance .mosaic-fallback-bg {
  background: linear-gradient(160deg, rgba(40,220,255,0.28), #101010);
}

.mosaic-item.tag-serveur .mosaic-fallback-bg {
  background: linear-gradient(160deg, rgba(139,77,255,0.34), #101010);
}

.mosaic-item.tag-mods .mosaic-fallback-bg {
  background: linear-gradient(160deg, rgba(96,220,130,0.26), #101010);
}

.mosaic-item.tag-site .mosaic-fallback-bg {
  background: linear-gradient(160deg, rgba(40,220,255,0.28), #101010);
}

.mosaic-item.tag-roleplay .mosaic-fallback-bg {
  background: linear-gradient(160deg, rgba(232,76,255,0.30), #101010);
}

.mosaic-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.20) 60%, transparent 100%);
}

.mosaic-content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px 18px;
  z-index: 2;
}

.mosaic-content .announcement-tag {
  margin-bottom: 8px;
}

.mosaic-content h3 {
  margin: 0 0 4px;
  font-size: 1.02rem;
  line-height: 1.25;
}

.mosaic-item.featured .mosaic-content h3 {
  font-size: 1.5rem;
}

.mosaic-content time {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.68);
}

@media (max-width: 980px) {
  .mosaic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 650px) {
  .mosaic-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }

  .mosaic-item.featured {
    grid-column: span 1;
    grid-row: span 1;
  }
}

.announcement-edit {
  margin-left: auto;
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem;
  font-weight: 700;
}

.announcement-edit:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

/* --- Formulaire de publication (rôles autorisés uniquement) --- */
.annonce-editor-section {
  padding: 56px 0 0;
}

.annonce-editor {
  border: 1px solid rgba(214,163,45,0.24);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(214,163,45,0.07), rgba(255,255,255,0.02));
}

.annonce-editor summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  padding: 22px 28px;
  cursor: pointer;
  list-style: none;
}

.annonce-editor summary::-webkit-details-marker {
  display: none;
}

.annonce-editor summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
  font-weight: 900;
  transition: transform 0.2s ease;
}

.annonce-editor[open] summary::before {
  transform: rotate(45deg);
}

.annonce-editor-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--white);
}

.annonce-editor-hint {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.5);
}

.annonce-form {
  padding: 0 28px 28px;
}

.annonce-delete-form {
  margin: 0 28px;
  padding: 22px 0 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.annonce-editor button.btn {
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

/* .account-field est en display:grid, qui l'emporterait sinon sur l'attribut hidden. */
.annonce-form [hidden] {
  display: none;
}

.annonce-form .account-field select,
.annonce-form .account-field textarea {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: var(--white);
  font-size: 1rem;
  font-family: inherit;
}

.annonce-form .account-field select {
  min-height: 48px;
}

.annonce-form .account-field select option {
  background: #161616;
}

.annonce-form .account-field textarea {
  resize: vertical;
  line-height: 1.55;
}

.annonce-form .account-field select:focus,
.annonce-form .account-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(214,163,45,0.18);
}

.annonce-form .account-hint code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: var(--gold-light);
  font-size: 0.82rem;
}

.annonce-format {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.annonce-format legend,
.annonce-field-label {
  margin-bottom: 8px;
  padding: 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.annonce-choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.annonce-choice:has(input:checked) {
  border-color: var(--gold);
  background: rgba(214,163,45,0.10);
}

.annonce-choice input,
.annonce-checkbox input {
  margin-top: 2px;
}

.annonce-choice strong {
  display: block;
  color: var(--white);
}

.annonce-choice small,
.annonce-checkbox small {
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem;
}

.annonce-form-row {
  display: grid;
  grid-template-columns: minmax(0, 260px) 1fr;
  align-items: end;
  gap: 18px 24px;
}

.annonce-checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 48px;
  padding-top: 10px;
  color: rgba(255,255,255,0.82);
  font-size: 0.92rem;
  cursor: pointer;
}

.annonce-current-image {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.annonce-current-image img {
  width: 180px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
}

/* Ces libellés sont dans un .account-field : on annule le style des intitulés de champ. */
.annonce-form .account-field .annonce-checkbox,
.annonce-form .account-field .account-file-button {
  font-size: 0.92rem;
  letter-spacing: 0;
  color: rgba(255,255,255,0.82);
}

.annonce-form .account-field .annonce-checkbox {
  min-height: 0;
  padding-top: 0;
  font-weight: 400;
  align-items: center;
}

.annonce-form .account-field .annonce-checkbox input {
  margin-top: 0;
}

.annonce-form .account-file-button {
  justify-self: start;
}

.annonce-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

@media (max-width: 650px) {
  .annonce-editor summary {
    padding: 18px 20px;
  }

  .annonce-form {
    padding: 0 20px 22px;
  }

  .annonce-delete-form {
    margin: 0 20px;
  }

  .annonce-format,
  .annonce-form-row {
    grid-template-columns: 1fr;
  }
}

/* --- Page dédiée d'un article (/info/communication/<slug>) --- */
.article-page {
  padding-top: calc(var(--header-h) + 70px);
}

.article-container {
  max-width: 760px;
}

.article-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.article-meta {
  flex-wrap: wrap;
  margin-top: 26px;
}

.article-author {
  color: rgba(255,255,255,0.5);
}

.article-title {
  margin: 14px 0 26px;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.article-image {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  margin-bottom: 30px;
  border-radius: 20px;
  border: 1px solid rgba(214,163,45,0.14);
}

.article-body {
  color: rgba(255,255,255,0.78);
  font-size: 1.05rem;
  line-height: 1.75;
}

.article-body p,
.article-body ul {
  margin: 0 0 1.1em;
}

.article-body h2,
.article-body h3 {
  margin: 1.6em 0 0.6em;
  color: var(--white);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.article-body h2 {
  font-size: 1.6rem;
}

.article-body h3 {
  font-size: 1.25rem;
}

.article-body ul {
  padding-left: 1.3em;
}

.article-body li + li {
  margin-top: 0.35em;
}

.article-body li::marker {
  color: var(--gold);
}

.article-body strong {
  color: var(--white);
}

.article-body a {
  color: var(--gold-light);
  text-decoration: underline;
}

/* ============================================================
   7 bis. MODPACK
   Présentation (/serveur/modpack), patchnotes, liste des mods et mods DeityCube.
   ============================================================ */
.hero-modpack .hero-bg {
  background-image: url("/assets/images/world-oasis1.jpg");
}

.hero-patchnotes .hero-bg {
  background-image: url("/assets/images/world-tour-aurore-boreale.jpg");
}

.hero-mods .hero-bg {
  background-image: url("/assets/images/world-bambou-creeper.jpg");
}

.hero-mods-deitycube .hero-bg {
  background-image: url("/assets/images/world-rp-taverne.jpg");
}

/* Les pages de liste n'ont pas besoin d'un hero plein écran. */
.hero-patchnotes,
.hero-mods,
.hero-mods-deitycube {
  min-height: 62svh;
}

/* Rubrique Roleplay (/roleplay) : page d'attente, en attendant les pages de la rubrique. */
.hero-roleplay .hero-bg {
  background-image: url("/assets/images/world-oasis2.jpg");
}

.modpack-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 22px 0 0;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

/* Pastilles d'état : canal d'une version, avancement d'un mod DeityCube. */
.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.86);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-alpha,
.status-mod-conception {
  background: rgba(232,76,255,0.16);
  color: #f2a6ff;
}

.status-beta,
.status-mod-developpement {
  background: rgba(40,220,255,0.14);
  color: var(--cyan-light);
}

.status-mod-test {
  background: rgba(214,163,45,0.16);
  color: var(--gold-light);
}

.status-stable,
.status-mod-disponible {
  background: rgba(96,220,130,0.14);
  color: #8ff0a8;
}

/* --- Présentation --- */
.modpack-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 44px;
}

.modpack-feature {
  padding: 28px 26px;
  border: 1px solid rgba(214,163,45,0.16);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.modpack-feature .card-icon {
  margin-bottom: 20px;
  color: var(--gold-light);
  background: rgba(214,163,45,0.10);
  border-color: rgba(214,163,45,0.22);
}

.modpack-feature h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.modpack-feature p {
  margin: 0;
  color: rgba(255,255,255,0.66);
  font-size: 0.94rem;
}

.modpack-more {
  max-width: 720px;
  margin: 34px 0 0;
  color: rgba(255,255,255,0.66);
}

.modpack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.modpack-profiles {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 40px;
}

.modpack-future .section-bg {
  background-image: url("/assets/images/world-panorama.jpg");
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: roadmap;
}

.roadmap-item {
  position: relative;
  padding: 24px 24px 24px 66px;
  border: 1px solid rgba(214,163,45,0.20);
  border-radius: 18px;
  background: rgba(10,10,10,0.55);
  counter-increment: roadmap;
}

.roadmap-item::before {
  content: counter(roadmap);
  position: absolute;
  left: 22px;
  top: 22px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(214,163,45,0.5);
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: 900;
}

.roadmap-item h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
}

.roadmap-item p {
  margin: 0;
  color: rgba(255,255,255,0.66);
  font-size: 0.92rem;
}

/* --- Patchnotes : liste des versions --- */
.patchnote-timeline {
  display: grid;
  gap: 18px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.patchnote-entry {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
}

.patchnote-entry-version {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-top: 22px;
}

.patchnote-number {
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}

.patchnote-entry-version time {
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
}

.patchnote-card {
  display: block;
  padding: 24px 28px;
  border: 1px solid rgba(214,163,45,0.14);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.patchnote-card:hover {
  border-color: rgba(214,163,45,0.45);
  transform: translateY(-3px);
}

.patchnote-entry.latest .patchnote-card {
  border-color: rgba(243,194,60,0.45);
  box-shadow: 0 0 36px rgba(214,163,45,0.10);
}

.patchnote-latest-label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.patchnote-card h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.patchnote-card p {
  margin: 0;
  color: rgba(255,255,255,0.68);
}

.patchnote-read {
  display: inline-block;
  margin-top: 14px;
  color: var(--gold-light);
  font-size: 0.86rem;
  font-weight: 800;
}

.change-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.change-chip {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.72);
  font-size: 0.78rem;
  font-weight: 700;
}

.chip-added { background: rgba(96,220,130,0.14); color: #8ff0a8; }
.chip-updated { background: rgba(40,220,255,0.12); color: var(--cyan-light); }
.chip-removed { background: rgba(255,107,107,0.14); color: #ff9c9c; }
.chip-config { background: rgba(214,163,45,0.14); color: var(--gold-light); }

/* --- Patchnote d'une version --- */
.patchnote-container {
  max-width: 860px;
}

.patchnote-kicker {
  margin: 22px 0 0;
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.patchnote-page .article-title {
  margin-top: 8px;
  margin-bottom: 14px;
}

.patchnote-summary {
  margin: 0;
  color: rgba(255,255,255,0.78);
  font-size: 1.15rem;
  line-height: 1.6;
}

.patchnote-chips {
  margin: 22px 0 6px;
}

.patchnote-notes {
  margin-top: 34px;
}

.patchnote-empty {
  margin: 30px 0 0;
  padding: 16px 20px;
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 14px;
  color: rgba(255,255,255,0.55);
  font-size: 0.92rem;
}

.patchnote-auto {
  margin-top: 46px;
  padding-top: 34px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.patchnote-auto h2 {
  margin: 0;
  font-size: 1.6rem;
}

.patchnote-auto-intro {
  margin: 8px 0 0;
  color: rgba(255,255,255,0.58);
  font-size: 0.92rem;
}

.patchnote-auto-intro a {
  color: var(--gold-light);
}

.change-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 30px 0 12px;
  font-size: 1.1rem;
}

.change-heading span {
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
}

.heading-added span { background: rgba(96,220,130,0.14); color: #8ff0a8; }
.heading-updated span { background: rgba(40,220,255,0.12); color: var(--cyan-light); }
.heading-removed span { background: rgba(255,107,107,0.14); color: #ff9c9c; }

.change-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 6px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.change-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.82);
  font-size: 0.94rem;
}

.change-version {
  color: rgba(255,255,255,0.5);
  font-size: 0.84rem;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}

.change-configs {
  margin-top: 30px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
}

.change-configs summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 800;
}

.change-configs summary span {
  padding: 1px 9px;
  border-radius: 999px;
  background: rgba(214,163,45,0.14);
  color: var(--gold-light);
  font-size: 0.78rem;
}

.change-configs-label {
  margin: 4px 20px 6px;
  color: rgba(255,255,255,0.55);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.change-configs ul {
  margin: 0 0 14px;
  padding: 0 20px 0 38px;
  color: rgba(255,255,255,0.7);
  font-size: 0.84rem;
}

.change-configs code {
  overflow-wrap: anywhere;
}

.patchnote-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 46px;
}

.patchnote-nav-link {
  display: grid;
  gap: 2px;
  padding: 14px 20px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  font-weight: 800;
  transition: border-color 0.2s ease;
}

.patchnote-nav-link.next {
  text-align: right;
}

.patchnote-nav-link small {
  color: rgba(255,255,255,0.5);
  font-size: 0.76rem;
  font-weight: 700;
}

.patchnote-nav-link:hover {
  border-color: rgba(214,163,45,0.5);
}

.patchnote-editor {
  margin-top: 46px;
}

/* --- Liste des mods --- */
.mods-patchnote-link {
  color: var(--gold-light);
  font-weight: 700;
  white-space: nowrap;
}

.mods-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px auto;
  align-items: end;
  gap: 16px 20px;
  margin-top: 34px;
}

.mods-toolbar[hidden],
.filter-bar[hidden] {
  display: none;
}

.mods-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: var(--white);
  font-size: 1rem;
  font-family: inherit;
}

.mods-search input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(214,163,45,0.18);
}

.mods-library-toggle {
  padding-top: 0;
  align-items: center;
}

.filter-pill small {
  opacity: 0.6;
  font-weight: 700;
}

.mods-count {
  margin: 22px 0 0;
  color: rgba(255,255,255,0.5);
  font-size: 0.86rem;
}

.mods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.mod-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid rgba(214,163,45,0.12);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.mod-card[hidden] {
  display: none;
}

.mod-card:target {
  border-color: var(--gold);
}

.mod-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mod-icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  image-rendering: pixelated;
}

.mod-icon-placeholder {
  display: grid;
  place-items: center;
  border: 1px solid rgba(214,163,45,0.2);
  color: var(--gold-light);
  font-weight: 900;
  font-size: 1.2rem;
}

.mod-title {
  min-width: 0;
}

.mod-title h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.mod-version {
  color: rgba(255,255,255,0.5);
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}

.mod-authors {
  margin: 12px 0 0;
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.mod-description {
  margin: 8px 0 0;
  color: rgba(255,255,255,0.72);
  font-size: 0.88rem;
  line-height: 1.5;
}

.mod-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.mod-tag,
.mod-badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.mod-tag {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.7);
}

.mod-badge {
  display: inline-block;
  background: rgba(139,77,255,0.18);
  color: var(--purple-light);
}

.badge-deitycube {
  background: rgba(214,163,45,0.16);
  color: var(--gold-light);
}

.mod-link {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 14px;
  color: var(--gold-light);
  font-size: 0.84rem;
  font-weight: 800;
}

.mod-link:hover {
  text-decoration: underline;
}

/* --- Mods DeityCube --- */
.mods-deitycube-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.mod-deitycube-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(214,163,45,0.16);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.mod-deitycube-card:hover {
  border-color: rgba(214,163,45,0.45);
  transform: translateY(-4px);
}

.mod-deitycube-card img,
.mod-deitycube-placeholder {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.mod-deitycube-placeholder {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(214,163,45,0.18), transparent 60%),
    rgba(255,255,255,0.03);
  color: var(--gold-light);
  font-size: 2.6rem;
}

.mod-deitycube-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px 24px 24px;
}

.mod-deitycube-body h3 {
  margin: 12px 0 6px;
  font-size: 1.3rem;
}

.mod-deitycube-body p {
  margin: 0;
  color: rgba(255,255,255,0.68);
}

.mod-deitycube-body .patchnote-read {
  margin-top: auto;
  padding-top: 14px;
}

.mods-deitycube-empty {
  display: grid;
  justify-items: center;
  gap: 18px;
  margin-top: 40px;
  padding: 40px;
  border: 1px dashed rgba(255,255,255,0.16);
  border-radius: 20px;
  color: rgba(255,255,255,0.62);
  text-align: center;
}

.mods-deitycube-empty p {
  max-width: 560px;
  margin: 0;
}

.patched-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.patched-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(214,163,45,0.18);
  border-radius: 999px;
}

.patched-list a {
  font-weight: 800;
}

.patched-list a:hover {
  color: var(--gold-light);
}

/* Fiche d'un mod DeityCube : texte à gauche, informations à droite. */
.mod-page-container {
  max-width: 1080px;
}

.mod-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 44px;
  align-items: start;
}

.mod-page-aside {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

.mod-info-card {
  padding: 22px;
  border: 1px solid rgba(214,163,45,0.16);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.mod-info-card h2 {
  margin: 0 0 8px;
  color: var(--gold-light);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mod-info-value {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.mod-info-hint {
  margin: 4px 0 0;
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
}

.mod-info-hint a {
  color: var(--gold-light);
}

.mod-wiki-button {
  width: 100%;
  margin-top: 14px;
}

.mod-wiki-button.is-disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.mod-history {
  display: grid;
  gap: 10px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.mod-history li {
  display: grid;
  gap: 2px;
  font-size: 0.88rem;
}

.mod-history a {
  font-weight: 800;
}

.mod-history a:hover {
  color: var(--gold-light);
}

.mod-history span {
  color: rgba(255,255,255,0.55);
}

@media (max-width: 980px) {
  .modpack-profiles {
    grid-template-columns: 1fr;
  }

  .mod-page {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 720px) {
  .patchnote-entry {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .patchnote-entry-version {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 0;
  }

  .mods-toolbar {
    grid-template-columns: 1fr;
  }

  .change-list {
    grid-template-columns: 1fr;
  }

  .patchnote-nav {
    flex-direction: column;
  }

  .patchnote-nav-link.next {
    text-align: left;
  }
}

/* ============================================================
   8. PIED DE PAGE
   ============================================================ */
.footer {
  /* Filet de sécurité : garantit que le footer reste collé au bas de la
     fenêtre (pas d'espace blanc en dessous), même si une page oublie
     d'envelopper son contenu dans <main> avec flex-grow. */
  margin-top: auto;
  padding: 32px 0;
  background: #0b0b0b;
  color: rgba(255, 255, 255, 0.68);
  border-top: 1px solid rgba(214, 163, 45, 0.15);
}

.footer-inner {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 800;
  white-space: nowrap;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(40,220,255,0.08));
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.footer-links a {
  position: relative;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
  font-weight: 650;
  transition: color 0.25s ease;
}

.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 2px;
  border-radius: 99px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.footer-links a:hover {
  color: var(--gold-light);
}

.footer-links a:hover::after {
  transform: scaleX(1);
}

.footer-links .current {
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 750;
  cursor: default;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 22px;
  text-align: right;
}

.footer-right p {
  margin: 0;
  font-size: 0.82rem;
}

.back-top {
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  transition: color 0.25s ease, transform 0.25s ease;
}

.back-top:hover {
  color: var(--white);
  transform: translateY(-2px);
}

@media (max-width: 820px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  .footer-right {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* ============================================================
   9. ANIMATIONS
   ============================================================ */
@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes scrollDot {
  0%, 100% { transform: translate(-50%, 0); opacity: 1; }
  50% { transform: translate(-50%, 8px); opacity: 0.4; }
}

/* ============================================================
   10. PAGES LÉGALES
   Mentions légales, confidentialité, règlement, 404 : gabarit clair
   et minimal, avec son propre en-tête (.legal-header, logo + retour).
   ============================================================ */
.legal-page {
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(214, 163, 45, 0.08), transparent 30%),
    var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}

.legal-page .legal-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 11, 11, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.legal-page .legal-nav {
  width: min(1160px, calc(100% - 32px));
  min-height: 78px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.legal-page .legal-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--white);
  text-decoration: none;
  font-weight: 850;
}

.legal-page .legal-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.legal-page .legal-back {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 800;
}

.legal-page .legal-hero {
  padding: 92px 20px 72px;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 30%, rgba(214, 163, 45, 0.18), transparent 32%),
    linear-gradient(135deg, #111, #080808);
  border-bottom: 1px solid rgba(214, 163, 45, 0.22);
}

.legal-page .legal-hero-inner,
.legal-page .legal-content,
.legal-page .legal-toc {
  width: min(900px, calc(100% - 32px));
  margin-inline: auto;
}

.legal-page .legal-eyebrow {
  margin: 0 0 10px;
  color: var(--gold-light);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.legal-page .legal-hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4.7rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.legal-page .legal-hero p {
  max-width: 700px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.7);
}

.legal-page .legal-main {
  padding: 70px 0 100px;
}

.legal-page .legal-notice {
  margin-bottom: 28px;
  padding: 20px 22px;
  border-left: 4px solid var(--gold);
  border-radius: 0 14px 14px 0;
  background: rgba(214, 163, 45, 0.07);
  color: #484640;
}

.legal-page .legal-notice strong {
  color: var(--ink);
}

.legal-page .legal-toc {
  margin-bottom: 34px;
  padding: 22px 26px;
  border: 1px solid rgba(24, 24, 24, 0.10);
  border-radius: 14px;
  background: rgba(214, 163, 45, 0.05);
  scroll-margin-top: 100px;
}

.legal-page .legal-toc h2 {
  margin: 0 0 12px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.legal-page .legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 28px;
}

.legal-page .legal-toc li {
  margin: 0 0 8px;
  break-inside: avoid;
}

.legal-page .legal-toc a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 650;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.legal-page .legal-toc a:hover {
  color: var(--gold-dark);
  border-color: var(--gold-dark);
}

.legal-page .legal-content section {
  padding: 34px 0;
  border-bottom: 1px solid rgba(24, 24, 24, 0.08);
  scroll-margin-top: 100px;
}

.legal-page .legal-content section:last-child {
  border-bottom: 0;
}

.legal-page .legal-content h2 {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
}

.legal-page .legal-content h2::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 28px;
  margin-right: 12px;
  vertical-align: -5px;
  border-radius: 99px;
  background: var(--gold);
}

.legal-page .legal-content h3 {
  margin: 26px 0 10px;
  font-size: 1.08rem;
}

.legal-page .legal-content p {
  margin: 0 0 12px;
}

.legal-page .legal-content ul {
  margin: 10px 0 14px;
  padding-left: 24px;
}

.legal-page .legal-content li {
  margin: 5px 0;
}

.legal-page .legal-info {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px 24px;
  margin-top: 20px;
  padding: 24px;
  border: 1px solid rgba(24, 24, 24, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.045);
}

.legal-page .legal-label {
  color: var(--muted);
  font-weight: 750;
}

.legal-page .legal-value {
  font-weight: 650;
}

.legal-page .legal-content a {
  color: var(--gold-dark);
}

.legal-page .legal-content code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(24, 24, 24, 0.06);
  font-size: 0.9em;
}

/* Tableaux de la politique de confidentialité (données / finalité / base / durée). */
.legal-page .legal-table {
  width: 100%;
  margin: 8px 0 18px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid rgba(24, 24, 24, 0.08);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
  line-height: 1.5;
}

.legal-page .legal-table th,
.legal-page .legal-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(24, 24, 24, 0.07);
}

.legal-page .legal-table th {
  background: rgba(214, 163, 45, 0.10);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legal-page .legal-table tbody tr:last-child td {
  border-bottom: 0;
}

.legal-page .legal-table td:first-child {
  width: 36%;
  font-weight: 600;
}

/* --- Page 404 --- */
.legal-page .error-hero {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  min-height: 62vh;
  padding: 110px 20px 100px;
  text-align: center;
}

.legal-page .error-hero .legal-hero-inner {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.legal-page .error-code {
  margin: 0;
  font-size: clamp(4.5rem, 15vw, 9.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--purple-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.legal-page .error-hero .legal-eyebrow {
  margin-top: 4px;
}

.legal-page .error-hero p:last-of-type {
  max-width: 560px;
}

.legal-page .error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 34px;
}

/* --- Bouton flottant "retour au sommaire" (page Règlement) --- */
.toc-fab {
  position: fixed;
  top: 25vh;
  right: 24px;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
}

.toc-fab:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

.toc-fab.is-hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

@media (max-width: 650px) {
  .toc-fab {
    right: 14px;
    width: 42px;
    height: 42px;
    font-size: 1.05rem;
  }

  .legal-page .legal-nav {
    min-height: 68px;
  }

  .legal-page .legal-brand img {
    width: 38px;
    height: 38px;
  }

  .legal-page .legal-back {
    font-size: 0.78rem;
  }

  .legal-page .legal-hero {
    padding: 68px 16px 56px;
  }

  .legal-page .legal-toc {
    padding: 18px 20px;
  }

  .legal-page .legal-toc ol {
    columns: 1;
  }

  .legal-page .legal-info {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 20px;
  }

  .legal-page .legal-label {
    margin-top: 8px;
  }

  .legal-page .legal-label:first-child {
    margin-top: 0;
  }

  /* Sur mobile, chaque ligne du tableau devient une carte avec ses libellés. */
  .legal-page .legal-table,
  .legal-page .legal-table tbody,
  .legal-page .legal-table tr,
  .legal-page .legal-table td {
    display: block;
    width: 100%;
  }

  .legal-page .legal-table {
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .legal-page .legal-table thead {
    display: none;
  }

  .legal-page .legal-table tr {
    margin-bottom: 12px;
    padding: 6px 16px;
    border: 1px solid rgba(24, 24, 24, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
  }

  .legal-page .legal-table td,
  .legal-page .legal-table td:first-child {
    width: 100%;
    padding: 8px 0;
  }

  .legal-page .legal-table tbody tr td:last-child {
    border-bottom: 0;
  }

  .legal-page .legal-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}

/* ============================================================
   11. COMPTE UTILISATEUR
   Pages connexion / inscription / mon compte (dossier compte/).
   ============================================================ */
.account-container {
  max-width: 560px;
}

.account-container h1 {
  margin-top: 10px;
  margin-bottom: 28px;
}

.account-card {
  padding: 34px;
  border: 1px solid rgba(214,163,45,0.16);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.account-form {
  display: grid;
  gap: 18px;
}

.account-field {
  display: grid;
  gap: 8px;
}

.account-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.account-field label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* Cases à cocher et boutons radio exclus : ils ont leur propre style (section 12). */
.account-field input:where(:not([type="checkbox"], [type="radio"])) {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: var(--white);
  font-size: 1rem;
  font-family: inherit;
}

.account-field input:where(:not([type="checkbox"], [type="radio"])):focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(214,163,45,0.18);
}

.account-actions {
  margin-top: 6px;
}

.account-links {
  margin-top: 22px;
  font-size: 0.9rem;
  color: var(--muted);
}

.account-links a {
  color: var(--gold-light);
}

/* Déconnexion : formulaire POST dont le bouton a l'apparence d'un lien. */
.logout-form {
  display: inline;
  margin: 0;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold-light);
  font: inherit;
  cursor: pointer;
}

.link-button:hover,
.link-button:focus-visible {
  text-decoration: underline;
}

.form-error,
.form-success {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.form-error {
  color: #ffb4b4;
  background: rgba(255,80,80,0.12);
  border: 1px solid rgba(255,80,80,0.28);
}

.form-success {
  color: var(--gold-light);
  background: rgba(214,163,45,0.12);
  border: 1px solid rgba(214,163,45,0.28);
}

.account-status-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.account-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.account-status-label {
  color: var(--muted);
  font-size: 0.88rem;
}

.account-status-value {
  font-weight: 700;
}

.status-ok {
  color: var(--gold-light);
}

.status-pending {
  color: var(--muted);
}

/* --- Bandeaux d'actions en attente (email à vérifier, Discord à lier) ---
   Affichés en tête de toutes les pages du compte, voir render_account_banners(). */
.account-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px 22px;
  border: 1px solid;
  border-left-width: 4px;
  border-radius: 16px;
}

.banner-warning {
  border-color: rgba(255,170,60,0.32);
  border-left-color: #ffaa3c;
  background: linear-gradient(135deg, rgba(255,170,60,0.12), rgba(255,170,60,0.03));
}

.banner-info {
  border-color: rgba(139,77,255,0.34);
  border-left-color: var(--purple-light);
  background: linear-gradient(135deg, rgba(139,77,255,0.14), rgba(40,220,255,0.03));
}

.account-banner-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
  background: rgba(255,255,255,0.07);
}

.banner-warning .account-banner-icon { color: #ffd9a0; }
.banner-info .account-banner-icon { color: var(--purple-light); }

.account-banner-body {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.78);
}

.account-banner-body p {
  margin: 0;
  overflow-wrap: anywhere;
}

.account-banner-body .account-banner-title {
  margin-bottom: 4px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
}

.account-banner-body a {
  color: var(--gold-light);
  text-decoration: underline;
}

.account-banner-body code {
  color: var(--white);
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 6px;
}

.account-banner-code {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold-light);
}

.account-banner-action {
  flex-shrink: 0;
  margin: 0;
}

@media (max-width: 650px) {
  .account-banner {
    flex-wrap: wrap;
    padding: 16px 18px;
  }

  .account-banner-body {
    flex-basis: calc(100% - 62px);
  }

  .account-banner-action,
  .account-banner-action .btn {
    width: 100%;
  }
}

/* --- Tableau de bord du compte : menu latéral + contenu --- */
.account-dashboard {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  max-width: 1040px;
}

.account-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 24px;
  border: 1px solid rgba(214,163,45,0.16);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.account-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.account-identity-text {
  min-width: 0;
}

.account-identity-name {
  margin: 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.account-identity-role {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--gold-light);
}

.account-nav {
  display: grid;
  gap: 4px;
}

.account-nav a,
.account-nav-logout {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: none;
  color: rgba(255,255,255,0.72);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.account-nav a:hover,
.account-nav-logout:hover {
  color: var(--white);
  background: rgba(255,255,255,0.05);
}

.account-nav a.active {
  color: var(--gold-light);
  background: rgba(214,163,45,0.10);
  border-color: rgba(214,163,45,0.28);
}

.account-nav .logout-form {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.account-nav-logout {
  color: var(--muted);
}

.account-main h1 {
  margin-top: 10px;
  margin-bottom: 28px;
  overflow-wrap: anywhere;
}

.account-main .account-card + .account-card {
  margin-top: 22px;
}

.account-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 18px;
}

.account-section .account-card-head h2 {
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.account-card-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold-light);
}

.account-card-link:hover {
  text-decoration: underline;
}

.account-card-danger {
  border-color: rgba(255,80,80,0.28);
  background: linear-gradient(160deg, rgba(255,80,80,0.06), rgba(255,255,255,0.02));
}

.account-hint {
  margin: 0 0 16px;
  font-size: 0.86rem;
  color: rgba(255,255,255,0.6);
}

.account-field .account-hint,
.account-avatar-controls .account-hint,
.account-card-head .account-hint {
  margin: 0;
}

.account-hint-error {
  color: #ffb4b4;
}

.account-note {
  margin: 0;
  font-size: 0.92rem;
}

.account-note a {
  color: var(--gold-light);
  text-decoration: underline;
}

.status-warning {
  color: #ffb4b4;
}

.account-status-email {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  overflow-wrap: anywhere;
}

.account-field-label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.account-optional {
  font-weight: 400;
}

.account-field input[type="date"] {
  color-scheme: dark;
}

/* Préfixé par .account-field : l'emporte sur ".account-field label" (intitulé de champ gris
   en gras), qui s'appliquait sinon au texte de la case. */
.account-checkbox,
.account-field .account-checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: rgba(255,255,255,0.82);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  cursor: pointer;
}

.account-field:has(> .account-checkbox) {
  gap: 14px;
}

/* 20px de case pour une ligne de ~22px : centrée sur la première ligne du texte. */
.account-checkbox input {
  margin-top: 1px;
}

.account-checkbox a {
  color: var(--gold-light);
}

/* Popup de (ré)acceptation règlement/CGU : injecté par site.js sur toutes les pages,
   au-dessus de tout le reste (z-index élevé), avec fond assombri non cliquable. Couleur de
   texte fixée ici : ce bloc est ajouté directement dans <body>, hors de toute section
   ".dark-flat" qui la fixerait normalement — sans ça le texte hérite du noir de <body>. */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 3, 10, 0.82);
  color: var(--white);
}

.modal-overlay .account-card {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #1c1524, #100b16);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
}

.modal-overlay h2 {
  margin: 0 0 14px;
  font-size: 1.3rem;
  color: var(--white);
}

.modal-overlay form {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

.modal-overlay .account-actions {
  margin-top: 0;
}

/* Visionneuse de document (règlement / CGU) ouverte par-dessus le popup ci-dessus : thème
   clair réutilisant les styles existants de .legal-page/.legal-content, pour une lecture
   confortable d'un texte long sans quitter la page ni redéclencher le popup. */
.doc-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 3, 10, 0.85);
}

.doc-viewer-panel {
  width: min(760px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
}

.doc-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(24,19,33,0.08);
  background: var(--white);
}

.doc-viewer-header h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink);
}

.doc-viewer-close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(24,19,33,0.06);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.doc-viewer-close:hover {
  background: rgba(24,19,33,0.12);
}

.doc-viewer-body {
  padding: 4px 28px 32px;
  overflow-y: auto;
}

.account-inline-form {
  margin-top: 14px;
}

/* --- Badges d'état --- */
.account-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-ok {
  color: var(--gold-light);
  background: rgba(214,163,45,0.12);
  border-color: rgba(214,163,45,0.30);
}

.badge-pending {
  color: #ffd9a0;
  background: rgba(255,170,60,0.10);
  border-color: rgba(255,170,60,0.28);
}

.badge-danger {
  color: #ffb4b4;
  background: rgba(255,80,80,0.12);
  border-color: rgba(255,80,80,0.30);
}

.badge-neutral {
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
}

/* --- Photo de profil --- */
.avatar {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--purple), var(--gold-dark));
  border: 2px solid rgba(214,163,45,0.45);
}

.avatar-initial {
  color: var(--white);
  font-weight: 900;
  line-height: 1;
}

.avatar-xs { width: 24px; height: 24px; font-size: 0.7rem; border-width: 1px; }
.avatar-md { width: 40px; height: 40px; font-size: 1rem; }
.avatar-lg { width: 60px; height: 60px; font-size: 1.5rem; }
.avatar-xl { width: 112px; height: 112px; font-size: 2.6rem; }

.account-avatar-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.account-avatar-controls {
  display: grid;
  justify-items: start;
  gap: 12px;
  flex: 1 1 220px;
}

/* Le vrai champ fichier est masqué : c'est le bouton-label qui l'ouvre. */
.account-file-button {
  cursor: pointer;
  min-height: 44px;
}

.account-file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.account-file-button:focus-within {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* --- Bouton d'action destructrice --- */
.btn-danger {
  color: var(--white);
  background: rgba(220,50,50,0.85);
  border-color: rgba(255,120,120,0.5);
}

.btn-danger:hover {
  background: #e04545;
  box-shadow: 0 12px 35px rgba(220,50,50,0.30);
}

.account-section button.btn {
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

/* --- Suivi des sanctions --- */
.account-platforms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.account-platform {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.sanction-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sanction-item {
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 4px solid rgba(255,255,255,0.18);
}

.sanction-en_cours { border-left-color: #ff6b6b; }
.sanction-avertissement { border-left-color: #ffaa3c; }
.sanction-levee { border-left-color: var(--gold); }

.sanction-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.sanction-type {
  margin-right: 4px;
  font-weight: 800;
}

.sanction-reason {
  margin: 10px 0 12px;
  color: rgba(255,255,255,0.85);
  overflow-wrap: anywhere;
}

.sanction-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin: 0;
  font-size: 0.84rem;
}

.sanction-dates div {
  display: flex;
  gap: 6px;
}

.sanction-dates dt {
  color: var(--muted);
}

.sanction-dates dd {
  margin: 0;
}

.sanction-item .account-hint {
  margin: 10px 0 0;
}

@media (max-width: 820px) {
  /* minmax(0, …) : sinon la colonne s'élargit à la largeur de la rangée d'onglets. */
  .account-dashboard {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .account-sidebar {
    position: static;
    padding: 18px;
  }

  .account-identity {
    padding-bottom: 14px;
    margin-bottom: 12px;
  }

  /* Menu en onglets défilants horizontalement */
  .account-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .account-nav a,
  .account-nav-logout {
    width: auto;
    white-space: nowrap;
  }

  .account-nav .logout-form {
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
  }

  .account-card {
    padding: 22px 18px;
  }

  .account-status-row {
    flex-wrap: wrap;
  }

  .account-platforms {
    grid-template-columns: 1fr;
  }

  .account-platform {
    grid-auto-flow: column;
    justify-content: space-between;
    align-items: center;
  }
}

/* ============================================================
   11 bis. PANNEAU D'ADMINISTRATION
   Pages réservées aux Grand Deity (dossier admin/).
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.admin-dashboard {
  max-width: 1160px;
}

.account-nav .admin-nav-link {
  margin-top: 8px;
  color: var(--gold-light);
  border-color: rgba(214,163,45,0.28);
}

.account-nav .admin-nav-back {
  margin-top: 8px;
  color: var(--muted);
}

.account-section select,
.account-section textarea,
.admin-lift-form input,
.admin-console-form input {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: var(--white);
  font-size: 0.95rem;
  font-family: inherit;
  color-scheme: dark;
}

.account-section textarea {
  padding: 12px 14px;
  resize: vertical;
}

.account-section select:focus,
.account-section textarea:focus,
.admin-lift-form input:focus,
.admin-console-form input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(214,163,45,0.18);
}

.account-section code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-size: 0.88em;
}

.admin-btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.88rem;
}

.account-section button.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 22px;
}

.admin-grid .account-card + .account-card {
  margin-top: 0;
}

.admin-subtitle {
  margin: 26px 0 12px;
  font-size: 0.95rem;
  letter-spacing: 0;
}

/* --- Indicateurs chiffrés --- */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.admin-stat {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.admin-stat-label {
  color: var(--muted);
  font-size: 0.8rem;
}

.admin-stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.admin-status-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 14px 0 0;
  overflow-wrap: anywhere;
}

/* --- Jauges machine --- */
.admin-meters {
  display: grid;
  gap: 16px;
}

.admin-meter-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.admin-meter-head span:first-child {
  color: var(--muted);
}

.admin-meter-head span:last-child {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.admin-meter-bar {
  height: 8px;
  border-radius: 99px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.admin-meter-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 0.6s ease;
}

.admin-meter-bar span.warn { background: #ffaa3c; }
.admin-meter-bar span.danger { background: #ff6b6b; }

/* --- Histogramme des inscriptions --- */
.admin-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 110px;
  padding-bottom: 1px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.admin-chart-bar {
  flex: 1;
  height: max(var(--h), 2px);
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
  opacity: 0.85;
}

.admin-chart-bar:hover {
  opacity: 1;
}

.admin-chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-role-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-role-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.9rem;
}

/* --- Joueurs connectés --- */
.admin-player-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.admin-player-initial {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--purple), var(--gold-dark));
  font-weight: 900;
}

.admin-player-name {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.admin-player .account-hint {
  margin: 0;
  font-size: 0.78rem;
}

/* --- Journal --- */
.admin-log-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-log-list li {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.admin-log-details {
  flex: 1 1 240px;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.admin-log-list .account-hint {
  margin: 0;
  font-size: 0.8rem;
}

.admin-log-list .account-hint a {
  color: var(--gold-light);
}

.admin-log-body {
  display: grid;
  gap: 4px;
  flex: 1 1 240px;
  min-width: 0;
}

.admin-log-full summary {
  cursor: pointer;
  overflow-wrap: anywhere;
}

/* --- Console --- */
.admin-console-state {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.admin-console-state .account-hint {
  margin: 0;
}

.admin-console-output {
  height: min(52vh, 480px);
  margin: 0 0 14px;
  padding: 14px 16px;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #050407;
  color: #d8d4e0;
  font-family: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-console-output:focus-visible {
  outline: 2px solid var(--gold);
}

.console-command { color: var(--gold-light); font-weight: 700; }
.console-response { color: var(--cyan-light); }
.console-error { color: #ff9b9b; }
.console-info { color: var(--muted); }

.admin-console-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-console-prompt {
  color: var(--gold-light);
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 800;
}

.admin-console-form input {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.admin-console-form .btn {
  min-height: 44px;
}

.admin-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.admin-chip {
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.8);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.admin-chip:hover:not(:disabled),
.admin-chip.active {
  color: var(--gold-light);
  border-color: rgba(214,163,45,0.4);
}

.admin-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-console-note {
  margin: 0;
}

.admin-console-note a {
  color: var(--gold-light);
}

.admin-history {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-history summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  overflow-wrap: anywhere;
}

.admin-history summary .account-hint {
  margin: 0;
  font-size: 0.8rem;
}

.admin-history-output {
  margin: 6px 0 0;
  padding: 12px 14px;
  max-height: 260px;
  overflow: auto;
  border-radius: 12px;
  background: #050407;
  color: var(--cyan-light);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.78rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* --- Membres --- */
.admin-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
}

.admin-filter-search {
  flex: 1 1 260px;
}

.admin-member-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-member {
  display: grid;
  grid-template-columns: minmax(200px, 1.1fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 14px 20px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.admin-member-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-member-identity > div {
  min-width: 0;
}

.admin-member-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.admin-member-email {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.admin-member-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  margin: 0;
  font-size: 0.84rem;
}

.admin-member-details dt {
  color: var(--muted);
  font-size: 0.76rem;
}

.admin-member-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-member-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.admin-member-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.admin-role-form {
  display: flex;
  gap: 8px;
}

.admin-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--muted);
}

.admin-pagination a {
  color: var(--gold-light);
  font-weight: 700;
}

/* --- Sanctions --- */
.admin-form-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.account-field[hidden] {
  display: none;
}

.admin-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  cursor: pointer;
}

.admin-checkbox input {
  margin: 0;
}

.sanction-head a.sanction-type {
  color: var(--gold-light);
}

.admin-lift-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-lift-form input {
  flex: 1 1 220px;
  min-height: 40px;
}

@media (max-width: 980px) {
  .admin-member {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .admin-member-actions {
    grid-column: 1 / -1;
    grid-auto-flow: column;
    justify-content: space-between;
    align-items: center;
  }
}

@media (max-width: 820px) {
  .admin-grid,
  .admin-form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-member {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-member-actions {
    grid-auto-flow: row;
    justify-items: start;
  }

  .admin-role-form {
    flex-wrap: wrap;
  }

  .admin-console-output {
    height: 50vh;
    font-size: 0.74rem;
  }

  .admin-console-prompt {
    display: none;
  }

  .account-nav .admin-nav-link,
  .account-nav .admin-nav-back {
    margin-top: 0;
  }
}

/* ============================================================
   12. CONTRÔLES DE FORMULAIRE
   Cases à cocher, boutons radio, listes déroulantes (site.js)
   et date de naissance en trois listes (site.js).
   ============================================================ */

/* --- Cases à cocher et boutons radio --- */
input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  display: inline-grid;
  place-content: center;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1.5px solid rgba(255,255,255,0.32);
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

input[type="radio"] {
  border-radius: 50%;
}

input[type="checkbox"]::before,
input[type="radio"]::before {
  content: "";
  background: #1a1206;
  transform: scale(0);
  transition: transform 0.15s ease;
}

input[type="checkbox"]::before {
  width: 12px;
  height: 12px;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

input[type="radio"]::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
  border-color: rgba(243,194,60,0.75);
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  border-color: var(--gold);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

input[type="checkbox"]:checked::before,
input[type="radio"]:checked::before {
  transform: scale(1);
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(214,163,45,0.30);
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* --- Listes déroulantes --- */
.dc-select {
  position: relative;
  min-width: 0;
}

/* Le <select> d'origine reste dans le formulaire (envoi, écouteurs "change"), invisible. */
.dc-select > select.dc-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
  pointer-events: none;
}

.dc-select-trigger {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 0 44px 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: var(--white);
  font: inherit;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.dc-select-trigger:hover {
  border-color: rgba(214,163,45,0.45);
  background: rgba(255,255,255,0.06);
}

.dc-select-trigger:focus-visible,
.dc-select.open .dc-select-trigger {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(214,163,45,0.18);
}

.dc-select-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dc-select-value {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dc-select.is-placeholder .dc-select-value {
  color: rgba(255,255,255,0.45);
}

/* Chevron */
.dc-select-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--gold-light);
  border-bottom: 2px solid var(--gold-light);
  transform: rotate(45deg);
  transition: transform 0.2s ease, margin-top 0.2s ease;
}

.dc-select.open .dc-select-trigger::after {
  margin-top: -1px;
  transform: rotate(225deg);
}

.dc-select-list {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  max-height: 280px;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  border: 1px solid rgba(214,163,45,0.28);
  border-radius: 14px;
  background: linear-gradient(160deg, #1d1726, #120d18);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  color: rgba(255,255,255,0.86);
  scrollbar-width: thin;
  scrollbar-color: rgba(214,163,45,0.45) transparent;
  animation: dc-select-in 0.14s ease-out;
}

.dc-select.drop-up .dc-select-list {
  top: auto;
  bottom: calc(100% + 6px);
}

.dc-select-list[hidden] {
  display: none;
}

@keyframes dc-select-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.dc-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 0.95rem;
  line-height: 1.35;
  white-space: nowrap;
  cursor: pointer;
}

.dc-select-option.is-active {
  background: rgba(214,163,45,0.14);
  color: var(--white);
}

.dc-select-option[aria-selected="true"] {
  color: var(--gold-light);
  font-weight: 700;
}

.dc-select-option[aria-selected="true"]::after {
  content: "";
  width: 10px;
  height: 10px;
  background: currentColor;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.dc-select-option.is-placeholder {
  color: rgba(255,255,255,0.45);
}

.dc-select-option[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Filtres de la liste des membres : largeur stable quel que soit le choix courant. */
.admin-filters .dc-select {
  min-width: 190px;
}

/* Sélecteur de rôle en ligne, à côté du petit bouton "Enregistrer". */
.admin-role-form .dc-select {
  flex: 1 1 170px;
}

.admin-role-form .dc-select-trigger {
  min-height: 40px;
  font-size: 0.92rem;
}

/* --- Date de naissance : jour / mois / année --- */
.dc-date {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr) minmax(0, 1.1fr);
  gap: 10px;
}

@media (max-width: 520px) {
  .dc-date {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .dc-date > .dc-select:nth-child(3) {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   13. ACCESSIBILITÉ
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .title-logo,
  .scroll-cue i::after {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   14. GUIDE « JOUER »
   Boîte ouverte par le bouton Jouer de l'en-tête (site.js), par-dessus la page :
   fond assombri et flouté, étapes du compte au lancement du jeu.
   ============================================================ */
body.play-guide-open {
  overflow: hidden;
}

.play-guide-overlay {
  position: fixed;
  inset: 0;
  /* Sous le popup bloquant du règlement/CGU (2000), au-dessus de tout le reste. */
  z-index: 1900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7,5,13,0.62);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
  backdrop-filter: blur(10px) saturate(115%);
  animation: playGuideFade 0.22s ease;
}

.play-guide-overlay[hidden] {
  display: none;
}

.play-guide {
  display: flex;
  flex-direction: column;
  width: min(820px, 100%);
  max-height: min(88vh, 780px);
  overflow: hidden;
  border: 1px solid rgba(214,163,45,0.28);
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 0%, rgba(214,163,45,0.12), transparent 40%),
    linear-gradient(160deg, #1c1524, #0e0a14);
  box-shadow: 0 30px 90px rgba(0,0,0,0.6);
  color: var(--white);
  animation: playGuideIn 0.26s ease;
}

.play-guide-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 26px 30px 0;
}

.play-guide-kicker {
  margin: 0 0 6px;
  color: var(--gold-light);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.play-guide-header h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.play-guide-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.play-guide-close:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

/* Fil des étapes : numéro (coché une fois l'étape faite) et intitulé. */
.play-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin: 22px 0 0;
  padding: 0 30px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  list-style: none;
}

.play-step-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 2px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255,255,255,0.55);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.play-step-tab:hover {
  color: var(--white);
  background: rgba(255,255,255,0.04);
}

.play-step-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 50%;
  font-size: 0.86rem;
  font-weight: 900;
}

.play-step-tab.done .play-step-number {
  border-color: rgba(96,220,130,0.5);
  background: rgba(96,220,130,0.16);
  color: transparent;
  position: relative;
}

.play-step-tab.done .play-step-number::after {
  content: "✓";
  position: absolute;
  color: #8ff0a8;
  font-size: 0.95rem;
}

.play-step-tab.active {
  color: var(--white);
}

.play-step-tab.active .play-step-number {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--black);
  box-shadow: 0 0 18px rgba(214,163,45,0.35);
}

.play-step-tab.active.done .play-step-number::after {
  color: var(--black);
}

.play-guide-body {
  flex: 1;
  overflow-y: auto;
  padding: 26px 30px;
}

.play-panel h3 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.play-panel h4 {
  margin: 0 0 6px;
  color: var(--gold-light);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.play-panel p,
.play-list {
  margin: 0 0 12px;
  color: rgba(255,255,255,0.78);
  line-height: 1.65;
}

.play-panel strong {
  color: var(--white);
}

.play-panel code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  font-size: 0.88em;
}

.play-list {
  padding-left: 1.2em;
}

.play-list li + li {
  margin-top: 6px;
}

.play-list li::marker {
  color: var(--gold);
}

.play-os + .play-os {
  margin-top: 22px;
}

.play-os[hidden],
.play-command[hidden] {
  display: none;
}

.play-command {
  display: block;
  margin: 0 0 8px;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  background: rgba(0,0,0,0.35) !important;
  color: var(--cyan-light);
  overflow-wrap: anywhere;
}

.play-tip {
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: rgba(214,163,45,0.08);
  font-size: 0.92rem;
}

.play-status {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,170,60,0.14);
  color: #ffc77a !important;
  font-size: 0.86rem;
  font-weight: 700;
}

.play-status[hidden] {
  display: none;
}

.play-status.ok {
  background: rgba(96,220,130,0.14);
  color: #8ff0a8 !important;
}

.play-status.ok::before {
  content: "✓ ";
}

.play-download-meta {
  color: rgba(255,255,255,0.6) !important;
  font-size: 0.9rem;
}

.play-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.play-actions[hidden],
.play-actions [hidden] {
  display: none;
}

.play-guide-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 30px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.18);
}

.play-guide-footer .btn {
  min-height: 44px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.play-guide-footer .btn:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

.play-progress {
  color: rgba(255,255,255,0.5);
  font-size: 0.84rem;
}

@keyframes playGuideFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes playGuideIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 620px) {
  .play-guide-overlay {
    padding: 10px;
  }

  .play-guide {
    max-height: 94vh;
    border-radius: 20px;
  }

  .play-guide-header,
  .play-guide-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .play-steps {
    padding: 0 12px 14px;
  }

  /* Sur téléphone, seuls les numéros ; l'intitulé de l'étape est le titre du panneau. */
  .play-step-label {
    display: none;
  }

  .play-guide-footer {
    padding: 12px 18px;
  }

  .play-progress {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .play-guide-overlay,
  .play-guide {
    animation: none;
  }
}

/* ============================================================
   15. PAGE D'ACCUEIL (index.html)
   Bouton Jouer mis en avant, présentation du serveur, tuiles des rubriques,
   dernières publications (accueil.js) et étapes pour rejoindre le serveur.
   ============================================================ */
.home-play {
  margin-top: 34px;
  display: grid;
  justify-items: center;
  gap: 20px;
}

/* Grand bouton Jouer : même composant que celui de l'en-tête (.play-button, qui ouvre le
   guide « Jouer » de site.js), agrandi, avec un halo pulsé et un reflet périodique. */
.play-button.play-button-hero {
  width: auto;
  min-width: 240px;
  height: 62px;
  padding: 0 40px;
  gap: 12px;
  border-radius: 18px;
  font-size: 1.08rem;
  letter-spacing: 0.18em;
  animation: playPulse 2.8s ease-out infinite;
}

.play-button.play-button-hero:hover {
  transform: translateY(-3px) scale(1.03);
}

.play-button-hero .play-icon {
  font-size: 0.85rem;
}

.play-button-hero::before {
  animation: playShine 5s ease-in-out infinite;
}

.home-play-meta {
  margin: 0;
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
}

.home-play-meta a {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-home .hero-actions {
  margin-top: 24px;
}

@keyframes playPulse {
  0% {
    box-shadow: 0 14px 44px rgba(243,194,60,0.36), 0 0 0 0 rgba(243,194,60,0.5), inset 0 1px 0 rgba(255,255,255,0.4);
  }
  70%,
  100% {
    box-shadow: 0 14px 44px rgba(243,194,60,0.36), 0 0 0 20px rgba(243,194,60,0), inset 0 1px 0 rgba(255,255,255,0.4);
  }
}

@keyframes playShine {
  0%, 60% { transform: translateX(-130%); }
  85%, 100% { transform: translateX(130%); }
}

/* --- Le serveur --- */
.home-lead {
  max-width: 600px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.home-pillars {
  display: grid;
  gap: 20px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.home-pillars li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.home-pillars .card-icon {
  flex: none;
  margin: 0;
}

.home-pillars h3 {
  margin: 0 0 4px;
  font-size: 1.08rem;
}

.home-pillars p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

#serveur .photo-panel {
  min-height: 480px;
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 32px;
}

.home-link {
  padding-bottom: 2px;
  border-bottom: 2px solid rgba(139,77,255,0.25);
  color: #6f36c9;
  font-weight: 800;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.home-link::after {
  content: " →";
}

.home-link:hover {
  color: var(--purple);
  border-color: var(--purple);
}

.dark .home-link,
.dark-flat .home-link {
  color: var(--gold-light);
  border-color: rgba(255,227,106,0.3);
}

.dark .home-link:hover,
.dark-flat .home-link:hover {
  color: var(--white);
  border-color: var(--gold);
}

/* --- Explorer : tuiles des rubriques ---
   Grille de 4 colonnes : Modpack en 2x2, Launcher et Roleplay sur 2 colonnes. */
.home-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
  margin-top: 44px;
}

.home-tile {
  position: relative;
  isolation: isolate;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(214,163,45,0.16);
  border-radius: 22px;
  background: #15121c;
  color: var(--white);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.home-tile img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.home-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(7,5,13,0.05) 15%, rgba(7,5,13,0.9) 100%);
}

.home-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(243,194,60,0.6);
  box-shadow: 0 18px 44px rgba(0,0,0,0.4), 0 0 26px rgba(243,194,60,0.12);
}

.home-tile:hover img {
  transform: scale(1.06);
}

.home-tile:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.home-tile-body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 4px;
  padding: 22px 24px;
}

.home-tile-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.home-tile strong {
  font-size: 1.35rem;
  line-height: 1.15;
}

.home-tile-text {
  color: rgba(255,255,255,0.8);
  font-size: 0.92rem;
}

.home-tile-meta {
  justify-self: start;
  margin-top: 8px;
  padding: 4px 11px;
  border: 1px solid rgba(243,194,60,0.4);
  border-radius: 999px;
  background: rgba(243,194,60,0.16);
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 800;
}

.home-tile-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--purple);
  color: var(--white);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}

.home-tile-modpack {
  grid-column: span 2;
  grid-row: span 2;
}

.home-tile-modpack .home-tile-body {
  padding: 30px 32px;
}

.home-tile-modpack strong {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.home-tile-modpack .home-tile-text {
  max-width: 420px;
  font-size: 1rem;
}

.home-tile-launcher,
.home-tile-roleplay {
  grid-column: span 2;
}

/* --- Actualités (cartes ajoutées par accueil.js) --- */
.home-news-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px 40px;
}

.home-news-head .home-links {
  margin-top: 0;
}

.home-news {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
}

.home-news:empty {
  display: none;
}

.home-news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(24,24,24,0.08);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 18px 44px rgba(45,18,90,0.08);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.home-news-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139,77,255,0.38);
  box-shadow: 0 18px 44px rgba(45,18,90,0.12), 0 0 28px rgba(139,77,255,0.08);
}

.home-news-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.home-news-card.no-image::before {
  content: "";
  height: 6px;
  background: linear-gradient(90deg, var(--purple), var(--gold));
}

.home-news-body {
  display: grid;
  gap: 8px;
  padding: 22px 24px 24px;
}

.home-news-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.home-news-section {
  color: #6f36c9;
  font-weight: 800;
}

.home-news-card strong {
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.25;
}

.home-news-summary {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.93rem;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.home-news-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

/* --- Rejoindre l'aventure --- */
.home-join {
  overflow: hidden;
  text-align: center;
}

.home-join .section-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("/assets/images/world-yellowstone.jpg") center / cover;
}

.home-join .section-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 30%, rgba(72,25,145,0.35), transparent 55%),
    rgba(10,8,14,0.86);
}

.home-join .container {
  position: relative;
  z-index: 2;
}

.home-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.home-steps li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  border: 1px solid rgba(214,163,45,0.22);
  border-radius: 22px;
  background: rgba(255,255,255,0.04);
}

.home-step-number {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  color: var(--black);
  font-weight: 900;
}

.home-steps h3 {
  margin: 6px 0 0;
  font-size: 1.2rem;
}

.home-steps p {
  flex: 1;
  margin: 0;
  color: rgba(255,255,255,0.72);
  font-size: 0.95rem;
}

.home-steps .home-link {
  align-self: flex-start;
}

.home-join .home-play {
  margin-top: 48px;
}

@media (max-width: 980px) {
  .home-tiles {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }

  .home-news {
    grid-template-columns: 1fr 1fr;
  }

  #serveur .photo-panel {
    min-height: 340px;
  }
}

@media (max-width: 820px) {
  .home-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .home-tiles {
    grid-template-columns: 1fr;
    grid-auto-rows: 190px;
  }

  .home-tile-launcher,
  .home-tile-roleplay {
    grid-column: auto;
  }

  .home-tile-modpack {
    grid-column: auto;
    grid-row: span 2;
  }

  .home-news {
    grid-template-columns: 1fr;
  }

  .play-button.play-button-hero {
    min-width: min(240px, 100%);
    height: 56px;
    padding: 0 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .play-button.play-button-hero,
  .play-button-hero::before {
    animation: none;
  }
}
