/* ==========================================================================
   Wan Consult — Blog (archive + single)
   ========================================================================== */

/* ── Archive — Featured article ──────────────────────────────────────────── */
.blog-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 0;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  overflow: hidden;
  margin-bottom: var(--s-8);
}

.blog-featured__image {
  overflow: hidden;
  min-height: 320px;
}

.blog-featured__image img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.blog-featured:hover .blog-featured__image img {
  transform: scale(1.03);
}

.blog-featured__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--s-7) var(--s-7);
  gap: var(--s-3);
}

.blog-featured__cat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 500;
}

.blog-featured__title {
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
  margin: 0;
  max-width: 100%;
}

.blog-featured__meta {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 13px;
  color: var(--muted);
}

.blog-featured__meta span::before {
  content: '·';
  margin-right: var(--s-2);
}

.blog-featured__excerpt {
  font-size: 15px;
  color: var(--text-soft);
  margin: 0;
  max-width: 52ch;
}

/* ── Archive — Filters ───────────────────────────────────────────────────── */
.blog-filters {
  display: flex;
  gap: var(--s-3);
  align-items: center;
  margin-bottom: var(--s-7);
}

.blog-filters__search {
  position: relative;
  flex: 1;
  max-width: 480px;
}

.blog-filters__search input {
  width: 100%;
  padding: 12px var(--s-4) 12px 44px;
  border: 1px solid var(--rule);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.blog-filters__search input:focus {
  border-color: var(--ink-2);
}

.blog-filters__search input::placeholder {
  color: var(--muted);
}

.blog-filters__search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

.blog-filters__cat {
  position: relative;
}

.blog-filters__cat select {
  appearance: none;
  padding: 12px var(--s-6) 12px var(--s-4);
  border: 1px solid var(--rule);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  outline: none;
  min-width: 220px;
  transition: border-color 0.2s;
}

.blog-filters__cat select:focus {
  border-color: var(--ink-2);
}

.blog-filters__cat::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--muted);
  pointer-events: none;
}

/* ── Archive — Card grid ─────────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.blog-card:hover {
  box-shadow: 0 8px 32px rgba(21,43,59,0.10);
  transform: translateY(-2px);
}

.blog-card__thumbnail {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--paper-2);
}

.blog-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card__thumbnail img {
  transform: scale(1.04);
}

.blog-card__thumbnail--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16/10;
  background: var(--paper-2);
}

.blog-card__thumbnail--placeholder svg {
  color: var(--sand);
  width: 40px;
  height: 40px;
}

.blog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--s-4);
  gap: var(--s-1);
}

.blog-card__cat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 500;
}

.blog-card__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
  max-width: 100%;
}

.blog-card__excerpt {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0;
  padding-top: 0;
}

/* ── Archive — Pagination ────────────────────────────────────────────────── */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-8);
}

.blog-pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--rule);
  font-size: 14px;
  color: var(--text-soft);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.blog-pagination .page-numbers.dots {
  border: 0;
  width: auto;
  pointer-events: none;
}

/* ── Single — Layout ─────────────────────────────────────────────────────── */
.single-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--s-8);
  align-items: start;
}

/* ── Single — Hero image ─────────────────────────────────────────────────── */
.single-hero {
  aspect-ratio: 16/7;
  overflow: hidden;
  margin-bottom: var(--s-6);
}

.single-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Single — Header ─────────────────────────────────────────────────────── */
.single-header {
  margin-bottom: var(--s-5);
}

.single-header__cat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 500;
  display: block;
  margin-bottom: var(--s-3);
}

.single-header__title {
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 var(--s-4);
  max-width: 100%;
}

.single-meta {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  font-size: 13px;
  color: var(--muted);
  padding: var(--s-3) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}

.single-meta__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.single-meta__item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.single-meta__sep {
  width: 1px;
  height: 14px;
  background: var(--rule);
}

.single-meta__share {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  transition: color 0.2s;
  background: none;
  border: 1px solid var(--rule);
  padding: 6px 14px;
  font-family: var(--font-body);
}

.single-meta__share:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.single-meta__updated {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-top: var(--s-3);
  margin-bottom: var(--s-4);
}

/* ── Single — Content ────────────────────────────────────────────────────── */
.single-content {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
}

.single-content p,
.single-content li,
.single-content h2,
.single-content h3,
.single-content h4 {
  max-width: 100%;
}

.single-content p {
  margin-bottom: 1.5em;
}

/* ── Titres dans l'\''article ── */
.single-content h2 {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 400;
  color: var(--ink);
  margin: var(--s-7) 0 var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--rule);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.single-content h3 {
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 700;
  color: var(--ink);
  margin: var(--s-5) 0 var(--s-2);
  letter-spacing: 0.01em;
}

.single-content h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  margin: var(--s-4) 0 var(--s-2);
}

.single-content strong {
  font-weight: 700;
  color: var(--ink);
}

.single-content em {
  font-style: italic;
  color: var(--text-soft);
}

/* ── Listes ── */
.single-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  border-left: 2px solid var(--rule);
  padding-left: var(--s-4);
}

.single-content ol {
  padding-left: var(--s-5);
  margin-bottom: 1.5em;
}

.single-content li {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-soft);
}

.single-content ul li::before {
  content: none;
}

/* ── Citation ── */
.single-content blockquote {
  border-left: 3px solid var(--green);
  margin: var(--s-6) 0;
  padding: var(--s-4) var(--s-5);
  background: var(--green-50);
  font-size: 16px;
  font-style: normal;
  color: var(--ink);
  line-height: 1.65;
}

.single-content blockquote p {
  margin: 0;
  font-weight: 400;
}

/* ── Liens ── */
.single-content a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.single-content a:hover {
  color: var(--green-deep);
}

/* ── Image ── */
.single-content img {
  width: 100%;
  height: auto;
  display: block;
  margin: var(--s-6) 0;
}

/* ── Tableau par défaut ── */
.single-content table {
  width: 100%;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
  margin: var(--s-6) 0;
  border: 1px solid var(--rule);
}

.single-content thead th {
  background: var(--ink);
  color: #fff;
  padding: 11px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  border: none;
}

.single-content tbody tr:nth-child(even) td {
  background: var(--paper-2);
}

.single-content tbody tr:hover td {
  background: #eef4f1;
}

.single-content td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  vertical-align: top;
}

.single-content tbody tr:last-child td {
  border-bottom: none;
}

/* ── Séparateur ── */
.single-content hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: var(--s-7) 0;
}

/* ── Encart chiffre clé ── */
.single-content .stat-block {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--green);
  padding: var(--s-4) var(--s-5);
  margin: var(--s-5) 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.single-content .stat-block strong {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 300;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}

.single-content .stat-block span {
  font-size: 13px;
  color: var(--text-soft);
}

/* ── Single — Tableau comparatif (.erp-compare) ─────────────────────────── */
.erp-compare {
  width: 100%;
  border-collapse: collapse;
  margin: var(--s-6) 0;
  font-size: 14px;
  line-height: 1.5;
}

.erp-compare thead th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: left;
  border: none;
}

.erp-compare thead th:first-child {
  width: 15%;
  background: var(--ink);
  color: #fff;
}

.erp-compare thead th:nth-child(2) {
  width: 42%;
  background: #7a3800;
  color: #fff;
}

.erp-compare thead th:nth-child(3) {
  width: 43%;
  background: var(--green);
  color: #fff;
}

.erp-compare tbody td {
  padding: 11px 14px;
  vertical-align: top;
  border: none;
  border-bottom: 1px solid var(--rule);
}

.erp-compare tbody td:first-child {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  background: var(--paper-2);
}

.erp-compare tbody td:nth-child(2) {
  background: #fffbf5;
  color: #5c2c00;
}

.erp-compare tbody td:nth-child(3) {
  background: #f2faf5;
  color: #1a3d28;
}

.erp-compare tbody tr:last-child td {
  border-bottom: none;
}

@media (max-width: 640px) {
  .erp-compare { font-size: 12px; }
  .erp-compare thead th,
  .erp-compare tbody td { padding: 8px 10px; }
}

/* ── Single — CTA bottom ─────────────────────────────────────────────────── */
.single-cta {
  margin-top: var(--s-8);
  padding: var(--s-6);
  background: var(--ink);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.single-cta p {
  color: rgba(255,255,255,0.7);
  font-size: 15px;
  margin: 0;
  max-width: 52ch;
}

/* ── Single — Sidebar ────────────────────────────────────────────────────── */
.single-sidebar {
  position: sticky;
  top: calc(var(--header-h) + var(--s-5));
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.sidebar-widget {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: var(--s-4);
}

.sidebar-widget__title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--rule);
}

/* Sidebar — recent posts */
.sidebar-recent {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.sidebar-recent__item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--s-3);
  align-items: start;
  text-decoration: none;
  color: inherit;
}

.sidebar-recent__item:hover .sidebar-recent__post-title {
  color: var(--green);
}

.sidebar-recent__thumb {
  width: 72px;
  height: 52px;
  object-fit: cover;
  display: block;
  background: var(--paper-2);
  flex-shrink: 0;
}

.sidebar-recent__thumb--placeholder {
  width: 72px;
  height: 52px;
  background: var(--sand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-recent__post-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  transition: color 0.15s;
  display: block;
}

.sidebar-recent__date {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .single-layout {
    grid-template-columns: 1fr;
  }

  .single-sidebar {
    position: static;
  }

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

/* ==========================================================================
   Extracted inline styles — blog utility classes
   ========================================================================== */

/* Blog: featured image placeholder */
.blog-featured__image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-featured__image-placeholder i {
  color: var(--sand);
  width: 48px;
  height: 48px;
}

/* Blog: empty state */
.blog-empty {
  color: var(--text-soft);
  padding: var(--s-7) 0;
}

/* Blog: results count */
.blog-results-count {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
  align-self: center;
}
.blog-results-count a { color: var(--green); }

/* Single: CTA block text */
.single-cta .eyebrow { color: rgba(255,255,255,0.5); }
.single-cta h3 { color: #fff; margin: 0; }
.single-cta .btn-row { margin-top: var(--s-2); }

/* Sidebar placeholder icon */
.sidebar-recent__thumb--placeholder i {
  width: 20px;
  height: 20px;
  color: var(--sand);
}

@media (max-width: 768px) {
  .blog-featured {
    grid-template-columns: 1fr;
  }

  .blog-featured__image {
    aspect-ratio: 16/9;
  }

  .blog-featured__body {
    padding: var(--s-5) var(--s-4);
  }

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

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

  .blog-filters__search {
    max-width: 100%;
  }

  .blog-filters__cat select {
    min-width: 100%;
    width: 100%;
  }

  .single-meta {
    gap: var(--s-2);
  }

  .single-hero {
    aspect-ratio: 16/9;
  }
}
