/* Lecture éditoriale du blog — gabarit Arqow, limité à .ed-blog et .ed-article. */

.ed-blog,
.ed-article {
  --ed-canvas: #ffffff;
  --ed-surface: #f7f7f5;
  --ed-ink: #18191b;
  --ed-muted: #686b70;
  --ed-subtle: #8b8e94;
  --ed-accent: #4263eb;
  --ed-accent-strong: #3451c7;
  --ed-accent-soft: #edf1fe;
  --ed-line: #e8e9ec;
  --ed-line-strong: #d4d6db;
  --ed-documented: #1f7a4d;
  --ed-documented-soft: #e8f6ee;
  --ed-statement: #8a5a12;
  --ed-statement-soft: #fbf3e4;
  --ed-open: #5b3cc4;
  --ed-open-soft: #f1edfd;
  --ed-serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --ed-sans: "Geist", "Outfit", system-ui, sans-serif;
  --ed-mono: "Geist Mono", ui-monospace, monospace;
  --ed-reading: 68ch;
  background: var(--ed-canvas);
  color: var(--ed-ink);
  font-family: var(--ed-sans);
  font-weight: 400;
  line-height: 1.5;
}

.ed-blog {
  padding: 148px 24px 88px;
}

.ed-article {
  padding: 132px 24px 72px;
}

.ed-wrap {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.ed-wrap-wide {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.ed-blog h1,
.ed-blog h2,
.ed-blog h3,
.ed-article h1,
.ed-article h2,
.ed-article h3,
.ed-article h4 {
  font-family: var(--ed-serif);
  font-weight: 500;
  color: var(--ed-ink);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.ed-blog h1 {
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.02;
  margin: 12px 0 0;
}

.ed-blog h2,
.ed-article h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.12;
}

.ed-blog h3 {
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.2;
}

.ed-article h2.ed-overline {
  margin: 0;
  font-family: var(--ed-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ed-muted);
}

.ed-kicker,
.ed-overline {
  margin: 0;
  font-family: var(--ed-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ed-muted);
}

.ed-lead {
  max-width: 38rem;
  margin: 18px 0 0;
  font-family: var(--ed-serif);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
  color: var(--ed-ink);
}

.ed-rule {
  height: 1px;
  margin: 36px 0 0;
  background: var(--ed-line);
  border: 0;
}

.ed-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 28px;
}

.ed-cat {
  font-size: 14px;
  color: var(--ed-muted);
  background: none;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
  font-family: inherit;
}

a.ed-cat {
  text-decoration: none;
}

.ed-cat.is-active,
.ed-cat:hover {
  color: var(--ed-ink);
}

.ed-cat.is-active {
  box-shadow: inset 0 -1px 0 var(--ed-ink);
}

.ed-section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: baseline;
  margin: 48px 0 22px;
  padding-top: 22px;
  border-top: 1px solid var(--ed-line);
}

.ed-section-head h2 {
  margin: 0;
  font-size: clamp(22px, 2vw, 28px);
}

.ed-section-head h2 span {
  margin-right: 10px;
  font-family: var(--ed-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ed-muted);
}

.ed-section-head p {
  margin: 0;
  color: var(--ed-muted);
  font-size: 14px;
}

.ed-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.85fr);
  gap: 40px 48px;
  align-items: start;
}

.ed-feature-side {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--ed-line);
  padding-left: 32px;
}

.ed-side-card + .ed-side-card {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--ed-line);
}

.ed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 28px;
}

.ed-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.ed-card-media {
  display: block;
  overflow: hidden;
  border-radius: 2px;
  background: var(--ed-surface);
  aspect-ratio: 16 / 10;
}

.ed-card-media img,
.ed-hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 320ms cubic-bezier(0.25, 1, 0.5, 1);
}

.ed-card:hover .ed-card-media img {
  transform: scale(1.015);
}

.ed-card-large .ed-card-media {
  aspect-ratio: 16 / 9;
  margin-bottom: 18px;
}

.ed-card-side .ed-card-media,
.ed-card-grid .ed-card-media {
  margin-bottom: 14px;
  aspect-ratio: 16 / 10;
}

.ed-card h2,
.ed-card h3 {
  margin: 8px 0 0;
  font-weight: 500;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size 200ms cubic-bezier(0.25, 1, 0.5, 1);
  width: fit-content;
  max-width: 100%;
}

.ed-card:hover h2,
.ed-card:hover h3 {
  background-size: 100% 1px;
}

.ed-card-large h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.12;
}

.ed-card-side h3,
.ed-card-grid h3 {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.25;
}

.ed-dek {
  margin: 12px 0 0;
  color: var(--ed-ink);
  font-size: 16px;
  line-height: 1.5;
}

.ed-card-large .ed-dek {
  font-family: var(--ed-serif);
  font-size: 18px;
  line-height: 1.45;
  max-width: 42rem;
}

.ed-card-grid .ed-dek,
.ed-card-side .ed-dek {
  font-size: 14px;
  color: var(--ed-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0 0;
  color: var(--ed-ink);
  font-size: 14px;
}

.ed-meta span[aria-hidden] {
  color: var(--ed-subtle);
}

.ed-empty {
  padding: 48px 0;
  color: var(--ed-muted);
}

.ed-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  height: 2px;
  width: 100%;
  background: transparent;
  pointer-events: none;
}

.ed-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ed-accent);
}

.ed-article-head {
  width: min(760px, 100%);
  margin: 0 auto;
}

.ed-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--ed-muted);
}

.ed-crumbs a {
  color: var(--ed-muted);
}

.ed-crumbs a:hover {
  color: var(--ed-ink);
}

.ed-article h1 {
  margin: 14px 0 0;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.05;
}

.ed-dek-article {
  margin: 18px 0 0;
  font-family: var(--ed-serif);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
  color: var(--ed-ink);
}

.ed-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
  justify-content: space-between;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--ed-line);
}

.ed-author {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.ed-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--ed-ink);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  flex: none;
}

.ed-author strong {
  display: block;
  font-weight: 500;
  font-size: 14px;
}

.ed-author span,
.ed-byline-meta {
  color: var(--ed-muted);
  font-size: 13px;
}

.ed-tools {
  display: flex;
  gap: 8px;
}

.ed-tool {
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--ed-line);
  background: #fff;
  color: var(--ed-ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.ed-tool:hover,
.ed-tool[aria-expanded="true"] {
  border-color: var(--ed-line-strong);
  background: var(--ed-surface);
}

.ed-prefs {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--ed-line);
  border-radius: 10px;
  background: var(--ed-surface);
  display: none;
  gap: 18px;
}

.ed-prefs.is-open {
  display: flex;
  flex-wrap: wrap;
}

.ed-prefs p {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-muted);
}

.ed-prefs button {
  margin-right: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--ed-line);
  background: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  color: var(--ed-ink);
}

.ed-prefs button.is-active {
  background: var(--ed-ink);
  color: #fff;
  border-color: var(--ed-ink);
}

.ed-takeaways {
  width: min(760px, 100%);
  margin: 36px auto 0;
  padding: 22px 22px 8px;
  border: 1px solid var(--ed-line);
  border-radius: 10px;
  background: var(--ed-surface);
}

.ed-takeaways ol {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  border-top: 1px solid var(--ed-line);
}

.ed-takeaways li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--ed-line);
}

.ed-takeaways li:last-child {
  border-bottom: 0;
}

.ed-takeaways li > span {
  font-family: var(--ed-mono);
  font-size: 13px;
  color: var(--ed-accent);
}

.ed-takeaways strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.ed-takeaways p {
  margin: 4px 0 0;
  font-family: var(--ed-serif);
  font-size: 17px;
  line-height: 1.45;
}

.ed-hero-figure {
  width: min(920px, 100%);
  margin: 36px auto 0;
}

.ed-hero-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 2px;
  background: var(--ed-surface);
}

.ed-hero-figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ed-muted);
}

.ed-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, var(--ed-reading));
  justify-content: center;
  gap: 48px;
  margin-top: 48px;
}

.ed-toc {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.ed-toc p,
.ed-toc-mobile summary {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ed-muted);
}

.ed-toc ol,
.ed-toc-mobile ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ed-toc a,
.ed-toc-mobile a {
  color: var(--ed-muted);
  font-size: 13px;
  line-height: 1.35;
}

.ed-toc a:hover,
.ed-toc a.is-active,
.ed-toc-mobile a:hover {
  color: var(--ed-ink);
}

.ed-toc-mobile {
  display: none;
  margin-bottom: 28px;
  border: 1px solid var(--ed-line);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--ed-surface);
}

.ed-toc-mobile summary {
  cursor: pointer;
  margin: 0;
}

.ed-toc-mobile ol {
  margin-top: 12px;
}

.ed-prose {
  font-family: var(--ed-serif);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ed-ink);
  hyphens: auto;
}

.ed-article[data-size="sm"] .ed-prose { font-size: 1rem; }
.ed-article[data-size="lg"] .ed-prose { font-size: 1.25rem; }
.ed-article[data-size="xl"] .ed-prose { font-size: 1.4rem; }
.ed-article[data-leading="compact"] .ed-prose { line-height: 1.55; }
.ed-article[data-leading="relaxed"] .ed-prose { line-height: 1.9; }

.ed-prose p,
.ed-prose h2,
.ed-prose h3,
.ed-prose ul,
.ed-prose figure,
.ed-prose blockquote {
  margin: 0 0 1.15em;
}

.ed-prose h2 {
  font-size: 1.7em;
  line-height: 1.2;
  margin-top: 1.6em;
  scroll-margin-top: 96px;
}

.ed-prose h3 {
  font-family: var(--ed-serif);
  font-size: 1.25em;
  font-weight: 500;
  margin-top: 1.4em;
  scroll-margin-top: 96px;
}

.ed-prose a {
  color: var(--ed-accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.ed-prose ul {
  padding-left: 1.2em;
}

.ed-prose li + li {
  margin-top: 0.45em;
}

.ed-prose blockquote {
  margin: 1.6em 0;
  padding: 0 0 0 18px;
  border-left: 2px solid var(--ed-ink);
  background: transparent;
  font-size: 1.2em;
  font-style: italic;
  line-height: 1.4;
  color: var(--ed-ink);
}

.ed-prose blockquote footer {
  margin-top: 10px;
  font-family: var(--ed-sans);
  font-style: normal;
  font-size: 13px;
  color: var(--ed-muted);
}

.ed-doc,
.ed-bars,
.ed-callout,
.ed-def,
.ed-panel {
  font-family: var(--ed-sans);
  border: 1px solid var(--ed-line);
  border-radius: 10px;
  background: var(--ed-surface);
}

.ed-doc,
.ed-bars,
.ed-callout,
.ed-def {
  padding: 18px 18px 16px;
  margin: 1.6em 0;
}

.ed-doc .ed-overline {
  color: var(--ed-accent);
}

.ed-doc h3,
.ed-bars p,
.ed-callout strong,
.ed-def strong {
  font-family: var(--ed-serif);
  font-size: 1.2rem;
  font-weight: 500;
  margin: 8px 0 0;
  letter-spacing: 0;
  text-transform: none;
}

.ed-doc p,
.ed-callout p,
.ed-def p,
.ed-bars .ed-note {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ed-muted);
}

.ed-doc a.ed-button,
.ed-share a,
.ed-panel a.ed-text-link {
  color: var(--ed-ink);
}

.ed-button {
  display: inline-flex;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--ed-ink);
  color: #fff !important;
  text-decoration: none !important;
  font-size: 14px;
}

.ed-button:hover {
  background: #000;
}

.ed-bars ul {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.ed-bars li + li {
  margin-top: 14px;
}

.ed-bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}

.ed-bar-label span:last-child {
  font-family: var(--ed-mono);
  font-weight: 400;
}

.ed-bar-track {
  margin-top: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ed-line);
  overflow: hidden;
}

.ed-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ed-accent);
}

.ed-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-family: var(--ed-mono);
  font-size: 12px;
  color: var(--ed-muted);
}

.ed-callout {
  background: var(--ed-accent-soft);
  border-color: transparent;
}

.ed-def strong {
  display: block;
}

.ed-after {
  width: min(760px, 100%);
  margin: 56px auto 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.ed-panel {
  padding: 22px;
  background: #fff;
}

.ed-panel h2 {
  font-size: 26px;
  margin: 0;
  scroll-margin-top: 96px;
}

.ed-panel > p {
  margin: 8px 0 0;
  color: var(--ed-muted);
  font-size: 14px;
}

.ed-claim + .ed-claim,
.ed-source + .ed-source,
.ed-unknown + .ed-unknown {
  margin-top: 14px;
}

.ed-claim,
.ed-source,
.ed-unknown {
  padding-top: 14px;
  border-top: 1px solid var(--ed-line);
}

.ed-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.ed-badge-doc { color: var(--ed-documented); background: var(--ed-documented-soft); }
.ed-badge-state { color: var(--ed-statement); background: var(--ed-statement-soft); }
.ed-badge-open { color: var(--ed-open); background: var(--ed-open-soft); }
.ed-badge-analysis { color: var(--ed-accent-strong); background: var(--ed-accent-soft); }

.ed-claim p,
.ed-unknown p,
.ed-source p,
.ed-panel li {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.ed-refs {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ed-muted);
}

.ed-refs a {
  color: var(--ed-accent-strong);
}

.ed-group + .ed-group {
  margin-top: 22px;
}

.ed-group h3 {
  margin: 0 0 4px;
  font-family: var(--ed-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
}

.ed-source {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 8px;
}

.ed-source > span {
  font-family: var(--ed-mono);
  font-size: 13px;
  color: var(--ed-muted);
}

.ed-source a {
  color: var(--ed-ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.ed-panel ul {
  margin: 12px 0 0;
  padding-left: 1.1em;
}

.ed-panel li + li {
  margin-top: 10px;
}

.ed-share {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 14px;
  font-size: 14px;
}

.ed-share a,
.ed-share button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--ed-ink);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.ed-related {
  width: min(1120px, 100%);
  margin: 64px auto 0;
  padding-top: 8px;
}

.ed-related .ed-grid {
  margin-top: 8px;
}

@media (max-width: 980px) {
  .ed-feature,
  .ed-layout,
  .ed-grid {
    grid-template-columns: 1fr;
  }

  .ed-feature-side {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--ed-line);
    padding-top: 28px;
  }

  .ed-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ed-toc {
    display: none;
  }

  .ed-toc-mobile {
    display: block;
  }

  .ed-section-head {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 680px) {
  .ed-blog,
  .ed-article {
    padding-top: 112px;
  }

  .ed-grid {
    grid-template-columns: 1fr;
  }

  .ed-byline {
    align-items: flex-start;
  }
}
