/* =========================
   FONTS
========================= */
@font-face{
  font-family: "LazyDog";
  src: url("../fonts/lazy_dog.ttf") format("truetype");
  font-display: swap;
}
@font-face{
  font-family: "ZombiesBrainless";
  src: url("../fonts/Zombies Brainless.otf") format("opentype");
  font-display: swap;
}

/* =========================
   THEME / VARIABLES
========================= */
:root{
  --bg:#0c0f10;
  --text:#dbdbdb;
  --muted:rgba(219,219,219,.72);
  --green:#3dce61;
  --violet:#523877;
}

/* =========================
   SCROLLBAR (theme du site, tous les elements scrollables)
========================= */
*{
  scrollbar-width: thin;
  scrollbar-color: rgba(61,206,97,.45) rgba(12,15,16,.55);
}
*::-webkit-scrollbar{
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track{
  background: rgba(12,15,16,.55);
}
*::-webkit-scrollbar-thumb{
  background: rgba(61,206,97,.35);
  border-radius: 999px;
  border: 2px solid rgba(12,15,16,.55);
}
*::-webkit-scrollbar-thumb:hover{
  background: rgba(61,206,97,.55);
}
*::-webkit-scrollbar-corner{
  background: rgba(12,15,16,.55);
}

/* =========================
   BASE / RESET
========================= */
*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  text-transform: uppercase;
  font-family: "LazyDog", system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif;
  overflow-x:hidden;
}

/* =========================
   BACKGROUND FX (ORBS + DOTS)
========================= */
#orbs{
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  display: block;
}

.bg{
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;

  background: radial-gradient(circle, rgba(219,219,219,.085) 1px, transparent 1px);
  background-size: 18px 18px;
  background-position: 0 0;
  opacity: .95;

  animation: dotsDrift 26s linear infinite;
}
@keyframes dotsDrift{
  0%   { background-position: 0 0; }
  100% { background-position: 180px 120px; }
}

.bg::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 20% 25%, rgba(61,206,97,.18), transparent 52%),
    radial-gradient(circle at 80% 30%, rgba(82,56,119,.22), transparent 55%),
    radial-gradient(circle at 50% 85%, rgba(61,206,97,.10), transparent 62%),
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0), rgba(0,0,0,.65));
  background-repeat: no-repeat;
  background-size: cover;
  filter: saturate(1.15);
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce){
  .bg{ animation:none !important; }
  .radial__ring{ animation:none !important; }
  .radial__item{ transition:none !important; }
  .radial__link{ transition:none !important; }
  .radial__trace circle{ animation:none !important; transition:none !important; }
  .radial[data-open="true"] .radial__trace circle{ opacity:.9; stroke-dashoffset:0; }
}

/* =========================
   LAYOUT (SHELL / TOPBAR / FOOTER)
========================= */
.shell{
  min-height:100vh;
  min-height:100dvh;
  display:grid;
  grid-template-rows:auto 1fr auto;
  gap: 14px;
  padding: 16px;
}

.topbar{
  position: relative;
  overflow: hidden;
  display:grid;
  grid-template-columns: 44px 1fr 74px;
  align-items:center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(12,15,16,.60);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(219,219,219,.10);
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}

/* =========================
   NAVIGATION RAPIDE ENTITES (grille en bas des pages fantomes/*.html)
   Ajoutee en JS (voir setupQuickNav() dans fantomes/entity.js) comme
   derniere section de .page__card, apres .layout.
========================= */
.entityQuickNav{
  padding: 22px 22px 26px;
  border-top: 1px solid rgba(219,219,219,.10);
}

.entityQuickNav__title{
  margin: 0 0 16px;
  color: var(--green);
  font-size: 13px;
  letter-spacing: .14em;
  text-align: center;
}

.entityQuickNav__grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 16px;
  justify-items: center;
}

.entityQuickNav__item{
  width: 88px;
  height: 88px;
  border-radius: 999px;
  padding: 8px;
  display: grid;
  place-items: center;

  background: radial-gradient(circle at 50% 50%, rgba(12,15,16,.62), rgba(12,15,16,.35));
  border: 1px solid rgba(219,219,219,.12);
  text-decoration: none;

  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.entityQuickNav__item:hover{
  transform: translateY(-3px);
  border-color: rgba(61,206,97,.40);
}
.entityQuickNav__item.is-current{
  border-color: var(--green);
  box-shadow: 0 0 16px rgba(61,206,97,.30);
}

.entityQuickNav__img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 999px;
  user-select: none;
  -webkit-user-drag: none;
}

@media (max-width: 560px){
  .entityQuickNav__grid{ grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
  .entityQuickNav__item{ width: 70px; height: 70px; }
}

@media (prefers-reduced-motion: reduce){
  .entityQuickNav__item{ transition: none; }
}

.brand{
  grid-column: 2;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  user-select:none;
}

.brand__dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(61,206,97,.7);
  display: inline-block;
  vertical-align: middle;
  margin: 0 8px 2px 0;
}

/* Sur les pages de section (fantomes, equipements) : dot Spooky devient gris */
body.is-section .brand__dot{
  background: rgba(219,219,219,.55);
  box-shadow: none;
}

.brand__text{
  font-family: "ZombiesBrainless", "LazyDog", system-ui, sans-serif;
  font-weight: lighter;
  letter-spacing: .18em;
  font-size: clamp(24px, 6vw, 54px);
  line-height: 1.35;
  color: rgba(219,219,219,.92);
  text-align: center;
}

/* sep + dot + lien de section : jamais coupes au retour a la ligne */
.brand__crumb{
  display: inline-block;
  white-space: nowrap;
}

/* Breadcrumb links */
.brand__link{
  color: rgba(219,219,219,.92);
  text-decoration: none;
  padding-bottom: 2px;
  transition: color .18s ease, text-shadow .18s ease;
}

/* Hover breadcrumb : texte vert */
.brand__link:hover{
  color: var(--green);
  text-shadow: 0 0 18px rgba(61,206,97,.12);
}

/* Le lien de la section active (a cote de son point vert) reste vert en permanence */
.brand__crumb .brand__link{
  color: var(--green);
}

/* =========================
   WIDGET FEYWEE (assets/js/feywee-widget.js)
   Bouton rond en haut a droite de la topbar + panneau reseaux
========================= */
.topbar__feywee{
  grid-column: 3;
  justify-self: end;
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(219,219,219,.18);
  background: rgba(12,15,16,.55);
  overflow: hidden;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.topbar__feywee:hover,
.topbar__feywee[aria-expanded="true"]{
  border-color: rgba(82,56,119,.55);
  box-shadow: 0 0 0 1px rgba(82,56,119,.25);
  transform: translateY(-1px);
}
.topbar__feyweeImg{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.feyweePanel{
  position: absolute;
  z-index: 60;
  width: 320px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(82,56,119,.40);
  background: rgba(12,15,16,.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.feyweePanel[hidden]{ display: none; }

.feyweePanel__title{
  margin: 0 0 10px;
  font-family: "ZombiesBrainless","LazyDog",system-ui,sans-serif;
  font-weight: lighter;
  letter-spacing: .14em;
  font-size: 14px;
  color: rgba(219,219,219,.95);
  text-align: center;
}

.feyweePanel__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.feyweePanel__link{
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(219,219,219,.10);
  transition: transform .16s ease, border-color .16s ease;
}
.feyweePanel__link:hover{
  transform: translateY(-2px);
  border-color: rgba(61,206,97,.35);
}
.feyweePanel__link img{
  width: 100%;
  display: block;
}

@media (max-width: 520px){
  .topbar{ grid-template-columns: 44px 1fr 58px; }
  .topbar__feywee{ width: 50px; height: 50px; }
  .feyweePanel{ width: min(260px, 84vw); padding: 14px; }
}

@media (prefers-reduced-motion: reduce){
  .topbar__feywee, .feyweePanel__link{ transition: none; }
}

/* =========================
   RECHERCHE GLOBALE (assets/js/search.js)
========================= */
.searchTrigger{
  grid-column: 1;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(219,219,219,.18);
  background: rgba(12,15,16,.55);
  color: rgba(219,219,219,.90);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, color .18s ease;
}
.searchTrigger:hover,
.searchTrigger[aria-expanded="true"]{
  border-color: rgba(61,206,97,.40);
  box-shadow: 0 0 0 1px rgba(61,206,97,.12);
  color: var(--green);
}
.searchTrigger svg{ width: 20px; height: 20px; fill: currentColor; }

.searchPanel{
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
}
.searchPanel.is-open{ display: block; }

.searchPanel__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
}

.searchPanel__box{
  position: absolute;
  left: 50%;
  top: 14vh;
  transform: translateX(-50%);
  width: min(560px, 92vw);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(219,219,219,.14);
  background: rgba(12,15,16,.90);
  backdrop-filter: blur(12px);
  box-shadow: 0 30px 90px rgba(0,0,0,.65);
  overflow: hidden;
}

.searchPanel__head{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(219,219,219,.10);
  flex: none;
}
.searchPanel__icon{
  width: 20px;
  height: 20px;
  fill: rgba(219,219,219,.55);
  flex: none;
}
.searchPanel__input{
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: rgba(219,219,219,.95);
  font-size: 14px;
  letter-spacing: .06em;
  outline: none;
}
.searchPanel__input::placeholder{ color: rgba(219,219,219,.40); }
.searchPanel__close{
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(219,219,219,.14);
  background: rgba(12,15,16,.50);
  color: rgba(219,219,219,.85);
  font-size: 16px;
  cursor: pointer;
}
.searchPanel__close:hover{ border-color: rgba(61,206,97,.35); color: var(--green); }

.searchPanel__results{
  overflow-y: auto;
  padding: 8px;
  display: grid;
  gap: 4px;
}

.searchPanel__hint{
  margin: 0;
  padding: 18px 10px;
  text-align: center;
  color: rgba(219,219,219,.45);
  font-size: 12px;
  letter-spacing: .06em;
}

.searchResult{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: rgba(219,219,219,.90);
  transition: background .15s ease;
}
.searchResult:hover,
.searchResult.is-active{
  background: rgba(61,206,97,.10);
}
.searchResult__type{
  font-size: 10px;
  letter-spacing: .08em;
  color: rgba(219,219,219,.45);
  white-space: nowrap;
}
.searchResult__name{
  font-family: "LazyDog",system-ui,sans-serif;
  color: var(--green);
  font-size: 15px;
  letter-spacing: .04em;
  text-align: right;
}

@media (max-width: 560px){
  .searchPanel__box{ top: 8vh; width: 94vw; }
}

/* =========================
   LIENS MOT-CLE (assets/js/keyword-links.js)
   Mots reconnus dans les textes (entites, equipements, objets maudits,
   maps, vitesses) et transformes en liens vers la fiche correspondante.
========================= */
.kwLink{
  color: var(--green);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: rgba(61,206,97,.55);
  text-underline-offset: 2px;
  transition: color .15s ease, text-shadow .15s ease;
}
.kwLink:hover{
  color: rgba(219,219,219,.98);
  text-shadow: 0 0 12px rgba(61,206,97,.35);
}

/* Dot mini avant FANTOMES */
.brand__dot--mini{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(61,206,97,.7);
  display: inline-block;
  vertical-align: middle;
  margin: 0 10px 2px 10px;
}

/* Footer */
.footer{
  position: relative;
  overflow: hidden;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(12,15,16,.60);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(219,219,219,.10);
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}

.footer__left{
  color: rgba(219,219,219,.82);
  font-size: 12px;
  white-space: nowrap;
}

.footer__links{
  display:flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.footer__links a{
  display: inline-flex;
  align-items: center;
  color: rgba(219,219,219,.82);
  text-decoration:none;
  font-size: 12px;
  letter-spacing: .08em;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(219,219,219,.12);
  background: rgba(12,15,16,.40);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.footer__links a:hover{
  transform: translateY(-1px);
  border-color: rgba(61,206,97,.35);
  box-shadow: 0 0 0 1px rgba(61,206,97,.14), 0 10px 26px rgba(0,0,0,.35);
}

/* Pile de mini avatars ronds injectee en JS (voir feywee-widget.js)
   a cote du lien PARTENAIRES du footer */
.footer__partnersAvatars{
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
}
.footer__partnersAvatars img{
  width: 22px;
  height: 22px;
  border-radius: 999px;
  object-fit: cover;
  background: #0c0f10;
  border: 1px solid rgba(12,15,16,.85);
  box-shadow: 0 0 0 1px rgba(219,219,219,.18);
  margin-left: -8px;
}
.footer__partnersAvatars img:first-child{ margin-left: 0; }

@media (max-width: 720px){
  .footer{
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
  }
  .footer__left{ white-space: normal; }
  .footer__links{ justify-content: flex-start; gap: 8px; }
}

/* Ajustement breadcrumb + footer mobile (espacements plus petits) */
@media (max-width: 520px){
  .brand{ gap: 8px; }
  .brand__text{ font-size: clamp(16px, 6.4vw, 24px); letter-spacing: .12em; }
  .brand__dot--mini{ margin: 0 6px 2px 6px; }
  .topbar{ padding: 10px 12px; }

  .footer{ padding: 8px 10px; border-radius: 12px; }
  .footer__left{ font-size: 10px; }
  .footer__links{ gap: 6px; }
  .footer__links a{ font-size: 10px; padding: 5px 8px; }
}

/* =========================
   SHELL BODY + NAVIGATION LATERALE (toutes les pages sauf l'accueil)
   Injectee en JS (voir main.js) : enveloppe .page (2e enfant de .shell)
   dans une grille a 2 colonnes plutot que de changer .shell lui-meme —
   .shell garde exactement 3 enfants directs partout (topbar/shellBody ou
   page/footer), donc aucun risque pour les pages sans barre laterale.
========================= */
.shellBody{
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.shellBody__main{
  min-width: 0;
}

/* .page est normalement cadre sur le viewport (96vw) : a l'interieur de
   shellBody__main, on le recadre plutot sur sa colonne reelle (100%) pour
   ne jamais deborder sur la barre laterale a cote */
.shellBody__main .page{
  width: min(var(--page-w, 980px), 100%);
}

.sideNav{
  position: sticky;
  top: 16px;

  /* reste pinglee en haut du viewport pendant que la page defile, mais
     defile elle-meme independamment des que son propre contenu (7 grandes
     icones) depasse la hauteur disponible */
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);

  display: flex;
  flex-direction: column;

  border-radius: 16px;
  background: rgba(12,15,16,.60);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(219,219,219,.10);
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
  overflow: hidden;
}

/* Pas de scrollbar visible : des fleches (affichees en JS seulement si le
   contenu depasse) indiquent qu'on peut defiler, et servent aussi de
   boutons pour le faire */
.sideNav__scroll{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;

  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
}
.sideNav__scroll::-webkit-scrollbar{ display: none; }

.sideNav__arrow{
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 6px 0;

  background: rgba(61,206,97,.10);
  border: none;
  cursor: pointer;
  color: var(--green);
  filter: drop-shadow(0 0 6px rgba(61,206,97,.35));

  transition: color .15s ease, background .15s ease, filter .15s ease;
}
.sideNav__arrow.is-visible{ display: flex; }
.sideNav__arrow:hover{
  background: rgba(61,206,97,.22);
  filter: drop-shadow(0 0 10px rgba(61,206,97,.55));
}
.sideNav__arrow svg{ width: 16px; height: 16px; }
.sideNav__arrow--up{ border-bottom: 1px solid rgba(219,219,219,.10); }
.sideNav__arrow--down{ border-top: 1px solid rgba(219,219,219,.10); }

.sideNav__item{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;

  padding: 12px 8px;
  border-radius: 14px;
  border: 1px solid transparent;

  text-decoration: none;
  color: rgba(219,219,219,.80);

  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.sideNav__item:hover{
  background: rgba(61,206,97,.08);
  color: var(--text);
}
.sideNav__item.is-active{
  background: rgba(61,206,97,.14);
  border-color: rgba(61,206,97,.30);
  color: var(--green);
}

/* Meme esprit que .radial__badge (accueil, menu ouvert) : cercle degrade +
   image en grand — la demande explicite etait d'egaler cette taille-la */
.sideNav__iconWrap{
  position: relative;
  display: block;
  width: 112px;
  height: 112px;
  flex: 0 0 auto;
}

.sideNav__icon{
  width: 112px;
  height: 112px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 14px rgba(61,206,97,.12));
}

.sideNav__label{
  font-size: 13px;
  letter-spacing: .06em;
  line-height: 1.25;
  text-align: center;
}

/* Pas assez de place pour une colonne fixe sans ecraser le contenu
   (--page-w le plus large est 1180px) : sous ce seuil, la barre laterale
   disparait plutot que de forcer un defilement horizontal */
@media (max-width: 1400px){
  .shellBody{ grid-template-columns: 1fr; }
  .sideNav{ display: none; }
}

/* =========================
   PAGE CARD (composant partage : fantomes.html, equipements.html,
   pages entite, pages legales)
   --page-w regle la largeur max, a surcharger par page si besoin
   (defaut 980px, utilise tel quel par les pages legales)
========================= */
.page{
  width: min(var(--page-w, 980px), 96vw);
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 18px 0 6px;
}

.page__card{
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(219,219,219,.10);
  background: rgba(12,15,16,.60);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
  overflow: hidden;
}

.page__header{
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(219,219,219,.08);
  display: grid;
  gap: 10px;
}

.page__headrow{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.page__title{
  margin: 0;
  font-family: "ZombiesBrainless","LazyDog",system-ui,sans-serif;
  letter-spacing: .14em;
  font-weight: lighter;
  font-size: clamp(18px, 3.2vw, 30px);
  color: rgba(219,219,219,.96);
}

.page__titleDot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(61,206,97,.7);
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
  transform: translateY(-2px);
}

.page__meta{
  margin: 6px 0 0;
  color: rgba(219,219,219,.75);
  font-size: 12px;
  letter-spacing: .10em;
}

.page__back{
  width: fit-content;
  text-decoration: none;
  color: rgba(219,219,219,.86);
  border: 1px solid rgba(219,219,219,.12);
  background: rgba(12,15,16,.40);
  padding: 8px 12px;
  border-radius: 999px;
  letter-spacing: .10em;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  margin-top: 2px;
}
.page__back:hover{
  transform: translateY(-1px);
  border-color: rgba(61,206,97,.35);
  box-shadow: 0 0 0 1px rgba(61,206,97,.14), 0 10px 26px rgba(0,0,0,.35);
}

/* =========================
   INDEX STAGE
========================= */
.stage{
  min-height: 0;
  display:grid;
  place-items:center;
  padding: 6px 10px 6px;
  gap: 16px;

  /* Container query: le menu radial se dimensionne sur l'espace REELLEMENT
     disponible ici (et non sur tout le viewport), il ne peut donc plus
     deborder sur la topbar/le footer quand ceux-ci deviennent plus hauts */
  container-type: size;
  container-name: stage;

  /* Tout est derive d'UNE seule taille de base (--stage-size), en
     proportions fixes. Ca garantit a la fois :
     - qu'aucune tuile ne deborde jamais du plateau (radius + btn/2 <= stage/2)
     - qu'aucune tuile ne chevauche jamais le hub central (radius - btn/2 > hub)
     ...quelle que soit la resolution d'ecran, sans valeurs planchers
     independantes qui pourraient rentrer en conflit entre elles. */
  /* 88cqmin : le plateau (.stage) mesure tres exactement l'espace REEL
     dispo entre topbar/footer (voir container-type:size plus bas), donc
     aller pres de 100% de cqmin ne peut pas deborder dessus — seule une
     petite marge est gardee pour le padding du container lui-meme.
     Agrandit le hub ET les tuiles ensemble sans toucher aux proportions/
     marges anti-chevauchement (qui restent valides a n'importe quelle
     taille de plateau, seul le plancher 260px reste le cas le plus serre). */
  --stage-size: clamp(260px, 88cqmin, 1000px);
  /* Logo TRES grand par defaut : rien autour de lui n'est visible tant que
     le menu est ferme (les tuiles sont invisibles en etat ferme), donc
     aucune contrainte de place a respecter ici. */
  --logo: calc(var(--stage-size) * 0.72);
  /* Tuiles (juste un point d'ancrage desormais, plus de cadre visible : voir
     .radial__link) volontairement larges pour laisser le cercle-image
     (.radial__badge, 94% de --btn) devenir le plus grand possible. */
  --btn: calc(var(--stage-size) * 0.30);
  /* Le rayon est calcule pour la taille EFFECTIVE du logo une fois retreci a
     l'ouverture (voir --radial-open-scale plus bas) : c'est cette taille-la
     qui doit rester espacee des tuiles, pas la taille fermee.
     Verifie mathematiquement sans chevauchement (marge >= ~3.8px meme au
     plancher de --stage-size) : logo<->tuiles, tuiles<->bord du plateau,
     ET tuiles adjacentes entre elles — cette derniere contrainte (tuiles
     adjacentes) est la plus stricte des trois, elle plafonne le cercle-image
     a ~30% de --stage-size quel que soit --radial-open-scale : au-dela,
     ecarter davantage les tuiles du centre (agrandir --radius) les
     rapproche du bord du plateau plus vite qu'il ne les eloigne les unes des
     autres, donc ca ne laisse pas de marge supplementaire pour grossir — la
     seule vraie marge de manoeuvre restante est --stage-size lui-meme (voir
     plus haut). Le detail du calcul est documente dans la conversation qui a
     introduit ce reglage. */
  --radius: calc(var(--stage-size) * 0.342);
  --count: 7;
  /* Facteur d'echelle applique au hub central quand le menu s'ouvre — reduit
     pour que le logo retreci reste plus petit que le cercle-image des
     tuiles (demande explicite : les images de section doivent paraitre plus
     grandes que le logo une fois le menu ouvert) */
  --radial-open-scale: 0.30;
}

.help{
  text-align:center;
  color: rgba(219,219,219,.70);
  font-size: 13px;
  line-height: 1.4;
}

/* =========================
   RADIAL MENU
========================= */
.radial{
  position: relative;
  width: var(--stage-size);
  height: var(--stage-size);
  display:grid;
  place-items:center;
  isolation:isolate;
}

.radial__center{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%,-50%) scale(1);
  width: calc(var(--logo) + 26px);
  height: calc(var(--logo) + 26px);
  border-radius: 999px;
  border: 1px solid rgba(219,219,219,.12);
  background: radial-gradient(circle at 50% 45%, rgba(12,15,16,.92), rgba(12,15,16,.45));
  cursor: pointer;
  display:grid;
  place-items:center;
  z-index: 10;
  box-shadow: 0 20px 70px rgba(0,0,0,.55);
  transition: border-color .2s ease, box-shadow .2s ease, transform .45s cubic-bezier(.15,.85,.15,1);
}
.radial__center:hover{
  border-color: rgba(61,206,97,.35);
  box-shadow: 0 0 26px rgba(61,206,97,.10), 0 26px 74px rgba(0,0,0,.60);
}

/* Le hub central se retrecit quand le menu s'ouvre, pour laisser
   la place aux tuiles tout autour sans jamais les chevaucher */
.radial[data-open="true"] .radial__center{
  transform: translate(-50%,-50%) scale(var(--radial-open-scale));
}

.radial__logo{
  width: var(--logo);
  height: var(--logo);
  object-fit: contain;
  filter:
    drop-shadow(0 0 28px rgba(61,206,97,.18))
    drop-shadow(0 0 34px rgba(82,56,119,.18));
  user-select:none;
}

.radial__ring{
  position:absolute;
  inset: -10px;
  border-radius: 999px;
  background: conic-gradient(
    from 180deg,
    rgba(61,206,97,.0),
    rgba(61,206,97,.38),
    rgba(82,56,119,.30),
    rgba(61,206,97,.0)
  );
  opacity: .65;
  mask: radial-gradient(circle, transparent 63%, black 66%);
  animation: ringSpin 9s linear infinite;
  pointer-events:none;
}
@keyframes ringSpin{ to{ transform: rotate(360deg); } }

/* Anneau qui se "trace" en glow vert au moment de l'ouverture (distinct de
   .radial__ring qui tourne en continu, meme ferme) : un cercle SVG dont le
   contour se dessine avec stroke-dashoffset, pour marquer clairement le
   geste d'ouverture. r=47 sur un viewBox 0..100 => circonference ~295.31 */
.radial__trace{
  position:absolute;
  inset:-10px;
  overflow: visible;
  pointer-events:none;
  transform: rotate(-90deg); /* le trace demarre en haut du cercle */
}
/* le "glow" est simule par un trait plus epais et flou en dessous (pas de
   filter:drop-shadow sur le SVG : ca peut faire apparaitre un halo carre
   du rectangle de filtre dans certains navigateurs) */
.radial__trace .trace-glow{
  fill:none;
  stroke: var(--green);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 295.31;
  stroke-dashoffset: 295.31;
  opacity: 0;
}
.radial__trace .trace-line{
  fill:none;
  stroke: var(--green);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 295.31;
  stroke-dashoffset: 295.31;
  opacity: 0;
}
.radial[data-open="true"] .radial__trace .trace-glow{
  animation: radialTraceGlow .65s cubic-bezier(.4,0,.2,1) forwards;
}
.radial[data-open="true"] .radial__trace .trace-line{
  animation: radialTrace .65s cubic-bezier(.4,0,.2,1) forwards;
}
.radial[data-open="false"] .radial__trace circle{
  transition: opacity .3s ease;
  opacity: 0;
  stroke-dashoffset: 295.31;
}
@keyframes radialTrace{
  0%{ stroke-dashoffset: 295.31; opacity: 1; }
  100%{ stroke-dashoffset: 0; opacity: .9; }
}
@keyframes radialTraceGlow{
  0%{ stroke-dashoffset: 295.31; opacity: .5; }
  100%{ stroke-dashoffset: 0; opacity: .22; }
}

.radial__items{
  position:absolute;
  inset:0;
  list-style:none;
  padding:0;
  margin:0;
  z-index:9;
  pointer-events:none;
}
.radial[data-open="true"] .radial__items{ pointer-events:auto; }

.radial__item{
  position:absolute;
  top:50%;
  left:50%;
  transform:
    translate(-50%,-50%)
    rotate(calc((360deg / var(--count)) * var(--i)))
    translateX(var(--radius))
    rotate(calc((-360deg / var(--count)) * var(--i)));

  opacity: 0;
  filter: blur(1px);
  transition:
    opacity .28s ease,
    filter .28s ease,
    transform .55s cubic-bezier(.15,.95,.15,1.15);
}

.radial[data-open="false"] .radial__item{
  transform:
    translate(-50%,-50%)
    rotate(calc((360deg / var(--count)) * var(--i)))
    translateX(calc(var(--radius) * .58))
    rotate(calc((-360deg / var(--count)) * var(--i) - 14deg))
    scale(.70);
  opacity: 0;
  filter: blur(4px);
  pointer-events: none;
}

.radial[data-open="true"] .radial__item{
  opacity: 1;
  filter: blur(0);
  pointer-events: auto;
  transition-delay: calc(var(--i) * 60ms);
}

/* Plus de cadre carre autour de l'image : juste un point d'ancrage pour le
   positionnement + l'animation au survol, le cercle lui-meme (radial__badge)
   porte tout l'habillage visuel */
.radial__link{
  width: var(--btn);
  height: var(--btn);
  position: relative;

  display:grid;
  place-items:center;

  text-decoration:none;
  color: var(--text);

  transition: transform .18s ease, filter .18s ease;
}

.radial__link:hover{
  transform: translateY(-4px) scale(1.04);
  filter: saturate(1.10);
}
.radial__link:hover .radial__badge::before{ opacity: .75; }

/* Cercle image (comme ghost__badge / equip__badge), a l'echelle du bouton
   radial — agrandi au maximum de la place geometriquement possible (voir
   commentaire sur --radius plus haut) depuis le retrait du cadre et du
   libelle texte (deja ecrit sur l'illustration elle-meme) */
.radial__badge{
  position: relative;
  width: calc(var(--btn) * .94);
  height: calc(var(--btn) * .94);
  border-radius: 999px;
  padding: calc(var(--btn) * .04);
  display: grid;
  place-items: center;

  background: radial-gradient(circle at 50% 50%, rgba(12,15,16,.62), rgba(12,15,16,.35));
  border: 1px solid rgba(219,219,219,.10);
  overflow: hidden;

  transition: border-color .18s ease, box-shadow .18s ease;
}

.radial__badge::before{
  content:"";
  position:absolute;
  inset:-40%;
  background: linear-gradient(120deg, transparent 35%, rgba(219,219,219,.10) 50%, transparent 65%);
  transform: translateX(-30%) rotate(10deg);
  opacity: 0;
  transition: opacity .22s ease;
  pointer-events:none;
}

.radial__link:hover .radial__badge{
  border-color: rgba(61,206,97,.40);
  box-shadow:
    0 0 0 1px rgba(61,206,97,.16),
    0 0 18px rgba(61,206,97,.10);
}

.radial__badge::after{
  content:"";
  position:absolute;
  inset: -2px;
  border-radius: 999px;
  border: 1.75px solid rgba(82,56,119,.60);
  box-shadow:
    0 0 0 1px rgba(82,56,119,.22),
    0 0 12px rgba(82,56,119,.16);
  pointer-events:none;
}

.radial__img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select:none;
  -webkit-user-drag:none;
  filter: drop-shadow(0 0 14px rgba(61,206,97,.12));
}

/* =========================
   APERCU FLOTTANT GENERIQUE (survol/focus d'une carte/image)
   Fixe a droite de l'ecran plutot qu'ancre a un element precis : reste
   lisible quelle que soit la mise en page de la page qui l'utilise.
   Reutilise sur index.html (sections), fantomes.html, equipements.html
   et objets-maudits.html — voir setupHoverPreview() dans main.js.
========================= */
.hoverPreview{
  position: fixed;
  top: 50%;
  right: clamp(14px, 4vw, 56px);
  transform: translateY(-50%) translateX(16px);
  width: min(320px, 86vw);
  z-index: 20;

  padding: 18px 20px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 20%, rgba(61,206,97,.08), transparent 55%),
    rgba(12,15,16,.86);
  border: 1px solid rgba(219,219,219,.14);
  box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(82,56,119,.14);
  backdrop-filter: blur(10px);

  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.hoverPreview.is-active{
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.hoverPreview__title{
  margin: 0 0 8px;
  color: var(--green);
  font-size: 20px;
  font-style: italic;
  font-family: "LazyDog","ZombiesBrainless",cursive;
  letter-spacing: .04em;
}

.hoverPreview__desc{
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .03em;
  color: rgba(219,219,219,.75);
}

/* Pas assez de place a droite (petit ecran) ou pas de survol possible
   (tactile) : l'apercu n'apporte rien, autant ne pas l'afficher */
@media (max-width: 900px), (hover: none){
  .hoverPreview{ display:none; }
}

@media (prefers-reduced-motion: reduce){
  .hoverPreview{ transition: opacity .01s linear; }
}

/* =========================
   PARTICULES FLOTTANTES GENERIQUES (badges/vignettes illustres) —
   meme animation que Spooky Versus, teintee dans le vert du site
========================= */
.cardParticle{
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(61,206,97,.55);
  box-shadow: 0 0 6px rgba(61,206,97,.45);
  animation: cardParticleFloat 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cardParticleFloat{
  0%, 100%{ transform: translate(0,0); opacity: .2; }
  50%{ transform: translate(var(--dx,20px), var(--dy,-20px)); opacity: .8; }
}
@media (prefers-reduced-motion: reduce){
  .cardParticle{ animation: none; opacity: .4; }
}

/* =========================
   TRAINEE DE PARTICULES AU CURSEUR
========================= */
.cursorTrail{
  position: fixed;
  z-index: 9999;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 999px;
  background: rgba(61,206,97,.75);
  box-shadow: 0 0 8px rgba(61,206,97,.65);
  pointer-events: none;
  animation: cursorTrailFade .6s ease-out forwards;
}
@keyframes cursorTrailFade{
  0%{ transform: scale(1) translateY(0); opacity: .9; }
  100%{ transform: scale(.3) translateY(-14px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce){
  .cursorTrail{ display: none; }
}

/* =========================
   RETOUR EN HAUT (bouton flottant, toutes les pages)
   bottom:90px plutot que 16px : reste au-dessus de la banniere cookies
   quand elle est affichee (elle occupe toute la largeur en bas d'ecran)
========================= */
.backToTop{
  position: fixed;
  right: 20px;
  bottom: 90px;
  z-index: 40;

  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;

  border-radius: 999px;
  border: 1px solid rgba(61,206,97,.35);
  background: rgba(61,206,97,.14);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(0,0,0,.45);
  color: var(--green);
  filter: drop-shadow(0 0 6px rgba(61,206,97,.35));
  cursor: pointer;

  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, border-color .15s ease, background .15s ease, filter .15s ease;
}
.backToTop.is-visible{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.backToTop:hover{
  border-color: rgba(61,206,97,.60);
  background: rgba(61,206,97,.24);
  filter: drop-shadow(0 0 10px rgba(61,206,97,.55));
}
.backToTop svg{ width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce){
  .backToTop{ transition: opacity .01s linear; }
}

/* =========================
   COOKIE BANNER + MODAL UI
========================= */
.cookie-banner{
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: grid;
  place-items: center;
}

.cookie-banner__inner{
  width: min(980px, 96vw);
  border-radius: 16px;
  border: 1px solid rgba(219,219,219,.12);
  background: rgba(12,15,16,.70);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 40px rgba(0,0,0,.45);
  padding: 12px 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.cookie-banner__title{
  font-family: "ZombiesBrainless","LazyDog",system-ui,sans-serif;
  font-weight: lighter;
  letter-spacing: .14em;
  font-size: 16px;
  color: rgba(219,219,219,.95);
}

.cookie-banner__desc{
  color: rgba(219,219,219,.78);
  font-size: 12px;
  letter-spacing: .06em;
  line-height: 1.35;
  max-width: 720px;
}
.cookie-banner__desc a{
  color: rgba(219,219,219,.92);
  text-decoration: none;
  border-bottom: 1px dashed rgba(61,206,97,.45);
}
.cookie-banner__desc a:hover{
  border-bottom-color: rgba(82,56,119,.55);
}

.cookie-banner__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-mini{
  border: 1px solid rgba(219,219,219,.18);
  background: rgba(12,15,16,.55);
  color: rgba(219,219,219,.95);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: .12em;
  font-weight: 900;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.cookie-mini:hover{
  transform: translateY(-1px);
  border-color: rgba(61,206,97,.35);
  box-shadow: 0 0 0 1px rgba(61,206,97,.12), 0 12px 26px rgba(0,0,0,.35);
}
.cookie-mini--ghost{ border-color: rgba(219,219,219,.12); }
.cookie-mini--save{
  border-color: rgba(61,206,97,.35);
  box-shadow: 0 0 0 1px rgba(61,206,97,.10);
}

/* Modal */
.cookie-modal{
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}
.cookie-modal.is-open{ display: block; }

.cookie-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
}

.cookie-modal__panel{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: min(820px, 94vw);
  border-radius: 18px;
  border: 1px solid rgba(219,219,219,.12);
  background: rgba(12,15,16,.78);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 80px rgba(0,0,0,.60);
  overflow: hidden;
}

.cookie-modal__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(219,219,219,.08);
}
.cookie-modal__title{
  font-family: "ZombiesBrainless","LazyDog",system-ui,sans-serif;
  font-weight: lighter;
  letter-spacing: .14em;
  font-size: 18px;
  color: rgba(219,219,219,.95);
}
.cookie-x{
  border: 1px solid rgba(219,219,219,.14);
  background: rgba(12,15,16,.50);
  color: rgba(219,219,219,.90);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
}

.cookie-modal__body{
  padding: 14px;
  color: rgba(219,219,219,.82);
  font-size: 12px;
  letter-spacing: .08em;
  line-height: 1.5;
  display: grid;
  gap: 12px;
}

.cookie-row{
  border: 1px solid rgba(219,219,219,.10);
  background: rgba(12,15,16,.45);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.cookie-row__name{
  font-family: "ZombiesBrainless","LazyDog",system-ui,sans-serif;
  font-weight: lighter;
  letter-spacing: .12em;
  color: rgba(219,219,219,.95);
}
.cookie-row__desc{
  color: rgba(219,219,219,.72);
  margin-top: 4px;
}

/* Pill + toggle (utilises dans la modale generee par JS ET sur gestion-cookies.html) */
.cookie-pill{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(219,219,219,.14);
  background: rgba(12,15,16,.40);
  font-size: 12px;
  letter-spacing: .10em;
  color: rgba(219,219,219,.85);
}
.cookie-pill--locked{ border-color: rgba(61,206,97,.25); }

.cookie-toggle{
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(219,219,219,.12);
  background: rgba(12,15,16,.35);
}
.cookie-toggle input{ position: absolute; opacity: 0; pointer-events: none; }
.cookie-toggle__ui{
  width: 44px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(219,219,219,.14);
  background: rgba(12,15,16,.55);
  position: relative;
  box-shadow: 0 12px 26px rgba(0,0,0,.30);
}
.cookie-toggle__ui::after{
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(219,219,219,.85);
  transition: left .18s ease, background .18s ease, box-shadow .18s ease;
}
.cookie-toggle input:checked + .cookie-toggle__ui{
  border-color: rgba(61,206,97,.35);
  box-shadow: 0 0 0 1px rgba(61,206,97,.12), 0 12px 26px rgba(0,0,0,.30);
}
.cookie-toggle input:checked + .cookie-toggle__ui::after{
  left: 23px;
  background: rgba(61,206,97,.95);
  box-shadow: 0 0 18px rgba(61,206,97,.22);
}
.cookie-toggle__label{
  font-size: 12px;
  letter-spacing: .12em;
  color: rgba(219,219,219,.86);
}

.cookie-modal__links{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cookie-modal__links a{
  color: rgba(219,219,219,.90);
  text-decoration: none;
  border-bottom: 1px dashed rgba(61,206,97,.45);
}
.cookie-modal__links a:hover{
  border-bottom-color: rgba(82,56,119,.55);
}

.cookie-modal__actions{
  padding: 14px;
  border-top: 1px solid rgba(219,219,219,.08);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 520px){
  .cookie-banner{ left: 10px; right: 10px; bottom: 10px; }
  .cookie-modal__title{ font-size: 16px; }
}
