/* =============================================
 * AME Custom Theme - blog.css
 * Blog listing, single post with sidebar, TOC,
 * author card, share buttons, related posts.
 * Version: 1.3.0
 * ============================================= */


/* ─────────────────────────────────────────────
 * BLOG HEADER (archive / search)
 * ───────────────────────────────────────────── */
.blog-header {
  background: var(--ame-fond-clair);
  padding: calc(var(--topbar-height) + var(--header-height) + 48px) 40px 48px;
}

.blog-header .section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.blog-header__title {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--ame-bleu-nuit);
  margin-bottom: 12px;
}

.blog-header .section-label {
  display: block;
  margin-bottom: 12px;
}

.blog-header .section-sub {
  margin-bottom: 0;
}


/* ─────────────────────────────────────────────
 * BLOG HEADER — gradient variant (archive v2)
 * ───────────────────────────────────────────── */
.blog-header--gradient {
  background: linear-gradient(135deg, var(--ame-bleu-nuit) 0%, #2a3168 100%);
  padding: calc(var(--topbar-height) + var(--header-height)) 40px 28px;
  text-align: center;
}

.blog-header--gradient .section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.blog-header--gradient .section-label--lime {
  display: block;
  color: var(--ame-lime);
  margin-bottom: 12px;
}

.blog-header--gradient .highlight {
  background: linear-gradient(transparent 50%, rgba(193, 255, 114, 0.3) 50%);
}

.blog-header__title--white {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--ame-blanc);
  margin-bottom: 12px;
}

.blog-header__sub {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0;
}


/* ─────────────────────────────────────────────
 * CATEGORY FILTER TABS
 * ───────────────────────────────────────────── */
.category-tabs {
  background: var(--ame-blanc);
  border-bottom: 1px solid var(--ame-border);
}

.category-tabs__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 40px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.category-tabs__tab {
  padding: 6px 16px;
  background: #f0eef5;
  color: var(--ame-bleu-nuit);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.category-tabs__tab:hover {
  background: var(--ame-lavande-clair);
}

.category-tabs__tab--active {
  background: var(--ame-bleu-nuit);
  color: var(--ame-blanc);
  font-weight: 600;
}

.category-tabs__tab--active:hover {
  background: var(--ame-bleu-nuit);
}

.category-tabs__count {
  color: var(--ame-lavande);
  font-size: 11px;
  margin-left: 2px;
}

.category-tabs__tab--active .category-tabs__count {
  color: rgba(255, 255, 255, 0.6);
}


/* ─────────────────────────────────────────────
 * FEATURED ARTICLE (blog home, page 1)
 * ───────────────────────────────────────────── */
.featured-article {
  background: var(--ame-blanc);
  padding: 28px 0 0;
}

.featured-article .section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.featured-article__card {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  background: var(--ame-blanc);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--ame-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s var(--ease-out);
}

.featured-article__card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.featured-article__image {
  overflow: hidden;
}

.featured-article__img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.featured-article__card:hover .featured-article__img {
  transform: scale(1.03);
}

.featured-article__img--fallback {
  background: var(--ame-fond-clair);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
}

.featured-article__body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-article__title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ame-bleu-nuit);
  margin-bottom: 10px;
}

.featured-article__excerpt {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 14px;
}

.featured-article__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #999;
}


/* ─────────────────────────────────────────────
 * INLINE CTA BANNER (between grid rows)
 * ───────────────────────────────────────────── */
.blog-cta-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--ame-bleu-nuit) 0%, #2a3168 100%);
  border-radius: var(--radius-md);
  padding: 20px 28px;
  margin: 24px 0;
  box-shadow: 0 2px 12px rgba(28, 33, 67, 0.15);
}

.blog-cta-inline__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ame-blanc);
  margin-bottom: 4px;
}

.blog-cta-inline__desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.blog-cta-inline__desc strong {
  color: var(--ame-lime);
  font-weight: 600;
}

.blog-cta-inline__btn {
  flex-shrink: 0;
  padding: 10px 22px;
  background: var(--ame-lime);
  color: var(--ame-bleu-nuit);
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.blog-cta-inline__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(193, 255, 114, 0.3);
}


/* ─────────────────────────────────────────────
 * SEARCH FORM INLINE (search.php)
 * ───────────────────────────────────────────── */
.search-form-inline {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  max-width: 560px;
}

.search-form-inline input[type="search"] {
  flex: 1;
  padding: 12px 20px;
  font-size: 15px;
  background: var(--ame-blanc);
  border: 1px solid var(--ame-border);
  border-radius: var(--radius-pill);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form-inline input[type="search"]:focus {
  border-color: var(--ame-lavande);
  box-shadow: 0 0 0 3px rgba(153, 143, 199, 0.15);
}

.search-form-inline__btn {
  flex-shrink: 0;
  gap: 6px;
}


/* ─────────────────────────────────────────────
 * BLOG GRID (archive + search)
 * ───────────────────────────────────────────── */
.blog-listing {
  background: var(--ame-blanc);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}


/* ─────────────────────────────────────────────
 * BLOG CARD (archive, search, related)
 * ───────────────────────────────────────────── */
.blog-card {
  background: var(--ame-blanc);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--ame-border);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.blog-card__image {
  display: block;
  height: 200px;
  overflow: hidden;
}

.blog-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.blog-card:hover .blog-card__img {
  transform: scale(1.05);
}

.blog-card__body {
  padding: 24px;
}

/* Tag badge (shared) */
.blog-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #ece6fc;
  color: var(--ame-bleu-nuit);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
  transition: background 0.2s ease;
}

.blog-tag:hover {
  background: var(--ame-lavande-clair);
}

.blog-tag--page {
  background: var(--ame-fond-clair);
}

.blog-card__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--ame-bleu-nuit);
}

.blog-card__title a {
  transition: color 0.2s ease;
}

.blog-card__title a:hover {
  color: var(--ame-lavande);
}

.blog-card__excerpt {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}


/* ─────────────────────────────────────────────
 * PAGINATION
 * ───────────────────────────────────────────── */
.blog-pagination {
  margin-top: 48px;
  text-align: center;
}

.blog-pagination .nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ame-bleu-nuit);
  background: var(--ame-blanc);
  border: 1px solid var(--ame-border);
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.blog-pagination a.page-numbers:hover {
  background: var(--ame-fond-clair);
  border-color: var(--ame-lavande-clair);
}

.blog-pagination .page-numbers.current {
  background: var(--ame-lavande);
  border-color: var(--ame-lavande);
  color: var(--ame-blanc);
}

.blog-pagination .page-numbers.dots {
  border: none;
  background: none;
  color: #888;
  min-width: auto;
  padding: 0 4px;
}

.blog-pagination .prev,
.blog-pagination .next {
  font-weight: 600;
  padding: 0 16px;
}


/* ─────────────────────────────────────────────
 * BLOG EMPTY STATE
 * ───────────────────────────────────────────── */
.blog-empty {
  text-align: center;
  padding: 60px 20px;
}

.blog-empty__icon {
  margin-bottom: 20px;
}

.blog-empty h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--ame-bleu-nuit);
  margin-bottom: 12px;
}

.blog-empty p {
  font-size: 16px;
  color: #666;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 28px;
}

.blog-empty__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}


/* ─────────────────────────────────────────────
 * ARCHIVE MOBILE RESPONSIVE
 * ───────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Header */
  .blog-header--gradient {
    padding: calc(var(--topbar-height) + var(--header-height) + 24px) 16px 20px;
  }

  .blog-header__title--white {
    font-size: 24px;
  }

  .blog-header__sub {
    font-size: 14px;
  }

  /* Category tabs: horizontal scroll */
  .category-tabs__inner {
    padding: 10px 16px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .category-tabs__inner::-webkit-scrollbar {
    display: none;
  }

  .category-tabs__tab {
    font-size: 12px;
    padding: 5px 12px;
  }

  /* Featured: stacked */
  .featured-article .section-inner {
    padding: 0 16px;
  }

  .featured-article__card {
    grid-template-columns: 1fr;
  }

  .featured-article__img {
    min-height: 180px;
    max-height: 200px;
  }

  .featured-article__body {
    padding: 16px;
  }

  .featured-article__title {
    font-size: 18px;
  }

  /* Grid: single column, horizontal cards */
  .blog-listing .section-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .blog-card {
    display: flex;
    flex-direction: row;
  }

  .blog-card__image {
    width: 110px;
    height: auto;
    flex-shrink: 0;
  }

  .blog-card__img {
    height: 100%;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  }

  .blog-card__body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .blog-card__title {
    font-size: 14px;
  }

  .blog-card__excerpt {
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* CTA inline: stacked */
  .blog-cta-inline {
    flex-direction: column;
    text-align: center;
    padding: 16px;
    gap: 12px;
  }

  .blog-cta-inline__title {
    font-size: 15px;
  }

  .blog-cta-inline__desc {
    font-size: 12px;
  }

  /* Pagination */
  .blog-pagination .page-numbers {
    min-width: 34px;
    height: 34px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .blog-card__image {
    width: 90px;
  }

  .blog-card__title {
    font-size: 13px;
  }

  .blog-card__excerpt {
    display: none;
  }
}


/* =============================================
 * SINGLE POST
 * ============================================= */

/* ─────────────────────────────────────────────
 * 1. SINGLE POST HEADER
 * ───────────────────────────────────────────── */
.single-post__header {
  background: var(--ame-fond-clair);
  padding: calc(var(--topbar-height) + var(--header-height) + 20px) 40px 40px;
}

.single-post__header-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

/* Breadcrumb */
.single-post__header .breadcrumb {
  margin-bottom: 24px;
}

.single-post__header .breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.single-post__header .breadcrumb__item {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  line-height: 1.4;
}

.single-post__header .breadcrumb__item a {
  color: var(--ame-lavande);
  transition: color 0.2s ease;
}

.single-post__header .breadcrumb__item a:hover {
  color: var(--ame-bleu-nuit);
}

.single-post__header .breadcrumb__sep {
  margin: 0 8px;
  color: #ccc;
  font-size: 11px;
}

.single-post__header .breadcrumb__item--current span[aria-current] {
  color: var(--ame-bleu-nuit);
  font-weight: 600;
}

/* Category badge */
.single-post__category-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--ame-lavande-clair);
  color: var(--ame-bleu-nuit);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
  transition: background 0.2s ease;
}

.single-post__category-badge:hover {
  background: #c8b6f8;
}

/* Title */
.single-post__title {
  font-size: 40px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.5px;
  color: var(--ame-bleu-nuit);
  margin-bottom: 20px;
}

/* Meta */
.single-post__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ame-lavande);
}

.single-post__meta strong {
  color: var(--ame-bleu-nuit);
  font-weight: 700;
}

.single-post__meta-sep {
  font-size: 16px;
  opacity: 0.5;
}


/* ─────────────────────────────────────────────
 * 2. FEATURED IMAGE
 * ───────────────────────────────────────────── */
.single-post__image {
  max-width: 1000px;
  margin: -20px auto 0;
  padding: 0 40px;
}

.single-post__featured-img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

.single-post__featured-img--fallback {
  background: var(--ame-fond-clair);
  border: 1px solid var(--ame-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
}


/* ─────────────────────────────────────────────
 * 3. MAIN LAYOUT: 2-column grid
 * ───────────────────────────────────────────── */
.single-post__layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 0 40px 60px;
}


/* ─────────────────────────────────────────────
 * 4. ARTICLE CONTENT (left column)
 * ───────────────────────────────────────────── */

/* Prose typography */
.article-prose h2 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ame-bleu-nuit);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ame-lavande-clair);
}

.article-prose h2:first-child {
  margin-top: 0;
}

.article-prose h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ame-bleu-nuit);
  margin-top: 36px;
  margin-bottom: 12px;
}

.article-prose h4 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ame-bleu-nuit);
  margin-top: 28px;
  margin-bottom: 10px;
}

.article-prose p {
  font-size: 17px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 20px;
}

.article-prose strong {
  font-weight: 700;
  color: var(--ame-bleu-nuit);
}

.article-prose a {
  color: var(--ame-lavande);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.article-prose a:hover {
  color: var(--ame-bleu-nuit);
}

.article-prose blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  background: var(--ame-fond-card);
  border-left: 4px solid var(--ame-lime);
  border-radius: 0 12px 12px 0;
  font-size: 16px;
  font-style: italic;
  line-height: 1.7;
  color: #555;
}

.article-prose blockquote p {
  margin-bottom: 0;
}

.article-prose blockquote p + p {
  margin-top: 12px;
}

.article-prose ul,
.article-prose ol {
  margin: 0 0 24px 0;
  padding-left: 0;
  font-size: 16px;
  line-height: 1.8;
}

.article-prose ul {
  list-style: none;
}

.article-prose ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  color: #444;
}

.article-prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--ame-lime);
  border-radius: 50%;
}

.article-prose ol {
  list-style: none;
  counter-reset: ol-counter;
}

.article-prose ol li {
  position: relative;
  padding-left: 36px;
  margin-bottom: 10px;
  color: #444;
  counter-increment: ol-counter;
}

.article-prose ol li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ame-fond-clair);
  color: var(--ame-bleu-nuit);
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
}

.article-prose img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 24px 0;
}

.article-prose figure {
  margin: 32px 0;
}

.article-prose figcaption {
  font-size: 13px;
  color: #888;
  text-align: center;
  margin-top: 8px;
}

.article-prose .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
  border-radius: var(--radius-md);
}

.article-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-width: 480px;
}

.article-prose table th,
.article-prose table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--ame-border);
}

.article-prose table th {
  background: var(--ame-fond-clair);
  font-weight: 700;
  color: var(--ame-bleu-nuit);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-prose table td {
  color: #444;
}

.article-prose table tr:hover td {
  background: var(--ame-fond-clair);
}

.article-prose code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 14px;
  background: var(--ame-fond-clair);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ame-bleu-nuit);
}

.article-prose pre {
  background: var(--ame-bleu-nuit);
  color: #e0e0e0;
  padding: 24px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 24px 0;
  font-size: 14px;
  line-height: 1.6;
}

.article-prose pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-size: inherit;
}

.article-prose hr {
  border: none;
  height: 1px;
  background: var(--ame-border);
  margin: 40px 0;
}


/* ─────────────────────────────────────────────
 * AUTHOR CARD
 * ───────────────────────────────────────────── */
.author-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 48px;
  padding: 28px;
  background: var(--ame-fond-card);
  border: 1px solid var(--ame-border);
  border-radius: var(--radius-md);
}

.author-card__avatar {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ame-lavande-clair), var(--ame-lavande));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ame-blanc);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
}

.author-card__info {
  flex: 1;
  min-width: 0;
}

.author-card__name {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--ame-bleu-nuit);
  margin-bottom: 2px;
}

.author-card__role {
  display: block;
  font-size: 14px;
  color: var(--ame-lavande);
  margin-bottom: 10px;
}

.author-card__bio {
  font-size: 14px;
  line-height: 1.7;
  color: #666;
  margin: 0;
}


/* ─────────────────────────────────────────────
 * POST TAGS
 * ───────────────────────────────────────────── */
.single-post__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--ame-border);
}

.single-post__tag-link {
  display: inline-block;
  padding: 6px 14px;
  background: var(--ame-fond-card);
  color: #666;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #e8e2f5;
  border-radius: var(--radius-pill);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.single-post__tag-link:hover {
  background: var(--ame-lavande-clair);
  color: var(--ame-bleu-nuit);
  border-color: var(--ame-lavande-clair);
}


/* ─────────────────────────────────────────────
 * 5. STICKY SIDEBAR
 * ───────────────────────────────────────────── */
.single-post__sidebar {
  min-width: 0;
}

.sidebar-sticky {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}


/* ── 5a. Table of Contents Card ── */
.toc-card {
  background: var(--ame-fond-card);
  border: 1px solid var(--ame-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.toc-card__progress {
  height: 4px;
  background: var(--ame-fond-clair);
  position: relative;
}

.toc-card__progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--ame-lime), var(--ame-lavande));
  border-radius: 0 2px 2px 0;
  transition: width 0.15s ease-out;
}

.toc-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
}

.toc-card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ame-bleu-nuit);
}

.toc-card__pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--ame-lavande);
  font-variant-numeric: tabular-nums;
}

.toc-card__list {
  list-style: none;
  padding: 0 20px 16px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-card__list li {
  position: relative;
}

.toc-card__list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
  line-height: 1.4;
  color: #666;
  transition: color 0.2s ease;
}

.toc-card__list a::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ame-lavande-clair);
  transition: background 0.2s ease, transform 0.2s var(--ease-out);
}

.toc-card__list a:hover {
  color: var(--ame-bleu-nuit);
}

.toc-card__list a:hover::before {
  background: var(--ame-lavande);
}

.toc-card__list a.active {
  color: var(--ame-bleu-nuit);
  font-weight: 600;
}

.toc-card__list a.active::before {
  background: var(--ame-lime);
  transform: scale(1.3);
}


/* ── 5b. CTA Devis Card ── */
.sidebar-cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1C2143 0%, #2a3065 100%);
  border-radius: var(--radius-md);
  padding: 24px;
}

.sidebar-cta__orb {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(193, 255, 114, 0.15), transparent 70%);
  pointer-events: none;
}

.sidebar-cta__content {
  position: relative;
  z-index: 1;
}

.sidebar-cta__title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ame-blanc);
  margin: 0 0 8px;
  line-height: 1.3;
}

.sidebar-cta__highlight {
  position: relative;
  display: inline;
}

.sidebar-cta__highlight::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0;
  height: 40%;
  background: rgba(193, 255, 114, 0.25);
  border-radius: 2px;
  z-index: -1;
}

.sidebar-cta__desc {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 20px;
}

.sidebar-cta__btn {
  display: block;
  width: 100%;
  padding: 12px 20px;
  background: var(--ame-lime);
  color: var(--ame-bleu-nuit);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease;
  margin-bottom: 10px;
}

.sidebar-cta__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(193, 255, 114, 0.3);
}

.sidebar-cta__phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--ame-blanc);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.2s ease;
}

.sidebar-cta__phone svg {
  flex-shrink: 0;
}

.sidebar-cta__phone:hover {
  background: rgba(255, 255, 255, 0.2);
}


/* ── 5c. Share Buttons ── */
.share-card {
  background: var(--ame-fond-card);
  border: 1px solid var(--ame-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.share-card__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  margin-bottom: 12px;
}

.share-card__buttons {
  display: flex;
  gap: 8px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  color: var(--ame-blanc);
  transition: transform 0.2s var(--ease-out), opacity 0.2s ease;
}

.share-btn:hover {
  transform: scale(1.1);
}

.share-btn--facebook {
  background: #1877f2;
}

.share-btn--x {
  background: #1a1a1a;
}

.share-btn--linkedin {
  background: #0a66c2;
}

.share-btn--whatsapp {
  background: #25d366;
}

.share-btn--copy {
  background: #e8e2f5;
  color: var(--ame-bleu-nuit);
}

.share-btn--copy.copied {
  background: var(--ame-lime);
}


/* ─────────────────────────────────────────────
 * 6. RELATED POSTS
 * ───────────────────────────────────────────── */
.related-posts {
  background: var(--ame-fond-clair);
}

.related-posts .section-label {
  display: block;
  color: var(--ame-lavande);
}

.related-posts .section-title {
  margin-bottom: 32px;
}


/* =============================================
 * RESPONSIVE - TABLET (max-width: 1024px)
 * ============================================= */
@media (max-width: 1024px) {

  /* Blog header */
  .blog-header {
    padding: calc(var(--topbar-height) + var(--header-height) + 40px) 24px 40px;
  }

  .blog-header__title {
    font-size: 34px;
  }

  /* Grid: 2 columns */
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Single post header */
  .single-post__header {
    padding: calc(var(--topbar-height) + var(--header-height) + 40px) 24px 40px;
  }

  .single-post__title {
    font-size: 32px;
  }

  .single-post__image {
    padding: 0 24px;
  }

  /* Layout: sidebar hides, content goes full width */
  .single-post__layout {
    grid-template-columns: 1fr;
    max-width: 800px;
    padding: 0 24px 48px;
    gap: 0;
  }

  .single-post__sidebar {
    display: none;
  }
}


/* =============================================
 * RESPONSIVE - MOBILE (max-width: 767px)
 * ============================================= */
@media (max-width: 767px) {

  /* Blog header */
  .blog-header {
    padding: calc(var(--topbar-height) + var(--header-height) + 32px) 16px 32px;
  }

  .blog-header__title {
    font-size: 26px;
    letter-spacing: -0.3px;
  }

  /* Search form stacks */
  .search-form-inline {
    flex-direction: column;
    max-width: 100%;
  }

  .search-form-inline__btn {
    width: 100%;
    justify-content: center;
  }

  /* Grid: 1 column */
  .blog-grid {
    grid-template-columns: 1fr;
  }

  /* Card image shorter */
  .blog-card__image {
    height: 180px;
  }

  .blog-card__body {
    padding: 20px;
  }

  .blog-card__title {
    font-size: 16px;
  }

  /* Pagination */
  .blog-pagination {
    margin-top: 32px;
  }

  .blog-pagination .page-numbers {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .blog-pagination .prev,
  .blog-pagination .next {
    padding: 0 12px;
  }

  /* Empty state */
  .blog-empty {
    padding: 40px 16px;
  }

  .blog-empty__actions {
    flex-direction: column;
  }

  .blog-empty__actions .btn-secondary,
  .blog-empty__actions .btn-lime {
    width: 100%;
    justify-content: center;
  }

  /* Single post header */
  .single-post__header {
    padding: calc(var(--topbar-height) + var(--header-height) + 24px) 16px 28px;
  }

  .single-post__title {
    font-size: 28px;
    letter-spacing: -0.3px;
  }

  .single-post__meta {
    font-size: 13px;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Featured image */
  .single-post__image {
    padding: 0 16px;
    margin-top: -12px;
  }

  .single-post__featured-img {
    height: 250px;
    border-radius: var(--radius-md);
  }

  /* Layout */
  .single-post__layout {
    grid-template-columns: 1fr;
    padding: 0 16px 40px;
    margin-top: 28px;
    gap: 0;
  }

  .single-post__sidebar {
    display: none;
  }

  /* Prose */
  .article-prose h2 {
    font-size: 22px;
    margin-top: 32px;
  }

  .article-prose h3 {
    font-size: 18px;
    margin-top: 24px;
  }

  .article-prose h4 {
    font-size: 16px;
  }

  .article-prose p {
    font-size: 15px;
    line-height: 1.75;
  }

  .article-prose blockquote {
    padding: 16px 20px;
    margin: 24px 0;
  }

  .article-prose pre {
    padding: 16px;
    font-size: 13px;
  }

  .article-prose table {
    font-size: 13px;
  }

  .article-prose table th,
  .article-prose table td {
    padding: 8px 12px;
  }

  /* Author card stacks */
  .author-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px;
  }

  /* Tags */
  .single-post__tags {
    justify-content: center;
  }

  /* Breadcrumb */
  .single-post__header .breadcrumb__item {
    font-size: 12px;
  }

  .single-post__header .breadcrumb__sep {
    margin: 0 6px;
  }

  /* Related posts */
  .blog-grid--related {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════
 * ARTICLE FAQ (converted from Elementor details)
 * ═══════════════════════════════════════════════ */
.article-faq {
  margin-top: 48px;
  padding: 40px;
  background: var(--ame-fond-clair);
  border-radius: var(--radius-lg);
}

.article-faq .section-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ame-lavande);
  margin-bottom: 8px;
}

.article-faq h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--ame-bleu-nuit);
  margin-bottom: 6px;
  padding-bottom: 0;
  border-bottom: none;
}

.article-faq__sub {
  font-size: 14px;
  color: #888;
  margin-bottom: 24px;
  line-height: 1.5;
}

.article-faq .faq-item {
  background: var(--ame-blanc);
  border: 1px solid var(--ame-border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.article-faq .faq-item:last-child {
  margin-bottom: 0;
}

.article-faq .faq-item:hover {
  border-color: var(--ame-lavande-clair);
}

.article-faq .faq-item.is-open {
  border-color: var(--ame-lavande);
  box-shadow: 0 2px 12px rgba(153, 143, 199, 0.1);
}

.article-faq .faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ame-bleu-nuit);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-align: left;
  font-family: inherit;
  line-height: 1.4;
}

.article-faq .faq-question:hover {
  color: var(--ame-lavande);
}

.article-faq .faq-plus {
  font-size: 18px;
  color: var(--ame-lavande);
  transition: transform 0.3s var(--ease-out);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0eef5;
  border-radius: 50%;
}

.article-faq .faq-item.is-open .faq-plus {
  transform: rotate(45deg);
  background: var(--ame-lavande);
  color: var(--ame-blanc);
}

.article-faq .faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease-out), padding 0.35s var(--ease-out);
  padding: 0 20px;
}

.article-faq .faq-item.is-open .faq-answer {
  max-height: 500px;
  padding: 0 20px 16px;
}

.article-faq .faq-answer p {
  font-size: 14px;
  line-height: 1.7;
  color: #555;
  margin-bottom: 10px;
}

.article-faq .faq-answer p:last-child {
  margin-bottom: 0;
}

/* FAQ mobile */
@media (max-width: 767px) {
  .article-faq {
    padding: 24px 16px;
    margin-top: 32px;
  }

  .article-faq h2 {
    font-size: 22px;
  }

  .article-faq .faq-question {
    padding: 14px 16px;
    font-size: 14px;
    gap: 12px;
  }

  .article-faq .faq-answer {
    padding: 0 16px;
  }

  .article-faq .faq-item.is-open .faq-answer {
    padding: 0 16px 14px;
  }

  .article-faq .faq-plus {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }
}
