/* Articles — lecture & liste (DA Caverne / Plaid editorial) */

:root {
  --article-bg: #050507;
  --article-panel: #0a0a0f;
  --article-line: rgba(255, 255, 255, 0.09);
  --article-muted: #85858f;
  --article-violet: #6e5bff;
  --article-violet2: #9d7cff;
  --article-pink: #c45eff;
  --article-amber: #f59e0b;
  --article-success: #34d399;
}

.article-page {
  margin: 0;
  min-height: 100vh;
  background: var(--article-bg);
  color: #fff;
  font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  overflow-x: hidden;
}

.article-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 10%, rgba(110, 91, 255, 0.22), transparent 30%),
    radial-gradient(circle at 80% 16%, rgba(196, 94, 255, 0.16), transparent 28%),
    radial-gradient(circle at 50% 95%, rgba(245, 158, 11, 0.08), transparent 34%);
}

.article-grid-bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 25%, black, transparent 72%);
}

.article-noise {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.85'/%3E%3C/svg%3E");
}

/* ── Nav ── */
.article-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 5, 7, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.article-nav-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.article-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}
.article-nav-mark {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  background: #fff;
  color: #000;
  font-weight: 900;
  font-style: italic;
}
.article-nav-title {
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.28em;
}
.article-nav-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #525252;
}
.article-nav-crumb {
  display: none;
  align-items: center;
  gap: 0.25rem;
}
@media (min-width: 768px) {
  .article-nav-crumb { display: flex; }
}
.article-nav-link,
.article-nav-active {
  padding: 0.5rem 0.75rem;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  transition: 0.2s;
}
.article-nav-link { color: #74747e; }
.article-nav-link:hover { color: #fff; }
.article-nav-active {
  color: #fff;
  font-style: italic;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--article-violet);
}
.article-nav-sep { color: #27272f; font-size: 8px; }
.article-nav-actions { display: flex; align-items: center; gap: 0.5rem; }

.article-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--article-line);
  padding: 0 18px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s;
  background: transparent;
  color: inherit;
  font-family: inherit;
}
.article-btn-white {
  background: #fff;
  color: #000;
  border-color: #fff;
}
.article-btn-white:hover {
  background: var(--article-violet);
  border-color: var(--article-violet);
  color: #fff;
}
.article-btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: #b8b8c0;
}
.article-btn-ghost:hover {
  border-color: rgba(157, 124, 255, 0.45);
  color: #fff;
  background: rgba(110, 91, 255, 0.08);
}

/* ── Preview banner ── */
.article-preview-banner {
  position: relative;
  z-index: 90;
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12), rgba(110, 91, 255, 0.08));
  padding: 0.65rem 1.25rem;
}
.article-preview-inner {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.article-preview-banner strong { color: #fcd34d; }
.article-preview-banner a {
  color: #c4b5fd;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Shell lecture ── */
.article-shell { position: relative; z-index: 10; }
.article-container { max-width: 1500px; margin: 0 auto; padding: 0 1.25rem; }

.article-hero {
  min-height: calc(100vh - 64px);
  display: grid;
  align-items: end;
  padding: 6rem 0 4rem;
}
.article-kicker {
  font-family: 'JetBrains Mono', monospace;
  color: var(--article-violet2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.42em;
}
.article-title {
  max-width: 1120px;
  margin-top: 26px;
  font-size: clamp(3.2rem, 9vw, 9.5rem);
  line-height: 0.82;
  letter-spacing: -0.105em;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
}
.article-hero-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 54px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--article-line);
}
.article-hero-meta div {
  background: rgba(10, 10, 15, 0.86);
  padding: 22px;
}
.article-hero-meta span {
  display: block;
  color: #777783;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.24em;
}
.article-hero-meta strong {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 900;
}
.article-lead-wrap {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 42px;
  align-items: start;
  margin-top: 58px;
}
.article-lead {
  font-size: clamp(1.6rem, 3vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
  font-weight: 900;
}
.article-summary-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--article-line);
  padding: 26px;
}
.article-summary-card p {
  color: #b7b7c0;
  font-size: 14px;
  line-height: 1.75;
  margin: 0;
}
.article-summary-list {
  display: grid;
  gap: 1px;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.08);
}
.article-summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background: #09090d;
  padding: 14px;
}
.article-summary-list span {
  color: #777783;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 900;
}
.article-summary-list b { font-size: 12px; }

/* ── Cover ── */
.article-cover {
  position: relative;
  min-height: 520px;
  border-block: 1px solid var(--article-line);
  overflow: hidden;
  background: #09090d;
}
.article-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.05);
  opacity: 0.62;
}
.article-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #050507 0%, transparent 46%, #050507 100%),
    radial-gradient(circle at 30% 10%, rgba(110, 91, 255, 0.26), transparent 35%);
}
.article-cover-label {
  position: absolute;
  left: 40px;
  bottom: 34px;
  z-index: 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: #d7d7ff;
}
.article-cover-source {
  position: absolute;
  right: 40px;
  bottom: 34px;
  z-index: 2;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
}

/* ── Layout contenu ── */
.article-content-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 820px) 300px;
  gap: 54px;
  padding: 92px 0;
}
.article-toc {
  position: sticky;
  top: 92px;
  align-self: start;
  border-left: 1px solid var(--article-line);
  padding-left: 18px;
}
.article-toc p,
.article-side p {
  margin: 0 0 18px;
  color: var(--article-violet2);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.28em;
}
.article-toc a {
  display: block;
  color: #74747e;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  padding: 9px 0;
  transition: color 0.15s;
}
.article-toc a:hover,
.article-toc a.is-active { color: #fff; }

.article-side {
  position: sticky;
  top: 92px;
  align-self: start;
}
.article-side-card {
  border: 1px solid var(--article-line);
  background: rgba(255, 255, 255, 0.03);
  padding: 22px;
  margin-bottom: 14px;
}
.article-side-card strong {
  display: block;
  font-size: 34px;
  line-height: 1;
  font-style: italic;
}
.article-side-card span {
  display: block;
  margin-top: 8px;
  color: #777783;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.article-tag {
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(129, 140, 248, 0.35);
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
}

/* ── Corps article (blocs Atlas) ── */
.article-body section { margin-bottom: 64px; }
.article-body h2 {
  margin: 0 0 24px;
  font-size: clamp(2.4rem, 4vw, 4.8rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  scroll-margin-top: 6rem;
}
.article-body h3 {
  margin: 46px 0 14px;
  font-size: 28px;
  letter-spacing: -0.04em;
  font-weight: 900;
  color: #e4e4e7;
}
.article-body p {
  color: #c8c8d0;
  font-size: 17px;
  line-height: 1.9;
  margin: 0 0 24px;
}
.article-body strong,
.article-body b { color: #fff; }
.article-body blockquote {
  margin: 42px 0;
  padding: 30px;
  border-left: 3px solid var(--article-violet);
  background: linear-gradient(90deg, rgba(110, 91, 255, 0.13), rgba(255, 255, 255, 0.025));
  font-size: clamp(1.15rem, 2.5vw, 24px);
  line-height: 1.45;
  letter-spacing: -0.03em;
  font-weight: 900;
  color: #f4f4f5;
}
.article-body ul,
.article-body ol {
  display: grid;
  gap: 12px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}
.article-body li {
  border: 1px solid var(--article-line);
  background: rgba(255, 255, 255, 0.025);
  padding: 18px 20px;
  color: #c8c8d0;
  line-height: 1.7;
}
.article-body ul li::before {
  content: "→";
  color: var(--article-violet2);
  font-weight: 900;
  margin-right: 12px;
}
.article-body ol { counter-reset: article-ol; }
.article-body ol li { counter-increment: article-ol; }
.article-body ol li::before {
  content: counter(article-ol, decimal-leading-zero);
  color: var(--article-violet2);
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  margin-right: 12px;
}
.article-body img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border: 1px solid var(--article-line);
  margin: 34px 0 12px;
  background: #09090d;
}
.article-body section img + p {
  margin-top: 0;
  margin-bottom: 28px;
  font-size: 12px;
  color: #737373;
  font-style: italic;
  line-height: 1.5;
}
.article-body a {
  color: #a5b4fc;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body a:hover { color: #fff; }
.article-body pre,
.article-body .code-panel {
  border: 1px solid rgba(157, 124, 255, 0.25);
  background: #08080d;
  margin: 40px 0;
  overflow: hidden;
}
.article-body pre {
  margin: 0;
  padding: 24px;
  overflow: auto;
  color: #ddd;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.8;
}
.article-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  color: #86efac;
}
.article-body pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}
.article-divider,
.article-body hr {
  height: 1px;
  border: none;
  background: linear-gradient(90deg, transparent, var(--article-line), transparent);
  margin: 64px 0;
}
.article-body .timeline {
  display: grid;
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 42px 0;
}
.article-body .timeline article {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  background: #09090d;
  padding: 22px;
}
.article-body .timeline b {
  color: var(--article-violet2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.article-body .timeline span {
  color: #c8c8d0;
  line-height: 1.6;
}

/* ── Related ── */
.article-related {
  border-top: 1px solid var(--article-line);
  padding: 84px 0;
}
.article-related-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}
.article-related-head h2 {
  font-size: clamp(2.5rem, 5vw, 5.5rem);
  line-height: 0.85;
  letter-spacing: -0.09em;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  margin: 0;
}
.article-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--article-line);
}
.article-related-card {
  background: #09090d;
  min-height: 260px;
  padding: 26px;
  text-decoration: none;
  color: #fff;
  transition: 0.2s;
  display: flex;
  flex-direction: column;
}
.article-related-card:hover { background: rgba(110, 91, 255, 0.1); }
.article-related-card span {
  font-family: 'JetBrains Mono', monospace;
  color: #85858f;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}
.article-related-card h3 {
  margin-top: auto;
  padding-top: 74px;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 900;
}
.article-related-card p {
  margin-top: 14px;
  color: #85858f;
  font-size: 13px;
  line-height: 1.6;
}
.article-related-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  margin-bottom: 12px;
  border: 1px solid var(--article-line);
  opacity: 0.85;
}

/* ── Liste / index ── */
.article-list-hero { padding: 6rem 0 3rem; }
.article-page-title {
  font-size: clamp(4.5rem, 12vw, 12rem);
  line-height: 0.75;
  letter-spacing: -0.115em;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  margin-top: 1.25rem;
}
.article-outline {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.22);
}
.article-post-row {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 34px;
  align-items: center;
  border-top: 1px solid var(--article-line);
  min-height: 210px;
  padding: 30px 0;
  color: #fff;
  text-decoration: none;
  position: relative;
}
.article-post-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(124, 92, 255, 0.08), transparent 38%);
  opacity: 0;
  transition: 0.2s;
  pointer-events: none;
}
.article-post-row:hover::after { opacity: 1; }
.article-post-index b { font-family: 'JetBrains Mono', monospace; font-size: 18px; }
.article-post-index strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: -0.04em;
}
.article-post-index span {
  display: block;
  margin-top: 6px;
  color: #a1a1aa;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.article-post-desc {
  font-size: clamp(1.45rem, 2.3vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.055em;
  font-weight: 800;
}
.article-post-thumb {
  height: 112px;
  width: 100%;
  object-fit: cover;
  filter: grayscale(0.25) contrast(1.05);
  opacity: 0.88;
  border: 1px solid var(--article-line);
}

/* ── Animations ── */
.article-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.article-reveal.is-visible {
  opacity: 1;
  transform: none;
}

.article-toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 200;
  background: #fff;
  padding: 1rem 1.25rem;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.article-toast.is-hidden { display: none; }

.article-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--article-line);
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: 11px;
  color: #525252;
}
.article-footer a { color: #737373; }

@media (max-width: 1200px) {
  .article-content-layout { grid-template-columns: 1fr; }
  .article-toc,
  .article-side { position: relative; top: auto; }
  .article-toc { display: none; }
  .article-lead-wrap { grid-template-columns: 1fr; }
  .article-hero-meta,
  .article-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .article-post-row { grid-template-columns: 1fr; }
  .article-post-thumb { height: 190px; }
}
@media (max-width: 760px) {
  .article-hero { padding-top: 5rem; min-height: auto; }
  .article-hero-meta,
  .article-related-grid { grid-template-columns: 1fr; }
  .article-title { font-size: clamp(3.8rem, 18vw, 6rem); }
  .article-content-layout { padding: 56px 0; }
  .article-cover { min-height: 360px; }
  .article-body p { font-size: 15px; }
  .article-body blockquote { font-size: 1.15rem; }
  .article-body .timeline article { grid-template-columns: 1fr; }
}
