:root {
  --bg1: #0a0a0f;
  --bg2: #1a0f2e;
  --bg3: #0f0a1a;
  --ink: #e6e6fa;
  --muted: #cfc5e8;
  --gold: #d6b46a;
  --violet: rgba(147, 112, 219, .22);
  --violet-2: rgba(138, 43, 226, .12);
  --glass: rgba(147, 112, 219, .10);
  --glass-b: rgba(147, 112, 219, .25);
  --radius: 20px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .6);

  --red: #ff6b6b;
  --green: #63e6be;
  --amber: #ffd166;

  --font-sans: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-title: "IM Fell English SC", "Times New Roman", serif;
}

/* typo globale */
h1, h2, h3, .title-font {
  font-family: var(--font-title);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
}

p, li, input, textarea, button {
  font-family: var(--font-sans);
}

/* container */
.container {
  width: min(1100px, 100% - 2rem);
  margin: 0 auto;
}

/* carte parchemin mystique */
.card {
  background: radial-gradient(circle at top left, var(--violet-2), transparent 60%),
              radial-gradient(circle at bottom right, rgba(0,0,0,.6), transparent 55%),
              linear-gradient(135deg, rgba(255,255,255,.03), rgba(0,0,0,.5));
  border-radius: var(--radius);
  padding: 1.5rem 1.8rem;
  border: 1px solid var(--glass-b);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

/* =========================================
   Layout global utile au header
   ========================================= */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.container {
  width: min(1100px, 100% - 2rem);
  margin-inline: auto;
}

/* Fond particules (sera alimenté en JS plus tard) */
#bg-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Pour laisser respirer le contenu sous le header */
.page-main {
  padding: 1.5rem 0 3rem;
}

/* =========================================
   HEADER
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background:
    linear-gradient(90deg, rgba(15,10,26,.96), rgba(10,10,15,.98));
  border-bottom: 1px solid var(--glass-b);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-block: .6rem;
}

/* =========================================
   Brand (logo + titre)
   ========================================= */
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--gold);
  white-space: nowrap;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(214,180,106,.4), 0 10px 25px rgba(0,0,0,.7);
}

.brand-text {
  font-family: "IM Fell English SC", serif;
  font-size: 1.05rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* =========================================
   NAVIGATION — Desktop par défaut
   ========================================= */
.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

/* Liens principaux */
.nav-link,
.nav-item > a.nav-link {
  border: none;
  background: none;
  color: var(--ink);
  font-size: .95rem;
  font-weight: 500;
  padding: .4rem .7rem;
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .12s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-item > a.nav-link:hover,
.nav-item > a.nav-link:focus-visible {
  background: radial-gradient(circle at top, var(--violet), transparent 70%);
  color: var(--gold);
  transform: translateY(-1px);
}

/* Bouton dropdown */
.has-menu::after {
  content: "▾";
  font-size: .7rem;
  opacity: .75;
}

/* =========================================
   DROPDOWNS (desktop) — version glow mystique
   ========================================= */
.dropdown {
  position: relative;
}

/* Panneau */
.dropdown .menu {
  position: absolute;
  top: 115%;
  left: 0;
  min-width: 230px;
  padding: 0.9rem 0.95rem 1rem;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(214,180,106,.16), transparent 60%),
    radial-gradient(circle at bottom right, rgba(147,112,219,.22), transparent 60%),
    rgba(5,5,12,.98);
  border: 1px solid rgba(147,112,219,.55);
  box-shadow:
    0 20px 50px rgba(0,0,0,.9),
    0 0 0 1px rgba(0,0,0,.85);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: .3rem;
  opacity: 0;
  transform: translateY(6px) scale(.97);
  transform-origin: top left;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 30;
}

/* Petite flèche vers le bouton */
.dropdown .menu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 26px;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background:
    radial-gradient(circle at top left, rgba(214,180,106,.16), transparent 60%),
    radial-gradient(circle at bottom right, rgba(147,112,219,.22), transparent 60%),
    rgba(5,5,12,.98);
  border-top: 1px solid rgba(147,112,219,.55);
  border-left: 1px solid rgba(147,112,219,.55);
  transform: rotate(45deg);
}

/* Alignement à droite pour certains menus */
.dropdown .menu.align-right {
  right: 0;
  left: auto;
  transform-origin: top right;
}
.dropdown .menu.align-right::before {
  left: auto;
  right: 26px;
}

/* Respect de l’attribut hidden */
.dropdown .menu[hidden] {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Quand JS enlève hidden, on laisse l’animation faire son taf */
.dropdown .menu:not([hidden]) {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Titres de groupe (Sang-Satō / Valshaari…) */
.menu-group-title {
  margin: .35rem .1rem .18rem;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--muted);
  opacity: .9;
  position: relative;
  padding-left: 1.1rem;
}

/* Liens internes au menu */
.menu-link {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .26rem .5rem;
  border-radius: 999px;
  font-size: .9rem;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.2;
  transition:
    background .14s ease,
    color .14s ease,
    transform .08s ease,
    padding-left .12s ease;
  position: relative;
}

/* Hover / focus */
.menu-link:hover,
.menu-link:focus-visible {
  background: radial-gradient(circle at left, var(--violet-2), transparent 70%);
  color: var(--gold);
  transform: translateX(2px);
  padding-left: .7rem;
}

.menu-link:hover::before,
.menu-link:focus-visible::before {
  color: var(--gold);
  opacity: 1;
}
/* Désactiver les petits ronds dans le menu */
.menu-group-title::before,
.menu-link::before {
  content: none !important;
}

/* =========================================
   Sous-menus dans le dropdown Portail
   ========================================= */

.menu-sub {
  margin-bottom: .25rem;
}

/* Titre cliquable (Sang-Satō / Valshaari) */
.menu-sub-label {
  width: 100%;
  padding: .35rem .4rem;
  margin: 0 0 .1rem;
  border-radius: 999px;
  border: none;
  background: rgba(18, 12, 32, .9);
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .1s ease;
}

.menu-sub-label::after {
  content: "▾";
  font-size: .7rem;
  opacity: .7;
}

/* Liste interne */
.menu-sub-list {
  list-style: none;
  margin: 0;
  padding: .1rem 0 .25rem .3rem;
  display: flex;
  flex-direction: column;
  gap: .12rem;

  /* animation ouverture desktop */
  max-height: 0;
  overflow: hidden;
  transition: max-height .2s ease;
}

/* Ouverture au survol / focus (desktop) */
.menu-sub:hover .menu-sub-list,
.menu-sub:focus-within .menu-sub-list {
  max-height: 300px;
}

.menu-sub:hover .menu-sub-label,
.menu-sub:focus-within .menu-sub-label {
  background: radial-gradient(circle at left, var(--violet-2), transparent 65%);
  color: var(--gold);
  transform: translateY(-1px);
}

/* Les liens restent comme avant, sans les ronds */
.menu-link {
  display: block;
  padding: .22rem .45rem;
  border-radius: 999px;
  font-size: .9rem;
  text-decoration: none;
  color: var(--ink);
  transition: background .14s ease, color .14s ease, transform .08s ease, padding-left .12s ease;
}

.menu-link:hover,
.menu-link:focus-visible {
  background: radial-gradient(circle at left, var(--violet-2), transparent 70%);
  color: var(--gold);
  transform: translateX(2px);
  padding-left: .6rem;
}

/* Mobile : sous-menus toujours ouverts dans le panneau */
@media (max-width: 768px) {
  .menu-sub-label {
    background: transparent;
    padding-left: 0;
    padding-right: 0;
  }
  .menu-sub-label::after {
    display: none;
  }
  .menu-sub-list {
    max-height: none;
    padding-left: .8rem;
  }
}

/* =========================================
   BOUTON BURGER (mobile)
   ========================================= */
.nav-toggle {
  display: none; /* affiché seulement en mobile */
  width: 38px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--glass-b);
  background: rgba(10,10,20,.9);
  padding: 0;
  margin: 0;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,.7);
}

.nav-toggle-bar {
  display: block;
  width: 60%;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

/* État ouvert (JS mettra aria-expanded="true" + classe .is-open sur .site-nav) */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  .header-inner {
    gap: .4rem;
  }

  .brand-text {
    font-size: .95rem;
  }

  /* Burger visible en mobile */
  .nav-toggle {
    display: inline-flex;
  }

  /* Navigation mobile : panneau déroulant */
  .site-nav {
    position: fixed;
    top: 56px; /* hauteur approximative du header */
    left: 0;
    right: 0;
    background: radial-gradient(circle at top, rgba(26,15,46,.98), rgba(10,10,15,.98));
    border-bottom: 1px solid var(--glass-b);
    max-height: 0;
    overflow: hidden;
    transition: max-height .22s ease;
  }

  /* Classe que le JS devra ajouter quand le menu est ouvert */
  .site-nav.is-open {
    max-height: 420px; /* assez pour tout le menu */
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: .3rem;
    padding: .6rem 1.2rem 1rem;
  }

  .nav-link,
  .nav-item > a.nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: .35rem 0;
    border-radius: 0;
  }

  /* Dropdowns en mobile : menus intégrés, non flottants */
  .dropdown .menu {
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: .2rem 0 .4rem 1rem;
    margin-top: 0;
  }

  .menu-group-title {
    margin-left: 0;
    margin-top: .35rem;
  }

  .menu-link {
    padding: .2rem 0;
    border-radius: 0;
  }
}
/* =========================================
   PARTICULES — Fond mystique
   ========================================= */
#bg-particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

/* Une particule : point lumineux diffus */
.particle {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(214,180,106, 0.9) 0%,
    rgba(147,112,219, 0.7) 40%,
    transparent 70%
  );
  filter: blur(2px);
  opacity: var(--opacity);
  animation: floatParticle var(--duration) linear infinite;
}

@keyframes floatParticle {
  0% {
    transform: translateY(0) translateX(0) scale(1);
  }
  50% {
    transform: translateY(-60px) translateX(15px) scale(1.2);
  }
  100% {
    transform: translateY(0) translateX(0) scale(1);
  }
}
/* =========================================
   FOOTER MYSTIQUE — Les Arcanes de Cookie
   ========================================= */
.site-footer {
  margin-top: 4rem;
  padding: 2.2rem 0 2.6rem;
  background: radial-gradient(circle at bottom, rgba(26,15,46,.35), rgba(10,10,15,.9));
  border-top: 1px solid var(--glass-b);
  box-shadow: 0 -20px 40px rgba(0,0,0,.45);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 3;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  text-align: center;
}

/* =========================================
   Icônes mystiques qui orbitent un peu
   ========================================= */
.footer-orbit {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  align-items: center;
}

.footer-icon {
  font-size: 1.35rem;
  color: var(--gold);
  opacity: .85;
  animation: footerFloat 5s ease-in-out infinite;
}

.footer-icon:nth-child(2) {
  animation-duration: 6.5s;
  animation-delay: -.5s;
}

.footer-icon:nth-child(3) {
  animation-duration: 7.8s;
  animation-delay: -.8s;
}

@keyframes footerFloat {
  0%   { transform: translateY(0) rotate(0deg); }
  50%  { transform: translateY(-6px) rotate(6deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

/* =========================================
   Texte central
   ========================================= */
.footer-text {
  color: var(--muted);
  font-size: .9rem;
  letter-spacing: .03em;
}

.footer-brand {
  color: var(--gold);
  font-weight: 600;
  letter-spacing: .05em;
}

/* =========================================
   Liens (Admin, Légal)
   ========================================= */
.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}

.footer-link {
  color: var(--ink);
  font-size: .95rem;
  text-decoration: none;
  padding: .1rem .4rem;
  border-radius: 4px;
  transition: color .18s ease, background .18s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--gold);
  background: rgba(214,180,106,.08);
}

.footer-sep {
  color: var(--muted);
  opacity: .8;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 650px) {
  .footer-orbit .footer-icon {
    font-size: 1.2rem;
  }
  .footer-text {
    font-size: .82rem;
  }
  .footer-link {
    font-size: .88rem;
  }
}

.btn-success-temp {
  box-shadow: 0 0 0 2px rgba(80, 255, 140, .7);
}

/* =========================================================
   THÈMES : sombre / clair
   ========================================================= */

/* Sombre = comportement actuel par défaut */
body[data-theme="dark"] {
  /* fond global */
  background: radial-gradient(circle at top, #1a0f2e 0, #0a0a0f 55%, #000 100%);
  color: var(--ink);
}

/* Désactiver totalement le fond de particules quand OFF */
body[data-particles="0"] #bg-particles {
  display: none !important;
}
.home-cta-row {
  margin: 1.5rem 0 0;
}

.home-advent-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 180, 106, 0.9);
  background: radial-gradient(circle at top, #f0dfb4 0%, #c4983c 60%, #7b4f1c 100%);
  color: #2b1d0c;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.9);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.home-advent-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 1);
  filter: brightness(1.05);
}
