.sw-radar-wrap{
  position:relative;
  width:100%;
  max-width:100%;
  margin:0;
  padding:8px;
  border-radius:12px;
  background:rgba(0,0,0,0.85);
  border:1px solid rgba(0,255,160,0.25);
  box-shadow:0 8px 32px rgba(0,0,0,0.4);
  color:rgba(215,255,235,0.92);
  box-sizing:border-box;
}
.sw-radar-hud{
  display:flex;align-items:baseline;justify-content:space-between;
  gap:8px;margin-bottom:6px;
}
.sw-radar-title{font-weight:700;letter-spacing:0.08em;text-transform:uppercase;font-size:12px;}
.sw-radar-sub{opacity:0.6;font-size:10px;letter-spacing:0.1em;}
.sw-radar-canvas{
  width:100%;
  height:auto;
  display:block;
  border-radius:8px;
  background:#060e0b;
  outline:1px solid rgba(0,255,160,0.15);
  cursor:crosshair;
}
.sw-radar-canvas:active{cursor:grabbing !important;}
.sw-radar-error{padding:12px;border:1px solid #555;border-radius:8px;}
.sw-poi-modal button:hover{filter:brightness(1.15);}
.sw-radar-hidden{position:relative;}
.sw-radar-hidden .sw-radar-canvas{filter:blur(6px) brightness(.4);pointer-events:none;}
.sw-radar-hidden::after{
  content:'SIGNAL RADAR COUPÉ';
  position:absolute;inset:40px 12px 20px;
  display:flex;align-items:center;justify-content:center;
  color:rgba(215,255,235,.8);letter-spacing:.18em;font-weight:800;
  text-transform:uppercase;font-size:clamp(10px,1.5vw,14px);
  border-radius:10px;border:1px dashed rgba(0,255,160,.3);background:rgba(0,0,0,.3);
}
/* Variante : signal coupé par le MJ — même visuel que carte masquée */
.sw-radar-player-hidden::after{
  border-color:rgba(0,255,160,.3);
  color:rgba(215,255,235,.8);
}

.sw-zoom 
.sw-zoom 
.sw-zoom 
.sw-zoom 

/* ══════════════════════════════════════════════════════════════
   VUE MJ — barre sticky + carte + onglets
   ══════════════════════════════════════════════════════════════ */

/* Canvas MJ */
.sw-radar-gm-wrap .sw-radar-gm-canvas {
  display: block;
  border-radius: 12px;
  cursor: crosshair;
}

/* ── Barre sticky MJ ── */
.swgm-bar {
  position: sticky;
  top: 32px; /* sous la barre WP admin */
  z-index: 200;
  background: rgba(6,12,10,0.97);
  border: 1px solid rgba(0,255,160,0.22);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

/* Ligne titre + actions globales */
.swgm-bar-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(0,255,160,0.1);
  flex-wrap: wrap;
}
.swgm-bar-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(0,255,160,.7);
  white-space: nowrap;
}
.swgm-bar-mapname {
  color: rgba(200,255,230,.6);
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: none;
  margin-left: 6px;
}
.swgm-bar-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
}

/* Boutons génériques de la barre */
.swgm-btn {
  border-radius: 7px;
  padding: 4px 11px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid;
  line-height: 1.4;
  transition: filter .12s;
}
.swgm-btn:hover { filter: brightness(1.2); }
.swgm-btn-ghost {
  background: rgba(0,255,160,0.07);
  border-color: rgba(0,255,160,0.25);
  color: rgba(180,255,220,.9);
}
.swgm-btn-primary {
  background: rgba(0,255,160,0.18);
  border-color: rgba(0,255,160,0.5);
  color: rgba(0,255,160,1);
  font-weight: 600;
}

/* ── Onglets ── */
.swgm-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(0,255,160,0.1);
  overflow-x: auto;
  scrollbar-width: none;
}
.swgm-tabs::-webkit-scrollbar { display: none; }
.swgm-tab {
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  cursor: pointer;
  border: none;
  background: transparent;
  color: rgba(150,200,180,.65);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.swgm-tab:hover {
  color: rgba(200,255,230,.9);
}
.swgm-tab.active {
  color: rgba(0,255,160,1);
  border-bottom-color: rgba(0,255,160,.8);
  background: rgba(0,255,160,0.04);
}

/* ── Panneaux d'onglets ── */
.swgm-tab-panels {
  padding: 0;
}
.swgm-tab-panel {
  display: none;
  padding: 10px 12px;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,255,160,.25) transparent;
}
.swgm-tab-panel::-webkit-scrollbar { width: 4px; }
.swgm-tab-panel::-webkit-scrollbar-thumb { background: rgba(0,255,160,.2); border-radius: 4px; }
.swgm-tab-panel.active { display: block; }

/* ── Tableau des zones (dans onglet) ── */
.swgm-zones-wrap {
  overflow-x: auto;
}
.swgm-zones-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: rgba(200,240,220,.85);
}
.swgm-zones-table thead th {
  text-align: left;
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .5;
  border-bottom: 1px solid rgba(0,255,160,.1);
}
.swgm-zones-table tbody tr {
  border-bottom: 1px solid rgba(0,255,160,.05);
  transition: background .1s;
}
.swgm-zones-table tbody tr:hover {
  background: rgba(0,255,160,.04);
}
.swgm-zone-name {
  padding: 5px 8px;
  font-size: 12px;
  white-space: nowrap;
}
.swgm-zone-size {
  font-size: 10px;
  opacity: .45;
  margin-left: 5px;
}
.swgm-vis { padding: 5px 8px; font-size: 12px; }
.swgm-vis-num { opacity: .4; font-size: 10px; margin-left: 3px; }
.swgm-zone-actions {
  padding: 4px 6px;
  white-space: nowrap;
  display: flex;
  gap: 4px;
}
.swgm-zbtn {
  padding: 2px 9px;
  font-size: 11px;
  border-radius: 5px;
  cursor: pointer;
  border: 1px solid rgba(120,120,120,.35);
  background: rgba(80,80,80,.15);
  color: rgba(190,190,190,.9);
  transition: filter .1s;
}
.swgm-zbtn:hover { filter: brightness(1.3); }
.swgm-zbtn-detect {
  border-color: rgba(255,200,60,.35);
  background: rgba(255,200,60,.1);
  color: rgba(255,210,80,.9);
}
.swgm-zbtn-reveal {
  border-color: rgba(0,255,160,.4);
  background: rgba(0,255,160,.12);
  color: rgba(0,255,160,1);
  font-weight: 600;
}

/* Panneau replié (aucun onglet actif) */
.swgm-tab-panels {
  transition: max-height .25s ease, padding .2s ease;
  overflow: hidden;
  max-height: 360px;
}
.swgm-tab-panels.swgm-collapsed {
  max-height: 0 !important;
  padding: 0 !important;
}
/* Indicateur visuel sur les onglets : petit chevron */
.swgm-tab::after {
  content: '';
  display: inline-block;
  margin-left: 5px;
  width: 0; height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid currentColor;
  opacity: .4;
  vertical-align: middle;
  transition: transform .18s;
}
.swgm-tab.active::after {
  transform: rotate(180deg);
  opacity: .8;
}

/* Les panneaux dynamiques (combat, narratif, etc.) injectés par JS
   n'ont plus besoin de margin externe dans la barre */
#swgm-combat-panel,
#swgm-narrative-panel {
  margin: 0;
  border: none;
  background: transparent;
  padding: 0;
}

.sw-radar-gm-wrap 
.sw-radar-gm-wrap 
.sw-radar-gm-wrap 

/* Panneau sélection token */
.sw-radar-gm-wrap .swgm-selected { font-size: 13px; }

/* ── Grille PNJ (picker holocron) ─────────────────────────────────────── */
.swgm-pnj-picker {
  margin-top: 12px;
  border: 1px solid rgba(180,140,255,0.22);
  border-radius: 10px;
  background: rgba(20,10,30,0.55);
  overflow: hidden;
}
.swgm-pnj-picker-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(180,140,255,0.15);
}
.swgm-pnj-picker-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(180,140,255,0.85);
  white-space: nowrap;
}
.swgm-pnj-search {
  flex: 1;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(180,140,255,0.25);
  border-radius: 6px;
  color: rgba(200,255,230,.9);
  padding: 4px 8px;
  font-size: 12px;
  outline: none;
  min-width: 0;
}
.swgm-pnj-search:focus {
  border-color: rgba(180,140,255,0.6);
}
.swgm-pnj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  gap: 6px;
  padding: 10px;
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(180,140,255,.2) transparent;
}
.swgm-pnj-grid::-webkit-scrollbar { width: 4px; }
.swgm-pnj-grid::-webkit-scrollbar-thumb { background: rgba(180,140,255,.2); border-radius: 4px; }
.swgm-pnj-loading {
  grid-column: 1/-1;
  font-size: 11px;
  opacity: .45;
  text-align: center;
  padding: 12px 0;
}
.swgm-pnj-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 8px;
  border: 1px solid rgba(180,140,255,0.15);
  background: rgba(40,20,60,0.5);
  cursor: pointer;
  transition: border-color .14s, background .14s, transform .1s;
  text-align: center;
}
.swgm-pnj-card:hover {
  border-color: rgba(180,140,255,0.5);
  background: rgba(60,30,90,0.7);
  transform: translateY(-1px);
}
.swgm-pnj-card-active {
  border-color: rgba(180,140,255,0.9) !important;
  background: rgba(80,40,120,0.8) !important;
  box-shadow: 0 0 8px rgba(180,140,255,0.4);
}
.swgm-pnj-portrait {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(180,140,255,0.3);
  display: block;
}
.swgm-pnj-no-portrait {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(180,140,255,0.15);
  border: 2px solid rgba(180,140,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: rgba(180,140,255,0.7);
}
.swgm-pnj-card-name {
  font-size: 10px;
  color: rgba(215,200,255,.9);
  line-height: 1.2;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}
.swgm-pnj-card-rang {
  font-size: 9px;
  opacity: .45;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.swgm-pnj-pending {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(180,140,255,0.12);
  border-top: 1px solid rgba(180,140,255,0.2);
  font-size: 12px;
  color: rgba(200,180,255,.9);
  flex-wrap: wrap;
}
.swgm-pnj-cancel {
  margin-left: auto;
  background: rgba(255,80,80,0.1);
  border: 1px solid rgba(255,80,80,0.3);
  color: rgba(255,140,140,.9);
  border-radius: 6px;
  padding: 2px 9px;
  font-size: 11px;
  cursor: pointer;
}
.swgm-pnj-cancel:hover { background: rgba(255,80,80,0.2); }

/* ── Tooltip zone (vue MJ) ─────────────────────────────────────── */
.swgm-zone-tooltip {
  position: fixed;
  z-index: 9999;
  display: none;
  background: rgba(6,12,10,0.92);
  border: 1px solid rgba(0,255,160,0.35);
  color: rgba(0,255,160,0.95);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,.6);
}
