/* LegaFly v4 — showcase chantier */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; background: #0a0d1a; color: #e8ecf5; min-height: 100vh; }

body {
  background:
    radial-gradient(at 20% 0%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
    radial-gradient(at 80% 100%, rgba(56, 189, 248, 0.10) 0%, transparent 50%),
    #0a0d1a;
}

a { color: #a5b4fc; }
code { font-family: "SF Mono", Menlo, Monaco, "Courier New", monospace; background: rgba(255, 255, 255, 0.08); padding: 1px 6px; border-radius: 4px; font-size: 0.88em; }

/* ============== TOPBAR ============== */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px;
  background: rgba(15, 20, 36, 0.7);
  backdrop-filter: blur(32px); -webkit-backdrop-filter: blur(32px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky; top: 0; z-index: 100;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.15rem; }
.logo { font-size: 1.4rem; }
.ver { color: #a5b4fc; font-weight: 500; margin-left: 4px; }
.topbar-meta { display: flex; align-items: center; gap: 12px; font-size: 0.85rem; color: #9aa3bd; }
.meta-text { display: none; }
@media (min-width: 700px) { .meta-text { display: inline; } }

.cta-play {
  background: linear-gradient(135deg, #7c3aed, #38bdf8);
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 600; font-size: 0.85rem;
  padding: 7px 14px; border-radius: 8px;
  border: 1px solid rgba(165, 180, 252, 0.3);
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta-play:hover { transform: translateY(-1px); box-shadow: 0 4px 18px rgba(124, 58, 237, 0.5); }

.pill {
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  letter-spacing: 0.5px;
}
.pill-status { background: rgba(251, 191, 36, 0.18); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.35); }

/* ============== TABS ============== */
.tabs {
  display: flex; gap: 4px;
  padding: 12px 24px;
  background: rgba(15, 20, 36, 0.5);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  position: sticky; top: 53px; z-index: 99;
  overflow-x: auto; white-space: nowrap;
}
.tab {
  background: rgba(255,255,255,0.04);
  color: #cdd5ea;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 8px 14px; border-radius: 8px;
  cursor: pointer; font-size: 0.9rem; font-weight: 500;
  transition: all 0.15s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.tab:hover { background: rgba(255,255,255,0.08); color: #ffffff; }
.tab.active { background: rgba(165, 180, 252, 0.18); color: #ffffff; border-color: rgba(165, 180, 252, 0.4); }
.tab .count {
  font-size: 0.72rem; font-weight: 700;
  background: rgba(255,255,255,0.1); padding: 2px 7px; border-radius: 999px;
  color: #9aa3bd;
}
.tab.active .count { background: rgba(165, 180, 252, 0.3); color: #ffffff; }

/* ============== PANELS ============== */
main { max-width: 1300px; margin: 0 auto; padding: 32px 24px 80px; }
.panel { display: none; }
.panel.active { display: block; animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

h1 { font-size: 1.65rem; font-weight: 700; margin-bottom: 8px; color: #ffffff; }
h2 { font-size: 1.15rem; font-weight: 600; margin: 32px 0 14px; color: #cdd5ea; }
.lead { color: #9aa3bd; font-size: 0.95rem; line-height: 1.55; margin-bottom: 24px; max-width: 720px; }
.panel-head { margin-bottom: 16px; }

/* ============== PALIERS ============== */
.paliers { list-style: none; display: grid; gap: 8px; margin-bottom: 24px; }
.paliers li {
  display: grid; grid-template-columns: 56px 1fr;
  gap: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px; padding: 12px 16px;
  align-items: center;
}
.paliers .pkey {
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.5px;
  background: rgba(165, 180, 252, 0.15); color: #a5b4fc;
  padding: 6px 0; border-radius: 6px; text-align: center;
}
.paliers li.done .pkey { background: rgba(74, 222, 128, 0.18); color: #4ade80; }
.paliers li.done .pkey::after { content: " ✓"; }
.paliers li.pending .pkey { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.paliers .ptext { font-weight: 600; color: #e8ecf5; display: block; }
.paliers .paux { font-size: 0.82rem; color: #9aa3bd; display: block; margin-top: 2px; }
.paliers li > span:last-child { display: flex; flex-direction: column; }
.paliers li.pending { opacity: 0.7; }

/* ============== METRICS ============== */
.bigmetric {
  display: inline-block;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(56, 189, 248, 0.10));
  border: 1px solid rgba(165, 180, 252, 0.25);
  border-radius: 12px; padding: 24px 32px;
  margin: 8px 0 16px;
}
.bigmetric-value { font-size: 2.8rem; font-weight: 800; color: #ffffff; line-height: 1; }
.bigmetric-label { color: #9aa3bd; font-size: 0.9rem; margin-top: 6px; }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px; padding: 18px;
}
.stat-v { font-size: 1.5rem; font-weight: 700; color: #ffffff; }
.stat-l { font-size: 0.82rem; color: #9aa3bd; margin-top: 4px; }

/* ============== KV LISTS ============== */
.kv { list-style: none; display: grid; gap: 6px; padding: 0; }
.kv li {
  background: rgba(255,255,255,0.03);
  border-left: 2px solid rgba(165, 180, 252, 0.5);
  padding: 8px 14px; border-radius: 4px;
  font-size: 0.9rem; line-height: 1.5;
}

/* ============== TABLES ============== */
.toolbar {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.toolbar input {
  flex: 1 1 280px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ffffff; padding: 10px 14px;
  border-radius: 8px; font-size: 0.92rem;
  outline: none; transition: border-color 0.15s;
}
.toolbar input:focus { border-color: rgba(165, 180, 252, 0.6); }
.toolbar-info { color: #9aa3bd; font-size: 0.85rem; }

.table-wrap {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px; overflow: auto;
  max-height: 70vh;
}
table.data { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.data thead { background: rgba(255,255,255,0.05); position: sticky; top: 0; }
table.data th {
  text-align: left; padding: 10px 14px;
  font-weight: 600; color: #cdd5ea; font-size: 0.8rem;
  letter-spacing: 0.4px; text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
table.data td {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: #e8ecf5; vertical-align: top;
}
table.data tbody tr:hover { background: rgba(165, 180, 252, 0.05); }
table.data td.muted { color: #6c7693; font-style: italic; }
table.data td.num { font-family: "SF Mono", Menlo, Monaco, monospace; font-size: 0.85rem; color: #a5b4fc; }
table.data td.code { font-family: "SF Mono", Menlo, Monaco, monospace; font-size: 0.83rem; color: #cdd5ea; }
table.data td.tag { color: #fbbf24; font-weight: 600; font-size: 0.82rem; }

/* ============== PAGER ============== */
.pager {
  display: flex; justify-content: center; align-items: center;
  gap: 6px; margin-top: 18px;
  flex-wrap: wrap;
}
.pager button {
  background: rgba(255,255,255,0.05);
  color: #cdd5ea;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 7px 12px; border-radius: 7px;
  font-size: 0.85rem; cursor: pointer;
  transition: all 0.15s ease;
}
.pager button:hover:not(:disabled) { background: rgba(255,255,255,0.1); }
.pager button.current { background: rgba(165, 180, 252, 0.2); color: #ffffff; border-color: rgba(165, 180, 252, 0.4); }
.pager button:disabled { opacity: 0.35; cursor: not-allowed; }
.pager .info { color: #9aa3bd; font-size: 0.85rem; margin: 0 8px; }

/* ============== FOOTER ============== */
.bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 16px 24px;
  font-size: 0.78rem; color: #6c7693;
  display: flex; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.bottom .rgt { text-align: right; }

@media (max-width: 600px) {
  .topbar { padding: 12px 16px; }
  .tabs { padding: 10px 16px; }
  main { padding: 24px 16px 60px; }
  h1 { font-size: 1.4rem; }
  .paliers li { grid-template-columns: 48px 1fr; padding: 10px 12px; }
  .bigmetric { padding: 18px 22px; }
  .bigmetric-value { font-size: 2.1rem; }
}
