/* ============================================================
   Voices du Peuple — Article pages (encrypted / tech theme)
   ============================================================ */

:root {
  --t-bg-0: #03100a;
  --t-bg-1: #07221512;
  --t-green: #2ee787;
  --t-green-dim: rgba(46, 231, 135, 0.55);
  --t-green-faint: rgba(46, 231, 135, 0.14);
  --t-text: #d7e8dd;
  --t-text-dim: rgba(215, 232, 221, 0.62);
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

/* full-bleed root so iOS overscroll / safe-area never shows white on the sides */
html:has(body.article-body) { background: #03100a; }
body.article-body {
  background:
    radial-gradient(120% 70% at 50% -10%, #0a2e1c 0%, rgba(10, 46, 28, 0) 60%),
    linear-gradient(180deg, #051b11 0%, var(--t-bg-0) 40%, #02100b 100%);
  color: var(--t-text);
}

/* ---- hex rain background ---- */
.hexbg {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 2vw;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.12em;
  color: var(--t-green);
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.3) 55%, rgba(0,0,0,0.65) 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.3) 55%, rgba(0,0,0,0.65) 100%);
}
.hexbg .col { white-space: pre; }

.article-main { position: relative; z-index: 1; }

/* ---- nav on dark ---- */
.article-body .nav {
  background: linear-gradient(135deg, rgba(20, 60, 40, 0.55) 0%, rgba(8, 30, 20, 0.35) 100%);
  border-color: rgba(46, 231, 135, 0.22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.12);
}
.article-body .nav-links a:hover { background: rgba(46, 231, 135, 0.12); }
.article-body .lang-toggle {
  background: rgba(46, 231, 135, 0.08);
  border-color: rgba(46, 231, 135, 0.25);
}
.article-body .lang-toggle button.active {
  background: var(--t-green);
  color: #06281a;
  box-shadow: 0 2px 10px rgba(46, 231, 135, 0.35);
}

/* ---- hero ---- */
.a-hero {
  position: relative;
  padding: 190px 24px 70px;
  max-width: 880px;
  margin: 0 auto;
}
.a-crumb {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--t-green-dim);
  margin-bottom: 30px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.a-crumb a { color: var(--t-green); border-bottom: 1px dotted rgba(46,231,135,0.4); }
.a-crumb a:hover { border-bottom-style: solid; }
.a-kicker {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--t-green);
  margin-bottom: 24px;
}
.a-kicker::before { content: "// "; opacity: 0.6; }
.a-hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 5.4vw, 64px);
  line-height: 1.1;
  color: #f2faf5;
  text-wrap: balance;
}
.a-lead {
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.75;
  color: var(--t-text-dim);
  max-width: 640px;
  margin-top: 26px;
  text-wrap: pretty;
}

/* ---- cipher strip ---- */
.cipher-strip {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--t-green-dim);
  white-space: nowrap;
  overflow: hidden;
  margin-top: 44px;
  padding: 14px 18px;
  border: 1px solid rgba(46, 231, 135, 0.18);
  border-radius: 12px;
  background: rgba(46, 231, 135, 0.05);
}
.cipher-strip .lock { color: var(--t-green); margin-right: 14px; }

/* ---- hero visual: no-wifi → mesh ---- */
.a-visual {
  max-width: 880px;
  margin: 30px auto 0;
  padding: 0 24px;
}
.a-visual-frame {
  border: 1px solid rgba(46, 231, 135, 0.18);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(46,231,135,0.06), rgba(46,231,135,0.012) 60%);
  padding: 34px 30px 26px;
  position: relative;
  overflow: hidden;
}
.a-visual svg { width: 100%; height: auto; display: block; }
.a-visual .legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 20px;
}
.a-visual .legend .off { color: rgba(255, 122, 122, 0.85); }
.a-visual .legend .on { color: var(--t-green); }

/* svg animations */
.wifi-arc { animation: wifi-die 6s ease-in-out infinite; }
.wifi-arc:nth-of-type(2) { animation-delay: 0.25s; }
.wifi-arc:nth-of-type(3) { animation-delay: 0.5s; }
@keyframes wifi-die {
  0%, 34%  { opacity: 0.75; }
  44%, 92% { opacity: 0.14; }
  100%     { opacity: 0.75; }
}
.wifi-slash {
  stroke-dasharray: 150;
  stroke-dashoffset: 150;
  animation: slash-draw 6s ease-in-out infinite;
}
@keyframes slash-draw {
  0%, 36%   { stroke-dashoffset: 150; opacity: 1; }
  46%, 90%  { stroke-dashoffset: 0; opacity: 1; }
  97%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
.mesh-node { animation: node-pulse 3s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes node-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
.mesh-link {
  stroke-dasharray: 6 8;
  animation: link-flow 1.6s linear infinite;
}
@keyframes link-flow { to { stroke-dashoffset: -14; } }
.mesh-packet { animation: packet-hop 4.2s cubic-bezier(.5,0,.5,1) infinite; }
@keyframes packet-hop {
  0%   { opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ---- terminal stats ---- */
.a-stats {
  max-width: 880px;
  margin: 26px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}
.stat {
  border: 1px solid rgba(46, 231, 135, 0.16);
  border-radius: 14px;
  background: rgba(46, 231, 135, 0.045);
  padding: 18px 20px;
}
.stat .k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--t-text-dim);
}
.stat .v {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--t-green);
  margin-top: 8px;
  min-height: 1.3em;
}

/* ---- article body ---- */
.a-content {
  max-width: 720px;
  margin: 90px auto 0;
  padding: 0 24px 40px;
}
.a-content h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.18;
  color: #eef9f2;
  margin: 64px 0 6px;
  text-wrap: balance;
}
.a-content h2 .sec-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.26em;
  color: var(--t-green);
  margin-bottom: 12px;
}
.a-content p {
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--t-text-dim);
  margin-top: 20px;
  text-wrap: pretty;
}
.a-content p strong, .a-content li strong { color: var(--t-text); font-weight: 600; }
.a-content a { color: var(--t-green); border-bottom: 1px dotted rgba(46,231,135,0.45); }
.a-content a:hover { border-bottom-style: solid; }
.a-content ul {
  list-style: none;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.a-content ul li {
  font-size: 16px;
  line-height: 1.75;
  color: var(--t-text-dim);
  border: 1px solid rgba(46, 231, 135, 0.14);
  border-radius: 14px;
  background: rgba(46, 231, 135, 0.035);
  padding: 18px 22px;
}
.a-content ul li::before {
  content: ">";
  font-family: var(--font-mono);
  color: var(--t-green);
  margin-right: 12px;
}
.a-pull {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.45;
  color: #eef9f2;
  border-left: 2px solid var(--t-green);
  padding: 6px 0 6px 26px;
  margin: 48px 0;
  text-wrap: balance;
}

/* download row */
.a-downloads {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.btn-term {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--t-green);
  background: rgba(46, 231, 135, 0.07);
  border: 1px solid rgba(46, 231, 135, 0.35);
  border-radius: 999px;
  padding: 13px 24px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-term:hover {
  background: rgba(46, 231, 135, 0.16);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(46, 231, 135, 0.12);
}

/* FAQ */
.a-faq { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  border: 1px solid rgba(46, 231, 135, 0.14);
  border-radius: 14px;
  background: rgba(46, 231, 135, 0.035);
  padding: 22px 24px;
}
.faq-item .q {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--t-green);
  letter-spacing: 0.02em;
}
.faq-item .q::before { content: "? "; opacity: 0.55; }
.faq-item .a-text {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--t-text-dim);
  margin-top: 10px;
  text-wrap: pretty;
}

/* share / back */
.a-end {
  max-width: 720px;
  margin: 80px auto 0;
  padding: 0 24px 120px;
  text-align: center;
}
.a-end .rule {
  width: 64px; height: 1px; border: none;
  background: rgba(46, 231, 135, 0.3);
  margin: 0 auto 36px;
}
.a-end .closing {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 27px);
  color: #eef9f2;
  text-wrap: balance;
}
.a-end .back {
  display: inline-block;
  margin-top: 34px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--t-green);
  border: 1px solid rgba(46, 231, 135, 0.35);
  border-radius: 999px;
  padding: 12px 26px;
  transition: background 0.25s ease;
}
.a-end .back:hover { background: rgba(46, 231, 135, 0.12); }

/* dark footer variant */
.footer--dark {
  background: linear-gradient(180deg, rgba(2, 16, 11, 0) 0%, #021109 100%);
  color: var(--t-text-dim);
  border-top: 1px solid rgba(46, 231, 135, 0.1);
}
.footer--dark .brandline { color: #eef9f2; }
.footer--dark .footer-links a { opacity: 0.6; }
.footer--dark .footer-links a:hover { opacity: 1; color: var(--t-green); }

@media (prefers-reduced-motion: reduce) {
  .wifi-arc, .wifi-slash, .mesh-node, .mesh-link, .mesh-packet { animation: none !important; }
  .wifi-slash { stroke-dashoffset: 0; }
}

@media (max-width: 700px) {
  .a-hero { padding-top: 150px; }
  .a-visual-frame { padding: 22px 16px 18px; }
  .a-content { margin-top: 60px; }
  .a-content h2 { margin-top: 48px; }
  .a-downloads { flex-direction: column; }
  .btn-term { justify-content: center; }
  .a-stats { grid-template-columns: 1fr 1fr; }
}
