:root {
  --bg: #0d1117;
  --bg-elevated: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --green: #3fb950;
  --blue: #58a6ff;
  --cyan: #39c5cf;
  --yellow: #d29922;
  --red: #f85149;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.topbar-actions {
  display: flex;
  gap: 0.6rem;
}

.btn-outline,
.btn-primary {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-primary {
  background: var(--green);
  color: #0d1117;
  border: 1px solid var(--green);
}

.btn-outline:hover,
.btn-primary:hover {
  opacity: 0.85;
}

/* Terminal */
.terminal-container {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  cursor: text;
}

.cmd-block {
  margin-bottom: 1.25rem;
}

.cmd-echo {
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.cmd-output {
  white-space: pre-wrap;
  word-break: break-word;
}

.input-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prompt {
  white-space: nowrap;
  user-select: none;
}

.prompt .user { color: var(--green); font-weight: 600; }
.prompt .host { color: var(--blue); font-weight: 600; }
.prompt .path { color: var(--cyan); }

#cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  caret-color: var(--green);
}

/* Helpers de coloration & liens cliquables */
.c-green { color: var(--green); }
.c-blue { color: var(--blue); }
.c-cyan { color: var(--cyan); }
.c-yellow { color: var(--yellow); }
.c-red { color: var(--red); }
.c-muted { color: var(--text-muted); }
.bold { font-weight: 700; }

.cmd-link {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cmd-link:hover {
  color: var(--green);
}

.ascii-box {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  margin: 0.4rem 0;
  display: inline-block;
  max-width: 100%;
}

/* Vue Classique */
.classic-container {
  font-family: var(--font-sans);
  max-width: 860px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1.25rem 4rem;
}

.classic-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
}

.classic-header h1 { font-size: 1.9rem; margin-bottom: 0.25rem; }
.classic-subtitle { color: var(--cyan); font-weight: 600; font-size: 1.1rem; }
.classic-meta { color: var(--text-muted); font-size: 0.95rem; margin-top: 0.4rem; }

.classic-section { margin-bottom: 2rem; }
.classic-section h2 {
  font-size: 1.15rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
  margin-bottom: 1rem;
}

.classic-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.classic-card h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.classic-card .period { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 0.6rem; }
.classic-card ul { padding-left: 1.25rem; }
.classic-card li { margin-bottom: 0.35rem; }

@media (max-width: 600px) {
  body { font-size: 14px; }
  .topbar-title { display: none; }
}

@media print {
  body { background: #fff; color: #111; }
  .topbar, #terminal-view { display: none !important; }
  #classic-view { display: block !important; margin: 0; padding: 0; }
  .classic-card { background: #fff; border-color: #ccc; }
  .classic-section h2 { color: #000; }
}