/* ==========================================================================
   Article — TOC, related content, sidebar, layout
   ========================================================================== */

@import url("./article-prose.css");

.prose-article {
  max-width: none;
}

/* --- Reading progress bar (injected by reading-progress.js) --- */

.gg-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-standard);
}

.gg-reading-progress.is-active {
  opacity: 1;
}

.gg-reading-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgb(var(--color-brand)), rgb(var(--color-accent)));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.toc-link {
  border-left: 2px solid rgb(var(--color-border));
  transition: color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard), background-color var(--duration-base) var(--ease-standard);
}

.toc-link:hover {
  color: rgb(var(--color-brand) / 0.85);
  border-color: rgb(var(--color-brand) / 0.55);
}

.toc-link.is-active {
  color: rgb(var(--color-brand));
  border-color: rgb(var(--color-brand));
  background-color: rgb(var(--color-brand) / 0.1);
}

.toc-sublink {
  border-left: 2px solid rgb(var(--color-border));
  transition: color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard), background-color var(--duration-base) var(--ease-standard);
}

.toc-sublink:hover {
  color: rgb(var(--color-brand) / 0.75);
  border-color: rgb(var(--color-brand) / 0.45);
}

.toc-sublink.is-active {
  color: rgb(var(--color-brand));
  border-color: rgb(var(--color-brand));
  background-color: rgb(var(--color-brand) / 0.1);
}

.related-content-card {
  display: block;
  overflow: hidden;
  cursor: pointer;
  animation: fade-up 0.6s ease both;
}

.related-content-grid .related-content-card:nth-child(2) {
  animation-delay: 0.1s;
}

.related-content-grid .related-content-card:nth-child(3) {
  animation-delay: 0.2s;
}

.related-content-grid .related-content-card:nth-child(4) {
  animation-delay: 0.3s;
}

.related-content-card__image {
  transition: transform 0.5s ease;
}

.related-content-card:hover .related-content-card__image {
  transform: scale(1.1);
}

.sidebar-related {
  transition: transform 0.2s ease;
}

.sidebar-related:hover {
  transform: translateX(4px);
}

/* --- Single articles --- */

.single-article__breadcrumb {
  line-height: 1.4;
}

.single-article__breadcrumb > span:last-child {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  min-width: 0;
  flex: 1 1 auto;
}

.single-article__title {
  text-wrap: balance;
}

.single-article__hero-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

@media (min-width: 768px) {
  .single-article__hero-image {
    aspect-ratio: 21 / 9;
    max-height: 30rem;
  }
}

.single-article--guide .single-article__hero-badge {
  background: rgb(var(--guide-accent));
  color: rgb(var(--guide-accent-contrast));
}

.single-article--guide .single-article__intro {
  border-left-color: rgb(var(--guide-accent));
}

/* --- Structured guides --- */

.guide-article__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  color: rgb(var(--text-secondary));
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

@media (min-width: 1024px) {
  .guide-article__back {
    margin-bottom: 1.75rem;
    min-height: auto;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    border: 1px solid rgb(var(--border-color));
    border-radius: 0.5rem;
    background: rgb(var(--card-bg) / 70%);
  }
}

.guide-article__grid {
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .guide-article__grid {
    gap: 2.5rem;
    margin-bottom: 5rem;
  }
}

@media (max-width: 1023px) {
  .guide-article__grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .guide-article__main {
    display: contents;
  }

  .guide-article__toc {
    order: 1;
  }

  .guide-article__games {
    order: 2;
  }

  .guide-content {
    order: 3;
  }

  .guide-article__toc .guide-toc {
    padding: 1.25rem;
    border: 1px solid rgb(var(--color-border));
    border-radius: 0;
    background: rgb(var(--color-surface));
    scroll-margin-top: 6rem;
  }

  .guide-article__toc .guide-toc__heading {
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .guide-article__toc .guide-toc__list {
    flex-direction: column;
    gap: 0.5rem;
  }

  .guide-article__toc .guide-toc-link {
    min-height: 3rem;
    padding: 0.875rem 1rem;
    border-left: 3px solid rgb(var(--color-border));
    border-radius: 0;
    font-size: 0.9375rem;
    line-height: 1.45;
  }

  .guide-article__toc .guide-toc-link--sub {
    padding-left: 1.25rem;
    font-size: 0.875rem;
  }
}

@media (min-width: 1024px) {
  .guide-toc {
    position: sticky;
    top: 8rem;
    padding: 1.5rem;
    border: 1px solid rgb(var(--border-color));
    border-radius: 0;
    background: rgb(var(--card-bg));
  }

  .guide-sidebar {
    position: sticky;
    top: 8rem;
    padding: 1.5rem;
    border: 1px solid rgb(var(--border-color));
    background: rgb(var(--card-bg));
  }
}

.guide-article__main > * + * {
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .guide-article__main > * + * {
    margin-top: 2rem;
  }
}

@media (max-width: 1023px) {
  .guide-article__main > * + * {
    margin-top: 0;
  }
}

.guide-article__main .guide-content {
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .guide-article__main .guide-content {
    margin-top: 2.5rem;
  }
}

.guide-toc__heading,
.guide-sidebar h2 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

@media (min-width: 1024px) {
  .guide-toc__heading,
  .guide-sidebar h2 {
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
  }
}

.guide-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.guide-sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.guide-sidebar-link img {
  margin-bottom: 0.75rem;
}

.guide-sidebar-link h3 {
  margin: 0;
  padding-bottom: 1rem;
}

.guide-intro {
  border-left: 4px solid rgb(var(--guide-accent));
  line-height: 1.65;
  font-size: 1rem;
  color: rgb(var(--color-ink-muted));
  background: rgb(var(--color-surface));
  padding: 1.25rem 1.25rem 1.25rem 1.375rem;
  border-radius: 0;
}

@media (min-width: 640px) {
  .guide-intro {
    font-size: 1.125rem;
    line-height: 1.7;
    padding: 1.375rem 1.5rem;
  }
}

.guide-article__games {
  row-gap: 0.5rem;
}

.guide-article__share {
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .guide-article__share {
    margin-bottom: 2rem;
  }
}

.guide-article [data-social-share] {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.social-share-btn.is-copied {
  border-color: rgb(var(--accent-primary));
  color: rgb(var(--accent-primary));
}

.social-share-btn__label {
  transition: color 0.2s ease;
}

.guide-filter-link {
  border-color: rgb(var(--border-color));
  color: rgb(var(--text-secondary));
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.guide-filter-link:hover,
.guide-filter-link.is-active {
  border-color: rgb(var(--guide-accent));
  color: rgb(var(--guide-accent));
  background: rgb(var(--guide-accent) / 8%);
}

.guide-toc-link {
  display: block;
  padding: 0.625rem 0.75rem;
  padding-left: 0.875rem;
  border-left: 2px solid rgb(var(--border-color));
  font-size: 0.875rem;
  line-height: 1.4;
  color: rgb(var(--text-secondary));
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.guide-toc-link--sub {
  padding-left: 1.25rem;
  font-size: 0.8125rem;
}

.guide-toc-link:hover,
.guide-toc-link:focus-visible {
  border-left-color: rgb(var(--guide-accent));
  color: rgb(var(--guide-accent));
  background: rgb(var(--guide-accent) / 8%);
}

.guide-content h2,
.guide-content h3 {
  scroll-margin-top: 8rem;
}

/* Game information box (article fiche jeu) */
.game-info-box {
  margin: 0 0 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgb(var(--color-border));
  border-left: 4px solid rgb(var(--color-brand));
  border-radius: 0;
  color: rgb(var(--color-ink));
  background: rgb(var(--section-tint) / 0.12);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.game-info-box__row {
  margin: 0 0 0.35rem;
}

.game-info-box__row:last-of-type {
  margin-bottom: 0;
}

.game-info-box__row strong {
  color: rgb(var(--text-primary));
  font-weight: 600;
}

.game-info-box__disclosure {
  margin: 0.85rem 0 0;
  font-size: 0.875rem;
  color: rgb(var(--text-secondary));
}

.prose-article > .game-info-box,
.guide-content > .game-info-box,
.entry-content > .game-info-box {
  margin-bottom: 1.75rem;
}

.post-author-byline__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: rgb(var(--color-brand));
}

.post-author-byline__label {
  color: rgb(var(--color-ink-muted));
}

.post-author-byline__name {
  margin-left: 0.25rem;
  color: rgb(var(--color-ink));
  font-weight: 600;
  text-decoration: none;
}

a.post-author-byline__name:hover {
  color: rgb(var(--color-brand));
}

/* Author archive hero */
.author-archive-hero {
  padding-top: var(--space-6);
  padding-bottom: 0;
}

.author-archive-hero__card {
  display: grid;
  gap: 1.5rem;
  padding: var(--page-panel-pad);
  border: 1px solid rgb(var(--color-border));
  border-radius: 0;
  background: rgb(var(--color-surface));
}

@media (min-width: 768px) {
  .author-archive-hero__card {
    padding: var(--page-panel-pad-md) var(--space-8);
  }
}

.author-archive-hero__identity {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.author-archive-hero__avatar {
  flex-shrink: 0;
  width: 5.5rem;
  height: 5.5rem;
  object-fit: cover;
  border-radius: 0;
  border: 2px solid rgb(var(--color-brand));
  background: rgb(var(--color-bg));
}

.author-archive-hero__avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  background: rgb(var(--color-brand));
}

.author-archive-hero__badge {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.75rem;
  color: #fff;
  font-size: var(--text-label-size);
  font-weight: var(--text-label-weight);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgb(var(--color-brand));
  border-radius: 0;
}

.author-archive-hero__name {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.author-archive-hero__count {
  margin: 0;
  color: rgb(var(--color-ink-muted));
  font-size: 0.9375rem;
}

.author-archive-hero__bio {
  margin: 0;
  max-width: 48rem;
  color: rgb(var(--color-ink-muted));
  font-size: 1rem;
  line-height: 1.65;
}

.author-archive-hero__bio p {
  margin: 0 0 0.75rem;
}

.author-archive-hero__bio p:last-child {
  margin-bottom: 0;
}

/* Article sidebar panel */
.single-article__sidebar-panel {
  background: rgb(var(--color-surface));
  border: 1px solid rgb(var(--color-border));
  border-radius: 0;
  padding: var(--space-6);
}

.single-article__sidebar-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 var(--space-6);
  font-size: 1.125rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.3;
}

.single-article__sidebar-title .gg-section-header__mark {
  --gg-section-sigil-size: 1.375rem;
  --gg-section-sigil-offset: 0.14rem;
  gap: 0.35rem;
}

.single-article__sidebar-title .gg-section-header__sigil-core {
  width: calc(0.3rem * var(--gg-hex-aspect));
  height: 0.3rem;
}

.single-article__sidebar-title .gg-section-header__rule {
  width: 0.9rem;
  height: 2px;
}

.single-article__sidebar-title .gg-section-header__rule-tip {
  width: calc(0.35rem * var(--gg-hex-aspect));
  height: 0.35rem;
}

.single-article__intro {
  border-radius: 0;
}

.article-sponsored {
  margin: var(--space-8) 0 0;
  font-size: 0.875rem;
  color: rgb(var(--color-ink-muted));
}

.article-sponsored__link {
  color: rgb(var(--color-brand));
  text-decoration: none;
}

.article-sponsored__link:hover {
  text-decoration: underline;
}
