/* ─────────────────────────────────────────────────────────────
   MidoGeek Zine — INNER PAGES STYLING
   S'applique aux single articles, pages fixes, archives, search.
   Scope explicite via body classes pour ne pas casser la home.
   ───────────────────────────────────────────────────────────── */

/* ─── HOME : neutralise les contraintes Astra qui squeezent le markup zine ──
   Approche : redéfinir les CSS vars Astra sur .home pour qu'elles deviennent
   inoffensives. Plus propre que de combattre rule par rule.
   - --wp--custom--ast-content-width-size : utilisé par .entry-content[data-ast-blocks-layout] > *
   - --wp--custom--ast-wide-width-size : pour les .alignwide
   - --ast-normal-container-width : pour .ast-container max-width
   On les passe à 100%/1400px pour libérer l'espace. */
.home {
  --wp--custom--ast-content-width-size: 100% !important;
  --wp--custom--ast-wide-width-size: 100% !important;
  --ast-normal-container-width: 100% !important;
  --wp--style--global--content-size: 100% !important;
  --wp--style--global--wide-size: 100% !important;
}

/* Force .ast-container plein-largeur sur la home (le Customizer impose 1240px) */
.home #content.site-content,
.home #content > .ast-container,
.home .ast-container {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  display: block !important;
}
.home #primary,
.home .ast-article-single,
.home .ast-article-post,
.home .site-main {
  padding: 0 !important;
  margin: 0 !important;
}
/* Force le 1400px centré sur .container (au cas où une autre rule l'override) */
.home .container {
  max-width: 1400px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ─── CONTAINER & SPACING ──────────────────────────────────── */
.single .ast-container,
body.page:not(.home) .ast-container,
.archive .ast-container,
.search .ast-container,
.error404 .ast-container {
  max-width: 1200px;
  padding-left: 24px;
  padding-right: 24px;
}

.single #content.site-content,
body.page:not(.home) #content.site-content,
.archive #content.site-content,
.search #content.site-content {
  padding-top: 56px;
  padding-bottom: 96px;
}

/* ─── TYPO HEADINGS (Instrument Serif) ──────────────────────── */
.single .entry-header .entry-title,
body.page:not(.home) .entry-header .entry-title,
.archive .ast-archive-description .ast-archive-title,
.search-no-results .page-title,
.error-404 .page-title {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
  font-size: clamp(40px, 6vw, 72px);
  margin-bottom: 28px;
}

.single .entry-content h1,
.single .entry-content h2,
.single .entry-content h3,
.single .entry-content h4,
body.page:not(.home) .entry-content h1,
body.page:not(.home) .entry-content h2,
body.page:not(.home) .entry-content h3,
body.page:not(.home) .entry-content h4 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.single .entry-content h2,
body.page:not(.home) .entry-content h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  line-height: 1.15;
}
.single .entry-content h3,
body.page:not(.home) .entry-content h3 {
  font-size: clamp(22px, 2.4vw, 28px);
  margin-top: 1.4em;
  margin-bottom: 0.4em;
  line-height: 1.2;
}
.single .entry-content h4,
body.page:not(.home) .entry-content h4 {
  font-size: 20px;
  margin-top: 1.3em;
  margin-bottom: 0.3em;
}

/* ─── ARCHIVE TITLE (page de catégorie) ─────────────────────── */
.archive .ast-archive-description {
  margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.archive .ast-archive-description::before {
  content: "◆ Rubrique";
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ramen);
  margin-bottom: 12px;
}
.archive .ast-archive-description p {
  font-family: var(--body);
  color: var(--ink-soft, #2A2A2E);
  font-size: 17px;
  line-height: 1.6;
  max-width: 720px;
  margin-top: 0;
}

/* ─── ENTRY META (date, auteur) ─────────────────────────────── */
.single .entry-meta,
.archive .entry-meta,
body.page:not(.home) .entry-meta {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted, #6B6860);
}
.single .entry-meta a,
.archive .entry-meta a,
body.page:not(.home) .entry-meta a {
  color: var(--muted, #6B6860);
  border-bottom: 1px dotted currentColor;
}
.single .entry-meta a:hover,
.archive .entry-meta a:hover {
  color: var(--ramen);
}

/* ─── BODY CONTENT (lecture confortable) ────────────────────── */
.single .entry-content,
body.page:not(.home) .entry-content {
  font-family: var(--body);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.7;
  max-width: 760px;
}
.single article > .entry-content {
  margin-left: auto;
  margin-right: auto;
}

.single .entry-content p,
body.page:not(.home) .entry-content p {
  margin-bottom: 1.2em;
}

.single .entry-content a,
body.page:not(.home) .entry-content a {
  color: var(--ramen);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.single .entry-content a:hover,
body.page:not(.home) .entry-content a:hover {
  color: var(--ramen-dark, #9D2A1F);
}

.single .entry-content strong,
body.page:not(.home) .entry-content strong {
  font-weight: 600;
  color: var(--ink);
}

/* Listes */
.single .entry-content ul,
.single .entry-content ol,
body.page:not(.home) .entry-content ul,
body.page:not(.home) .entry-content ol {
  margin: 1em 0 1.4em 1.5em;
  padding: 0;
}
.single .entry-content li,
body.page:not(.home) .entry-content li {
  margin-bottom: 0.5em;
}
.single .entry-content ul li::marker,
body.page:not(.home) .entry-content ul li::marker {
  color: var(--ramen);
}

/* Blockquote */
.single .entry-content blockquote,
body.page:not(.home) .entry-content blockquote {
  border-left: 3px solid var(--ramen);
  margin: 1.6em 0;
  padding: 0.5em 0 0.5em 1.5em;
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink-soft, #2A2A2E);
}
.single .entry-content blockquote p:last-child,
body.page:not(.home) .entry-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Code inline + pre */
.single .entry-content code,
body.page:not(.home) .entry-content code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: rgba(0,0,0,0.06);
  padding: 0.1em 0.4em;
  border-radius: 2px;
}
.single .entry-content pre,
body.page:not(.home) .entry-content pre {
  background: var(--ink);
  color: var(--bg);
  padding: 16px 20px;
  border-radius: 4px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
  margin: 1.4em 0;
}
.single .entry-content pre code,
body.page:not(.home) .entry-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Tableaux */
.single .entry-content table,
body.page:not(.home) .entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 15px;
}
.single .entry-content th,
.single .entry-content td,
body.page:not(.home) .entry-content th,
body.page:not(.home) .entry-content td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.single .entry-content th,
body.page:not(.home) .entry-content th {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0,0,0,0.04);
}

/* Featured image (single) */
.single .post-thumb-img-content img,
.single .wp-post-image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  margin-bottom: 32px;
  border-radius: 4px;
}

/* ─── ARCHIVE — cards style zine (on garde le layout flex Astra natif) ── */
.archive .ast-article-inner,
.blog .ast-article-inner {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin-bottom: 32px;
}
.archive .ast-article-inner:hover,
.blog .ast-article-inner:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

.archive .ast-blog-featured-section,
.blog .ast-blog-featured-section {
  margin: 0;
}
.archive .ast-blog-featured-section img,
.blog .ast-blog-featured-section img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.archive .ast-article-inner .entry-header,
.blog .ast-article-inner .entry-header {
  padding: 20px 24px 8px;
}
.archive .ast-article-inner .entry-title,
.blog .ast-article-inner .entry-title {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 8px;
  color: var(--ink);
}
.archive .ast-article-inner .entry-title a,
.blog .ast-article-inner .entry-title a {
  color: var(--ink);
}
.archive .ast-article-inner .entry-title a:hover,
.blog .ast-article-inner .entry-title a:hover {
  color: var(--ramen);
}
.archive .ast-article-inner .entry-meta,
.blog .ast-article-inner .entry-meta {
  font-size: 11px;
  margin-bottom: 0;
}
.archive .ast-article-inner .ast-excerpt-container,
.archive .ast-article-inner .entry-content,
.blog .ast-article-inner .ast-excerpt-container,
.blog .ast-article-inner .entry-content {
  padding: 0 24px 20px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft, #2A2A2E);
  font-family: var(--body);
  max-width: none;
}
.archive .ast-article-inner .read-more,
.blog .ast-article-inner .read-more {
  padding: 0 24px 24px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.archive .ast-article-inner .read-more a,
.blog .ast-article-inner .read-more a {
  color: var(--ramen);
}

/* ─── PAGINATION ARCHIVE ────────────────────────────────────── */
.archive .ast-pagination,
.blog .ast-pagination {
  margin-top: 48px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.archive .ast-pagination a,
.archive .ast-pagination span,
.blog .ast-pagination a,
.blog .ast-pagination span {
  padding: 8px 14px;
  border: 1px solid rgba(0,0,0,0.12);
  margin-right: 6px;
  color: var(--ink);
}
.archive .ast-pagination a:hover,
.blog .ast-pagination a:hover {
  border-color: var(--ramen);
  color: var(--ramen);
}
.archive .ast-pagination .current,
.blog .ast-pagination .current {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ─── COMMENTS (single) ─────────────────────────────────────── */
.single .comments-area {
  max-width: 760px;
  margin: 64px auto 0;
  padding-top: 32px;
  border-top: 2px solid rgba(0,0,0,0.08);
}
.single .comments-title,
.single .comment-reply-title {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 24px;
}

/* ─── 404 + SEARCH ─────────────────────────────────────────── */
.error404 .page-title,
.search-no-results .page-title {
  text-align: center;
}
.error404 .page-content,
.search-no-results .page-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

/* ─── MOBILE RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 921px) {
  /* Header zine compact */
  .brand-bar-inner {
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
    text-align: center;
  }
  .brand-center {
    font-size: 11px;
    line-height: 1.4;
  }
  .brand-actions {
    justify-content: center;
  }
  .main-nav-inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .main-nav-inner::-webkit-scrollbar { display: none; }
  .nav-list {
    flex-wrap: nowrap;
    white-space: nowrap;
    padding: 0 12px;
  }
  .nav-extras {
    display: none;
  }

  /* Footer cols */
  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }
  .footer-manifesto {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .footer-cols {
    grid-template-columns: 1fr;
  }
  .single #content.site-content,
  body.page:not(.home) #content.site-content,
  .archive #content.site-content {
    padding-top: 32px;
    padding-bottom: 56px;
  }
  .single .entry-content,
  body.page:not(.home) .entry-content {
    font-size: 17px;
  }
}
