/* ═══════════════════════════════════════════════════════════
   NEXSHELL — Site officiel · thème OS V1
   Couleurs extraites du code source du jeu
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg:          #050608;
  --bg-soft:     #0d0f14;
  --bg-card:     #0e1116;
  --fg:          #f0f4f8;
  --fg-muted:    #5a627a;
  --fg-dim:      #8b94a8;

  --accent:      #00d9ff;
  --accent-soft: rgba(0, 217, 255, 0.15);
  --accent-glow: rgba(0, 217, 255, 0.45);

  --success:     #00ffae;
  --warning:     #ffaa44;
  --error:       #ff4d6d;
  --magenta:     #ff2d92;

  --border:      rgba(0, 217, 255, 0.20);
  --border-soft: rgba(0, 217, 255, 0.08);

  --font-mono:   'JetBrains Mono', 'Fira Code', 'Source Code Pro', Consolas, Monaco, 'Courier New', monospace;

  --radius:      4px;
  --max-width:   1100px;
}

/* ════════ RESET ════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

a:hover, a:focus {
  border-bottom-color: var(--accent);
  color: var(--success);
}

code {
  font-family: var(--font-mono);
  background: var(--accent-soft);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.92em;
  border: 1px solid var(--border-soft);
}

strong {
  color: var(--accent);
  font-weight: 500;
}

em {
  color: var(--magenta);
  font-style: italic;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ════════ EFFETS CRT ════════ */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 3px
  );
  mix-blend-mode: multiply;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0, 0, 0, 0.35) 100%
  );
}

.muted {
  color: var(--fg-muted);
}

/* ════════ CONTAINER ════════ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ════════ TOPBAR ════════ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 15, 20, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.dot-red    { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green  { background: #27c93f; }

.topbar-title {
  margin-left: 12px;
  color: var(--fg-muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.topbar-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.topbar-nav a {
  color: var(--fg-dim);
  font-size: 13px;
  border-bottom: none;
  padding: 4px 0;
}

.topbar-nav a:hover {
  color: var(--accent);
}

/* ════════ HERO ════════ */
.hero {
  min-height: calc(100vh - 50px);
  display: flex;
  align-items: center;
  padding: 60px 0;
  background:
    radial-gradient(ellipse at top, rgba(0, 217, 255, 0.06), transparent 50%),
    radial-gradient(ellipse at bottom, rgba(255, 45, 146, 0.05), transparent 50%);
}

.hero .container {
  width: 100%;
}

.boot {
  font-size: 13px;
  color: var(--fg-dim);
  margin-bottom: 36px;
  min-height: 150px;
  line-height: 1.15;
}

.boot-line {
  display: block;
  margin: 0;
  padding: 0;
}

.boot .ok    { color: var(--success); }
.boot .info  { color: var(--accent); }
.boot .warn  { color: var(--warning); }

.hero-title {
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-logo {
  display: block;
  margin: 0 auto 28px;
  width: 220px;
  height: 220px;
  max-width: 60vw;
  max-height: 60vw;
  filter: drop-shadow(0 0 18px var(--accent-glow));
  user-select: none;
  -webkit-user-drag: none;
}

@media (max-width: 460px) {
  .hero-logo {
    width: 160px;
    height: 160px;
  }
}

.title {
  font-size: clamp(1.1rem, 3.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--fg);
  margin-bottom: 18px;
  text-shadow: 0 0 22px rgba(240, 244, 248, 0.25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.tagline {
  font-size: clamp(0.9rem, 1.4vw, 1.1rem);
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  text-shadow: 0 0 12px var(--accent-glow);
}

.version {
  color: var(--fg-muted);
  font-size: 13px;
  margin-bottom: 36px;
}

.cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  border-bottom: none;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--success);
  border-color: var(--success);
  color: var(--bg);
  box-shadow: 0 0 22px rgba(0, 255, 174, 0.5);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.bracket {
  color: var(--fg-muted);
  font-weight: 400;
}
.btn-primary .bracket { color: rgba(5, 6, 8, 0.55); }

.platforms {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--fg-dim);
  letter-spacing: 0.03em;
}

.platform {
  padding: 4px 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

/* ════════ STATS BAND ════════ */
.stats-band {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
  position: relative;
}

.stats-band::before,
.stats-band::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
}
.stats-band::before { top: 0; }
.stats-band::after  { bottom: 0; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  position: relative;
}

.stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: var(--border-soft);
}

@media (max-width: 700px) {
  .stat:not(:last-child)::after {
    display: none;
  }
}

.stat-num {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  text-shadow: 0 0 14px var(--accent-glow);
  line-height: 1;
}

.stat-pct {
  font-size: 0.5em;
  color: var(--fg-dim);
  margin-left: 2px;
  vertical-align: top;
  text-shadow: none;
}

.stat-label {
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ════════ SECTIONS ════════ */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--border-soft);
  position: relative;
}

.section-alt {
  background: var(--bg-soft);
}

.section-title {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 500;
  margin-bottom: 36px;
  color: var(--fg);
  letter-spacing: 0.02em;
}

.prompt {
  color: var(--success);
  font-weight: 400;
  margin-right: 6px;
}

/* ════════ HISTOIRE ════════ */
.quote-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--magenta);
  padding: 28px 32px;
  margin-bottom: 32px;
  border-radius: var(--radius);
  position: relative;
}

.quote-box::before {
  content: 'mail.eml';
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--bg);
  padding: 0 10px;
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-meta {
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border-soft);
  line-height: 1.8;
}

.quote-meta strong {
  color: var(--fg);
}

.quote-box blockquote {
  font-style: italic;
  color: var(--fg);
  font-size: 15px;
  line-height: 1.85;
}

.quote-box blockquote p {
  margin-bottom: 12px;
}

.quote-box blockquote p:last-child {
  margin-bottom: 0;
  font-style: normal;
}

.ip {
  color: var(--accent);
  font-style: normal;
  background: var(--accent-soft);
  padding: 1px 6px;
  border-radius: 2px;
}

.cursor-line {
  margin-top: 18px;
  color: var(--success) !important;
  font-style: normal !important;
}

.cursor {
  display: inline-block;
  color: var(--success);
  margin-left: 4px;
  animation: blink 1s steps(1) infinite;
  font-weight: 700;
}

@keyframes blink {
  50% { opacity: 0; }
}

.lore p {
  margin-bottom: 16px;
  color: var(--fg-dim);
}

.lore p:last-child {
  margin-bottom: 0;
}

/* ════════ FEATURES GRID ════════ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  padding: 24px;
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 217, 255, 0.12);
}

.card-icon {
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.card h3 {
  font-size: 15px;
  color: var(--fg);
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.card p {
  font-size: 13.5px;
  color: var(--fg-dim);
  line-height: 1.6;
}

/* ════════ GALLERY ════════ */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.shot {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
  cursor: zoom-in;
}

.shot:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--border-soft);
}

.shot figcaption {
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--fg-muted);
  letter-spacing: 0.01em;
}

/* Lightbox simple */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 8, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  cursor: zoom-out;
  padding: 24px;
  backdrop-filter: blur(4px);
}
.lightbox.open {
  display: flex;
}
.lightbox img {
  max-width: 95%;
  max-height: 95vh;
  border: 1px solid var(--accent);
  box-shadow: 0 0 32px var(--accent-glow);
}

/* ════════ INSTALL ════════ */
.install-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.install-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px;
}

.install-card h3 {
  font-size: 15px;
  color: var(--fg);
  margin-bottom: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.os-tag {
  background: var(--accent);
  color: var(--bg);
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-right: 6px;
}
.os-tag.muted {
  background: var(--fg-muted);
  color: var(--bg);
}

.install-card ol {
  list-style: none;
  counter-reset: step;
  padding: 0;
}

.install-card ol li {
  counter-increment: step;
  position: relative;
  padding-left: 32px;
  margin-bottom: 14px;
  color: var(--fg-dim);
  font-size: 13.5px;
  line-height: 1.6;
}

.install-card ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.install-card p {
  color: var(--fg-dim);
  font-size: 13.5px;
}

.specs {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  border-radius: var(--radius);
}

.specs h4 {
  color: var(--fg);
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.specs ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.specs li {
  font-size: 13px;
  color: var(--fg-dim);
}

/* ════════ ABOUT ════════ */
.about-box {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--success);
  padding: 28px 32px;
  border-radius: var(--radius);
  max-width: 760px;
}

.about-box p {
  margin-bottom: 16px;
  color: var(--fg-dim);
}

.about-box p:last-of-type {
  margin-bottom: 24px;
}

.about-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px dashed var(--border-soft);
}

.about-links a {
  font-size: 14px;
}

/* ════════ FOOTER ════════ */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0;
  background: var(--bg-soft);
}

.footer-ascii pre {
  color: var(--fg-muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 18px;
  white-space: pre-wrap;
  word-break: break-all;
}

.footer-meta {
  text-align: center;
  font-size: 12.5px;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 18px;
}

.footer-meta strong {
  color: var(--fg-dim);
}

.footer-back {
  text-align: center;
  font-size: 13px;
}

/* ════════ RESPONSIVE ════════ */
@media (max-width: 700px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .topbar-nav {
    gap: 12px;
    font-size: 12px;
  }
  .ascii-hex {
    font-size: 11px;
  }
  .quote-box {
    padding: 22px 20px;
  }
  .quote-box blockquote {
    font-size: 14px;
  }
  .section {
    padding: 60px 0;
  }
  .specs ul {
    grid-template-columns: 1fr;
  }
  .footer-ascii pre {
    font-size: 10px;
  }
}

@media (max-width: 460px) {
  .ascii-hex {
    font-size: 9px;
  }
  .cta {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    justify-content: center;
  }
}

/* ════════ MOTION REDUCTION ════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
