/* Dashboard Ember Drive - palette reprise de emberdrive.com (noir + neon magenta). */
:root {
  --bg: #000000;
  --bg-2: #0a0a0a;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #ffffff;
  --text-muted: #b8b0b6;
  --text-dim: #6e6670;
  --neon: #ff0a8c;
  --neon-2: #ff3da8;
  --neon-soft: rgba(255, 10, 140, 0.14);
  --neon-glow: rgba(255, 10, 140, 0.55);
  --neon-dark: #5c0034;
  --ok: #36d399;
  --warm: #ffb454;
  --cold: #8a8a8a;
  --dead: #6e6670;
  --font-display: 'Anton', 'Bebas Neue', Impact, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --container: 1180px;
  --radius: 12px;
  --radius-lg: 24px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255, 10, 140, 0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--neon-2); text-decoration: none; }
a:hover { color: var(--neon); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* --- header / nav --- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; gap: 28px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 30px; width: auto; display: block; }
.brand .tag {
  font-family: var(--font-display); letter-spacing: 1px;
  text-transform: uppercase; font-size: 14px; color: var(--text-dim);
}
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a {
  color: var(--text-muted); padding: 8px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active { color: var(--text); background: var(--neon-soft); }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-muted);
}
.user-chip a { color: var(--text-dim); font-size: 12px; }

/* --- page --- */
main { padding: 36px 0 80px; }
.page-title {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(32px, 5vw, 56px); margin: 0 0 4px; letter-spacing: 1px;
}
.page-sub { color: var(--text-dim); margin: 0 0 28px; font-size: 14px; }
h2.section {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: 22px; letter-spacing: 1px; margin: 40px 0 16px;
  border-left: 3px solid var(--neon); padding-left: 12px;
}

/* --- cards / KPI --- */
.grid { display: grid; gap: 16px; }
.kpi-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
.kpi .num {
  font-family: var(--font-display); font-size: 40px; line-height: 1;
  color: var(--text);
}
.kpi .num.neon { color: var(--neon); text-shadow: 0 0 18px var(--neon-glow); }
.kpi .lbl {
  text-transform: uppercase; letter-spacing: 0.5px; font-size: 11px;
  color: var(--text-dim); margin-top: 8px;
}

/* --- tables --- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
thead th {
  font-family: var(--font-body); text-transform: uppercase; font-size: 11px;
  letter-spacing: 0.5px; color: var(--text-dim); font-weight: 600;
  position: sticky; top: 0; background: var(--bg-2);
}
tbody tr:hover { background: var(--surface-hover); }
tbody tr:last-child td { border-bottom: none; }

/* --- badges statut --- */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.4px; border: 1px solid var(--border-strong);
  white-space: nowrap;
}
.badge.ok { color: var(--ok); border-color: rgba(54, 211, 153, 0.4); background: rgba(54, 211, 153, 0.10); }
.badge.warm { color: var(--warm); border-color: rgba(255, 180, 84, 0.4); background: rgba(255, 180, 84, 0.10); }
.badge.pending { color: var(--neon-2); border-color: rgba(255, 61, 168, 0.4); background: var(--neon-soft); }
.badge.cold { color: var(--cold); }
.badge.dead { color: var(--dead); text-decoration: line-through; }
.badge.muted { color: var(--text-dim); }

/* --- funnel bars --- */
.funnel-row { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: center; margin-bottom: 8px; }
.funnel-row .name { font-size: 13px; color: var(--text-muted); }
.bar-track { background: var(--surface); border-radius: 8px; height: 26px; position: relative; overflow: hidden; }
.bar-fill {
  height: 100%; width: 0; background: linear-gradient(90deg, var(--neon-dark), var(--neon));
  border-radius: 8px; transition: width 0.6s var(--ease, ease);
}
.bar-label { position: absolute; right: 10px; top: 0; line-height: 26px; font-size: 12px; color: var(--text); }

/* --- shows / timeline --- */
.show-item, .commit-item {
  display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border);
}
.show-item:last-child, .commit-item:last-child { border-bottom: none; }
.show-date {
  font-family: var(--font-display); font-size: 18px; color: var(--neon);
  min-width: 110px;
}
.countdown { font-size: 12px; color: var(--text-dim); }
.commit-date { color: var(--text-dim); font-size: 13px; min-width: 110px; font-variant-numeric: tabular-nums; }
.commit-hash { color: var(--neon-2); font-family: ui-monospace, monospace; font-size: 12px; }

/* --- layout utilitaires (evite les style= inline bloques par la CSP) --- */
.grid-2col { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.mt-8 { margin-top: 8px; }
.chart-box { position: relative; height: 200px; }

/* --- charts --- */
.chart-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.chart-card { min-height: 260px; }
.chart-card h3 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
canvas { max-width: 100%; }

/* --- markdown blocks (veille / streaming) --- */
.md { font-size: 14px; color: var(--text-muted); }
.md h1 { display: none; }
.md h2 { font-family: var(--font-display); text-transform: uppercase; font-size: 18px; color: var(--text); letter-spacing: 0.5px; margin: 28px 0 12px; }
.md h3 { font-size: 15px; color: var(--text); margin: 20px 0 6px; }
.md table { margin: 8px 0 16px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.md em { color: var(--text-dim); font-style: italic; }
.md ul { padding-left: 18px; }

/* --- login / denied --- */
.center-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { max-width: 420px; width: 100%; text-align: center; }
.auth-card img.logo { height: 64px; margin-bottom: 24px; }
.auth-card h1 { font-family: var(--font-display); text-transform: uppercase; font-size: 28px; letter-spacing: 1px; margin: 0 0 6px; }
.auth-card p { color: var(--text-dim); margin: 0 0 28px; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; font-size: 14px;
  background: var(--neon); color: #fff; border: none; cursor: pointer;
  box-shadow: 0 0 24px var(--neon-glow);
}
.btn:hover { background: var(--neon-2); color: #fff; }
.muted { color: var(--text-dim); font-size: 13px; }
.filter-input {
  width: 100%; max-width: 360px; padding: 10px 14px; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 999px; color: var(--text); font-family: var(--font-body); font-size: 14px;
}
.filter-input::placeholder { color: var(--text-dim); }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pill { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--text-muted); }
.pill strong { color: var(--neon-2); }
.empty { color: var(--text-dim); font-style: italic; padding: 16px 0; }
footer.site-footer { border-top: 1px solid var(--border); color: var(--text-dim); font-size: 12px; padding: 24px 0; text-align: center; }

/* ---------------------------------------------------------------------------
   Responsive mobile
   --------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .container { padding: 0 16px; }
  main { padding: 22px 0 60px; }

  /* Header : brand + user sur une ligne, nav scrollable horizontalement dessous */
  .site-header .container { flex-wrap: wrap; height: auto; gap: 10px 16px; padding-top: 10px; padding-bottom: 10px; }
  .brand { flex: 1; }
  .brand img { height: 26px; }
  .user-chip { order: 2; }
  .nav {
    order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto;
    gap: 2px; padding-bottom: 2px; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 7px 10px; font-size: 13px; }

  /* Grilles : une seule colonne pour eviter tout debordement horizontal */
  .grid-2col, .chart-grid { grid-template-columns: 1fr; }

  /* Funnel : nom au-dessus de la barre */
  .funnel-row { grid-template-columns: 1fr; gap: 4px; margin-bottom: 12px; }
  .funnel-row .name { font-size: 12px; }
  .bar-label { font-size: 11px; }

  h2.section { font-size: 19px; margin: 28px 0 12px; }
  .page-sub { font-size: 13px; }
  .kpi .num { font-size: 32px; }
  th, td { padding: 8px 10px; font-size: 13px; }
  .show-date, .commit-date { min-width: 84px; font-size: 15px; }
  .show-item, .commit-item { gap: 12px; }
}

@media (max-width: 420px) {
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .kpi .num { font-size: 28px; }
  .brand .tag { display: none; }
  .filter-input { max-width: 100%; }
}
