/* ============================================================================
 * Module : shared/styles/components/blog-post.css
 * Rôle   : Styles partagés pour le contenu slotté des articles de blog
 *          (à l'intérieur de <mda-blog-post-layout>).
 *
 *          Style :
 *          - Le contenu texte de l'article (h2, h3, p, ul, ol, li, strong)
 *            via le sélecteur `.article-body` (déclaré par le slot du Web Component).
 *          - Les composants annexes : .callout (info/warning), .stat-grid +
 *            .stat-card, .scenario (bad/good), .highlight-box, .cta-block,
 *            .article-nav.
 *
 *          Ces classes vivent dans le LIGHT DOM. Le composant <mda-blog-post-layout>
 *          encapsule juste le hero + le container ; le contenu est dans le slot.
 *          ::slotted() ne pouvant cibler que les enfants directs du slot,
 *          on utilise ce CSS global avec préfixe `.article-body` pour isoler.
 *
 * Dépend de : tokens.css, typography.css (cohérence des styles de base)
 * Utilisé par : pages d'articles blog (blog-*.html)
 * ============================================================================ */

/* ─── Texte de l'article (override des tailles par défaut de typography.css) ─── */

.article-body h2 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: var(--weight-black);
  color: var(--gray-900);
  margin: var(--space-12) 0 var(--space-4);
  line-height: 1.3;
}

.article-body h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: var(--weight-bold);
  color: var(--brand-dark);
  margin: 28px 0 10px;
}

.article-body p {
  margin-bottom: 18px;
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.7;
}

.article-body ul,
.article-body ol {
  margin: 12px 0 20px 24px;
}

.article-body li {
  margin-bottom: 8px;
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.7;
}

.article-body strong {
  color: var(--gray-900);
  font-weight: var(--weight-bold);
}

.article-body em {
  font-style: italic;
}

/* ─── Callouts (info / warning) ─── */

.callout {
  border-radius: 14px;
  padding: 20px 24px;
  margin: 28px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.callout .icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.callout.info {
  background: var(--brand-50);
  border-left: 4px solid var(--brand-mid);
}

.callout.warning {
  background: #FEF3C7;
  border-left: 4px solid #F59E0B;
}

.callout.danger {
  background: #FEF2F2;
  border-left: 4px solid #EF4444;
}

.callout.purple {
  background: #F5F3FF;
  border-left: 4px solid #7C3AED;
}

.callout p {
  margin: 0;
  font-size: 0.92rem;
}

.callout strong {
  display: block;
  margin-bottom: 4px;
}

/* ─── Stat grid (chiffres clés) ─── */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.stat-card .number {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--brand);
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card .label {
  font-size: 0.82rem;
  color: var(--gray-500);
  line-height: 1.4;
}

/* ─── Scenario (bad / good) ─── */

.scenario {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid;
}

.scenario.bad {
  border-color: #EF4444;
}

.scenario.good {
  border-color: var(--brand-mid);
}

.scenario h4 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: 1rem;
  margin-bottom: 12px;
}

.scenario.bad h4 {
  color: #B91C1C;
}

.scenario.good h4 {
  color: var(--brand);
}

.scenario p {
  font-size: 0.92rem;
  color: var(--gray-600);
  margin: 0;
  line-height: 1.7;
}

/* ─── Highlight box (encadré mis en avant) ─── */

.highlight-box {
  background: var(--brand-50);
  border: 2px solid var(--brand-100);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 32px 0;
  text-align: center;
}

.highlight-box p {
  font-size: 1.1rem;
  font-weight: var(--weight-semibold);
  color: var(--brand-dark);
  margin: 0;
}

/* ─── CTA block (appel à l'inscription) ─── */

.cta-block {
  background: linear-gradient(135deg, var(--brand-dark), #0a4a30);
  border-radius: 20px;
  padding: 40px 36px;
  text-align: center;
  margin-top: 56px;
}

.cta-block h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: var(--weight-black);
  color: var(--white);
  margin-bottom: 12px;
}

.cta-block p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 24px;
}

.cta-block a {
  display: inline-block;
  background: var(--brand-mid);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: var(--weight-bold);
  font-family: var(--font-heading);
  text-decoration: none;
  font-size: 1rem;
  transition: all var(--transition-base);
}

.cta-block a:hover {
  background: var(--brand-light);
  transform: translateY(-2px);
}

/* ─── Navigation prev/next entre articles ─── */

.article-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--gray-200);
  gap: 12px;
  flex-wrap: wrap;
}

.article-nav a {
  font-weight: var(--weight-semibold);
  font-size: 0.9rem;
  color: var(--brand);
  text-decoration: none;
}

.article-nav a:hover {
  text-decoration: underline;
}

/* ─── Timeline (calendrier officiel, étapes datées) ─── */

.timeline {
  margin: 32px 0;
}

.timeline-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.timeline-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-black);
  font-size: 0.8rem;
  font-family: var(--font-heading);
  text-align: center;
  flex-shrink: 0;
  margin-top: 2px;
  line-height: 1.1;
}

.timeline-dot.past {
  background: var(--gray-200);
  color: var(--gray-500);
}

.timeline-dot.soon {
  background: #FEF3C7;
  color: #92400E;
}

.timeline-dot.future {
  background: var(--brand-50);
  color: var(--brand);
}

.timeline-content h4 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  color: var(--gray-900);
  margin-bottom: 4px;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin: 0;
}

/* ─── Mention list (liste numérotée de mentions obligatoires) ─── */

.mention-list {
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mention-item {
  background: var(--white);
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border-left: 4px solid var(--brand-mid);
}

.mention-num {
  width: 36px;
  height: 36px;
  background: var(--brand);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-black);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.mention-content h4 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  color: var(--gray-900);
  margin-bottom: 6px;
  font-size: 1rem;
}

.mention-content p {
  font-size: 0.88rem;
  color: var(--gray-500);
  margin: 0;
  line-height: 1.6;
}

/* ─── Code inline (dans .mention-content ou ailleurs) ─── */

.article-body code,
.mention-content code {
  background: var(--gray-100);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--brand-dark);
  font-family: 'Courier New', monospace;
}

/* ─── Code block (pavé sombre) ─── */

.code-block {
  background: var(--gray-900);
  color: var(--brand-light);
  padding: 18px 20px;
  border-radius: 12px;
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
  margin: 16px 0;
  line-height: 1.6;
}

/* ─── TVA table (table stylée avec badges) ─── */

.tva-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.tva-table th {
  background: var(--brand-dark);
  color: var(--white);
  padding: 14px 16px;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: var(--weight-bold);
  border: none;
}

.tva-table td {
  padding: 13px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--gray-100);
  background: var(--white);
  color: var(--gray-700);
  border-left: none;
  border-right: none;
  border-top: none;
}

.tva-table tr:last-child td {
  border-bottom: none;
}

.tva-table tr:hover td {
  background: var(--brand-50);
}

.tva-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-weight: var(--weight-bold);
  font-size: 0.78rem;
  font-family: var(--font-heading);
}

.tva-5 {
  background: var(--brand-100);
  color: var(--brand);
}

.tva-10 {
  background: #DBEAFE;
  color: #1E40AF;
}

.tva-20 {
  background: #FEF3C7;
  color: #92400E;
}

/* ─── Seuil cards (paire de chiffres clés) ─── */

.seuil-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.seuil-card {
  background: var(--white);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.seuil-card .type {
  font-size: 0.78rem;
  font-weight: var(--weight-bold);
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
  display: block;
}

.seuil-card .amount {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--brand);
  display: block;
}

.seuil-card .label {
  font-size: 0.82rem;
  color: var(--gray-500);
  margin-top: 4px;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .seuil-cards {
    grid-template-columns: 1fr;
  }
  .tva-table {
    font-size: 0.82rem;
  }
}
