/* ============================================
   ARTICLE CSS — Blog article template
   ============================================ */

/* ---- Barre de progression de lecture ---- */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ---- Breadcrumb ---- */
.breadcrumb-bar {
  background: var(--dark);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 11px 0;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover { color: rgba(255,255,255,0.8); }
.breadcrumb span:last-child { color: rgba(255,255,255,0.6); }
.breadcrumb-sep { color: rgba(255,255,255,0.2); }

/* ---- Article Hero ---- */
.article-hero {
  background: var(--dark);
  color: #fff;
  padding: 52px 30px 60px;
}
.article-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.article-tag {
  background: rgba(229,124,216,0.18);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid rgba(229,124,216,0.3);
}
.article-date,
.article-read-time,
.article-updated {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}
.article-updated { font-style: italic; }
.article-hero h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 18px;
  color: #fff;
  max-width: 780px;
  letter-spacing: -0.02em;
}
.article-intro {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.6);
  max-width: 680px;
  margin-bottom: 30px;
}
.article-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.article-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.article-author strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}
.article-author span {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}

/* ---- Sommaire mobile ---- */
.toc-mobile {
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: none;
}
.toc-mobile-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
  width: 100%;
  font-family: inherit;
}
.toc-chevron {
  margin-left: auto;
  transition: transform 0.25s;
}
.toc-mobile-toggle[aria-expanded="true"] .toc-chevron {
  transform: rotate(180deg);
}
.toc-mobile-nav {
  display: none;
  padding-bottom: 12px;
}
.toc-mobile-nav.open { display: block; }
.toc-mobile-nav a {
  display: block;
  padding: 6px 0 6px 14px;
  font-size: 0.83rem;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}
.toc-mobile-nav a:hover,
.toc-mobile-nav a.toc-active {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---- Image cover article ---- */
.article-cover-img {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 52px;
  background: #e8ddf0;
}

/* ---- Layout principal ---- */
.article-main {
  background: #fff;
  padding: 60px 30px 100px;
}
.article-layout {
  max-width: 860px;
  margin: 0 auto;
}

/* ---- Corps article ---- */
.article-body { min-width: 0; }

.article-body p a,
.article-body li a,
.article-body td a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.article-body p a:hover,
.article-body li a:hover,
.article-body td a:hover { color: var(--purple-mid); }

.article-body section { margin-bottom: 60px; }

.article-body h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 18px;
  margin-top: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.article-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
  margin-top: 34px;
  margin-bottom: 10px;
  letter-spacing: -0.005em;
}
.article-body p {
  font-size: 0.975rem;
  line-height: 1.85;
  color: #5a4a62;
  margin-bottom: 18px;
}
.article-body ul, .article-body ol {
  padding-left: 20px;
  margin-bottom: 18px;
}
.article-body li {
  font-size: 0.975rem;
  line-height: 1.75;
  color: #5a4a62;
  margin-bottom: 7px;
}
.article-body strong { color: var(--dark); font-weight: 600; }

/* ---- Callouts ---- */
.article-callout {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 10px;
  margin: 28px 0;
  font-size: 0.88rem;
  line-height: 1.65;
}
.article-callout-icon { flex-shrink: 0; margin-top: 1px; }
.article-callout--info    { background: #F0F6FF; border-left: 3px solid #4A90D9; color: #1a3a5c; }
.article-callout--info    .article-callout-icon { color: #4A90D9; }
.article-callout--tip     { background: #FFFBF0; border-left: 3px solid #E8A020; color: #4a3000; }
.article-callout--tip     .article-callout-icon { color: #E8A020; }
.article-callout--warning { background: #FFF6F0; border-left: 3px solid #D96B20; color: #4a2000; }
.article-callout--warning .article-callout-icon { color: #D96B20; }
.article-callout--success { background: #F0FAF4; border-left: 3px solid #1E7A4B; color: #0d3a22; }
.article-callout--success .article-callout-icon { color: #1E7A4B; }

/* ---- Tableau ---- */
.article-table-wrap {
  margin: 28px 0;
  border-radius: 12px;
  border: 1px solid #ede6f3;
  box-shadow: 0 4px 20px rgba(44,19,56,0.06);
  overflow: hidden;
}
.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.article-table thead tr {
  background: linear-gradient(135deg, #2C1338 0%, #3e1a52 100%);
}
.article-table th {
  color: rgba(255,255,255,0.7);
  padding: 14px 18px;
  text-align: left;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.article-table th:first-child { color: #fff; }
.article-table tbody tr { transition: background 0.15s; }
.article-table tbody tr:nth-child(even) td { background: #faf8fc; }
.article-table tbody tr:hover td { background: #f5eefb !important; }
.article-table td {
  padding: 14px 18px;
  border-top: 1px solid #f0ebf4;
  color: #5a4a62;
  vertical-align: middle;
  line-height: 1.5;
}
.article-table td:first-child {
  font-weight: 500;
  color: var(--dark);
}
.article-table-total td {
  background: #f2ecf9 !important;
  font-weight: 600;
  color: var(--dark);
  border-top: 2px solid #d8cceb;
  font-size: 0.9rem;
}
.article-table-highlight td {
  background: linear-gradient(90deg, #fdf0fb, #fce5f8) !important;
  color: var(--dark);
  font-weight: 600;
  font-size: 0.9rem;
}
.article-table-highlight td:last-child { color: var(--accent); }

/* ---- Steps ---- */
.article-steps {
  display: flex;
  flex-direction: column;
  margin: 24px 0;
  position: relative;
}
.article-steps::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 38px;
  bottom: 12px;
  width: 1px;
  background: var(--border);
}
.article-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 14px 0;
  position: relative;
}
.article-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--dark);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.article-step strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 3px;
}
.article-step p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ---- Criteria grid (Qualiopi) ---- */
.article-criteria-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}
.article-criterion {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid #ede8f2;
  transition: border-color 0.2s, background 0.2s;
}
.article-criterion:hover { border-color: var(--accent); background: #fdf7fc; }
.criterion-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--dark);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.article-criterion strong {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 3px;
}
.article-criterion p {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

/* ---- CTA badge ---- */
.article-cta-badge {
  display: inline-block;
  background: rgba(229,124,216,0.15);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 14px;
  border: 1px solid rgba(229,124,216,0.25);
}
.article-cta-badge--dark {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.2);
}

/* ---- CTA intermédiaire ---- */
.article-cta-block {
  background: var(--dark);
  border-radius: 14px;
  padding: 40px 38px;
  margin: 60px 0;
}
.article-cta-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.35;
  max-width: 540px;
  letter-spacing: -0.01em;
}
.article-cta-content p {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  margin-bottom: 26px;
  line-height: 1.7;
  max-width: 500px;
}
.article-cta-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
/* strong visible sur fond sombre */
.article-cta-block strong { color: #fff; }

/* Bouton secondaire sur fond sombre */
.article-cta-block .btn-secondary {
  border-color: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.85);
  background: transparent;
}
.article-cta-block .btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.article-cta-link {
  font-size: 0.87rem;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 0.2s;
}
.article-cta-link:hover { color: var(--accent); }

/* ---- CTA final ---- */
.article-cta-final {
  background: #fdf7fc;
  border-radius: 14px;
  padding: 40px 38px;
  margin: 60px 0 36px;
  border: 1px solid #f0d6ec;
}
.article-cta-final-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
}
.article-cta-final-text { flex: 1; min-width: 240px; }
.article-cta-final h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 10px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.article-cta-final p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 16px;
  line-height: 1.6;
}
.article-cta-proof {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.article-cta-proof span {
  font-size: 0.8rem;
  color: #1e7a4b;
  font-weight: 500;
}
.article-cta-final-btn { flex-shrink: 0; white-space: nowrap; }

/* ---- Partage ---- */
.article-share {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}
.article-share > span {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-family: inherit;
  transition: all 0.2s;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.share-linkedin:hover { background: #F0F6FF; border-color: #0077B5; color: #0077B5; }
.share-twitter:hover  { background: #F5F8FF; border-color: #1DA1F2; color: #1DA1F2; }
.share-copy.copied    { background: #F0FAF4; border-color: #1E7A4B; color: #1E7A4B; }

/* ---- FAQ dans article ---- */
.faq-list .faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  background: #fff;
}
.faq-list .faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark);
  text-align: left;
  gap: 12px;
  font-family: inherit;
  transition: background 0.15s;
}
.faq-list .faq-question:hover { background: #fdf9ff; }
.faq-chevron { flex-shrink: 0; transition: transform 0.25s; color: var(--muted); }
.faq-list .faq-item.active .faq-chevron { transform: rotate(180deg); }
.faq-list .faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-list .faq-answer p {
  padding: 0 20px 16px;
  margin: 0;
  font-size: 0.88rem;
  color: #5a4a62;
  line-height: 1.7;
  border-top: 1px solid #f5f0f8;
  padding-top: 14px;
}

/* ---- Articles liés ---- */
.related-articles {
  background: var(--dark);
  padding: 70px 30px 80px;
}
.related-header {
  max-width: 1100px;
  margin: 0 auto 36px;
}
.related-header .section-tag {
  display: inline-block;
  background: rgba(229,124,216,0.15);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
  border: 1px solid rgba(229,124,216,0.25);
  margin-bottom: 12px;
}
.related-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.related-card {
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.22s, background 0.2s;
}
.related-card:hover {
  border-color: rgba(229,124,216,0.4);
  transform: translateY(-3px);
  background: rgba(255,255,255,0.07);
}
.related-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  flex-shrink: 0;
  overflow: hidden;
  background: #2a1640;
}
.related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.related-card:hover .related-card-img img {
  transform: scale(1.04);
}
.related-card-body {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.related-tag {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}
.related-card h3 {
  font-size: 0.92rem;
  font-weight: 500;
  color: #fff;
  line-height: 1.5;
  margin-bottom: 8px;
  flex: 1;
}
.related-card p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.55;
  margin-bottom: 14px;
}
.related-meta {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 800px) {
  .article-cover-img { height: 200px; border-radius: 10px; margin-bottom: 36px; }
  .toc-mobile { display: block; }
  .article-hero { padding: 36px 16px 48px; }
  .article-main { padding: 32px 16px 64px; }
  .article-criteria-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; gap: 12px; }
  .article-cta-block,
  .article-cta-final { padding: 28px 22px; }
  .article-cta-final-inner { flex-direction: column; align-items: flex-start; }
  .article-cta-final-btn { width: 100%; text-align: center; justify-content: center; }
  .article-steps::before { left: 17px; }
}

@media (max-width: 600px) {
  .article-hero-meta { gap: 8px; }
  .article-hero h1 { font-size: 1.45rem; }
  .article-share { flex-direction: column; align-items: flex-start; }

  /* Tableaux : affichage carte empilée */
  .article-table-wrap { border: none; box-shadow: none; background: transparent; }
  .article-table thead { display: none; }
  .article-table tbody tr {
    display: block;
    background: #fff;
    border: 1px solid #ede6f3;
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 4px 0;
    box-shadow: 0 2px 8px rgba(44,19,56,0.05);
  }
  .article-table tbody tr:nth-child(even) td { background: transparent; }
  .article-table tbody tr:hover td { background: transparent !important; }
  .article-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid #f3eef8;
    font-size: 0.84rem;
    background: transparent !important;
  }
  .article-table td:first-child {
    border-top: none;
    padding-top: 14px;
  }
  .article-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 2px;
    min-width: 70px;
  }
  .article-table-total tr {
    background: #f2ecf9 !important;
    border-color: #c8b8e0;
  }
  .article-table-highlight tr {
    background: #fdf0fb !important;
    border-color: var(--accent);
  }
}
