/* ==========================================================================
   BASE — Cyberpunk / Blade Runner Design System
   Skills: Taste-Skill (dark-luxe cyberpunk) + Emil Design + Impeccable
   Palette: Cyan #00e5ff · Yellow #fcee0a · Magenta #ff2d78 · Black #050508
========================================================================== */

/* =========================
   Variables — Cyberpunk Dark
========================= */
:root {
  --bg:         #050508;
  --bg-raised:  #080810;
  --panel:      #0c0c18;
  --panel2:     #111124;
  --panel-hover:#141428;

  --border:     rgba(0, 229, 255, 0.12);
  --border-mid: rgba(0, 229, 255, 0.22);
  --border-hot: rgba(0, 229, 255, 0.5);

  --text:       #cce8ee;
  --muted:      #5a8090;
  --muted2:     #2d4850;

  /* Neons */
  --neon-cyan:    #00e5ff;
  --neon-yellow:  #fcee0a;
  --neon-pink:    #ff2d78;
  --neon-green:   #00ff9f;

  --accent:       var(--neon-cyan);
  --accent-dim:   rgba(0, 229, 255, 0.07);
  --accent-glow:  rgba(0, 229, 255, 0.35);

  /* Glow shadows */
  --glow-cyan:   0 0 6px #00e5ff, 0 0 16px rgba(0,229,255,0.5), 0 0 40px rgba(0,229,255,0.2);
  --glow-yellow: 0 0 6px #fcee0a, 0 0 16px rgba(252,238,10,0.5), 0 0 40px rgba(252,238,10,0.2);
  --glow-pink:   0 0 6px #ff2d78, 0 0 16px rgba(255,45,120,0.5), 0 0 40px rgba(255,45,120,0.2);

  --shadow:    0 8px 40px rgba(0,0,0,0.8);
  --shadow-lg: 0 20px 80px rgba(0,0,0,0.9);

  --radius:    0px;
  --radius-sm: 0px;

  --font-display: "Orbitron", "Rajdhani", monospace;
  --font-heading: "Rajdhani", "Exo 2", ui-sans-serif, sans-serif;
  --font-body:    "Barlow", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", "Share Tech Mono", ui-monospace, Menlo, monospace;

  --topbar-h:   62px;
  --topbar-gap: 32px;
  --sticky-top: calc(var(--topbar-h) + var(--topbar-gap));
}

/* =========================
   Variables — Light (Braindance / Day-City)
========================= */
html[data-theme="light"] {
  --bg:         #e8e4d8;
  --bg-raised:  #ddd8ca;
  --panel:      #e4dfd2;
  --panel2:     #dad5c8;
  --panel-hover:#d4cebb;

  --border:     rgba(180, 100, 0, 0.18);
  --border-mid: rgba(180, 100, 0, 0.32);
  --border-hot: rgba(180, 100, 0, 0.6);

  --text:       #0a0806;
  --muted:      #5a4828;
  --muted2:     #9a8860;

  /* Neons day-mode (amber/gold tones) */
  --neon-cyan:   #006888;
  --neon-yellow: #c08000;
  --neon-pink:   #c0003a;
  --neon-green:  #006840;

  --accent:       var(--neon-yellow);
  --accent-dim:   rgba(192, 128, 0, 0.08);
  --accent-glow:  rgba(192, 128, 0, 0.3);

  --glow-cyan:   0 0 4px #006888, 0 0 12px rgba(0,104,136,0.4);
  --glow-yellow: 0 0 4px #c08000, 0 0 12px rgba(192,128,0,0.4);
  --glow-pink:   0 0 4px #c0003a, 0 0 12px rgba(192,0,58,0.4);

  --shadow:    0 8px 40px rgba(0,0,0,0.15);
  --shadow-lg: 0 20px 80px rgba(0,0,0,0.2);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* =========================
   Body + Effets de fond
========================= */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
}

/* Grille cyberpunk (fond) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

html[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(180, 100, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 100, 0, 0.05) 1px, transparent 1px);
}

/* Scanlines (très subtil) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.06) 3px,
    rgba(0, 0, 0, 0.06) 4px
  );
  pointer-events: none;
  z-index: 9998;
  opacity: 0.5;
}

img { display: block; max-width: 100%; }

/* =========================
   Container
========================= */
.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding-top: var(--topbar-gap);
  padding-bottom: 80px;
  position: relative;
  z-index: 10;
}

/* =========================
   Topbar
========================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--topbar-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 32px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Ligne neon en bas de la topbar */
.topbar::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--neon-cyan) 30%, var(--neon-yellow) 50%, var(--neon-cyan) 70%, transparent 100%);
  opacity: 0.4;
}

html[data-theme="light"] .topbar::after {
  background: linear-gradient(90deg, transparent 0%, var(--neon-yellow) 30%, var(--neon-cyan) 50%, var(--neon-yellow) 70%, transparent 100%);
}

/* Progress bar */
.progress-container {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 10;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-yellow));
  transition: width 0.08s linear;
  box-shadow: var(--glow-cyan);
}

/* =========================
   Brand
========================= */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.logo-slot {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-mid);
  background: var(--panel);
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: border-color 200ms ease-out, box-shadow 200ms ease-out, transform 150ms ease-out;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  position: relative;
}

.brand:hover .logo-slot {
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
  transform: scale(1.05);
}

.logo-slot img {
  width: 130%;
  height: 130%;
  object-fit: cover;
  display: block;
}

.brand-text { line-height: 1; }

.brand-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  transition: color 150ms ease-out, text-shadow 150ms ease-out;
}

.brand:hover .brand-title {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px var(--neon-cyan);
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.05em;
}

/* =========================
   Navigation
========================= */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: color 150ms ease-out, border-color 150ms ease-out, background 150ms ease-out, box-shadow 150ms ease-out;
  position: relative;
}

.nav-link::before {
  content: "//";
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted2);
  margin-right: 4px;
  transition: color 150ms ease-out;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--neon-cyan);
  border-color: var(--border);
  background: var(--accent-dim);
}

.nav-link:hover::before,
.nav-link.is-active::before {
  color: var(--neon-cyan);
}

.nav-link.is-active {
  text-shadow: 0 0 8px var(--neon-cyan);
}

/* =========================
   Actions
========================= */
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.social-link {
  color: var(--muted);
  transition: color 150ms ease-out;
}
.social-link:hover {
  color: var(--neon-cyan);
}

/* =========================
   Boutons
========================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border: 1px solid var(--border-mid);
  background: var(--panel);
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: color 150ms ease-out, border-color 150ms ease-out, box-shadow 150ms ease-out, background 150ms ease-out, transform 150ms ease-out;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  position: relative;
}

.btn:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan), inset 0 0 20px rgba(0,229,255,0.05);
  background: var(--accent-dim);
  transform: translateY(-1px);
}

.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent-dim);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 8px rgba(0,229,255,0.2);
}

.btn-primary:hover {
  box-shadow: var(--glow-cyan);
  background: rgba(0, 229, 255, 0.1);
}

html[data-theme="light"] .btn-primary {
  border-color: var(--neon-yellow);
  color: var(--neon-yellow);
  box-shadow: 0 0 8px rgba(192,128,0,0.2);
}

html[data-theme="light"] .btn-primary:hover {
  box-shadow: var(--glow-yellow);
  background: rgba(192, 128, 0, 0.08);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--neon-cyan);
  border-color: var(--border);
  box-shadow: none;
  background: var(--panel);
  transform: none;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 11px;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
}

/* =========================
   Toggle thème — icônes
========================= */
.theme-toggle-icons {
  position: relative;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-icon-sun,
.theme-icon-moon {
  position: absolute;
  transition: opacity 200ms ease-out, transform 200ms ease-out;
}

html[data-theme="dark"]  .theme-icon-sun  { opacity: 0; transform: scale(0.5) rotate(90deg); }
html[data-theme="dark"]  .theme-icon-moon { opacity: 1; transform: scale(1) rotate(0deg); }
html[data-theme="light"] .theme-icon-moon { opacity: 0; transform: scale(0.5) rotate(-90deg); }
html[data-theme="light"] .theme-icon-sun  { opacity: 1; transform: scale(1) rotate(0deg); }

/* =========================
   Footer (legacy in-page)
========================= */
.footer {
  margin-top: 80px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted2);
  letter-spacing: 0.05em;
}

.footer a { color: var(--muted); text-decoration: none; transition: color 150ms ease-out; }
.footer a:hover { color: var(--neon-cyan); text-shadow: 0 0 6px var(--neon-cyan); }

/* =========================
   Site Footer (global)
========================= */
.site-footer {
  margin-top: 64px;
  padding: 20px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted2);
  letter-spacing: 0.05em;
}

.footer-link {
  color: var(--neon-cyan);
  text-decoration: none;
  text-shadow: 0 0 6px var(--neon-cyan);
  transition: color 150ms ease-out, text-shadow 150ms ease-out;
}

.footer-link:hover {
  color: #fff;
  text-shadow: 0 0 12px var(--neon-cyan), 0 0 24px var(--neon-cyan);
}

html[data-theme="light"] .footer-link {
  color: var(--neon-yellow);
  text-shadow: 0 0 5px var(--neon-yellow);
}

html[data-theme="light"] .footer-link:hover {
  color: #333;
  text-shadow: 0 0 10px var(--neon-yellow), 0 0 20px var(--neon-yellow);
}

/* =========================
   Share menu (TOC)
========================= */
.share-menu {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.share-menu-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 10px;
}

.share-buttons {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 150ms ease-out, color 150ms ease-out, box-shadow 150ms ease-out;
  white-space: nowrap;
}

.share-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 6px color-mix(in srgb, var(--neon-cyan) 30%, transparent);
}

html[data-theme="light"] .share-btn:hover {
  border-color: var(--neon-yellow);
  color: var(--neon-yellow);
  box-shadow: 0 0 6px color-mix(in srgb, var(--neon-yellow) 30%, transparent);
}

.share-btn svg { flex-shrink: 0; }

/* =========================
   Animations — Cyberpunk
========================= */

/* Glitch sur les titres */
@keyframes glitch-before {
  0%, 87%, 100% { clip-path: inset(0 0 100% 0); transform: translate(0); opacity: 0; }
  88% { clip-path: inset(55% 0 28% 0); transform: translate(-4px); opacity: 0.8; }
  90% { clip-path: inset(15% 0 70% 0); transform: translate(4px); opacity: 0.8; }
  92% { clip-path: inset(78% 0 8% 0); transform: translate(-3px); opacity: 0.6; }
  94% { clip-path: inset(0 0 100% 0); opacity: 0; }
}

@keyframes glitch-after {
  0%, 88%, 100% { clip-path: inset(0 0 100% 0); transform: translate(0); opacity: 0; }
  89% { clip-path: inset(20% 0 55% 0); transform: translate(4px); opacity: 0.7; }
  91% { clip-path: inset(70% 0 12% 0); transform: translate(-4px); opacity: 0.7; }
  93% { clip-path: inset(40% 0 40% 0); transform: translate(2px); opacity: 0.5; }
  95% { clip-path: inset(0 0 100% 0); opacity: 0; }
}

.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.glitch::before {
  color: var(--neon-cyan);
  animation: glitch-before 6s infinite;
}

.glitch::after {
  color: var(--neon-pink);
  animation: glitch-after 6s infinite;
}

/* Pulse neon */
@keyframes neon-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

/* Clignotement curseur terminal */
@keyframes cursor-blink {
  0%, 48% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* FadeInUp */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scan line animation (sur les cartes) */
@keyframes card-scan {
  from { top: -100%; }
  to   { top: 200%; }
}

.anim-in { animation: fadeInUp 400ms cubic-bezier(0.0, 0.0, 0.2, 1) both; }
.anim-in-delay-1 { animation-delay: 80ms; }
.anim-in-delay-2 { animation-delay: 160ms; }
.anim-in-delay-3 { animation-delay: 240ms; }
.anim-in-delay-4 { animation-delay: 320ms; }

/* =========================
   Homepage — Hero
========================= */
.home-hero {
  padding: 72px 0 64px;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--neon-green);
  margin-bottom: 28px;
  text-shadow: 0 0 8px var(--neon-green);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
  animation: neon-pulse 2s ease-in-out infinite;
}

.home-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 90px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 28px;
  max-width: 800px;
}

.home-title .accent-neon {
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
}

html[data-theme="light"] .home-title .accent-neon {
  color: var(--neon-yellow);
  text-shadow: var(--glow-yellow);
}

/* Terminal line */
.hero-terminal {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
  letter-spacing: 0.03em;
}

.terminal-prompt {
  color: var(--neon-yellow);
  text-shadow: 0 0 6px var(--neon-yellow);
  font-weight: 700;
}

html[data-theme="light"] .terminal-prompt {
  color: var(--neon-cyan);
  text-shadow: 0 0 6px var(--neon-cyan);
}

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

.terminal-cursor {
  display: inline-block;
  width: 9px;
  height: 16px;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
  animation: cursor-blink 1.1s step-start infinite;
  vertical-align: middle;
}

html[data-theme="light"] .terminal-cursor {
  background: var(--neon-yellow);
  box-shadow: 0 0 8px var(--neon-yellow);
}

.home-desc {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 36px;
}

.home-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
  margin-top: 36px;
  border-left: 3px solid var(--neon-cyan);
  padding-left: 24px;
}

html[data-theme="light"] .hero-stats {
  border-left-color: var(--neon-yellow);
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
  line-height: 1;
  letter-spacing: 0.05em;
}

html[data-theme="light"] .stat-value {
  color: var(--neon-yellow);
  text-shadow: var(--glow-yellow);
}

.stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted2);
  text-transform: uppercase;
  margin-top: 4px;
}

.stat-divider {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted2);
}

/* =========================
   Homepage — Articles récents
========================= */
.home-section { margin-bottom: 64px; }

.home-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.home-section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  text-shadow: 0 0 8px var(--neon-cyan);
}

html[data-theme="light"] .home-section-title {
  color: var(--neon-yellow);
  text-shadow: 0 0 6px var(--neon-yellow);
}

.home-articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* =========================
   Home — Author card
========================= */
.home-author-card {
  margin-top: 32px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--neon-cyan);
  background: var(--panel);
  margin-bottom: 8px;
}

html[data-theme="light"] .home-author-card {
  border-left-color: var(--neon-yellow);
}

.author-link {
  color: var(--neon-cyan);
  text-decoration: none;
  text-shadow: 0 0 8px var(--neon-cyan);
  transition: color 150ms ease-out, text-shadow 150ms ease-out;
}

.author-link:hover {
  color: #fff;
  text-shadow: 0 0 12px var(--neon-cyan), 0 0 24px var(--neon-cyan);
}

html[data-theme="light"] .author-link {
  color: var(--neon-yellow);
  text-shadow: 0 0 6px var(--neon-yellow);
}

html[data-theme="light"] .author-link:hover {
  color: #333;
  text-shadow: 0 0 10px var(--neon-yellow), 0 0 20px var(--neon-yellow);
}

.home-author-name {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  margin-bottom: 10px;
}

.home-author-avail {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* =========================
   Home — Featured article
========================= */
.home-featured-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--panel);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color 200ms ease-out, box-shadow 200ms ease-out, transform 200ms ease-out;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
  position: relative;
}

.home-featured-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,229,255,0.04), transparent);
  z-index: 2;
  pointer-events: none;
}

.home-featured-card:hover::before {
  animation: card-scan 0.8s ease-out forwards;
}

.home-featured-card:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 1px var(--neon-cyan), var(--glow-cyan);
  transform: translateY(-3px);
}

html[data-theme="light"] .home-featured-card:hover {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 0 1px var(--neon-yellow), var(--glow-yellow);
}

.home-featured-img {
  width: 100%;
  max-height: 340px;
  overflow: hidden;
  background: var(--bg-raised);
}

.home-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease-out, filter 400ms ease-out;
  filter: brightness(0.85) saturate(0.9);
}

.home-featured-card:hover .home-featured-img img {
  transform: scale(1.04);
  filter: brightness(0.92) saturate(1.1);
}

.home-featured-body {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.home-featured-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  text-shadow: 0 0 8px var(--neon-cyan);
}

html[data-theme="light"] .home-featured-label {
  color: var(--neon-yellow);
  text-shadow: 0 0 6px var(--neon-yellow);
}

.home-featured-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 0;
  transition: color 150ms ease-out;
}

.home-featured-card:hover .home-featured-title { color: var(--neon-cyan); }

html[data-theme="light"] .home-featured-card:hover .home-featured-title { color: var(--neon-yellow); }

.home-featured-intro {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.home-featured-intro strong { color: var(--text); }
.home-featured-intro code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-raised);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--neon-cyan);
}

html[data-theme="light"] .home-featured-intro code { color: var(--neon-yellow); }

.home-featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* =========================
   Home Card
========================= */
.home-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--panel);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color 200ms ease-out, box-shadow 200ms ease-out, transform 200ms ease-out;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  position: relative;
}

/* Scan line on hover */
.home-card::before {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(180deg, rgba(0,229,255,0.06), transparent);
  top: -100%;
  transition: none;
  pointer-events: none;
  z-index: 2;
}

.home-card:hover::before {
  animation: card-scan 0.8s ease-out forwards;
}

html[data-theme="light"] .home-card::before {
  background: linear-gradient(180deg, rgba(192,128,0,0.06), transparent);
}

.home-card:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 1px var(--neon-cyan), var(--glow-cyan);
  transform: translateY(-4px);
}

html[data-theme="light"] .home-card:hover {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 0 1px var(--neon-yellow), var(--glow-yellow);
}

.home-card-img {
  height: 160px;
  overflow: hidden;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.home-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease-out;
  filter: brightness(0.85) saturate(0.9);
}

.home-card:hover .home-card-img img {
  transform: scale(1.06);
  filter: brightness(0.9) saturate(1.1);
}

.home-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.home-card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--text);
  transition: color 150ms ease-out;
}

.home-card:hover .home-card-title { color: var(--neon-cyan); }

html[data-theme="light"] .home-card:hover .home-card-title { color: var(--neon-yellow); }

.home-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tag-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  padding: 3px 9px;
  border: 1px solid var(--border);
  color: var(--muted);
  letter-spacing: 0.05em;
  background: var(--bg-raised);
}

/* =========================
   Utilitaires
========================= */
.muted  { color: var(--muted); }
.muted2 { color: var(--muted2); }

/* =========================
   Accessibilité
========================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .glitch::before, .glitch::after { display: none; }
  body::after { display: none; }
}

/* =========================
   Responsive
========================= */
@media (max-width: 680px) {
  .topbar {
    display: flex;
    padding: 0 12px;
    gap: 4px;
  }

  .brand-text { display: none; }

  .top-nav {
    display: flex;
    gap: 2px;
  }

  .top-actions {
    margin-left: auto;
    gap: 4px;
  }

  #themeToggle span:not(.theme-toggle-icons) { display: none; }

  .nav-link {
    padding: 6px 8px;
    font-size: 11px;
  }

  .nav-link::before { display: none; }

  .container { width: calc(100% - 32px); }

  .home-title { font-size: 32px; }

  .hero-stats { gap: 16px; padding-left: 16px; }

  .home-articles { grid-template-columns: 1fr; }

  .stat-value { font-size: 22px; }
}
