:root{
  --gold:#C79A2D;
  --gold2:#e5c067;
  --bg0:#120c07;
  --bg1:#24160c;
  --panel:#1a120d;
  --panel2:#21160f;
  --text:#f7f2ea;
  --muted:#cdbfae;
  --line:rgba(199,154,45,.20);

  --ok:#38d27a;
  --warn:#ffcc66;
  --bad:#ff5b5b;

  --shadow: 0 18px 60px rgba(0,0,0,.45);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 15% 0%, rgba(199,154,45,.18), transparent 62%),
    radial-gradient(900px 600px at 85% 20%, rgba(199,154,45,.12), transparent 60%),
    linear-gradient(180deg,var(--bg0),var(--bg1));
}

.app{min-height:100%; display:flex; flex-direction:column}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  background:rgba(0,0,0,.18);
  backdrop-filter: blur(6px);
}

.brand{display:flex; gap:12px; align-items:center}
.brandLogo{
  width:46px;height:46px;border-radius:14px;
  border:1px solid rgba(199,154,45,.35);
  background:#000; box-shadow:0 0 0 3px rgba(0,0,0,.2);
}
.brandTitle{font-weight:800; letter-spacing:.3px}
.brandSub{font-size:12px; color:rgba(205,191,174,.85)}

.topActions{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.pill{
  display:flex; gap:8px; align-items:center;
  padding:8px 10px;border-radius:999px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.18);
  font-size:12px; color:rgba(205,191,174,.9);
}
.dot{width:10px;height:10px;border-radius:99px;background:var(--warn);}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.18);
  color:var(--text);
  cursor:pointer;
  user-select:none;
}
.btn:hover{border-color:rgba(199,154,45,.35)}
.btn.primary{background:rgba(199,154,45,.14); border-color:rgba(199,154,45,.36)}
.btn.ghost{background:transparent}
.btn.small{padding:8px 10px;border-radius:12px;font-size:12px}

.layout{
  display:grid;
  grid-template-columns: 360px 1fr 360px;
  gap:12px;
  padding:12px;
  flex:1;
}

@media (max-width: 1100px){
  .layout{grid-template-columns: 330px 1fr 320px}
}
@media (max-width: 980px){
  .layout{grid-template-columns: 1fr}
  .rightPane{position:fixed; inset:74px 12px 12px 12px; transform:translateY(110%); transition:.25s ease; z-index:50}
  .rightPane.open{transform:translateY(0)}
}
@media (max-width: 520px){
  .topActions .pill{display:none}
}

.leftPane,.centerPane,.rightPane{
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(0,0,0,.14);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.paneHead{
  padding:12px 12px 10px 12px;
  border-bottom:1px solid rgba(199,154,45,.15);
}
.paneTitle{font-weight:800}
.paneSub{margin-top:4px; font-size:12px; color:rgba(205,191,174,.85)}
.paneBtns{display:flex; gap:10px; margin-top:10px; flex-wrap:wrap}

.map{height:520px; width:100%}
@media (max-width: 980px){ .map{height:380px} }

.mapLegend{
  display:flex; gap:12px; flex-wrap:wrap;
  padding:10px 12px;
  border-top:1px solid rgba(199,154,45,.15);
  color:rgba(205,191,174,.85);
  font-size:12px;
}
.legendItem{display:flex; gap:8px; align-items:center}
.lgDot{width:10px;height:10px;border-radius:99px; display:inline-block}
.lgKey{background:var(--gold)}
.lgAgent{background:#8bd3ff00; border:1px solid rgba(229,192,103,.8)} /* pas de bleu : juste contour or */
.lgModule{background:rgba(199,154,45,.35)}

.centerCard{margin:12px; padding:12px}
.card{
  border:1px solid rgba(199,154,45,.18);
  border-radius:18px;
  background:rgba(0,0,0,.12);
}
.moduleHeader{display:flex; flex-direction:column; gap:4px}
.moduleName{font-weight:900; font-size:18px}
.moduleUrl{font-size:12px; color:rgba(205,191,174,.9); word-break:break-all}

.moduleGrid{
  margin-top:12px;
  display:grid; grid-template-columns:repeat(3,1fr);
  gap:10px;
}
@media (max-width: 520px){ .moduleGrid{grid-template-columns:1fr} }

.mini{
  border:1px solid rgba(199,154,45,.18);
  border-radius:16px;
  padding:10px;
  background:rgba(0,0,0,.12);
}
.miniT{font-size:12px;color:rgba(205,191,174,.85)}
.miniV{margin-top:4px;font-weight:900}

.sep{height:1px;background:rgba(199,154,45,.18);margin:12px 0}

.actionRow{display:flex; gap:10px; flex-wrap:wrap}

.twoCols{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width: 980px){ .twoCols{grid-template-columns:1fr} }

.inner{padding:12px}
.innerTitle{font-weight:800; margin-bottom:10px}

.console{
  margin:0;
  height:220px;
  overflow:auto;
  border-radius:14px;
  border:1px solid rgba(199,154,45,.18);
  background:rgba(0,0,0,.18);
  padding:10px;
  color:var(--text);
  font-size:12px;
  line-height:1.35;
  white-space:pre-wrap;
}

.form{display:flex; flex-direction:column; gap:8px}
label{font-size:12px;color:rgba(205,191,174,.85)}
.field{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.20);
  color:var(--text);
  outline:none;
}
.field::placeholder{color:rgba(245,242,234,.35)}
.formBtns{display:flex; gap:10px; flex-wrap:wrap; margin-top:6px}
.small{font-size:12px; color:rgba(205,191,174,.85)}

.list{padding:12px; display:flex; flex-direction:column; gap:10px}
.row{
  border:1px solid rgba(199,154,45,.18);
  border-radius:16px;
  padding:10px;
  background:rgba(0,0,0,.12);
  display:flex; gap:10px; align-items:center; justify-content:space-between;
}
.rowTxt{min-width:0}
.rowTitle{font-weight:800}
.rowSub{font-size:12px; color:rgba(205,191,174,.85); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:220px}
.rowBtns{display:flex; gap:8px}

.footer{
  text-align:center;
  padding:10px 12px;
  color:rgba(205,191,174,.75);
  font-size:12px;
}
.footNote{padding:0 12px 12px 12px}