/* ══════════════════════════════════════════════════════════════
   article.css — culotte-salie.fr/blog/
   Chargé via $extra_css = "/blog/article.css" sur chaque article.
   Utilise les variables CSS de header.php :
     --color-primary   #7B2D42
     --color-accent    #A0394E
     --color-secondary #F5EDE8
     --font-title      'Playfair Display', serif
     --font-body       'Lato', sans-serif
     --shadow-soft     (défini dans header.php)
     --shadow-medium   (défini dans header.php)
══════════════════════════════════════════════════════════════ */

/* ── HERO ARTICLE ─────────────────────────────────────────── */
.article-hero {
  background: #1A1A1A;
  padding: 5rem 2rem 4rem;
  text-align: left;
  border-top: 6px solid #7B2D42;
  position: relative;
  overflow: hidden;
}

.article-hero::before {
  content: '';
  display: block;
  width: 80px;
  height: 2px;
  background: #fff;
  margin-bottom: 1.5rem;
}
.article-hero::after {
  display: none;
}

.article-hero h1 {
  font-family: var(--font-title, 'Playfair Display', serif);
  color: #fff;
  font-size: 3rem;
  max-width: 860px;
  margin: 0 0 1rem;
  line-height: 1.25;
  text-align: left;
}

.article-hero-sub {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.1rem;
  max-width: 680px;
  margin: 0;
  line-height: 1.65;
}

/* ── META BADGES ──────────────────────────────────────────── */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.article-meta span {
  color: #999;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ── LAYOUT CORPS + SIDEBAR ───────────────────────────────── */
.article-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
  overflow-x: hidden;
}

.article-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── CARTE PRINCIPALE ─────────────────────────────────────── */
.article-body {
  background: transparent;
  padding: 2.5rem 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.article-section {
  margin-bottom: 2.5rem;
}

.article-section h2 {
  font-family: var(--font-title, 'Playfair Display', serif);
  font-size: 1.75rem;
  color: #1A1A1A;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  padding-left: 1rem;
  border-left: 3px solid #7B2D42;
  line-height: 1.3;
}

.article-section h2::after {
  display: none;
}

.article-section p:first-of-type::first-letter {
  font-family: var(--font-title, 'Playfair Display', serif);
  font-size: 4rem;
  color: #7B2D42;
  float: left;
  line-height: 0.8;
  margin: 0.1em 0.1em 0 0;
}

.article-pullquote {
  border-top: 2px solid #1A1A1A;
  border-bottom: 2px solid #1A1A1A;
  padding: 1.5rem 0;
  margin: 2rem 0;
  font-family: var(--font-title, 'Playfair Display', serif);
  font-style: italic;
  font-size: 1.4rem;
  text-align: center;
  color: #1A1A1A;
  line-height: 1.5;
}

/* ── SOMMAIRE HORIZONTAL ─────────────────────────────────── */
.article-toc {
  background: #F5F5F5;
  border-left: 4px solid #7B2D42;
  padding: 1.2rem 1.8rem;
  margin-bottom: 2.5rem;
  order: -1;
}

.article-toc .toc-title {
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #999;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.article-toc ol {
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin: 0;
  list-style: none;
  counter-reset: toc-counter;
}

.article-toc ol li {
  counter-increment: toc-counter;
}

.article-toc a {
  color: #1A1A1A;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  line-height: 1.45;
  transition: color 0.18s ease;
}

.article-toc a:hover {
  color: #7B2D42;
}

/* ── LISTE À PUCES ────────────────────────────────────────── */
.article-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.article-list li {
  padding: 0.7rem 0 0.7rem 1.5rem;
  border-bottom: 1px solid #E0E0E0;
  font-size: 0.95rem;
  line-height: 1.6;
  position: relative;
}

.article-list li::before {
  content: '\2014';
  color: #7B2D42;
  position: absolute;
  left: 0;
  font-weight: 700;
}

.article-list li strong {
  color: var(--color-primary, #7B2D42);
}

/* ── IMAGES ───────────────────────────────────────────────── */
img {
  max-width: 100%;
  height: auto;
}

.article-figure {
  margin: 2rem -2rem;
  overflow: hidden;
}

.article-figure img {
  width: 100%;
  display: block;
  height: auto;
  object-fit: contain;
  filter: grayscale(20%);
}

.article-figure figcaption {
  padding: 0.75rem 1.2rem;
  font-size: 0.85rem;
  color: #6B4A52;
  font-style: italic;
  text-align: center;
  line-height: 1.5;
}

.article-figures-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 1.5rem 0;
}

/* ── TABLEAU ──────────────────────────────────────────────── */
.article-table-wrap {
  overflow-x: auto;
  border-radius: 4px;
  box-shadow: var(--shadow-soft, 0 2px 16px rgba(123, 45, 66, 0.07));
  margin: 1.5rem 0;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.article-table thead tr {
  border-top: 2px solid #1A1A1A;
  border-bottom: 2px solid #1A1A1A;
}

.article-table th {
  padding: 0.85rem 1.2rem;
  text-align: left;
  font-family: var(--font-title, 'Playfair Display', serif);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1A1A1A;
  background: transparent;
  white-space: nowrap;
}

.article-table td {
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid #F0E4E8;
  overflow-wrap: break-word;
  word-break: break-word;
}

.article-table tbody tr:nth-child(even) {
  background: var(--color-secondary, #F5EDE8);
}

.article-table tbody tr:hover {
  background: #F0E4E8;
}

/* ── CTA BLOCK ────────────────────────────────────────────── */
.article-cta {
  background: #1A1A1A;
  border-left: 6px solid #7B2D42;
  padding: 2.5rem 2rem;
  text-align: left;
  margin: 2.5rem 0;
}

.article-cta h2 {
  font-family: var(--font-title, 'Playfair Display', serif);
  color: #fff;
  border: none;
  margin-bottom: 0.8rem;
  font-size: 1.8rem;
  line-height: 1.25;
}

.article-cta h2::after { display: none; }

.article-cta p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 520px;
  margin: 0 0 1.6rem;
  line-height: 1.65;
}

.article-cta .btn-cta,
.article-cta a.btn-cta {
  display: inline-block;
  background: transparent;
  color: #fff;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-weight: 800;
  font-size: 1rem;
  padding: 0.9rem 2.2rem;
  border: 2px solid #fff;
  border-radius: 0;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.article-cta .btn-cta:hover,
.article-cta .btn-cta:focus,
.article-cta a.btn-cta:hover,
.article-cta a.btn-cta:focus {
  background: #fff;
  color: #1A1A1A;
  outline: none;
}

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.faq-item {
  border: none;
}

.faq-item summary {
  background: transparent;
  padding: 1.2rem 0;
  border-bottom: 1px solid #E0E0E0;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-weight: 700;
  color: #2A1A1F;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  list-style: none;
  transition: color 0.18s ease;
  line-height: 1.5;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '▸';
  color: var(--color-primary, #7B2D42);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.faq-item details[open] > summary::after,
.faq-item[open] > summary::after {
  content: '▾';
}

.faq-item summary:hover {
  color: #7B2D42;
}

.faq-answer {
  padding: 1rem 1.3rem;
  color: #6B4A52;
  line-height: 1.7;
  font-size: 0.95rem;
  border-top: 1px dashed rgba(123, 45, 66, 0.2);
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ── NOTE / ENCART ────────────────────────────────────────── */
.article-note {
  background: transparent;
  border-left: 3px solid #7B2D42;
  padding: 1rem 1.4rem;
  font-size: 0.95rem;
  font-style: italic;
  color: #6B4A52;
  margin: 1.2rem 0;
  line-height: 1.65;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ── PROSE GÉNÉRALE ───────────────────────────────────────── */
.article-body p,
.article-body li,
.article-body td {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */

/* Tablet / narrow desktop ─────────────────────────────── */
@media (max-width: 980px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-toc {
    order: -1;
  }

  .article-body {
    padding: 2rem 0;
  }
}

/* Mobile ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .article-hero {
    padding: 3rem 1.5rem 2.5rem;
  }

  .article-hero h1 {
    font-size: 2rem;
  }

  .article-shell {
    padding: 2rem 1rem 3rem;
  }

  .article-body {
    padding: 1.5rem 0;
  }

  .article-figure {
    margin: 2rem -1rem;
  }

  .article-section p:first-of-type::first-letter {
    font-size: 3rem;
  }

  .article-section h2 {
    font-size: 1.4rem;
  }

  .article-figures-grid {
    grid-template-columns: 1fr;
  }

  .article-toc ol {
    flex-direction: column;
    gap: 0.3rem;
  }

  .article-cta {
    padding: 2rem 1.2rem;
  }

  .article-cta h2 {
    font-size: 1.45rem;
  }
}
