/* ─── Base ──────────────────────────────────────────── */
:root {
  --gold:        #d4af37;
  --gold-light:  #f0d060;
  --gold-dark:   #a07c1a;
  --bg:          #0a0c10;
  --bg-card:     #10141c;
  --bg-nav:      rgba(8, 10, 15, 0.92);
  --border:      rgba(212, 175, 55, 0.2);

  /* Couleurs officielles (d'après la carte) */
  --elyndor:     #8b46d6;   /* violet — La Mémoire et la Magie */
  --durandar:    #2d7a3d;   /* vert   — La Tradition et l'Ordre */
  --nexusia:     #1a6da8;   /* bleu   — Le Progrès et l'Avenir  */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: #ccc;
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  min-height: 100vh;
}

h1, h2, h3, .navbar-brand { font-family: 'Cinzel', serif; color: #fff; }

/* ─── Navbar ─────────────────────────────────────────── */
.navbar {
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.navbar-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold) !important;
  letter-spacing: 0.1em;
}

.brand-icon { font-size: 1.1rem; margin-right: 0.25rem; }

.nav-link {
  color: #aaa !important;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--gold) !important; }

.btn-gold {
  background: var(--gold);
  color: #000;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: none;
  border-radius: 4px;
  padding: 0.45rem 1.1rem;
  transition: background 0.2s, transform 0.15s;
}
.btn-gold:hover { background: var(--gold-light); color: #000; transform: translateY(-1px); }

.btn-outline-gold {
  background: transparent;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 0.45rem 1.1rem;
  transition: all 0.2s;
}
.btn-outline-gold:hover { background: var(--gold); color: #000; }

/* ─── Hero ───────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(212,175,55,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 20% 80%, rgba(139,70,214,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(26,109,168,0.05) 0%, transparent 60%),
    var(--bg);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle 1px at 20% 30%, rgba(212,175,55,0.4) 0%, transparent 1px),
    radial-gradient(circle 1px at 75% 15%, rgba(212,175,55,0.3) 0%, transparent 1px),
    radial-gradient(circle 1px at 40% 70%, rgba(212,175,55,0.3) 0%, transparent 1px),
    radial-gradient(circle 1px at 85% 60%, rgba(212,175,55,0.2) 0%, transparent 1px),
    radial-gradient(circle 1px at 10% 80%, rgba(212,175,55,0.2) 0%, transparent 1px),
    radial-gradient(circle 1.5px at 60% 40%, rgba(212,175,55,0.3) 0%, transparent 1.5px);
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, var(--bg) 100%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; padding: 0 1rem; }

.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #fff;
  text-shadow: 0 0 60px rgba(212,175,55,0.3), 0 0 120px rgba(212,175,55,0.1);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-family: 'Cinzel', serif;
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-desc { font-size: 1rem; color: #888; line-height: 1.8; }

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 1.2rem;
  animation: bounce 2s infinite;
  z-index: 1;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ─── Section headings ───────────────────────────────── */
.factions-section {
  background: linear-gradient(to bottom, var(--bg), #0d1120, var(--bg));
}

.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--border);
  padding: 0.25rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.section-sub { color: #666; font-size: 0.95rem; max-width: 480px; margin: 0 auto; }

/* ─── Faction Cards (index.php) ──────────────────────── */
.faction-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.75rem;
  text-align: center;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s;
  height: 100%;
}
.faction-card:hover { transform: translateY(-6px); }

.faction-elyndor:hover  { border-color: var(--elyndor); }
.faction-durandar:hover { border-color: var(--durandar); }
.faction-nexusia:hover  { border-color: var(--nexusia); }

.faction-glow {
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 200px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.faction-elyndor  .faction-glow { background: var(--elyndor); }
.faction-durandar .faction-glow { background: var(--durandar); }
.faction-nexusia  .faction-glow { background: var(--nexusia); }
.faction-card:hover .faction-glow { opacity: 0.15; }

.faction-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }

.faction-name { font-family: 'Cinzel', serif; font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.faction-elyndor  .faction-name { color: #c084f5; }
.faction-durandar .faction-name { color: #5cba7d; }
.faction-nexusia  .faction-name { color: #60b4f0; }

.faction-subtitle { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: #666; margin-bottom: 1rem; }

.faction-lore { font-size: 0.88rem; color: #777; line-height: 1.7; margin-bottom: 1.25rem; }

.faction-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: #555;
}
.faction-stats i { margin-right: 0.3rem; }

.btn-faction {
  display: inline-block;
  background: transparent;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.45rem 1.5rem;
  border-radius: 4px;
  border: 1px solid currentColor;
  transition: all 0.2s;
  text-decoration: none;
}
.faction-elyndor  .btn-faction { color: var(--elyndor); }
.faction-durandar .btn-faction { color: var(--durandar); }
.faction-nexusia  .btn-faction { color: var(--nexusia); }
.faction-elyndor  .btn-faction:hover { background: var(--elyndor);  color: #fff; }
.faction-durandar .btn-faction:hover { background: var(--durandar); color: #fff; }
.faction-nexusia  .btn-faction:hover { background: var(--nexusia);  color: #fff; }

/* ─── CTA ────────────────────────────────────────────── */
.cta-section {
  background: radial-gradient(ellipse 80% 100% at 50% 50%, rgba(212,175,55,0.05) 0%, transparent 70%);
  border-top: 1px solid var(--border);
}
.cta-title { font-family: 'Cinzel', serif; font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 700; color: #fff; }
.cta-sub { color: #666; font-size: 0.95rem; }

/* ─── Footer ─────────────────────────────────────────── */
.site-footer { background: var(--bg); border-top: 1px solid rgba(255,255,255,0.05); }

/* ─── Page Hero (sous-pages) ─────────────────────────── */
.page-hero {
  position: relative;
  padding: 8rem 0 4rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(212,175,55,0.07) 0%, transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle 1px at 15% 40%, rgba(212,175,55,0.35) 0%, transparent 1px),
    radial-gradient(circle 1px at 80% 20%, rgba(212,175,55,0.25) 0%, transparent 1px),
    radial-gradient(circle 1px at 50% 70%, rgba(212,175,55,0.2) 0%, transparent 1px);
  pointer-events: none;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, var(--bg) 100%);
}
.page-hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.1em;
  text-shadow: 0 0 40px rgba(212,175,55,0.2);
  margin: 1rem 0 0.75rem;
}
.page-hero-sub { color: #777; font-size: 1rem; max-width: 560px; margin: 0 auto; line-height: 1.7; }

/* ─── Couleurs utilitaires ───────────────────────────── */
.text-gold     { color: var(--gold); }
.text-elyndor  { color: #c084f5; }
.text-durandar { color: #5cba7d; }
.text-nexusia  { color: #60b4f0; }

/* ─── Lore ───────────────────────────────────────────── */
.lore-text { color: #999; line-height: 1.85; font-size: 0.95rem; margin-bottom: 1rem; }
.lore-divider { border: none; border-top: 1px solid var(--border); margin: 0 2rem; }

.lore-quote {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 2rem;
  position: relative;
}
.lore-quote-icon { font-size: 2.5rem; color: var(--gold); opacity: 0.3; position: absolute; top: 1rem; left: 1.25rem; line-height: 1; }
.lore-quote blockquote { font-family: 'Cinzel', serif; font-size: 0.95rem; color: #ccc; line-height: 1.7; margin: 0 0 1rem 1rem; padding: 0; border: none; }
.lore-quote cite { font-size: 0.78rem; color: var(--gold); opacity: 0.7; margin-left: 1rem; }

/* ─── Interactive Map ────────────────────────────────── */
.map-wrapper {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #080a0e;
}

.map-canvas {
  flex: 1;
  position: relative;
  overflow: hidden;
  line-height: 0;
  min-width: 0;
}

.map-img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
}

.map-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Pins — points colorés visibles */
.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: all;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 0; /* masque le caractère, visuel géré par ::before */
  line-height: 1;
  transition: transform 0.15s;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-pin:hover      { transform: translate(-50%, -50%) scale(1.7); }
.map-pin.pin-active { transform: translate(-50%, -50%) scale(2); }

.map-pin::before {
  content: '';
  display: block;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor, 0 0 3px rgba(0,0,0,0.9);
  transition: box-shadow 0.15s;
}

.pin-elyndor  { color: #c084f5; }
.pin-durandar { color: #5cba7d; }
.pin-nexusia  { color: #60b4f0; }

.pin-capital::before { width: 33px; height: 33px; box-shadow: 0 0 22px currentColor, 0 0 10px rgba(0,0,0,0.9); }
.pin-major::before   { width: 10px; height: 10px; box-shadow: 0 0 10px currentColor, 0 0 4px rgba(0,0,0,0.9); }
.pin-city::before    { width: 14px; height: 14px;  box-shadow: 0 0 7px currentColor,  0 0 3px rgba(0,0,0,0.9); }
.pin-port::before    { width: 8px;  height: 8px;  box-shadow: 0 0 7px currentColor,  0 0 3px rgba(0,0,0,0.9); }
.pin-poi::before     { width: 10px; height: 10px;  box-shadow: 0 0 5px currentColor,  0 0 3px rgba(0,0,0,0.9); opacity: 0.9; }
.pin-ruins::before   { width: 7px;  height: 7px;  background: transparent; border: 1.5px solid currentColor; box-shadow: 0 0 6px currentColor; }

/* Capitales — déjà grandes, scaling limité au survol/clic */
.map-pin.pin-capital:hover      { transform: translate(-50%, -50%) scale(1.2); }
.map-pin.pin-capital.pin-active { transform: translate(-50%, -50%) scale(1.3); }

/* Panneau info latéral */
.map-panel {
  width: 300px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
}

.map-panel-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #444;
  padding: 2rem;
  text-align: center;
  font-size: 0.87rem;
}
.map-panel-empty i { font-size: 2rem; }

.map-panel-info { padding: 1.5rem; position: relative; }

@media (max-width: 768px) {
  .map-wrapper { flex-direction: column; }
  .map-panel { width: 100%; border-left: none; border-top: 1px solid var(--border); }
}

.map-close {
  position: absolute;
  top: 0.65rem; right: 0.75rem;
  background: transparent;
  border: none;
  color: #555;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.map-close:hover { color: #fff; }

.map-info-badge {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 0.6rem;
}
.badge-elyndor  { background: rgba(139,70,214,0.2);  color: #c084f5; }
.badge-durandar { background: rgba(45,122,61,0.2);   color: #5cba7d; }
.badge-nexusia  { background: rgba(26,109,168,0.2);  color: #60b4f0; }

.map-info-name { font-family: 'Cinzel', serif; font-size: 1.05rem; color: #fff; margin-bottom: 0.2rem; }
.map-info-type { font-size: 0.72rem; color: #555; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.75rem; }
.map-info-desc { font-size: 0.83rem; color: #888; line-height: 1.65; margin-bottom: 0; }

/* Légende sous la carte */
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 0.75rem;
  padding: 0.65rem 0;
  font-size: 0.73rem;
  color: #555;
  border-top: 1px solid var(--border);
  align-items: center;
}
.map-legend .leg-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 0.3rem;
  vertical-align: middle;
  background: #555;
}
.map-legend .leg-dot--lg { width: 12px; height: 12px; }
.map-legend .leg-dot--md { width: 9px;  height: 9px;  }
.map-legend .leg-dot--sm { width: 7px;  height: 7px;  }
.map-legend .leg-dot--hollow { background: transparent; border: 1.5px solid #555; }

/* ─── Faction Detail Tabs (world.php) ───────────────── */
.faction-tabs .nav-link {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: #555 !important;
  border-radius: 6px 6px 0 0;
  border: 1px solid transparent !important;
  padding: 0.6rem 1.25rem;
}
.faction-tabs .nav-link:hover { color: #aaa !important; }
.faction-tabs .nav-link.active { background: var(--bg-card) !important; border-color: var(--border) !important; border-bottom-color: var(--bg-card) !important; }
.faction-tabs .nav-link.tab-elyndor.active  { color: #c084f5 !important; }
.faction-tabs .nav-link.tab-durandar.active { color: #5cba7d !important; }
.faction-tabs .nav-link.tab-nexusia.active  { color: #60b4f0 !important; }

.faction-tab-pane {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 2rem;
}

.faction-detail-header { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem; }
.faction-detail-icon { font-size: 2.5rem; }
.faction-detail-name { font-family: 'Cinzel', serif; font-size: 1.6rem; color: #fff; margin: 0; }
.faction-detail-sub  { font-size: 0.78rem; letter-spacing: 0.15em; text-transform: uppercase; color: #555; }

.faction-kv { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; font-size: 0.87rem; }
.faction-kv-label { color: #555; min-width: 80px; }
.faction-kv-value { color: #ccc; font-weight: 600; }

.strengths-grid, .weaknesses-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.84rem;
}
@media (max-width: 576px) { .strengths-grid, .weaknesses-grid { grid-template-columns: 1fr; } }

.sw-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  line-height: 1.4;
}
.sw-item i { flex-shrink: 0; margin-top: 2px; }

.rel-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.85rem; }
.rel-item:last-child { border-bottom: none; }
.rel-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.rel-dot.green { background: #2d7a3d; }
.rel-dot.orange { background: #c07830; }
.rel-dot.red { background: #a33030; }

/* ─── Timeline ───────────────────────────────────────── */
.timeline {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem; top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding: 0 0 2.5rem 2rem;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 1rem;
  align-items: start;
}
.timeline-dot {
  position: absolute;
  left: calc(0.5rem - 5px);
  top: 4px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #333;
  border: 2px solid #555;
}
.timeline-dot--elyndor  { border-color: var(--elyndor);  background: rgba(139,70,214,0.3); }
.timeline-dot--durandar { border-color: var(--durandar); background: rgba(45,122,61,0.3); }
.timeline-dot--nexusia  { border-color: var(--nexusia);  background: rgba(26,109,168,0.3); }
.timeline-dot--gold     { border-color: var(--gold);     background: rgba(212,175,55,0.3); }

.timeline-date { font-family: 'Cinzel', serif; font-size: 0.78rem; color: var(--gold); opacity: 0.8; padding-top: 2px; white-space: nowrap; }
.timeline-content h4 { font-family: 'Cinzel', serif; font-size: 1rem; color: #fff; margin-bottom: 0.4rem; }
.timeline-content p  { font-size: 0.87rem; color: #666; line-height: 1.6; margin: 0; }
