/* =========================================================================
   AEGIS — Page Installation
   ========================================================================= */

.inst-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  align-items: start;
}

/* Sommaire latéral */
.inst-toc {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
}
.inst-toc h4 {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 14px;
}
.inst-toc a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 0.92rem;
  color: var(--text-secondary);
  border-left: 2px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.inst-toc a:hover { color: var(--text); background: var(--bg-subtle); }
.inst-toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 540; }

/* Onglets Local / VPS */
.inst-tabs {
  display: inline-flex;
  padding: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  margin-bottom: 36px;
}
.inst-tab {
  height: 40px; padding-inline: 22px;
  border: none; background: transparent;
  border-radius: var(--r-pill);
  font-size: 0.95rem; font-weight: 540; color: var(--text-secondary);
  transition: color 0.25s;
  position: relative; z-index: 1;
}
.inst-tab.active { color: var(--text); background: #fff; box-shadow: var(--shadow-sm); }

.inst-panel { display: none; }
.inst-panel.active { display: block; animation: fade 0.5s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Étapes */
.step { position: relative; padding-left: 60px; padding-bottom: 40px; }
.step::before {
  content: "";
  position: absolute; left: 19px; top: 44px; bottom: -4px;
  width: 2px; background: var(--border);
}
.step:last-child::before { display: none; }
.step__num {
  position: absolute; left: 0; top: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 650; font-size: 1rem;
  box-shadow: 0 6px 16px -4px var(--accent-glow);
}
.step h3 { font-size: 1.35rem; letter-spacing: -0.025em; margin-bottom: 8px; padding-top: 6px; }
.step p { color: var(--text-secondary); line-height: 1.55; margin-bottom: 14px; }
.step p + .code, .step .code + p { margin-top: 14px; }
.step__sub { font-weight: 600; margin: 18px 0 8px; }

/* Affichage d'une commande slash */
.cmd-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 11px 16px;
  margin: 4px 0 6px;
}
.cmd-line .slash { color: var(--accent); }
.cmd-line .arg { color: var(--text-tertiary); }

.cmd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.cmd-tag {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid rgba(88, 101, 242, 0.16);
}
.cmd-tag.muted { background: var(--bg-subtle); color: var(--text-secondary); border-color: var(--border); }

/* Encarts */
.callout {
  display: flex; gap: 14px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  font-size: 0.93rem;
  line-height: 1.55;
  margin: 16px 0;
  border: 1px solid;
}
.callout svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.callout code { font-family: var(--font-mono); padding: 1px 5px; border-radius: 5px; font-size: 0.86em; }
.callout--warn { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.25); color: #92600c; }
.callout--warn code { background: rgba(245,158,11,0.14); }
.callout--info { background: var(--accent-soft); border-color: rgba(88,101,242,0.2); color: var(--accent-strong); }
.callout--info code { background: rgba(88,101,242,0.12); }
.callout--tip { background: rgba(34,197,94,0.08); border-color: rgba(34,197,94,0.22); color: #15803d; }
.callout--tip code { background: rgba(34,197,94,0.14); }

/* Prérequis */
.prereq-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.prereq {
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 20px;
}
.prereq .v { font-family: var(--font-mono); color: var(--accent); font-size: 0.85rem; font-weight: 600; }
.prereq h4 { font-size: 1.05rem; margin: 8px 0 4px; }
.prereq p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.45; margin: 0; }

/* Tableau .env */
.env-table {
  width: 100%; border-collapse: collapse; margin-top: 10px;
  font-size: 0.9rem; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden;
}
.env-table th, .env-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.env-table th { background: var(--bg-subtle); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-tertiary); }
.env-table tr:last-child td { border-bottom: none; }
.env-table code { font-family: var(--font-mono); color: var(--accent-strong); font-size: 0.86em; }
.env-table .req-y { color: var(--c-green); font-weight: 700; }
.env-table .req-n { color: var(--text-tertiary); }
.env-wrap { overflow-x: auto; }

/* Bloc final */
.inst-done {
  margin-top: 40px;
  padding: 32px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--accent-soft), rgba(139,92,246,0.08));
  border: 1px solid rgba(88,101,242,0.18);
  text-align: center;
}
.inst-done h3 { font-size: 1.5rem; margin-bottom: 8px; }
.inst-done p { color: var(--text-secondary); margin-bottom: 20px; }

@media (max-width: 900px) {
  .inst-layout { grid-template-columns: 1fr; gap: 0; }
  .inst-toc { display: none; }
  .prereq-grid { grid-template-columns: 1fr; }
}
