:root {
  --bg: #080b10;
  --surface: #11161f;
  --surface-2: #171e2b;
  --border: rgba(255, 255, 255, 0.09);
  --text: #edf2f7;
  --muted: #8b99ad;
  --accent: #3ecf8e;
  --accent-2: #38bdf8;
  --accent-glow: rgba(62, 207, 142, 0.22);
  --term-bg: #0b0e14;
  --term-fg: #e2e8f0;
}

/* Thèmes interactifs identiques à MacVise */
html[data-theme="matrix"] {
  --bg: #020803;
  --surface: #071409;
  --surface-2: #0c1f0f;
  --accent: #22e655;
  --accent-2: #86efac;
  --accent-glow: rgba(34, 230, 85, 0.24);
  --term-bg: #020902;
  --term-fg: #34f562;
}
html[data-theme="solarized"] {
  --bg: #001f27;
  --surface: #032b36;
  --surface-2: #073642;
  --accent: #2aa198;
  --accent-2: #268bd2;
  --accent-glow: rgba(42, 161, 152, 0.25);
  --term-bg: #002b36;
  --term-fg: #93a1a1;
}
html[data-theme="cyberpunk"] {
  --bg: #0d0417;
  --surface: #160926;
  --surface-2: #200d38;
  --accent: #ff38d6;
  --accent-2: #00f0ff;
  --accent-glow: rgba(255, 56, 214, 0.26);
  --term-bg: #120521;
  --term-fg: #ff6be0;
}
html[data-theme="retro"] {
  --bg: #0d0900;
  --surface: #181102;
  --surface-2: #241904;
  --accent: #ffb700;
  --accent-2: #ffe066;
  --accent-glow: rgba(255, 183, 0, 0.25);
  --term-bg: #0f0a00;
  --term-fg: #ffb700;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.35s ease;
}

.bg-glow {
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 520px;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-glow), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(8, 11, 16, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
}
.brand-logo { width: 32px; height: 32px; border-radius: 8px; }
.version-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  border: 1px solid var(--border);
}
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 8px 14px; font-size: 0.86rem; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #061015;
  box-shadow: 0 8px 26px var(--accent-glow);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); }

/* Hero */
.hero { padding: 76px 0 42px; text-align: center; }
.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
}
.badge {
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  max-width: 700px;
  margin: 0 auto 30px;
  font-size: 1.08rem;
  color: var(--muted);
}
.hero-subtitle strong { color: var(--text); }
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}
.hero-meta { font-size: 0.85rem; color: var(--muted); }
.hero-meta a { color: var(--accent); text-decoration: none; }
.hero-meta a:hover { text-decoration: underline; }

/* Theme Switcher & Interactive Preview */
.preview-section { padding: 20px 0 70px; }
.theme-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}
.theme-label { font-size: 0.85rem; color: var(--muted); margin-right: 4px; }
.theme-chip {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}
.theme-chip.active, .theme-chip:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface-2);
}

.app-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255,255,255,0.03);
}
.window-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.traffic-lights { display: flex; gap: 7px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.window-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--muted);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; display: inline-block;
  box-shadow: 0 0 8px #22c55e;
}
.window-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0,0,0,0.28);
  padding: 3px;
  border-radius: 8px;
}
.win-tab {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.win-tab.active { background: var(--accent); color: #051014; }
.unread-dot {
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 999px;
  margin-left: 3px;
}

.window-body { display: none; min-height: 290px; }
.window-body.active { display: block; }

/* SFTP mock */
.sftp-grid { display: grid; grid-template-columns: 1fr 1fr; }
.pane { padding: 14px; border-right: 1px solid var(--border); }
.pane:last-child { border-right: none; }
.pane-head {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.pane-head code { color: var(--accent); }
.file-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.83rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.file-row.selected {
  background: var(--accent-glow);
  outline: 1px solid var(--accent);
}
.transfer-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}
.transfer-progress strong { color: var(--accent); }

/* Terminal mock */
.terminal-mock { background: var(--term-bg); color: var(--term-fg); min-height: 290px; }
.term-toolbar {
  display: flex; gap: 8px; padding: 8px 14px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
}
.term-tab { padding: 3px 10px; border-radius: 5px; color: var(--muted); }
.term-tab.active { background: rgba(255,255,255,0.1); color: var(--text); }
.term-pill {
  margin-left: auto; padding: 3px 9px; border-radius: 5px;
  background: rgba(255,255,255,0.06); color: var(--accent);
}
.term-pill + .term-pill { margin-left: 0; }
.term-screen {
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84rem;
  line-height: 1.55;
  overflow-x: auto;
}
.t-accent { color: var(--accent); font-weight: 700; }
.t-cyan { color: var(--accent-2); }
.cursor-block { animation: blink 1s steps(2, start) infinite; color: var(--accent); }
@keyframes blink { to { visibility: hidden; } }

/* Tunnels mock */
.tunnels-mock { padding: 18px; display: grid; gap: 12px; }
.tunnel-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.tunnel-card p { font-size: 0.82rem; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.pill-on { color: #22c55e; font-size: 0.78rem; font-weight: 700; }
.pill-idle { color: var(--muted); font-size: 0.78rem; }

/* Chat mock */
.chat-mock { display: grid; grid-template-columns: 190px 1fr; min-height: 290px; }
.chat-sidebar {
  border-right: 1px solid var(--border);
  padding: 14px;
  background: rgba(0,0,0,0.16);
}
.chat-side-title { font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.peer { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 0.84rem; }
.chat-main { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 12px; font-size: 0.88rem; }
.bubble.other { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); }
.bubble.me { align-self: flex-end; background: var(--accent); color: #051014; }
.b-meta { font-size: 0.72rem; opacity: 0.75; margin-bottom: 4px; font-weight: 600; }
.b-path {
  margin-top: 8px; font-size: 0.78rem; padding: 4px 9px; border-radius: 6px;
  background: var(--accent-glow); color: var(--accent); display: inline-block;
  font-family: ui-monospace, Menlo, monospace;
}

/* Sections */
.features-section, .install-section, .changelog-section { padding: 64px 0; }
.section-title {
  text-align: center;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 38px;
}
.muted { color: var(--muted); font-weight: 500; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.f-icon { font-size: 1.7rem; margin-bottom: 10px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.9rem; color: var(--muted); }
.feature-card code { color: var(--accent); font-size: 0.84rem; }

/* Install steps */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #051014; font-weight: 800;
  margin-bottom: 12px;
}
.step-card h3 { margin-bottom: 8px; font-size: 1.02rem; }
.step-card p { font-size: 0.88rem; color: var(--muted); }
.code-copy {
  margin-top: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #05070b; border: 1px solid var(--border);
  padding: 8px 10px; border-radius: 8px;
}
.code-copy code { font-size: 0.76rem; color: var(--accent); overflow-x: auto; }
.copy-btn {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 10px; font-size: 0.76rem; cursor: pointer;
}
.copy-btn:hover { border-color: var(--accent); }

/* Changelog */
.changelog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
}
.changelog-head {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px; margin-bottom: 16px;
}
.changelog-notes {
  background: #06090f;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84rem;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.6;
}

/* Footer */
.announcement-bar {
  position: relative;
  z-index: 25;
  text-align: center;
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #061015;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.contact-section { padding: 20px 0 64px; }
.contact-form { display: flex; flex-direction: column; gap: 12px; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; padding: 11px 13px; border-radius: 9px;
  border: 1px solid var(--border); background: #06090f; color: var(--text);
  font-family: inherit; font-size: 0.9rem;
}
.contact-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hp-field { display: none !important; }
@media (max-width: 760px) { .contact-row { grid-template-columns: 1fr; } }

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 30px;
}
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px;
  font-size: 0.86rem; color: var(--muted);
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-logo { width: 24px; height: 24px; border-radius: 6px; }
.footer-links { display: flex; gap: 10px; }
.footer-links a { color: var(--accent); text-decoration: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .features-grid, .steps-grid, .sftp-grid, .chat-mock { grid-template-columns: 1fr; }
  .pane { border-right: none; border-bottom: 1px solid var(--border); }
  .chat-sidebar { border-right: none; border-bottom: 1px solid var(--border); }
}
