/* ══ FICHE HOMELAB ══════════════════════════════════════════════════
   Styles de projets/homelab.html.
   S'ajoute à index.css (tokens, nav, curseur, tags, boutons, arch-box,
   footer) : on ne redéfinit rien, on complète.
   ════════════════════════════════════════════════════════════════════ */

/* ─── EN-TÊTE ────────────────────────────────────────────────────── */
.pj-hero {
  position: relative;
  overflow: hidden;
  padding: 150px 0 72px;
}
.pj-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem; letter-spacing: 0.08em;
  color: var(--muted2);
  margin-bottom: 40px;
  transition: color 0.2s, gap 0.2s;
}
.pj-back:hover { color: var(--accent); gap: 12px; }
.pj-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.pj-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(2.6rem, 8vw, 5.6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.pj-tagline {
  max-width: 680px;
  font-size: 1.15rem; font-weight: 300;
  color: var(--muted2);
  line-height: 1.7;
  margin-bottom: 40px;
}
.pj-tagline strong { color: var(--text); font-weight: 500; }

/* Fiche d'identité du projet */
.pj-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 28px;
}
.pj-meta > div { padding: 18px 22px; }
.pj-meta > div + div { border-left: 1px solid var(--border); }
.pj-meta dt {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.pj-meta dd { font-size: 0.92rem; font-weight: 500; }
.pj-meta dd.live { color: #4ADE80; }
.pj-meta dd.live::before { content: '● '; }
.pj-hero .project-tags { margin-bottom: 36px; }
.pj-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ─── SECTIONS ───────────────────────────────────────────────────── */
.pj-section { padding: 100px 0; }
.pj-section.alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.pj-section .section-title { margin-bottom: 32px; }
.pj-prose { max-width: 720px; }
.pj-prose p {
  color: var(--muted2);
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 18px;
}
.pj-prose strong { color: var(--text); font-weight: 500; }
.pj-prose code {
  font-family: 'DM Mono', monospace;
  font-size: 0.85em;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
}

/* ─── CARTES ───────────────────── */
.pj-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.pj-cards.three { grid-template-columns: repeat(3, 1fr); }
.pj-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  padding: 24px;
  transition: border-color 0.3s;
}
.pj-section:not(.alt) .pj-card { background: var(--surface); }
.pj-card:hover { border-color: rgba(0,163,255,0.3); }
.pj-card-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.66rem; letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
}
.pj-card h3 {
  font-family: 'Unbounded', sans-serif;
  font-size: 0.95rem; font-weight: 700;
  margin-bottom: 12px;
}
.pj-card p { font-size: 0.88rem; color: var(--muted2); line-height: 1.7; }
.pj-card ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.pj-card li {
  position: relative;
  padding-left: 16px;
  font-size: 0.88rem; color: var(--muted2); line-height: 1.6;
}
.pj-card li::before {
  content: '';
  position: absolute; left: 0; top: 0.65em;
  width: 6px; height: 1px;
  background: var(--accent);
}
.pj-card li strong { color: var(--text); font-weight: 500; }

/* ─── ARCHITECTURE ───────────────────────────────────────────────── */
/* Réutilise .arch-box / .arch-bar / .arch-body / .arch-connector de index.css */
.pj-arch { margin-top: 40px; max-width: 860px; }
.pj-arch .arch-connector span { background: var(--bg); }
.pj-section.alt .pj-arch .arch-connector span { background: var(--surface); }
.pj-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ─── TOPOLOGIE RÉSEAU (fiche HomeLab) ───────────────────────────── */
/* Réutilise .net-flow / .net-node de index.css dans un cadre de fiche */
.pj-topo {
  margin-top: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  overflow-x: auto;
}
.pj-topo .homelab-block-title { margin-bottom: 18px; }
.pj-section.alt .pj-topo .net-node { background: var(--bg); }
.pj-section:not(.alt) .pj-topo .net-node { background: var(--surface); }
.pj-topo .net-node.warn { border-color: rgba(255,170,0,0.45); }
.pj-topo .net-node.warn .net-node-name { color: #FFB020; }
.pj-topo .net-flow + .homelab-block-title { margin-top: 28px; }
/* Flèche entre deux étapes d'un flux (verticale sur mobile) */
.net-arrow { flex: none; padding: 0 10px; color: var(--muted); font-family: 'DM Mono', monospace; }
.net-arrow::before { content: '→'; }

.pj-host-desc {
  font-size: 0.82rem; color: var(--muted2); line-height: 1.6;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 14px;
}

/* Bouton retour flottant sur mobile (la nav est masquée < 900px) */
.pj-fab {
  display: none;
  position: fixed; top: 20px; right: 20px; z-index: 1100;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(17,17,22,0.9);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  color: var(--text);
}
.pj-fab svg { width: 18px; height: 18px; }

@media (max-width: 900px) {
  .pj-fab { display: flex; }
  .pj-meta { grid-template-columns: repeat(2, 1fr); }
  .pj-meta > div:nth-child(3) { border-left: none; }
  .pj-meta > div:nth-child(n+3) { border-top: 1px solid var(--border); }
  .pj-cards, .pj-cards.three { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .net-arrow { padding: 4px 0 4px 14px; }
  .net-arrow::before { content: '↓'; }
  .pj-hero { padding: 100px 0 56px; }
  .pj-section { padding: 72px 0; }
  .pj-meta { grid-template-columns: 1fr; }
  .pj-meta > div + div { border-left: none; border-top: 1px solid var(--border); }
  .pj-cta { flex-direction: column; }
  .pj-cta a { justify-content: center; }
  .container { padding: 0 20px; }
}
