/* ============================================================
   GeekNews — design system (custom.css)
   Complète Tailwind Play CDN. Signature : un seul accent
   vert acide (#C5F94B) + typographie terminal (JetBrains Mono).
============================================================ */

:root {
  --ink: #0A0D12;
  --panel: #11161D;
  --panel2: #171E27;
  --line: #232B36;
  --paper: #E7ECF2;
  --steel: #93A1B1;
  --accent: #C5F94B;
  --accent-dim: #8FB82F;
  --danger: #FF7A6E;
}

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: #2b3543; border: 2px solid var(--ink); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3a4657; }

.font-display { font-family: "Chakra Petch", sans-serif; }
.font-mono { font-family: "JetBrains Mono", monospace; }

/* --- Eyebrow / levier de section (//RUBRIQUE) --- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: "//"; color: var(--accent); }

/* --- Badge rubrique --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  line-height: 1;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(197, 249, 75, .45);
  background: rgba(197, 249, 75, .08);
  padding: .4em .65em;
  border-radius: 2px;
  white-space: nowrap;
}
.badge-danger { color: var(--danger); border-color: rgba(255, 122, 110, .5); background: rgba(255, 122, 110, .08); }

/* --- Boutons --- */
.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink);
  background: var(--accent);
  padding: .75em 1.3em;
  border: 1px solid var(--accent);
  transition: background .15s, color .15s, transform .15s;
}
.btn-accent:hover { background: transparent; color: var(--accent); }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--paper);
  padding: .75em 1.3em;
  border: 1px solid var(--line);
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* --- Lien souligné évolutif --- */
.linkline { position: relative; }
.linkline::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  height: 1px; width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.linkline:hover::after, .linkline:focus-visible::after { transform: scaleX(1); }

/* --- Cascade hero --- */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.hero-anim > * { animation: rise .65s cubic-bezier(.19, .7, .26, 1) both; }
.hero-anim > *:nth-child(1) { animation-delay: .05s; }
.hero-anim > *:nth-child(2) { animation-delay: .15s; }
.hero-anim > *:nth-child(3) { animation-delay: .25s; }
.hero-anim > *:nth-child(4) { animation-delay: .35s; }
.hero-anim > *:nth-child(5) { animation-delay: .45s; }

/* --- Révélation au scroll --- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }

/* --- Grille de fond (papier quadrillé) --- */
.grid-bg {
  background-image:
    linear-gradient(to right, rgba(35, 43, 54, .55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(35, 43, 54, .55) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* --- Menu mobile --- */
.m-menu { display: none; border-top: 1px solid var(--line); background: var(--panel); }
.m-menu.open { display: block; animation: rise .25s ease; }

/* Bouton hamburger -> croix */
.burger { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; align-items: center; }
.burger > span { display: block; width: 22px; height: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.burger.is-open > span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open > span:nth-child(2) { opacity: 0; }
.burger.is-open > span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Bloc article éditorial --- */
.prose-geek {
  max-width: 70ch;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #d4dbe4;
}
.prose-geek p { margin: 1.3em 0; }
.prose-geek h2 {
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--paper);
  margin: 2.2em 0 .55em;
  letter-spacing: -.01em;
}
.prose-geek h3 {
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--paper);
  margin: 1.9em 0 .35em;
}
.prose-geek a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(197, 249, 75, .4);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s;
}
.prose-geek a:hover { text-decoration-color: var(--accent); }
.prose-geek blockquote {
  border-left: 2px solid var(--accent);
  padding: .4em 0 .4em 1.3em;
  margin: 1.7em 0;
  color: var(--steel);
}
.prose-geek ul, .prose-geek ol { margin: 1.3em 0; padding-left: 1.4em; }
.prose-geek ul { list-style: square; color: #d4dbe4; }
.prose-geek ol { list-style: decimal; color: #d4dbe4; }
.prose-geek li { margin: .45em 0; padding-left: .3em; }
.prose-geek li::marker { color: var(--accent); }
.prose-geek strong { color: var(--paper); font-weight: 600; }
.prose-geek table { width: 100%; border-collapse: collapse; margin: 1.7em 0; font-size: .95rem; line-height: 1.5; }
.prose-geek th {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: left;
  border-bottom: 1px solid var(--accent);
  padding: .7em .8em;
}
.prose-geek td { border-bottom: 1px solid var(--line); padding: .7em .8em; color: #d4dbe4; vertical-align: top; }

/* --- Figure / encadré --- */
.fig { border: 1px solid var(--line); background: var(--panel); }

/* --- Champs de formulaire --- */
.field {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--paper);
  padding: .8em 1em;
  font-family: "IBM Plex Sans", sans-serif;
  outline: none;
  transition: border-color .15s;
}
.field:focus { border-color: var(--accent); }
.field::placeholder { color: #5b6774; }

/* --- Focus visible global --- */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- Navigation --- */
.navlink {
  display: inline-block;
  padding: .55rem .65rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--steel);
  white-space: nowrap;
  transition: color .15s;
}
.navlink:hover { color: var(--accent); }
.navlink.is-active { color: var(--accent); }
.m-link {
  display: block;
  padding: .85em 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--steel);
  border-bottom: 1px solid var(--line);
}
.m-link:hover { color: var(--accent); }
.m-link.is-active { color: var(--accent); }

/* --- Point pulsant (breaking) --- */
@keyframes blink { 50% { opacity: .25; } }
.pulse-dot { animation: blink 1.4s infinite; }

/* --- Mouvement réduit --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}