:root {
  --bg:       #080d08;
  --bg-card:  #0b110b;
  --bg-bar:   #0e160e;
  --green:    #00cc44;
  --green-b:  #00ff55;
  --green-d:  #1a6630;
  --amber:    #ffaa00;
  --muted:    #3d7a4d;
  --border:   #1a3a20;
  --text:     #c0e8cc;

  --s-col: #ffd700;
  --a-col: #00ff55;
  --b-col: #99ee22;
  --c-col: #ffee00;
  --d-col: #ff8800;
  --e-col: #ff4400;
  --f-col: #ff2222;
}

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

/* ── CRT RETRO EFFECTS ── */

@keyframes crt-flicker {
  0%, 100% { opacity: 1; }
  41.9%    { opacity: 1; }
  42%      { opacity: 0.93; }
  42.4%    { opacity: 1; }
  42.8%    { opacity: 0.96; }
  43.2%    { opacity: 1; }
  78.9%    { opacity: 1; }
  79%      { opacity: 0.95; }
  79.3%    { opacity: 1; }
}

@keyframes crt-grain {
  0%   { transform: translate(0,    0);   }
  10%  { transform: translate(-2%, -3%);  }
  20%  { transform: translate(3%,   1%);  }
  30%  { transform: translate(-1%,  3%);  }
  40%  { transform: translate(2%,  -2%);  }
  50%  { transform: translate(-3%,  2%);  }
  60%  { transform: translate(1%,  -3%);  }
  70%  { transform: translate(-2%,  1%);  }
  80%  { transform: translate(3%,  -1%);  }
  90%  { transform: translate(-1%,  2%);  }
  100% { transform: translate(0,    0);   }
}

/* Grain noise layer */
html::after {
  content: '';
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: 0.038;
  animation: crt-grain 0.35s steps(1) infinite;
  pointer-events: none;
  will-change: transform;
  z-index: 9999;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.65;
  min-height: 100vh;
  animation: crt-flicker 9s infinite;
}

/* Scanlines — plus denses pour l'effet CRT */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 2px,
    rgba(0, 0, 0, 0.18) 3px
  );
  pointer-events: none;
  z-index: 9998;
}

/* Vignette CRT + lueur phosphore centrale */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0, 40, 10, 0.12) 0%, transparent 65%),
    radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.65) 100%);
  pointer-events: none;
  z-index: 9997;
}

/* Lueur phosphore sur tout le texte */
p, span, div, li, td, th, pre {
  text-shadow: 0 0 3px rgba(0, 220, 80, 0.12);
}

.container {
  width: min(1000px, 94vw);
  margin: 0 auto;
}

/* ── HERO ── */
.hero {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}

.hero-prompt {
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  letter-spacing: 0.02em;
}

.ph-user   { color: var(--amber); }
.ph-at     { color: var(--muted); }
.ph-host   { color: var(--amber); }
.ph-colon  { color: var(--muted); }
.ph-path   { color: var(--green-d); }
.ph-dollar { color: var(--green);  }
.ph-cmd    { color: var(--text);   }

h1 {
  font-size: clamp(1.15rem, 2.5vw, 1.75rem);
  color: var(--green-b);
  text-shadow: 0 0 14px rgba(0, 255, 85, 0.45), 0 0 28px rgba(0, 255, 85, 0.15);
  margin-bottom: 0.5rem;
  min-height: 1.65em;
}

.intro {
  color: var(--muted);
  max-width: 72ch;
  font-size: 0.85rem;
  min-height: 1.65em;
}

/* Blinking cursor */
.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--green-b);
  vertical-align: sub;
  animation: blink 1s step-end infinite;
  box-shadow: 0 0 8px var(--green-b);
  margin-top: 0.5rem;
}

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

/* ── SECTIONS ── */
.section { padding: 2.5rem 0; }

.section-head {
  margin-bottom: 1.5rem;
  padding-left: 0.8rem;
  border-left: 2px solid var(--green-d);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.section-head.visible {
  opacity: 1;
  transform: translateX(0);
}

.section-head h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
}

.section-head h2::before { content: '> '; color: var(--green-d); }

.section-head p {
  color: var(--green-d);
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

/* ── DISTRO CARDS ── */
.distro-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 80, 20, 0.15);
  transition: box-shadow 0.25s, border-color 0.25s;
}

.card:hover {
  border-color: var(--green-d);
  box-shadow: 0 0 28px rgba(0, 180, 60, 0.25);
}

.card-titlebar {
  background: var(--bg-bar);
  border-bottom: 1px solid var(--border);
  padding: 0.3rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  user-select: none;
}

.dot   { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }

.card-cmd {
  margin-left: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.cmd-file { color: var(--amber); }

.card-body {
  display: flex;
  gap: 1.8rem;
  padding: 1rem 1.2rem;
  align-items: flex-start;
}

.ascii-art {
  color: var(--green-d);
  font-size: 0.38rem;
  line-height: 1.1;
  flex-shrink: 0;
  min-width: 200px;
  text-shadow: 0 0 5px rgba(0, 200, 60, 0.45);
  user-select: none;
}

.card-info {
  flex: 1;
  padding-top: 0.15rem;
}

.info-row {
  display: flex;
  align-items: baseline;
  margin-bottom: 0.28rem;
  font-size: 0.84rem;
  flex-wrap: wrap;
  gap: 0;
}

.ikey {
  color: var(--amber);
  white-space: pre;
  flex-shrink: 0;
}

.isep {
  color: var(--muted);
  flex-shrink: 0;
  margin: 0 0.3rem;
}

.ival { color: var(--text); }


/* ── DE GRID ── */
.de-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── BADGES / RATINGS ── */
.badge {
  display: inline-block;
  padding: 0.05rem 0.55rem;
  border: 1px solid;
  font-weight: 700;
  font-size: 0.85rem;
  font-style: normal;
  border-radius: 2px;
}

.rating-s { color: var(--s-col); border-color: var(--s-col); text-shadow: 0 0 8px var(--s-col), 0 0 20px var(--s-col); background: rgba(255, 215,   0, 0.1); box-shadow: 0 0 8px rgba(255, 215,   0, 0.2); }
.rating-a { color: var(--a-col); border-color: var(--a-col); text-shadow: 0 0 8px var(--a-col), 0 0 20px var(--a-col); background: rgba(  0, 255,  85, 0.1); box-shadow: 0 0 8px rgba(  0, 255,  85, 0.2); }
.rating-b { color: var(--b-col); border-color: var(--b-col); text-shadow: 0 0 8px var(--b-col), 0 0 20px var(--b-col); background: rgba(153, 238,  34, 0.1); box-shadow: 0 0 8px rgba(153, 238,  34, 0.2); }
.rating-c { color: var(--c-col); border-color: var(--c-col); text-shadow: 0 0 8px var(--c-col), 0 0 20px var(--c-col); background: rgba(255, 238,   0, 0.1); box-shadow: 0 0 8px rgba(255, 238,   0, 0.2); }
.rating-d { color: var(--d-col); border-color: var(--d-col); text-shadow: 0 0 8px var(--d-col), 0 0 20px var(--d-col); background: rgba(255, 136,   0, 0.1); box-shadow: 0 0 8px rgba(255, 136,   0, 0.2); }
.rating-e { color: var(--e-col); border-color: var(--e-col); text-shadow: 0 0 8px var(--e-col), 0 0 20px var(--e-col); background: rgba(255,  68,   0, 0.1); box-shadow: 0 0 8px rgba(255,  68,   0, 0.2); }
.rating-f { color: var(--f-col); border-color: var(--f-col); text-shadow: 0 0 8px var(--f-col), 0 0 20px var(--f-col); background: rgba(255,  34,  34, 0.1); box-shadow: 0 0 8px rgba(255,  34,  34, 0.2); }

/* ── FOOTER ── */
.site-footer {
  margin-top: 2rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--border);
}

.footer-prompt {
  color: var(--muted);
  margin-right: 0.5rem;
}

.footer-text {
  color: var(--green-d);
}

/* ── TABLE last-row fix (kept as fallback) ── */
tr:last-child td { border-bottom: none; }

/* ── RESPONSIVE ── */
@media (max-width: 580px) {
  body { font-size: 12px; }

  .card-body {
    flex-direction: column;
    gap: 0.8rem;
  }

  .ascii-art {
    min-width: unset;
    align-self: center;
  }

  .hero { padding: 2rem 0 1.5rem; }
}
