/* ============================================================
   PAGES.CSS — styles spécifiques par page
   ============================================================ */

/* ============================================================
   HERO (page d'accueil)
   ============================================================ */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 40px 0 100px;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}
.hero-logo {
  width: 240px;
  height: 240px;
  object-fit: contain;
  filter: drop-shadow(0 0 40px var(--accent-glow));
  animation: heroLogoFloat 6s ease-in-out infinite;
}
@keyframes heroLogoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.hero-title {
  font-size: clamp(3rem, 9vw, 6rem);
  margin: 20px 0 0;
  background: linear-gradient(180deg, var(--accent-strong) 0%, var(--accent) 50%, var(--primary-soft) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 20px var(--accent-glow));
}
.hero-sub {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.8vw, 1.2rem);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 8px 0 0;
  text-indent: 0.5em;
}
.hero-quote {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--text-soft);
  max-width: 50ch;
  margin: 32px auto 0;
}
.hero-ip {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
  padding: 14px 20px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4), inset 0 0 20px rgba(255,255,255,0.02);
}
.hero-ip .ip-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.hero-ip code {
  font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  font-size: 1.1rem;
  color: var(--accent-strong);
  font-weight: 600;
}
.ip-copy {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  transition: all .25s;
}
.ip-copy:hover {
  background: var(--accent);
  color: var(--bg-deep);
  border-color: var(--accent);
}
.hero-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.4;
  animation: statusPulse 1.5s ease-out infinite;
}
.status-online  { background: #4ade80; }
.status-offline { background: #ef4444; }
.status-loading { background: #a8a8a8; }
@keyframes statusPulse {
  0%   { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(2.5); opacity: 0; }
}
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-bottom {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-cue {
  display: inline-block;
  color: var(--accent);
  font-size: 1.4rem;
  animation: scrollBounce 2s ease-in-out infinite;
  opacity: 0.6;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%      { transform: translateY(10px); opacity: 0.9; }
}

/* ============================================================
   FEATURES GRID (page accueil)
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 30px;
}
.feature {
  text-align: center;
  padding: 36px 24px;
}
.feature-icon {
  font-size: 2.4rem;
  color: var(--accent);
  margin-bottom: 12px;
  text-shadow: 0 0 20px var(--accent-glow);
}
.feature h3 {
  font-family: var(--font-decor);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.feature p {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin: 0;
}

/* Quicklinks */
.quicklinks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.quicklink {
  display: block;
  text-align: left;
  color: var(--text);
  text-decoration: none;
  position: relative;
}
.quicklink h3 { font-family: var(--font-decor); }
.quicklink p {
  color: var(--text-soft);
  font-size: 0.92rem;
  margin: 10px 0 0;
}
.ql-icon {
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 8px;
}
.ql-arrow {
  position: absolute;
  bottom: 20px;
  right: 24px;
  color: var(--accent);
  font-size: 1.4rem;
  transition: transform .35s;
}
.quicklink:hover .ql-arrow { transform: translateX(6px); }

/* ============================================================
   PAGE INNER HEADER (autres pages)
   ============================================================ */
.page-head {
  padding: 80px 0 50px;
  text-align: center;
  position: relative;
}
.page-head h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 0;
  background: linear-gradient(180deg, var(--accent-strong) 0%, var(--accent) 70%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
/* Titre image (typographie LOTR fournie) — texte doré sur fond transparent.
   Le drop-shadow utilise la couleur d'accent du thème pour un halo cohérent. */
.page-head h1.page-title-img {
  background: none;
  -webkit-text-fill-color: initial;
  color: inherit;
  line-height: 0;
  font-size: 0;
  margin: 0;
}
.page-head h1.page-title-img img {
  display: block;
  margin: 0 auto;
  max-width: min(720px, 85%);
  height: auto;
  filter:
    drop-shadow(0 2px 6px rgba(0,0,0,0.55))
    drop-shadow(0 0 22px color-mix(in srgb, var(--accent) 35%, transparent));
  animation: titleImgIn 0.9s cubic-bezier(0.22, 0.85, 0.3, 1) both;
}
@keyframes titleImgIn {
  from { opacity: 0; transform: translateY(-8px); filter: drop-shadow(0 0 0 transparent); }
  to   { opacity: 1; transform: none; }
}

/* Hero (page d'accueil) — titre image plus grand */
.hero-title.hero-title-img {
  background: none;
  -webkit-text-fill-color: initial;
  color: inherit;
  filter: none;
  line-height: 0;
  font-size: 0;
  margin: 20px 0 0;
}
.hero-title.hero-title-img img {
  display: block;
  margin: 0 auto;
  max-width: min(820px, 92%);
  height: auto;
  filter:
    drop-shadow(0 3px 10px rgba(0,0,0,0.6))
    drop-shadow(0 0 32px color-mix(in srgb, var(--accent) 45%, transparent));
  animation: titleImgIn 1.1s cubic-bezier(0.22, 0.85, 0.3, 1) both;
}
.page-head .lead { margin-top: 14px; }

/* ============================================================
   CARTE INTERACTIVE
   ============================================================ */
.map-page {
  padding-bottom: 80px;
}
.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}
.map-frame {
  position: relative;
  background: linear-gradient(180deg, var(--bg-base), var(--bg-card));
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(0,0,0,0.3);
  overflow: hidden;
}
.map-frame::before,
.map-frame::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border: 2px solid var(--accent);
  opacity: 0.5;
  pointer-events: none;
}
.map-frame::before { top: 8px; left: 8px;  border-right: 0; border-bottom: 0; }
.map-frame::after  { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.map-corners {
  position: absolute;
  pointer-events: none;
}
.map-container {
  position: relative;
  width: 100%;
  aspect-ratio: 3200 / 4000;
  overflow: hidden;
  border-radius: 8px;
  background: #0a0a0a;
}
.map-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: none;
}
.map-banners {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.map-hotspot {
  position: absolute;
  width: 38px;
  height: 50px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  transition: transform .25s;
}
/* Reveal de la position au survol (cercle subtil) */
.map-hotspot::before {
  content: "";
  position: absolute;
  inset: 50% 50% 50% 50%;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--accent-glow);
  transition: inset .3s, box-shadow .3s, opacity .3s;
  opacity: 0;
}
.map-hotspot:hover::before,
.map-hotspot:focus-visible::before,
.map-hotspot.active::before {
  inset: -10%;
  opacity: 0.25;
  box-shadow: 0 0 0 4px var(--accent-glow);
  animation: hotspotPulse 1.5s ease-out infinite;
}
@keyframes hotspotPulse {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 0.5; }
}
.map-hotspot:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Mode édition : montre tous les hotspots */
.map-frame.edit-mode .map-hotspot::before {
  inset: -20%;
  opacity: 0.5;
  background: var(--evil);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.4);
  animation: none;
}
.map-frame.edit-mode .map-hotspot {
  cursor: grab;
}
.map-frame.edit-mode .map-hotspot:active { cursor: grabbing; }
.map-frame.edit-mode::after {
  content: "MODE ÉDITION — drag les bannières · E pour quitter · L pour copier les coords";
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  border: 0;
  text-align: center;
  background: var(--evil);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  padding: 6px 0;
  width: auto;
  height: auto;
  opacity: 1;
}

/* Tooltip flottant sur la carte (apparait avec le panneau latéral en réalité) */

/* ============================================================
   PANNEAU LATÉRAL FACTION (carte)
   ============================================================ */
.faction-panel {
  position: sticky;
  top: 100px;
  background: linear-gradient(180deg, var(--bg-base), var(--bg-card));
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 28px;
  max-height: calc(100vh - 130px);
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.faction-empty {
  text-align: center;
  color: var(--text-mute);
  font-style: italic;
  padding: 40px 12px;
}
.faction-empty-icon {
  font-size: 3rem;
  color: var(--accent);
  opacity: 0.4;
  margin-bottom: 16px;
}
.faction-card {
  animation: factionIn .4s cubic-bezier(.2,.8,.2,1);
}
@keyframes factionIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
.faction-banner {
  width: 80px;
  height: 110px;
  margin: 0 auto 20px;
  background: var(--banner-color);
  color: var(--banner-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  clip-path: polygon(0 0, 100% 0, 100% 88%, 50% 100%, 0 88%);
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.5));
  position: relative;
}
.faction-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.1), transparent 50%);
  clip-path: inherit;
}
/* Variante avec image : on désactive le clip-path et le pseudo-élément,
   la bannière Minecraft a déjà sa forme + son design. */
.faction-banner.has-image {
  width: 70px;
  height: 140px;
  background: transparent;
  clip-path: none;
  padding: 0;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.55));
}
.faction-banner.has-image::after { display: none; }
.faction-banner.has-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}
.faction-card h3 {
  font-family: var(--font-decor);
  font-size: 1.6rem;
  text-align: center;
  margin: 0 0 8px;
}
.faction-allegiance {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin: 0 auto 20px;
  display: block;
  width: fit-content;
}
.faction-allegiance.bien   { background: rgba(111,179,255,0.12); color: var(--good); border: 1px solid rgba(111,179,255,0.3); }
.faction-allegiance.mal    { background: rgba(214,58,42,0.12);  color: var(--evil); border: 1px solid rgba(214,58,42,0.3); }
.faction-allegiance.neutre { background: rgba(212,185,98,0.12); color: var(--neutral); border: 1px solid rgba(212,185,98,0.3); }
.faction-desc {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin: 0 0 20px;
  line-height: 1.7;
}
.faction-meta {
  display: grid;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.faction-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
}
.faction-meta-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.faction-meta-value {
  color: var(--text);
  text-align: right;
}

/* Filtres factions */
.faction-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}
.filter-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-soft);
  cursor: pointer;
  transition: all .25s;
}
.filter-btn:hover { color: var(--accent); border-color: var(--accent); }
.filter-btn.active {
  background: var(--accent);
  color: var(--bg-deep);
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

/* ============================================================
   BOUTIQUE
   ============================================================ */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.shop-card {
  text-align: center;
  display: flex;
  flex-direction: column;
}
.shop-card[data-featured="true"] {
  border-color: var(--accent);
  transform: scale(1.02);
}
.shop-card[data-featured="true"]::before {
  content: "POPULAIRE";
  position: absolute;
  top: -1px;
  right: -1px;
  background: var(--accent);
  color: var(--bg-deep);
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  padding: 6px 12px;
  border-radius: 0 10px 0 10px;
  opacity: 1;
  height: auto;
  width: auto;
}
.shop-tier {
  font-family: var(--font-decor);
  font-size: 1.6rem;
  margin: 0 0 8px;
}
.tier-bronze   { color: #cd7f32; }
.tier-argent   { color: #c0c0c0; }
.tier-or       { color: #ffd700; }
.tier-mithril  { color: #87ceeb; }
.shop-price {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--accent);
  margin: 12px 0 24px;
  text-shadow: 0 0 20px var(--accent-glow);
}
.shop-perks {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  text-align: left;
  flex: 1;
}
.shop-perks li {
  padding: 10px 0 10px 26px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-soft);
  position: relative;
}
.shop-perks li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.7;
}

/* ============================================================
   REJOINDRE — étapes
   ============================================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 30px;
}
.step {
  text-align: center;
  position: relative;
}
.step-number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: var(--bg-deep);
  font-family: var(--font-decor);
  font-size: 1.5rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 30px var(--accent-glow);
  position: relative;
}
.step-number::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0.4;
}
.step h3 {
  font-family: var(--font-decor);
  font-size: 1.15rem;
  margin: 0 0 12px;
}
.step p {
  color: var(--text-soft);
  font-size: 0.92rem;
  margin: 0;
}
.step kbd {
  font-family: monospace;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.85em;
  color: var(--accent);
}

/* ============================================================
   REGLEMENT
   ============================================================ */
.reglement-iframe {
  width: 100%;
  height: 80vh;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #f5e6c4;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

/* ============================================================
   VOTER
   ============================================================ */
.vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.vote-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--text);
}
.vote-card h3 {
  font-family: var(--font-decor);
  margin: 0 0 6px;
}
.vote-card p {
  color: var(--text-mute);
  font-size: 0.85rem;
  margin: 0;
}
.vote-arrow {
  color: var(--accent);
  font-size: 1.6rem;
  transition: transform .3s;
}
.vote-card:hover .vote-arrow { transform: translateX(8px); }

/* ============================================================
   ADMIN PANEL TABS
   ============================================================ */
.admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.admin-tab {
  background: transparent;
  border: 0;
  padding: 12px 18px;
  color: var(--text-mute);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .25s, border-color .25s;
}
.admin-tab:hover { color: var(--accent); }
.admin-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .map-layout {
    grid-template-columns: 1fr;
  }
  .faction-panel {
    position: static;
    max-height: none;
  }
}
@media (max-width: 640px) {
  .hero-logo { width: 180px; height: 180px; }
  .hero-actions { flex-direction: column; width: 100%; max-width: 320px; }
  .hero-actions .btn { justify-content: center; width: 100%; }
  .hero-ip { flex-wrap: wrap; }
  .map-frame { padding: 8px; }
  .map-hotspot { width: 28px; height: 38px; }
}

/* ============================================================
   TERRITOIRES SVG (page Carte publique — nouveau système)
   ============================================================ */
.map-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.territory {
  fill: var(--territory-color, #888);
  fill-opacity: 0.03;
  stroke: var(--territory-color, #888);
  stroke-width: 0.25;
  stroke-opacity: 0;
  vector-effect: non-scaling-stroke;
  pointer-events: auto;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: fill-opacity 0.3s ease, stroke-opacity 0.3s ease, filter 0.3s ease;
}
.territory:focus { outline: none; }
.territory:focus-visible {
  /* Accessibilité clavier : surbrillance subtile via le stroke (au lieu du rectangle natif) */
  stroke-opacity: 1;
  stroke-width: 0.55;
}
.territory:hover,
.territory.active {
  fill-opacity: 0.42;
  stroke-opacity: 1;
  stroke-width: 0.5;
  filter: drop-shadow(0 0 8px var(--territory-color));
}
.territory.dim {
  fill-opacity: 0.02 !important;
  stroke-opacity: 0 !important;
}

/* Mode "toujours visible" : on voit les zones en permanence en très léger */
.map-frame.show-territories .territory {
  fill-opacity: 0.12;
  stroke-opacity: 0.35;
}
.map-frame.show-territories .territory:hover,
.map-frame.show-territories .territory.active {
  fill-opacity: 0.45;
  stroke-opacity: 1;
}

/* Toggle bouton "voir tous les territoires" */
.map-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.map-toolbar .toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-mute);
  cursor: pointer;
  user-select: none;
}
.map-toolbar .toggle-switch input { accent-color: var(--accent); }

/* ============================================================
   ÉDITEUR DE POLYGONES (page interne /pages/editor.html)
   ============================================================ */
.editor-page { overflow-x: hidden; }

.editor-main {
  display: grid;
  grid-template-columns: 380px 1fr;
  min-height: calc(100vh - 70px);
}

.editor-sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 22px 20px;
  overflow-y: auto;
  height: calc(100vh - 70px);
  position: sticky;
  top: 70px;
}

.editor-header h1 {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  margin: 0 0 8px;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.editor-hint {
  font-size: 0.83rem;
  color: var(--text-mute);
  line-height: 1.55;
  margin-bottom: 14px;
}

.editor-current-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--c) 22%, transparent),
    color-mix(in srgb, var(--c) 6%, transparent));
  border: 1px solid var(--c);
  border-left: 4px solid var(--c);
  border-radius: 10px;
  margin: 12px 0;
}
.editor-current-badge {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--c);
  color: #fff;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--c) 50%, transparent);
}
.editor-current-info { min-width: 0; }
.editor-current-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mute);
}
.editor-current-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  font-family: 'Cinzel', serif;
  margin: 2px 0;
}
.editor-current-meta {
  font-size: 0.78rem;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
}

.editor-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 14px 0;
}
.editor-controls .btn {
  padding: 8px 6px;
  font-size: 0.78rem;
  justify-content: center;
}

.editor-zoom {
  margin: 14px 0;
  font-size: 0.82rem;
  color: var(--text-mute);
}
.editor-zoom label { display: flex; justify-content: space-between; }
.editor-zoom input { width: 100%; margin-top: 6px; accent-color: var(--accent); }

.editor-display {
  margin: 8px 0 14px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.editor-display label {
  display: block;
  font-size: 0.83rem;
  color: var(--text-mute);
  margin: 4px 0;
  cursor: pointer;
}
.editor-display input { margin-right: 8px; accent-color: var(--accent); }

.editor-sidebar h3 {
  font-family: 'Cinzel', serif;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin: 16px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.editor-progress {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: none;
}

.editor-faction-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 16px;
  max-height: 280px;
  overflow-y: auto;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.editor-faction-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}
.editor-faction-item:last-child { border-bottom: none; }
.editor-faction-item:hover { background: rgba(255,255,255,0.04); }
.editor-faction-item.active {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  padding-left: 7px;
  border-left: 3px solid var(--accent);
}
.editor-faction-item.done .editor-faction-name    { color: #6abf6a; font-weight: 600; }
.editor-faction-item.partial .editor-faction-name { color: #d4933a; }
.editor-faction-item.empty .editor-faction-name   { color: var(--text-mute); }

.editor-faction-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.25);
}
.editor-faction-name { flex: 1; font-size: 0.84rem; }
.editor-faction-status {
  font-size: 0.72rem;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
}

.editor-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0;
}
.btn-danger { color: var(--evil)!important; border-color: var(--evil)!important; }
.btn-danger:hover { background: color-mix(in srgb, var(--evil) 15%, transparent); }

.editor-storage {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.editor-storage .hint {
  font-size: 0.74rem;
  color: var(--text-mute);
  line-height: 1.6;
  margin: 0;
}
.editor-storage kbd {
  display: inline-block;
  padding: 1px 5px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.7rem;
}

/* Canvas */
.editor-canvas-wrap {
  overflow: auto;
  background:
    radial-gradient(circle at 30% 20%, rgba(212,185,98,0.04), transparent 60%),
    #0a0a0a;
  padding: 20px;
}
.editor-canvas {
  position: relative;
  width: 600px;
  margin: 0 auto;
  cursor: crosshair;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
}
.editor-canvas img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
.editor-canvas svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* Modal d'import */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  backdrop-filter: blur(4px);
}
.modal[hidden] { display: none; }
.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  width: min(640px, 92vw);
  max-height: 92vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.modal-card h3 {
  margin: 0 0 8px;
  font-family: 'Cinzel', serif;
  color: var(--accent);
}
.modal-card .hint { font-size: 0.85rem; color: var(--text-mute); margin: 0 0 12px; }
.modal-card textarea {
  width: 100%;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.82rem;
  resize: vertical;
  line-height: 1.4;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

@media (max-width: 1000px) {
  .editor-main { grid-template-columns: 1fr; }
  .editor-sidebar { position: relative; top: 0; height: auto; max-height: none; }
  .editor-canvas { width: 100%; }
}

/* ============================================================
   PETITS COMPLÉMENTS CARTE
   ============================================================ */
.faction-empty-hint {
  font-size: 0.78rem;
  margin-top: 14px;
  opacity: 0.75;
}
.faction-empty-hint a,
.link-accent {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.faction-empty-hint a:hover,
.link-accent:hover { color: var(--accent-bright, var(--accent)); }

.faction-locked {
  margin-top: 14px;
  padding: 8px 12px;
  background: rgba(212,185,98,0.12);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--accent);
}

/* ============================================================
   PLAYER NARRATION — bouton play/pause + barre + temps
   ============================================================ */
.faction-narration {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 4px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(212,185,98,0.08), rgba(212,185,98,0.02));
  border: 1px solid rgba(212,185,98,0.25);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.faction-narration::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 50%, rgba(212,185,98,0.10), transparent 60%);
  pointer-events: none;
}
.narration-play {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000));
  color: var(--bg-deep, #0c1224);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  position: relative;
  z-index: 1;
}
.narration-play:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.45), 0 0 16px color-mix(in srgb, var(--accent) 50%, transparent), inset 0 1px 0 rgba(255,255,255,0.3);
}
.narration-play:active { transform: scale(0.96); }
.narration-play svg { display: block; }
.narration-play .icon-pause { display: none; }
.faction-narration.is-playing .narration-play .icon-play { display: none; }
.faction-narration.is-playing .narration-play .icon-pause { display: block; }
.faction-narration.is-playing .narration-play {
  animation: narrationPulse 1.8s ease-in-out infinite;
}
@keyframes narrationPulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(0,0,0,0.35), 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent), inset 0 1px 0 rgba(255,255,255,0.25); }
  50%      { box-shadow: 0 4px 14px rgba(0,0,0,0.35), 0 0 0 8px color-mix(in srgb, var(--accent) 0%, transparent), inset 0 1px 0 rgba(255,255,255,0.25); }
}
.faction-narration.is-loading .narration-play {
  opacity: 0.7;
  cursor: wait;
}
.narration-body {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.narration-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.narration-progress {
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.narration-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #fff));
  border-radius: 100px;
  transition: width 0.1s linear;
}
.narration-time {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--text-mute, rgba(255,255,255,0.55));
  font-variant-numeric: tabular-nums;
}
.narration-time .narration-current { color: var(--accent); }
.faction-narration.is-error {
  border-color: rgba(255,100,100,0.4);
  background: rgba(255,100,100,0.05);
}
.faction-narration.is-error .narration-label::after {
  content: " — erreur";
  color: rgba(255,140,140,0.85);
}

code {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.88em;
  padding: 1px 6px;
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--accent);
}

/* ============================================================
   ════════════════════════════════════════════════════════════
   HOME — REFONTE CINÉMATIQUE
   ════════════════════════════════════════════════════════════
   ============================================================ */

body.page-home main { overflow-x: hidden; }

/* ─────────── HERO PLEIN ÉCRAN ─────────── */
.cinematic-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-height, 76px));
}

.cinematic-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-scene {
  width: 100%;
  height: 100%;
  display: block;
  transform: scale(1.04); /* permet le parallax sans bord blanc */
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.scene-layer { transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); will-change: transform; }

/* Animations atmosphériques */
@keyframes mistDrift {
  0%   { transform: translateX(-3%); opacity: 0.45; }
  50%  { transform: translateX(2%);  opacity: 0.55; }
  100% { transform: translateX(-3%); opacity: 0.45; }
}
.scene-mist-high { animation: mistDrift 18s ease-in-out infinite; transform-origin: center; }
.scene-mist-low  { animation: mistDrift 22s ease-in-out infinite reverse; }

@keyframes starsTwinkle {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 0.4; }
}
.scene-stars { animation: starsTwinkle 6s ease-in-out infinite; }

@keyframes sunPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.85; transform: scale(1.05); }
}
.scene-sunglow { animation: sunPulse 8s ease-in-out infinite; transform-origin: 1180px 280px; }

@keyframes windowFlicker {
  0%, 90%, 100% { opacity: 0.9; }
  92%, 96%      { opacity: 0.5; }
}
.scene-window { animation: windowFlicker 4s ease-in-out infinite; }
.scene-window:nth-child(2) { animation-delay: 1s; }
.scene-window:nth-child(3) { animation-delay: 2s; }
.scene-window:nth-child(4) { animation-delay: 3s; }

/* Vignette atmosphère plus prononcée */
.scene-vignette { mix-blend-mode: multiply; }

/* Canvas particules par-dessus */
.atmosphere-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ─────────── CONTENU CENTRÉ DU HERO ─────────── */
.cinematic-content {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  padding: 100px 24px 140px; /* + bottom pour laisser place au scroll indicator */
}
/* Voile sombre derrière le contenu central pour la lisibilité */
.cinematic-content::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center 55%,
    rgba(0,0,0,0.45) 0%,
    rgba(0,0,0,0.25) 40%,
    transparent 75%
  );
  pointer-events: none;
  z-index: -1;
}
.cinematic-inner {
  max-width: 900px;
  margin: 0 auto;
}
.cinematic-logo {
  width: 140px;
  height: 140px;
  filter:
    drop-shadow(0 0 30px var(--accent-glow))
    drop-shadow(0 8px 24px rgba(0,0,0,0.6));
  animation: heroLogoFloat 6s ease-in-out infinite;
  margin: 0 auto 16px;
  display: block;
}
.cinematic-title {
  margin: 0 0 8px;
  line-height: 0;
  font-size: 0;
}
.cinematic-title img {
  display: block;
  margin: 0 auto;
  max-width: min(820px, 92vw);
  height: auto;
  filter:
    drop-shadow(0 3px 12px rgba(0,0,0,0.75))
    drop-shadow(0 0 36px color-mix(in srgb, var(--accent) 50%, transparent));
}
.cinematic-sub {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 1.5vw, 1.05rem);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 8px 0 28px;
  text-indent: 0.5em;
  opacity: 0.85;
}
.cinematic-quote {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--text-soft);
  max-width: 620px;
  margin: 0 auto 32px;
  line-height: 1.6;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.cinematic-ip,
.cinematic-status {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px;
  margin: 6px auto;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 100px;
  font-family: var(--font-display);
}
.cinematic-ip {
  margin-bottom: 8px;
}
.cinematic-ip .ip-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.cinematic-ip code {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 1.05rem;
  background: none;
  border: none;
  padding: 0;
}
.cinematic-ip .ip-copy {
  background: none;
  border: none;
  color: var(--text-mute);
  cursor: pointer;
  padding: 4px;
  transition: color .2s ease, transform .2s ease;
}
.cinematic-ip .ip-copy:hover { color: var(--accent); transform: scale(1.1); }

.cinematic-status .status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--neutral);
  box-shadow: 0 0 8px currentColor;
}
.cinematic-status .status-dot.status-online  { background: #4ade80; }
.cinematic-status .status-dot.status-offline { background: var(--evil); }
.cinematic-status .status-dot.status-loading { background: var(--text-mute); animation: statusPulse 1.5s ease-in-out infinite; }
@keyframes statusPulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.cinematic-status .status-text {
  font-size: 0.85rem;
  color: var(--text-soft);
}

.cinematic-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.btn-large {
  padding: 14px 30px;
  font-size: 1rem;
  border-radius: 8px;
}

/* Indicateur scroll */
.cinematic-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-mute);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.7;
  transition: opacity .3s ease, transform .3s ease;
  animation: scrollBounce 2.5s ease-in-out infinite;
}
.cinematic-scroll:hover { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.scroll-mouse {
  display: block;
  width: 24px;
  height: 38px;
  border: 1.5px solid currentColor;
  border-radius: 12px;
  position: relative;
}
.scroll-wheel {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: currentColor;
  border-radius: 2px;
  animation: scrollWheel 1.5s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-6px); }
}
@keyframes scrollWheel {
  0%   { opacity: 1; top: 6px; }
  100% { opacity: 0; top: 18px; }
}

/* ─────────── SECTIONS GÉNÉRIQUES REFONDUES ─────────── */
.section {
  padding: 100px 0;
  position: relative;
}
.section-bg {
  position: absolute;
  inset: 0;
  background-image: var(--pattern-image);
  background-size: 200px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.section .wrapper { position: relative; z-index: 1; }

.section-head { text-align: center; max-width: 760px; margin: 0 auto 60px; }
.section-head-large { margin-bottom: 80px; }
.section-head .eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  padding: 6px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 100px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  margin: 0 0 18px;
  line-height: 1.1;
  background: linear-gradient(180deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.section-head .lead {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  color: var(--text-soft);
  line-height: 1.7;
  margin: 0;
}

/* ─────────── STATS ─────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.stat {
  text-align: center;
  padding: 32px 20px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--bg-card) 90%, transparent), color-mix(in srgb, var(--bg-base) 70%, transparent));
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity .35s ease;
}
.stat:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  box-shadow: 0 12px 36px rgba(0,0,0,0.4), 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent) inset;
}
.stat:hover::before { opacity: 1; }
.stat-icon {
  color: var(--accent);
  margin-bottom: 14px;
  filter: drop-shadow(0 0 12px var(--accent-glow));
}
.stat-value {
  font-family: var(--font-decor);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* ─────────── PILIERS ─────────── */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.pillar {
  position: relative;
  padding: 36px 30px 30px;
  background: linear-gradient(165deg, var(--bg-card), color-mix(in srgb, var(--bg-base) 80%, var(--bg-deep)));
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .4s cubic-bezier(0.22, 1, 0.36, 1), border-color .35s ease, box-shadow .35s ease;
}
.pillar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    var(--pattern-image);
  background-size: cover, 220px;
  opacity: 0.5;
  z-index: 0;
  transition: opacity .4s ease;
}
.pillar::after {
  content: "";
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transition: width .5s ease;
}
.pillar > * { position: relative; z-index: 1; }
.pillar:hover {
  transform: translateY(-8px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}
.pillar:hover::before { opacity: 0.8; }
.pillar:hover::after  { width: 80%; }

.pillar-icon-wrap {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 20%, var(--bg-elev)), color-mix(in srgb, var(--accent) 5%, var(--bg-card)));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
  filter: drop-shadow(0 0 16px var(--accent-glow));
  transition: transform .4s ease;
}
.pillar:hover .pillar-icon-wrap { transform: rotate(-5deg) scale(1.06); }

.pillar h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0 0 12px;
  color: var(--text);
}
.pillar p {
  font-family: var(--font-body);
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0 0 20px;
}
.pillar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  transition: gap .3s ease;
}
.pillar-link:hover { gap: 14px; }
.pillar-link span { transition: transform .3s ease; }
.pillar-link:hover span { transform: translateX(2px); }

/* ─────────── ONBOARDING (3 ÉTAPES) ─────────── */
.onboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  position: relative;
}
.onboard-step {
  padding: 32px 26px;
  background: linear-gradient(165deg, var(--bg-card), var(--bg-base));
  border: 1px solid var(--border);
  border-radius: 14px;
  position: relative;
  text-align: center;
}
.onboard-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000));
  color: var(--bg-deep);
  font-family: var(--font-decor);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.3);
}
.onboard-line {
  display: none; /* future: ligne décorative entre étapes */
}
.onboard-step h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 12px;
  color: var(--accent);
}
.onboard-step p {
  font-family: var(--font-body);
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0;
}
.onboard-cta {
  margin-top: 40px;
  text-align: center;
}

/* ─────────── EXPLORE GRID (asymétrique) ─────────── */
.explore-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  grid-auto-rows: 200px;
  gap: 16px;
}
.explore-card {
  display: flex;
  gap: 18px;
  padding: 28px;
  background: linear-gradient(165deg, var(--bg-card), color-mix(in srgb, var(--bg-base) 90%, var(--bg-deep)));
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  transition: transform .4s cubic-bezier(0.22, 1, 0.36, 1), border-color .35s ease, box-shadow .35s ease;
  position: relative;
  overflow: hidden;
}
.explore-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity .4s ease;
}
.explore-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.explore-card:hover::before { opacity: 1; }
.explore-card-large {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  flex-direction: column;
  padding: 36px;
}
.explore-card > * { position: relative; z-index: 1; }
.explore-card-icon {
  flex: 0 0 auto;
  color: var(--accent);
  filter: drop-shadow(0 0 14px var(--accent-glow));
  transition: transform .4s ease;
}
.explore-card:hover .explore-card-icon { transform: scale(1.1) rotate(-4deg); }
.explore-card-body { flex: 1 1 auto; min-width: 0; }
.explore-card-body h3 {
  font-family: var(--font-display);
  margin: 0 0 6px;
  font-size: 1.25rem;
  color: var(--text);
}
.explore-card-large .explore-card-body h3 { font-size: 1.7rem; margin-bottom: 12px; }
.explore-card-body p {
  font-family: var(--font-body);
  margin: 0 0 12px;
  color: var(--text-mute);
  font-size: 0.95rem;
  line-height: 1.5;
}
.explore-arrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
@media (max-width: 880px) {
  .explore-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .explore-card-large { grid-column: 1; grid-row: auto; }
}

/* ─────────── CTA FINAL ─────────── */
.section-finalcta {
  position: relative;
  text-align: center;
  padding: 120px 0;
  overflow: hidden;
}
.finalcta-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.finalcta-bg svg { width: 100%; height: 100%; display: block; }
.finalcta-content { position: relative; z-index: 1; }
.finalcta-content h2 {
  font-family: var(--font-decor);
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin: 0 0 16px;
  background: linear-gradient(180deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px var(--accent-glow));
}
.finalcta-content p {
  font-family: var(--font-body);
  color: var(--text-soft);
  font-size: 1.1rem;
  margin: 0 0 32px;
}
.finalcta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─────────── MOBILE ─────────── */
@media (max-width: 720px) {
  .cinematic-hero { min-height: 92vh; }
  .cinematic-content { padding: 100px 16px 80px; }
  .cinematic-logo { width: 100px; height: 100px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pillars-grid, .onboard-grid { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
}

/* ============================================================
   ════════════════════════════════════════════════════════════
   HERO IMAGE PLEIN ÉCRAN — refonte "gaming product"
   ════════════════════════════════════════════════════════════
   ============================================================ */

body.page-home {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.cine-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-height, 76px));
  isolation: isolate;
}

/* ─────────── Slideshow ken-burns ─────────── */
.cine-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.cine-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  will-change: opacity, transform;
}
/* Ken-burns différent pour chaque slide pour ne pas avoir les mêmes mouvements */
.cine-slide-1 {
  animation:
    cineSlideFade1 18s ease-in-out infinite,
    cineKenBurns1  18s ease-in-out infinite;
}
.cine-slide-2 {
  animation:
    cineSlideFade2 18s ease-in-out infinite,
    cineKenBurns2  18s ease-in-out infinite;
}
@keyframes cineSlideFade1 {
  0%, 45%   { opacity: 1; }
  55%, 95%  { opacity: 0; }
  100%      { opacity: 1; }
}
@keyframes cineSlideFade2 {
  0%, 45%   { opacity: 0; }
  55%, 95%  { opacity: 1; }
  100%      { opacity: 0; }
}
@keyframes cineKenBurns1 {
  0%   { transform: scale(1.0) translate(0, 0); }
  50%  { transform: scale(1.12) translate(-1.5%, -1%); }
  100% { transform: scale(1.0) translate(0, 0); }
}
@keyframes cineKenBurns2 {
  0%   { transform: scale(1.12) translate(1%, 1%); }
  50%  { transform: scale(1.0) translate(0, 0); }
  100% { transform: scale(1.12) translate(1%, 1%); }
}

/* ─────────── Overlay dégradé ─────────── */
.cine-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    /* Bandeau haut : assombrit pour que le header lise bien */
    linear-gradient(180deg,
      rgba(8, 12, 20, 0.85) 0%,
      rgba(8, 12, 20, 0.45) 12%,
      rgba(8, 12, 20, 0.15) 28%,
      transparent 50%,
      rgba(8, 12, 20, 0.55) 80%,
      rgba(8, 12, 20, 0.95) 100%
    ),
    /* Vignette centrale légère */
    radial-gradient(ellipse at center, transparent 35%, rgba(8, 12, 20, 0.55) 100%),
    /* Teinte d'accent du thème pour cohérence */
    color-mix(in srgb, var(--accent) 5%, transparent);
  pointer-events: none;
}

/* ─────────── Contenu hero ─────────── */
.cine-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 100px 24px 160px;
  max-width: 920px;
  margin: 0 auto;
  animation: cineContentIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes cineContentIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cine-eyebrow {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 8px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 100px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: 26px;
}

.cine-mark {
  margin: 0 0 14px;
  font-size: 0;
  line-height: 0;
}
.cine-mark img {
  display: block;
  margin: 0 auto;
  max-width: min(820px, 92vw);
  height: auto;
  filter:
    drop-shadow(0 6px 20px rgba(0,0,0,0.8))
    drop-shadow(0 0 40px color-mix(in srgb, var(--accent) 55%, transparent));
}

.cine-tag {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  color: rgba(255,255,255,0.85);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.55;
  font-weight: 400;
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
}

/* Bloc IP serveur + status — grand encart central */
.cine-server {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 24px 14px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 14px;
  margin-bottom: 30px;
  box-shadow:
    0 12px 40px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
.cine-server-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cine-server-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.cine-server-row code {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  letter-spacing: 0.01em;
}
.cine-server-copy {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}
.cine-server-copy:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-deep);
  transform: scale(1.06);
}
.cine-server-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
}
.cine-server-status .status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--neutral);
  box-shadow: 0 0 8px currentColor;
}
.cine-server-status .status-dot.status-online  { background: #4ade80; }
.cine-server-status .status-dot.status-offline { background: var(--evil); }
.cine-server-status .status-dot.status-loading { background: rgba(255,255,255,0.4); animation: cineDotPulse 1.4s ease-in-out infinite; }
@keyframes cineDotPulse { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }
.cine-server-status .status-text strong { color: #4ade80; font-weight: 700; }

/* ─────────── CTA principaux (gros boutons gaming) ─────────── */
.cine-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 6px;
}
.btn-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 38px;
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  overflow: hidden;
  transition: transform .25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow .25s ease;
}
.btn-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .8s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-cta:hover::before { transform: translateX(100%); }
.btn-cta:hover { transform: translateY(-2px); }
.btn-cta:active { transform: translateY(0); }
.btn-cta > * { position: relative; z-index: 1; }
.btn-cta-primary {
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 70%, #ff8c2a) 100%);
  color: var(--bg-deep);
  box-shadow:
    0 10px 30px color-mix(in srgb, var(--accent) 45%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn-cta-primary:hover {
  box-shadow:
    0 14px 40px color-mix(in srgb, var(--accent) 60%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn-cta-discord {
  background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
  color: #fff;
  box-shadow:
    0 10px 30px rgba(88, 101, 242, 0.45),
    inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-cta-discord:hover {
  box-shadow:
    0 14px 40px rgba(88, 101, 242, 0.6),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

/* ─────────── Scroll indicator minimaliste ─────────── */
.cine-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color .3s ease;
}
.cine-scroll:hover { color: var(--accent); }
.cine-scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, transparent, currentColor);
  animation: cineScrollLine 2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cineScrollLine {
  0%, 100% { transform: scaleY(0.3); opacity: 0.4; }
  50%      { transform: scaleY(1);   opacity: 1; }
}
.cine-scroll-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ─────────── Caption du slide actif ─────────── */
.cine-caption {
  position: absolute;
  bottom: 30px;
  right: 30px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.1);
}
.cine-caption-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: background .4s ease, transform .4s ease;
}
.cine-caption-dot.active {
  background: var(--accent);
  transform: scale(1.4);
  box-shadow: 0 0 10px var(--accent-glow);
}
.cine-caption-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  font-style: italic;
}

/* ─────────── Mobile ─────────── */
@media (max-width: 720px) {
  .cine-content { padding: 80px 16px 140px; }
  .cine-eyebrow { font-size: 0.7rem; padding: 6px 14px; }
  .cine-server-row { flex-wrap: wrap; justify-content: center; }
  .cine-server-row code { font-size: 1rem; }
  .btn-cta { padding: 14px 28px; font-size: 0.95rem; }
  .cine-caption { right: 16px; bottom: 70px; }
  .cine-caption-text { display: none; } /* trop encombré sur mobile */
}

/* Cache le canvas atmosphère qui n'existe plus */
.atmosphere-canvas { display: none; }
