/* ══════════════════════════════════════
   NOXUS — module-monde.css
   Styles du module Monde — Carte Runeterra
   Pan / Zoom / Fog of War
   ══════════════════════════════════════ */

#module-world {
  overflow: hidden;
}

/* ── LAYOUT PRINCIPAL ── */
.monde-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ══════════════════════════════════════
   ZONE DE CARTE (conteneur de la vue)
   ══════════════════════════════════════ */
.monde-carte-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #050510;
  cursor: grab;
  user-select: none;
}

.monde-carte-wrapper:active { cursor: grabbing; }

/* ── SCÈNE (élément déplacé/zoomé) ── */
#monde-scene {
  position: absolute;
  left: 0;
  top: 0;
  width: 3000px;
  height: 2000px;
  transform-origin: 0 0;
  will-change: transform;
}

/* ── IMAGE DE FOND ── */
#monde-carte-img {
  position: absolute;
  inset: 0;
  width: 3000px;
  height: 2000px;
  object-fit: fill;
  display: block;
  opacity: 0.82;
  z-index: 0;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* ── CALQUE MARQUEURS ── */
#monde-marqueurs {
  position: absolute;
  inset: 0;
  width: 3000px;
  height: 2000px;
  z-index: 5;
  pointer-events: none; /* les marqueurs individuels ont pointer-events:all */
}

/* ── CALQUE FOG OF WAR ── */
#monde-fog {
  position: absolute;
  inset: 0;
  width: 3000px;
  height: 2000px;
  z-index: 3;
  pointer-events: none;
}

/* ── CONTRÔLES DE NAVIGATION ── */
.monde-controls {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.carte-btn {
  width: 32px;
  height: 32px;
  background: rgba(24, 18, 16, 0.88);
  border: 1px solid var(--border-gold);
  border-radius: 3px;
  color: var(--gold-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  transition: all 0.18s;
  line-height: 1;
}

.carte-btn:hover {
  background: rgba(139,0,0,0.3);
  border-color: var(--gold);
  color: var(--gold);
}

.carte-btn-sep { height: 6px; }

/* ── LÉGENDE MINI ── */
.monde-legende {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 20;
  background: rgba(24, 18, 16, 0.88);
  border: 1px solid var(--border-gold);
  border-radius: 3px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.legende-titre {
  font-family: 'Cinzel', serif;
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}

.legende-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Cinzel', serif;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.legende-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid;
  flex-shrink: 0;
}

/* ══════════════════════════════════════
   MARQUEURS
   ══════════════════════════════════════ */

.marqueur {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
  pointer-events: all;
}

.marqueur-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid;
  transition: all 0.2s;
  position: relative;
  z-index: 2;
}

/* Statuts */
.marqueur-controle .marqueur-dot {
  background: rgba(139,0,0,0.85);
  border-color: var(--gold);
}

.marqueur-neutre .marqueur-dot {
  background: rgba(40,40,40,0.85);
  border-color: #8A7A6A;
}

.marqueur-hostile .marqueur-dot {
  background: rgba(80, 0, 0, 0.55);
  border-color: #7A1010;
}

/* Types */
.marqueur-type-capitale .marqueur-dot {
  width: 18px;
  height: 18px;
  border-width: 2.5px;
  border-color: var(--gold);
  background: rgba(139,0,0,0.95);
  box-shadow: 0 0 10px rgba(201,168,76,0.4);
}

.marqueur-type-interet .marqueur-dot {
  border-color: var(--gold);
  background: rgba(201,168,76,0.25);
}

/* Hover & sélection */
.marqueur:hover .marqueur-dot {
  transform: scale(1.4);
  box-shadow: 0 0 8px currentColor;
}

.marqueur-selected .marqueur-dot {
  transform: scale(1.5);
  box-shadow: 0 0 12px currentColor;
}

/* Labels */
.marqueur-label {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text-main);
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,0,0,1), 0 0 8px rgba(0,0,0,0.8);
  pointer-events: none;
  opacity: 0.85;
  z-index: 1;
}

.marqueur-type-capitale .marqueur-label {
  top: 20px;
  font-size: 10px;
  font-weight: 600;
  color: var(--gold);
  opacity: 1;
}

.marqueur-selected .marqueur-label { color: var(--gold); opacity: 1; }

/* Pulse pour opération en cours */
.marqueur-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--crimson-light);
  animation: pulse-monde 1.5s ease-out infinite;
  pointer-events: none;
}

@keyframes pulse-monde {
  0%   { transform: translate(-50%,-50%) scale(0.8); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(2.2); opacity: 0; }
}

/* ══════════════════════════════════════
   PANNEAU LATÉRAL
   ══════════════════════════════════════ */

.monde-panneau {
  width: 0;
  background: var(--stone-panel);
  border-left: 1px solid var(--border-gold);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.3s ease;
  flex-shrink: 0;
  position: relative;
  z-index: 30;
}

.monde-panneau.open { width: 280px; }

.monde-panneau.open::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--crimson), var(--gold-dim));
}

.panneau-content {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panneau-content::-webkit-scrollbar { width: 3px; }
.panneau-content::-webkit-scrollbar-thumb { background: var(--border); }

.panneau-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.panneau-nom {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.2;
}

.panneau-statut {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: 2px;
  white-space: nowrap;
}

.statut-controle { background: rgba(139,0,0,0.3);  border: 1px solid var(--crimson);      color: var(--crimson-light); }
.statut-neutre   { background: rgba(58,46,36,0.5);  border: 1px solid var(--border);       color: var(--text-dim); }
.statut-hostile  { background: rgba(139,0,0,0.2);   border: 1px solid var(--crimson-dark); color: var(--crimson-light); }

.panneau-desc {
  font-family: 'Crimson Text', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.panneau-section-title {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.panneau-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 2px 0;
}

.panneau-stat-label { color: var(--text-dim); font-style: italic; }
.panneau-stat-value { font-family: 'Cinzel', serif; font-size: 11px; color: var(--text-main); }

/* Butin */
.butin-tags { display: flex; flex-wrap: wrap; gap: 4px; }

.butin-tag {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  padding: 2px 6px;
  background: rgba(201,168,76,0.1);
  border: 1px solid var(--border-gold);
  border-radius: 2px;
  color: var(--gold-dim);
  letter-spacing: 0.5px;
}

/* Boutons opérations */
.btn-operation {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
  transition: background 0.2s, border-color 0.2s;
}

.btn-operation:hover { background: rgba(139,0,0,0.1); }

.btn-operation span:first-child {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.op-desc {
  font-family: 'Crimson Text', serif;
  font-size: 12px;
  color: var(--text-dim) !important;
  font-style: italic;
}

/* Panneau envoi */
.panneau-envoi {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.envoi-titre {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--gold);
  text-transform: uppercase;
}

.envoi-unite-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(58,46,36,0.4);
  font-size: 12px;
}

.envoi-unite-nom  { flex: 1; color: var(--text-main); }
.envoi-unite-dispo { color: var(--text-dim); font-style: italic; font-size: 11px; white-space: nowrap; }

.envoi-input {
  width: 56px;
  background: var(--stone-light);
  border: 1px solid var(--border-gold);
  border-radius: 2px;
  color: var(--text-main);
  font-family: 'Cinzel', serif;
  font-size: 12px;
  padding: 2px 6px;
  text-align: center;
}

.envoi-input:focus { outline: none; border-color: var(--gold); }
.envoi-input::-webkit-inner-spin-button,
.envoi-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ══════════════════════════════════════
   ZONE OPÉRATIONS (bas de page)
   ══════════════════════════════════════ */
.monde-bottom {
  height: 110px;
  flex-shrink: 0;
  border-top: 1px solid var(--border-gold);
  background: var(--stone-panel);
  padding: 10px 16px;
  overflow-y: auto;
  position: relative;
  z-index: 10;
}

.monde-bottom::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--crimson), var(--gold-dim), var(--crimson), transparent);
  opacity: 0.4;
}

.monde-bottom-title {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.monde-bottom::-webkit-scrollbar { width: 3px; }
.monde-bottom::-webkit-scrollbar-thumb { background: var(--border); }

/* ── Fermer panneau ── */
.panneau-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.2s;
}

.panneau-close:hover { color: var(--text-main); }

/* ── Territoire masqué (masque: true, non encore découvert) ── */
.marqueur-masque {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: default;
  z-index: 10;
  pointer-events: none;
}

/* ── Territoire masqué mais cliquable (neutre/hostile) ── */
.marqueur-masque-cliquable {
  pointer-events: all;
  cursor: pointer;
}

.marqueur-masque-cliquable:hover .marqueur-inconnu {
  border-color: rgba(139, 0, 0, 0.6);
  background: rgba(30, 10, 10, 0.75);
  color: rgba(180, 140, 100, 0.8);
  box-shadow: 0 0 8px rgba(139, 0, 0, 0.4);
}

.marqueur-masque-cliquable.marqueur-selected .marqueur-inconnu {
  border-color: var(--gold);
  color: var(--gold-dim);
  box-shadow: 0 0 10px rgba(201, 168, 76, 0.4);
}

.marqueur-inconnu {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(90, 74, 42, 0.5);
  background: rgba(10, 8, 12, 0.55);
  color: rgba(138, 122, 106, 0.5);
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s;
}

/* ── Type : Port ── */
.marqueur-type-port .marqueur-dot {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  transform: rotate(45deg);
  border-color: #4A8AAA;
  background: rgba(30, 80, 110, 0.75);
  box-shadow: 0 0 6px rgba(74, 138, 170, 0.35);
}

.marqueur-type-port:hover .marqueur-dot {
  transform: rotate(45deg) scale(1.4);
  box-shadow: 0 0 10px rgba(74, 138, 170, 0.6);
}

.marqueur-type-port.marqueur-selected .marqueur-dot {
  transform: rotate(45deg) scale(1.5);
  box-shadow: 0 0 14px rgba(74, 138, 170, 0.8);
}

.marqueur-type-port .marqueur-label {
  color: #7ABBD0;
  top: 16px;
}

.marqueur-type-port.marqueur-selected .marqueur-label {
  color: #A8D8EA;
}

/* ── Statut : Hostile Majeur ── */
.marqueur-hostile-majeur .marqueur-dot {
  width: 14px;
  height: 14px;
  background: rgba(200, 0, 0, 0.95);
  border-color: #FF2222;
  border-width: 2px;
  box-shadow: 0 0 6px 1px rgba(255, 30, 30, 0.6);
}

.marqueur-hostile-majeur .marqueur-label {
  color: #FF2222;
  font-weight: 600;
  opacity: 1;
}

.marqueur-hostile-majeur:hover .marqueur-dot {
  transform: scale(1.4);
  box-shadow: 0 0 18px 4px rgba(255, 60, 60, 1);
}

.marqueur-hostile-majeur.marqueur-selected .marqueur-dot {
  transform: scale(1.5);
  box-shadow: 0 0 20px 5px rgba(255, 60, 60, 1);
}

.marqueur-type-capitale.marqueur-hostile-majeur .marqueur-dot {
  width: 20px;
  height: 20px;
  border-color: #FF4444;
  border-width: 2.5px;
  box-shadow: 0 0 8px 2px rgba(255, 60, 60, 0.5);
}

.statut-hostile-majeur {
  background: rgba(180, 0, 0, 0.25);
  border: 1px solid #FF4444;
  color: #FF6666;
}

/* ── Type : Ennemi ── */
.marqueur-type-ennemi .marqueur-dot {
  border: none !important;
  width: 18px;
  height: 18px;
  border-radius: 0 !important;
  clip-path: polygon(
    50% 0%,    65% 35%,
    100% 50%,  65% 65%,
    50% 100%,  35% 65%,
    0% 50%,    35% 35%
  );
  transition: transform 0.2s, box-shadow 0.2s;
}

.marqueur-hostile.marqueur-type-ennemi .marqueur-dot {
  background: #B22222;
  box-shadow: none;
}

.marqueur-hostile-majeur.marqueur-type-ennemi .marqueur-dot {
  background: #FF4444;
  filter: drop-shadow(0 0 4px rgba(255,60,60,0.9));
}

.marqueur-neutre.marqueur-type-ennemi .marqueur-dot {
  background: #8A7A6A;
}

.marqueur-controle.marqueur-type-ennemi .marqueur-dot {
  background: var(--gold);
  filter: drop-shadow(0 0 4px rgba(201,168,76,0.6));
}

.marqueur-type-ennemi:hover .marqueur-dot {
  transform: scale(1.4) rotate(45deg);
}

.marqueur-type-ennemi.marqueur-selected .marqueur-dot {
  transform: scale(1.5) rotate(45deg);
}

.marqueur-type-ennemi .marqueur-label {
  font-weight: 600;
  opacity: 1;
  top: 15px;
}