/* ============================================================
   THALAXO — Single post (layout éditorial sans sidebar)
   Scoped .thalaxo-single-article — tokens --thalaxo-* Customizer
   ============================================================ */

.thalaxo-single-article {
  --thalaxo-single-shell: min(1120px, calc(100vw - 2rem));
  --thalaxo-single-prose: min(780px, 100%);
}

/* ── Layout : pleine largeur, sidebar masquée ─────────────── */

.thalaxo-single-article .sidebar,
.thalaxo-single-article #right-sidebar,
.thalaxo-single-article .widget-area {
  display: none !important;
}

.thalaxo-single-article .site-content {
  max-width: var(--thalaxo-single-shell);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 3vw, 1.75rem);
  padding-right: clamp(1rem, 3vw, 1.75rem);
}

/* Aligne le header sur la colonne article */
.thalaxo-single-article #masthead .inside-header.grid-container,
.thalaxo-single-article .site.grid-container.container {
  max-width: var(--thalaxo-single-shell);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 3vw, 1.75rem);
  padding-right: clamp(1rem, 3vw, 1.75rem);
  box-sizing: border-box;
}

.thalaxo-single-article .content-area,
.thalaxo-single-article .site-main {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
}

.thalaxo-single-article .inside-article {
  padding-top: clamp(1.25rem, 3vw, 2rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

/* ── Couverture featured image ──────────────────────────────── */

.thalaxo-single-article .featured-image,
.thalaxo-single-article .post-image,
.thalaxo-single-article .gp-featured-image {
  margin-bottom: 1.75rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--thalaxo-border, #333333);
}

.thalaxo-single-article .featured-image img,
.thalaxo-single-article .post-image img,
.thalaxo-single-article .gp-featured-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
}

/* ── Eyebrow + titre + meta ─────────────────────────────────── */

.thalaxo-single-article .thalaxo-single-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1.3;
}

.thalaxo-single-article .thalaxo-single-eyebrow-badge {
  color: var(--thalaxo-orange, #FFA500);
}

.thalaxo-single-article .thalaxo-single-eyebrow-read,
.thalaxo-single-article .thalaxo-single-eyebrow-sep {
  color: var(--thalaxo-text-secondary, #A3A3A3);
}

.thalaxo-single-article .entry-title,
.thalaxo-single-article h1.entry-title {
  margin: 0 0 0.85rem !important;
  font-size: clamp(1.65rem, 3.4vw, 2.25rem) !important;
  font-weight: 700 !important;
  line-height: 1.18 !important;
  letter-spacing: -0.025em;
  color: var(--thalaxo-text-primary, #FFFFFF) !important;
  max-width: none;
}

.thalaxo-single-article .thalaxo-single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  margin: 0 0 1.35rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--thalaxo-border, #333333);
  font-size: 0.875rem;
  line-height: 1.4;
}

.thalaxo-single-article .thalaxo-single-meta-date,
.thalaxo-single-article .thalaxo-single-meta-read {
  color: var(--thalaxo-text-secondary, #A3A3A3);
}

.thalaxo-single-article .thalaxo-single-meta-author {
  color: var(--thalaxo-text-primary, #FFFFFF);
  font-weight: 600;
}

.thalaxo-single-article .thalaxo-single-meta-sep {
  color: var(--thalaxo-border, #333333);
  user-select: none;
}

/* Masque la meta GP par défaut (date · by author) — remplacée par .thalaxo-single-meta */
.thalaxo-single-article .entry-header .entry-meta {
  display: none !important;
}

/* Masque le footer meta GP (catégories / tags redondants) */
.thalaxo-single-article footer.entry-meta {
  display: none !important;
}

/* ── Corps de l'article : colonne de lecture confortable ────── */

.thalaxo-single-article .entry-content {
  max-width: var(--thalaxo-single-shell);
  margin-left: auto;
  margin-right: auto;
  font-size: 1.0625rem;
  line-height: 1.72;
  color: #D0D2D6;
}

.thalaxo-single-article .entry-content a {
  color: #60A5FA !important;
}

.thalaxo-single-article .entry-content a:hover,
.thalaxo-single-article .entry-content a:focus-visible {
  color: #93C5FD !important;
}

.thalaxo-single-article .entry-content > p,
.thalaxo-single-article .entry-content > ul,
.thalaxo-single-article .entry-content > ol,
.thalaxo-single-article .entry-content > blockquote {
  max-width: var(--thalaxo-single-prose);
  color: #D0D2D6;
}

/* Éléments larges : tableaux, code, figures */
.thalaxo-single-article .entry-content table,
.thalaxo-single-article .entry-content .comparison-table,
.thalaxo-single-article .entry-content pre,
.thalaxo-single-article .entry-content figure,
.thalaxo-single-article .entry-content .wp-block-table,
.thalaxo-single-article .entry-content .wp-block-image,
.thalaxo-single-article .entry-content .wp-block-group,
.thalaxo-single-article .entry-content .thalaxo-share-block,
.thalaxo-single-article .entry-content .thalaxo-inline-cta,
.thalaxo-single-article .entry-content #ez-toc-container,
.thalaxo-single-article .entry-content .thalaxo-article-meta-bar,
.thalaxo-single-article .entry-content .thalaxo-article-footer,
.thalaxo-single-article .entry-content .thalaxo-article-author {
  max-width: var(--thalaxo-single-shell);
  width: 100%;
}

.thalaxo-single-article .entry-content table,
.thalaxo-single-article .entry-content .comparison-table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.thalaxo-single-article .entry-content h2,
.thalaxo-single-article .entry-content h3 {
  color: var(--thalaxo-text-primary, #FFFFFF) !important;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

/* ── Table des matières (Easy TOC) ──────────────────────────── */

.thalaxo-single-article #ez-toc-container {
  margin: 1.75rem auto 2rem !important;
  padding: 0.95rem 1.1rem !important;
  border: 1px solid var(--thalaxo-border, #333333) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  box-shadow: none !important;
}

.thalaxo-single-article #ez-toc-container .ez-toc-title-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem !important;
}

.thalaxo-single-article #ez-toc-container .ez-toc-title {
  margin: 0 !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: var(--thalaxo-text-secondary, #A3A3A3) !important;
}

.thalaxo-single-article #ez-toc-container .ez-toc-list {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.65 !important;
}

.thalaxo-single-article #ez-toc-container .ez-toc-list a {
  color: var(--thalaxo-blue, #3B82F6) !important;
  text-decoration: none !important;
  font-size: 0.95rem;
}

.thalaxo-single-article #ez-toc-container .ez-toc-list a:hover,
.thalaxo-single-article #ez-toc-container .ez-toc-list a:focus-visible {
  color: var(--thalaxo-blue-light, #60A5FA) !important;
  text-decoration: underline !important;
}

.thalaxo-single-article #ez-toc-container .ez-toc-btn,
.thalaxo-single-article #ez-toc-container .ez-toc-toggle {
  border-radius: 6px !important;
  border: 1px solid var(--thalaxo-border, #333333) !important;
  background: #1E1E1E !important;
  box-shadow: none !important;
  padding: 0.25rem 0.5rem !important;
  min-width: unset !important;
  width: auto !important;
}

/* ── CTA inline ─────────────────────────────────────────────── */

.thalaxo-single-article .thalaxo-inline-cta {
  margin: 1.75rem auto;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--thalaxo-border, #333333);
  background: rgba(255, 255, 255, 0.03);
}

.thalaxo-single-article .thalaxo-inline-cta--mid,
.thalaxo-single-article .thalaxo-inline-cta--footer {
  max-width: var(--thalaxo-single-shell);
  text-align: left;
}

.thalaxo-single-article .thalaxo-inline-cta--mid {
  margin: 2.25rem auto;
}

.thalaxo-single-article .thalaxo-inline-cta-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--thalaxo-orange, #FFA500);
}

.thalaxo-single-article .thalaxo-inline-cta-title {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--thalaxo-text-primary, #FFFFFF);
}

.thalaxo-single-article .thalaxo-inline-cta-sub {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--thalaxo-text-secondary, #A3A3A3);
}

.thalaxo-single-article .thalaxo-inline-cta-btn {
  flex-shrink: 0;
  width: auto !important;
  display: inline-block !important;
  padding: 0.65rem 1.15rem !important;
  font-size: 0.9rem !important;
  white-space: nowrap;
}

/* ── Articles liés (3 cartes) ───────────────────────────────── */

.thalaxo-single-article .thalaxo-related {
  max-width: 900px;
  margin: 2.5rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--thalaxo-border, #333333);
}

.thalaxo-single-article .thalaxo-related-title {
  margin: 0 0 1.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--thalaxo-text-secondary, #A3A3A3);
}

.thalaxo-single-article .thalaxo-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.thalaxo-single-article .thalaxo-related-card {
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
}

.thalaxo-single-article .thalaxo-related-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #1a1a1a;
}

.thalaxo-single-article .thalaxo-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.thalaxo-single-article .thalaxo-related-card:hover .thalaxo-related-thumb img {
  transform: scale(1.04);
}

.thalaxo-single-article .thalaxo-related-card-title {
  margin: 0;
  padding: 1rem 1.1rem 1.15rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
}

.thalaxo-single-article .thalaxo-related-card-title a {
  color: var(--thalaxo-text-primary, #FFFFFF) !important;
  text-decoration: none !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.thalaxo-single-article .thalaxo-related-card-title a:hover,
.thalaxo-single-article .thalaxo-related-card-title a:focus-visible {
  color: var(--thalaxo-blue, #3B82F6) !important;
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 768px) {
  .thalaxo-single-article .entry-title,
  .thalaxo-single-article h1.entry-title {
    max-width: none;
  }

  .thalaxo-single-article .thalaxo-inline-cta-btn {
    width: 100% !important;
    text-align: center !important;
  }
}

/* ── Partage compact (single post) ──────────────────────────── */

.thalaxo-single-article .thalaxo-share-top.thalaxo-share-block {
  max-width: var(--thalaxo-single-shell);
  margin: 0 auto 1.25rem;
  padding: 0.55rem 0.75rem;
}

.thalaxo-single-article .thalaxo-share-top .thalaxo-share-intro {
  margin: 0 0 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  color: #C5C7CB;
}

.thalaxo-single-article .thalaxo-share-top .thalaxo-share-row {
  gap: 0.45rem;
}

.thalaxo-single-article .thalaxo-share-top .thalaxo-share-buttons,
.thalaxo-single-article .thalaxo-share-top .thalaxo-share-more {
  gap: 0.45rem;
}

.thalaxo-single-article .thalaxo-share-bottom.thalaxo-share-block {
  max-width: var(--thalaxo-single-shell);
  margin-left: auto;
  margin-right: auto;
  padding: 0.55rem 0.75rem;
}

.thalaxo-single-article .thalaxo-share-bottom .thalaxo-share-intro {
  font-size: 0.8125rem;
  margin-bottom: 0.45rem;
}

@media (max-width: 960px) {
  .thalaxo-single-article .thalaxo-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile — 1 colonne (après 960px pour ne pas être écrasé) + carte horizontale */
@media (max-width: 768px) {
  .thalaxo-single-article .thalaxo-related {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .thalaxo-single-article .thalaxo-related-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .thalaxo-single-article .thalaxo-related-card {
    flex-direction: row;
    align-items: stretch;
    min-height: 88px;
  }

  .thalaxo-single-article .thalaxo-related-thumb {
    flex: 0 0 108px;
    width: 108px;
    aspect-ratio: auto;
    min-height: 88px;
  }

  .thalaxo-single-article .thalaxo-related-thumb img {
    min-height: 88px;
  }

  .thalaxo-single-article .thalaxo-related-card-title {
    display: flex;
    flex: 1;
    align-items: center;
    padding: 0.65rem 0.85rem;
    font-size: 0.875rem;
    line-height: 1.35;
  }

  .thalaxo-single-article .thalaxo-related-card-title a {
    -webkit-line-clamp: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thalaxo-single-article .thalaxo-related-thumb img {
    transition: none !important;
  }
}
