/* ==========================================================================
   INTEL MARCHÉS // CLASSIFIÉ — terminal dense, minimal, sans artifice
   ========================================================================== */

:root{
  --bg:        #000000;
  --panel:     #050505;
  --line:      #262626;
  --line-soft: #1a1a1a;

  --text:      #d4d4d4;
  --text-dim:  #7a7a7a;
  --text-faint:#4a4a4a;

  --green: #4ade80;
  --red:   #f87171;
  --amber: #facc15;
  --cyan:  #67e8f9;

  --crit:  #ff5555;
  --high:  #f59e0b;
  --med:   #eab308;
  --low:   #4ade80;

  --mono: "IBM Plex Mono", "Share Tech Mono", "Courier New", monospace;
}

*{ box-sizing: border-box; }
html, body{ margin:0; padding:0; background: var(--bg); color: var(--text); font-family: var(--mono); }
body{ font-size: 13px; line-height: 1.4; }
::selection{ background: var(--text); color: var(--bg); }
a{ color: var(--cyan); text-decoration: none; }
a:hover{ text-decoration: underline; }
button{ font-family: inherit; }

.app{ max-width: 1500px; margin: 0 auto; padding: 10px 14px 0; }

/* ---------------------------------------------------------------- Header */

.topbar{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.brand{ font-weight: 600; font-size: 15px; letter-spacing: 0.5px; }
.brand-sep{ color: var(--text-faint); }

.status-cluster{ display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-dim); }
.status-cluster b{ color: var(--text); font-weight: 600; }
.status-item{ white-space: nowrap; }

.dot{
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-faint); margin-right: 5px; position: relative; top: -1px;
}
.dot.on{ background: var(--green); }
.dot.warn{ background: var(--amber); }
.dot.off{ background: var(--red); }

/* ---------------------------------------------------------------- Ticker */

.ticker-wrap{
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  margin-bottom: 10px;
}
.ticker-track{ display: inline-flex; padding: 5px 0; animation: scroll 45s linear infinite; }
.ticker-track:hover{ animation-play-state: paused; }
@keyframes scroll{ from{ transform: translateX(0); } to{ transform: translateX(-50%); } }
.tick-item{
  display: inline-flex; gap: 7px; padding: 0 16px;
  border-right: 1px solid var(--line-soft); font-size: 12px; white-space: nowrap;
}
.tick-item .lbl{ color: var(--text-dim); }
.tick-item .up{ color: var(--green); }
.tick-item .down{ color: var(--red); }

/* ---------------------------------------------------------------- Layout */

.grid{
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 12px;
  align-items: start;
}
.col{ display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.col-main{ gap: 0; }

.panel{ border: 1px solid var(--line); background: var(--panel); }
.panel-head{
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 9px; border-bottom: 1px solid var(--line);
}
.panel-head h2{ margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--text); }
.panel-tag{ font-size: 10px; color: var(--text-faint); }

/* ---------------------------------------------------------------- Generic dense tables */

.table-wrap{ padding: 6px 9px 8px; }
.dtable{ width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 11.5px; }
.dtable td{ padding: 3px 4px; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.dtable tr:last-child td{ border-bottom: none; }
.dtable td:nth-child(2), .dtable td:nth-child(3){ width: 56px; }
.dtable .num{ text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.dtable .lbl{ color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtable .up{ color: var(--green); }
.dtable .down{ color: var(--red); }
.dtable .muted{ color: var(--text-faint); }

.tag-lvl{ font-size: 9.5px; padding: 0 4px; border: 1px solid currentColor; }
.tag-lvl.crit{ color: var(--crit); }
.tag-lvl.high{ color: var(--high); }
.tag-lvl.med{  color: var(--med); }
.tag-lvl.low{  color: var(--low); }

.loading-line{ color: var(--text-dim); font-size: 12px; padding: 8px; }

/* ---------------------------------------------------------------- Filters */

.filter-row{ display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--line); }
.filter-chip{
  font-size: 10.5px; letter-spacing: 0.5px; color: var(--text-dim);
  border: none; border-right: 1px solid var(--line);
  padding: 5px 9px; cursor: pointer; background: transparent;
}
.filter-chip:hover{ color: var(--text); background: var(--line-soft); }
.filter-chip.active{ color: var(--bg); background: var(--text); }

/* ---------------------------------------------------------------- Feed table */

.feed-table{ max-height: 640px; overflow-y: auto; }
.frow{
  display: grid;
  grid-template-columns: 60px 74px 150px 1fr 90px;
  gap: 8px;
  padding: 5px 9px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  font-size: 12px;
  align-items: baseline;
}
.frow:hover{ background: var(--line-soft); }
.frow .f-time{ color: var(--text-faint); font-size: 10.5px; white-space: nowrap; }
.frow .f-impact{ font-size: 10px; }
.frow .f-cat{ color: var(--text-dim); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frow .f-head{ color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow .f-src{ color: var(--text-faint); font-size: 10.5px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 900px){
  .frow{ grid-template-columns: 1fr; gap: 2px; padding: 8px 9px; }
  .frow .f-src{ text-align: left; }
}

/* ---------------------------------------------------------------- Console */

.console{ border: 1px solid var(--line); border-top: none; background: var(--panel); margin-top: 12px; }
.term-log{
  padding: 6px 9px; font-size: 11.5px; color: var(--text-dim);
  height: 120px; overflow-y: auto; display: flex; flex-direction: column; justify-content: flex-end;
}
.term-log div{ white-space: pre-wrap; overflow-wrap: anywhere; }
.term-log div::before{ content: "> "; color: var(--text-faint); }
.term-input-row{ display: flex; gap: 6px; align-items: center; border-top: 1px solid var(--line); padding: 6px 9px; }
.term-prompt{ font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.term-input{ flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-family: var(--mono); font-size: 12px; }
.term-input::placeholder{ color: var(--text-faint); }

/* ---------------------------------------------------------------- Footer */

.footer{
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
  margin: 10px 0; padding-top: 8px; border-top: 1px solid var(--line);
  font-size: 9.5px; color: var(--text-faint); letter-spacing: 0.5px;
}

/* ---------------------------------------------------------------- Modal */

.brief-overlay{
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; pointer-events: none; transition: opacity 0.1s;
}
.brief-overlay.open{ opacity: 1; pointer-events: auto; }
.brief-card{
  max-width: 560px; width: 100%; background: var(--panel);
  border: 1px solid var(--line); padding: 16px 18px; font-size: 12.5px;
}
.brief-close{ float: right; color: var(--text-dim); cursor: pointer; font-size: 11px; }
.brief-close:hover{ color: var(--text); }
.brief-meta{ font-size: 10.5px; color: var(--text-dim); letter-spacing: 0.5px; clear: both; }
.brief-card h3{ font-size: 14px; line-height: 1.4; margin: 8px 0 10px; color: var(--text); font-weight: 600; }
.brief-body{ line-height: 1.6; color: var(--text); }
.brief-link{ display: inline-block; margin-top: 10px; color: var(--cyan); border-bottom: 1px dashed var(--cyan); font-size: 12px; }

/* ---------------------------------------------------------------- Responsive */

@media (max-width: 1080px){
  .grid{ grid-template-columns: 1fr; }
  .col-left, .col-right{ flex-direction: row; flex-wrap: wrap; }
  .col-left .panel, .col-right .panel{ flex: 1 1 220px; }
}
@media (max-width: 480px){
  .app{ padding: 8px 10px 0; }
  .status-cluster{ gap: 10px; font-size: 10.5px; }
}
