/* Pages blog, article, interventions. Tokens : site.css uniquement. */

.page-hero.hero {
  height: auto;
  min-height: 70svh;
  max-height: none;
  justify-content: flex-end;
  padding-bottom: 36px;
}

.page-hero .hero-photo {
  object-position: center 42%;
}

.hero-blog .hero-photo {
  object-position: center 48%;
}

.hero-article .hero-photo {
  object-position: center 46%;
}

.hero-talks .hero-photo {
  object-position: 72% 42%;
}

.page-hero.hero h1 {
  font-size: clamp(2.45rem, 5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 100%;
}

.hero-article.hero h1 {
  font-size: clamp(2.05rem, 3.4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: min(22em, 100%);
}

.page-hero .hero-copy {
  gap: 14px;
}

.page-hero + .band::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: min(var(--container), calc(100% - 48px));
  height: 1px;
  background: var(--rule);
  pointer-events: none;
}

.page-float {
  top: 18%;
  right: max(20px, 5vw);
  width: 168px;
  height: 112px;
  z-index: 3;
}

.page-float-portrait {
  width: 132px;
  height: 176px;
  top: 16%;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0;
  max-width: 100%;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.crumbs a {
  color: var(--text-2);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

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

.crumbs [aria-current="page"] {
  color: var(--text);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.byline {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.byline img {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--cyan);
  flex: none;
}

.byline strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0.01em;
}

.byline span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.filter {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.filter:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: color-mix(in oklab, var(--text) 8%, transparent);
}

.filter.is-on {
  color: var(--text);
  border-color: color-mix(in oklab, var(--cyan) 55%, transparent);
  background: color-mix(in oklab, var(--cyan) 14%, transparent);
}

.post-feature {
  display: grid;
  padding: 0;
  gap: 0;
}

.post-feature .media {
  width: 100%;
  margin: 0;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.post-feature .media::after {
  height: 28%;
}

.post-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 20px 22px;
}

.post-feature h3 {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.more-label {
  margin-top: auto;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid color-mix(in oklab, var(--cyan) 50%, transparent);
  align-self: flex-start;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.post-grid,
.related-grid,
.topic-grid {
  display: grid;
  gap: 16px;
}

.post-grid {
  margin-top: 16px;
}

.cat-annonce {
  color: var(--text);
}

.read-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 75;
  pointer-events: none;
}

.read-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad-text);
}

.article-shell {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.article-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  max-width: 68ch;
}

.article-body .chapo {
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.55;
  letter-spacing: 0;
}

.article-body h2 {
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-top: 12px;
  scroll-margin-top: 96px;
}

.article-body h3 {
  font-size: 1.2rem;
  margin-top: 4px;
  scroll-margin-top: 96px;
}

.article-body p,
.article-body li {
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.7;
}

.article-body ul,
.retenir ul {
  margin: 0;
  padding-left: 1.15em;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-body blockquote {
  margin: 4px 0;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--cyan);
}

.article-body blockquote p {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.term {
  margin: 4px 0;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--bg-2);
  box-shadow: var(--shadow-glass);
  overflow: hidden;
  min-width: 0;
}

.term figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.term-dots {
  display: inline-flex;
  gap: 6px;
}

.term-dots i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--cyan);
  display: block;
}

.term-dots i:nth-child(2) {
  background: var(--blue);
}

.term-dots i:nth-child(3) {
  background: var(--muted);
}

.term pre {
  margin: 0;
  padding: 16px 16px 18px;
  overflow-x: auto;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.term code {
  font-family: inherit;
}

.term .ok {
  color: var(--cyan-200);
}

.retenir {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.retenir h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.toc {
  order: -1;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(16px);
  padding: 8px 16px 12px;
}

.toc p {
  margin: 8px 0 0;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc a {
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-top: 1px solid var(--border);
}

.toc a:hover {
  color: var(--text);
}

.toc a[aria-current="true"] {
  color: var(--text);
  font-weight: 700;
  box-shadow: inset 2px 0 0 var(--cyan);
  padding-left: 10px;
}

.share {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.page-float-portrait img {
  object-position: center 28%;
}

.copy-note {
  flex-basis: 100%;
  min-height: 1.4em;
  margin: 0;
  color: var(--cyan-200);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.author-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.author-card img {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--cyan);
}

.author-card h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.stack-tight {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.format-list {
  display: grid;
  gap: 12px;
}

.format-list article h3 {
  font-size: 1.15rem;
}

.topic-grid .card h3 {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  letter-spacing: -0.02em;
}

.invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (min-width: 768px) {
  .page-hero.hero {
    min-height: 70svh;
    padding-bottom: 48px;
  }

  .page-float {
    display: block;
  }

  .post-feature {
    grid-template-columns: 1.15fr 0.85fr;
    min-height: 380px;
  }

  .post-feature .media {
    height: 100%;
    min-height: 380px;
    aspect-ratio: auto;
    border-radius: var(--radius-card) 0 0 var(--radius-card);
  }

  .post-copy {
    padding: 28px 28px 26px;
    justify-content: center;
  }

  .post-grid,
  .related-grid,
  .topic-grid,
  .format-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .article-shell {
    display: grid;
    grid-template-columns: minmax(0, 68ch) 220px;
    justify-content: start;
    column-gap: 56px;
    align-items: start;
  }

  .toc {
    order: 0;
    position: sticky;
    top: 96px;
  }

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

@media (max-width: 767px) {
  .page-hero .hero-copy {
    width: min(640px, calc(100% - 32px));
  }

  .invite-actions .btn {
    width: 100%;
  }

  .page-float {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .read-progress span {
    transition: width 150ms linear;
  }
}

@media (prefers-reduced-motion: reduce) {
  .filter:hover,
  .post-feature:hover {
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .filter,
  .toc,
  .term {
    backdrop-filter: none;
    background: var(--bg-2);
  }
}
