:root {
  --bg: #f8fafc;
  --card: #fff;
  --line: #e5e7eb;
  --ink: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-soft: #eff4ff;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
.loading { color: var(--muted); text-align: center; margin-top: 80px; }
a { color: var(--accent); text-decoration: none; }

/* ---- Layout ---- */
.layout { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px;
  display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; }
.nav { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 999px;
  color: var(--ink); font-weight: 500; cursor: pointer; }
.nav a:hover { background: #eef2f7; }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.content { min-width: 0; }
.content h1 { font-size: 26px; font-weight: 500; margin: 2px 0 20px; }

/* ---- Cards ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-bottom: 16px; }
.card h2 { font-size: 15px; margin: 0 0 4px; }
.card .hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

/* ---- Accueil ---- */
.hero { text-align: center; padding: 34px 22px; }
.hero .avatar { width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 14px;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  font: 700 34px system-ui; }
.hero .name { font-size: 24px; font-weight: 500; }
.hero .mail { color: var(--muted); margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px;
  font-weight: 600; font-size: 13px; color: var(--ink); cursor: pointer; }
.chip:hover { background: #f1f5f9; }

/* ---- Lignes clé/valeur ---- */
.kv { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 4px; border-top: 1px solid var(--line); }
.kv:first-of-type { border-top: 0; }
.kv .k { color: var(--muted); font-size: 13px; }
.kv .v { font-weight: 600; }

/* ---- Lanceur ---- */
.row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; }
.row:hover { background: #f8fafc; }
.row.off { opacity: .5; }
.row .tile { width: 38px; height: 38px; border-radius: 10px; background: #f1f5f9; flex: none;
  display: flex; align-items: center; justify-content: center; }
.row .tile img { width: 24px; height: 24px; object-fit: contain; display: block; }
.row .nom { flex: 1; font-weight: 600; }
.row .mv { display: flex; flex-direction: column; gap: 2px; }
.row .mv button { width: 26px; height: 18px; border: 1px solid var(--line); background: #fff; border-radius: 6px;
  cursor: pointer; line-height: 1; color: var(--muted); font-size: 11px; padding: 0; }
.row .mv button:hover:not(:disabled) { background: #f1f5f9; color: var(--ink); }
.row .mv button:disabled { opacity: .4; cursor: default; }
.row label.sw input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.btn { border: 0; border-radius: 10px; padding: 10px 18px; font: 600 14px system-ui; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { opacity: .5; cursor: default; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--ink); }
.saved { color: #059669; font-size: 13px; font-weight: 600; }

/* ---- Login ---- */
.login { text-align: center; margin: 90px auto; max-width: 360px; }
.login img { height: 40px; margin-bottom: 22px; }
.login p { color: var(--muted); margin-bottom: 22px; }

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 6px; }
  .nav a { white-space: nowrap; padding: 8px 14px; }
}
