*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #0f1117;
  --surface: #181c27;
  --card:    #1e2233;
  --border:  #2a3050;
  --accent:  #3b82f6;
  --accent2: #6366f1;
  --text:    #e2e8f0;
  --muted:   #64748b;
  --green:   #22c55e;
  --yellow:  #f59e0b;
  --red:     #ef4444;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* ── Layout ──────────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: 56px 1fr;
  min-height: 100vh;
}

/* ── Topbar ──────────────────────────────────────────────────── */
.topbar {
  grid-column: 1 / -1;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-logo .dot {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.topbar-logo .name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.topbar-logo .name span {
  color: var(--muted);
  font-weight: 400;
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-date {
  font-size: 12px;
  color: var(--muted);
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}
.status-label {
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 8px 6px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background .12s, color .12s;
  cursor: pointer;
}
.nav-link:hover, .nav-link.active {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text);
}
.nav-link.active {
  color: var(--accent);
}
.nav-link .icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.nav-link .badge {
  margin-left: auto;
  font-size: 10px;
  background: rgba(59,130,246,.2);
  color: var(--accent);
  border-radius: 10px;
  padding: 1px 7px;
  font-weight: 600;
}

/* ── Main ────────────────────────────────────────────────────── */
.main {
  padding: 28px 32px;
  overflow-y: auto;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.page-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
}

/* ── Cards grille ────────────────────────────────────────────── */
.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--card-accent, transparent);
  transition: opacity .15s;
}
.tool-card:hover {
  border-color: var(--card-accent, var(--accent));
  box-shadow: 0 4px 24px rgba(0,0,0,.3);
  transform: translateY(-2px);
}
.tool-card:hover::before {
  background: var(--card-accent, var(--accent));
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--icon-bg, rgba(59,130,246,.15));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.card-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
}
.card-status .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
}
.dot-green { background: var(--green); box-shadow: 0 0 5px var(--green); }
.dot-yellow { background: var(--yellow); }
.dot-gray { background: var(--muted); }

.card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.card-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.card-url {
  font-size: 11px;
  color: var(--muted);
  font-family: 'Courier New', monospace;
  opacity: 0.6;
}
.card-cta {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--card-accent, var(--accent));
}
.card-cta::after {
  content: '↗';
  font-size: 11px;
}

/* ── Séparateur ──────────────────────────────────────────────── */
.sep {
  height: 1px;
  background: var(--border);
  margin: 4px 0 28px;
}

/* ── Info strip ──────────────────────────────────────────────── */
.info-strip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.info-strip .icon { font-size: 18px; flex-shrink: 0; }
.info-strip .text { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.info-strip .text strong { color: var(--text); }

/* ── Clients twimi ───────────────────────────────────────────── */
.client-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  text-decoration: none;
  transition: border-color .15s;
}
.client-row:hover { border-color: var(--accent); }
.client-dot {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.client-info { flex: 1; }
.client-name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.client-meta { font-size: 11.5px; color: var(--muted); }
.client-actions {
  display: flex;
  gap: 8px;
}
.btn-sm {
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: background .12s, color .12s, border-color .12s;
  white-space: nowrap;
}
.btn-sm:hover {
  background: rgba(59,130,246,.12);
  color: var(--accent);
  border-color: var(--accent);
}
.btn-sm.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-sm.primary:hover {
  background: #2563eb;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: 56px auto 1fr; }
  .sidebar { display: none; }
  .main { padding: 20px 16px; }
  .cards-grid { grid-template-columns: 1fr; }
}
