/* ===================================================
   SOS IDEC — Blog & Articles — Feuille de style
   Palette : bleu professionnel #2563EB / #1e40af
   Police  : Inter (héritée du style principal)
   =================================================== */

/* ----- BREADCRUMB ----- */
.breadcrumb {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}
.breadcrumb a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease;
}
.breadcrumb a:hover {
  color: #2563EB;
}
.breadcrumb span {
  color: #cbd5e1;
  margin: 0 0.5rem;
}

/* ----- BLOG HERO (pages articles) ----- */
.blog-hero {
  background: linear-gradient(135deg, #0f1f3d 0%, #1e3a5f 50%, #1e40af 100%);
  color: #ffffff;
  padding: 64px 0 48px;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1.2' fill='rgba(255,255,255,0.06)'/%3E%3C/svg%3E");
}
.blog-hero .container {
  position: relative;
}
.blog-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 0.8rem;
  color: #ffffff;
}
.blog-hero .hero-subtitle {
  font-size: 1.05rem;
  opacity: 0.85;
  max-width: 680px;
  line-height: 1.7;
  color: #bfdbfe;
}
.blog-hero .breadcrumb {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.2rem;
}
.blog-hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.65);
}
.blog-hero .breadcrumb a:hover {
  color: #ffffff;
}
.blog-hero .breadcrumb span {
  color: rgba(255, 255, 255, 0.3);
}

/* ----- ARTICLE CONTAINER ----- */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* ----- ARTICLE META ----- */
.article-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
.article-meta .meta-sep {
  color: #cbd5e1;
}

/* ----- ARTICLE TAGS ----- */
.article-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.article-tag {
  display: inline-block;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
}

/* ----- ARTICLE BODY ----- */
.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #1e293b;
}

.article-body h2 {
  font-size: clamp(1.3rem, 3vw, 1.65rem);
  font-weight: 800;
  color: #0f172a;
  border-left: 4px solid #2563EB;
  padding-left: 1rem;
  margin: 2.5rem 0 1rem;
  line-height: 1.25;
}

.article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e40af;
  margin: 2rem 0 0.75rem;
}

.article-body p {
  margin-bottom: 1.2rem;
  color: #334155;
}

.article-body ul,
.article-body ol {
  padding-left: 1.6rem;
  margin-bottom: 1.2rem;
}

.article-body ul li,
.article-body ol li {
  margin-bottom: 0.5rem;
  color: #334155;
  line-height: 1.75;
}

.article-body ul li::marker {
  color: #2563EB;
}

.article-body ol li::marker {
  color: #2563EB;
  font-weight: 700;
}

.article-body strong {
  color: #2563EB;
  font-weight: 700;
}

.article-body em {
  color: #475569;
}

.article-body a {
  color: #2563EB;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body a:hover {
  color: #1e40af;
}

/* ----- TABLE OF CONTENTS ----- */
.toc-box {
  background: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.toc-box h3 {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1e40af;
  margin: 0 0 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc-box ol {
  padding-left: 1.4rem;
  margin: 0;
}

.toc-box ol li {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.toc-box ol li a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.toc-box ol li a:hover {
  color: #1e40af;
  text-decoration: underline;
}

/* ----- CTA BOX ----- */
.cta-box {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #ffffff;
  border-radius: 12px;
  padding: 2rem;
  margin: 2.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='20' cy='20' r='1' fill='rgba(255,255,255,0.07)'/%3E%3C/svg%3E");
}

.cta-box > * {
  position: relative;
}

.cta-box h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.5rem;
}

.cta-box p {
  color: #bfdbfe;
  font-size: 0.95rem;
  margin: 0 0 1.2rem;
  line-height: 1.65;
}

.cta-box .btn-cta {
  background: #ffffff;
  color: #1e40af;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cta-box .btn-cta:hover {
  background: #f0f9ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.cta-box .cta-links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.cta-box .btn-cta-secondary {
  background: transparent;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cta-box .btn-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.8);
}

/* ----- RELATED ARTICLES ----- */
.related-articles {
  background: #f8fafc;
  padding: 3rem;
  border-radius: 12px;
  margin: 3rem 0;
}

.related-articles h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 1.5rem;
  border: none;
  padding: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.related-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  display: block;
  color: inherit;
  border: 1px solid #e2e8f0;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.related-card:hover {
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.15);
  transform: translateY(-2px);
  color: inherit;
}

.related-card .card-type {
  font-size: 0.72rem;
  color: #2563EB;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
  display: block;
}

.related-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
  margin: 0;
}

/* ----- BLOG LISTING PAGE ----- */
.blog-listing {
  padding: 48px 0 64px;
}

.blog-listing-header {
  margin-bottom: 2.5rem;
}

.blog-listing-header h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.blog-listing-header p {
  color: #64748b;
  font-size: 1rem;
}

.blog-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.blog-card:hover {
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.12);
  transform: translateY(-3px);
}

.blog-card-date {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.blog-card-tag {
  display: inline-block;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 50px;
  width: fit-content;
}

.blog-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin: 0;
}

.blog-card h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-card h3 a:hover {
  color: #2563EB;
}

.blog-card p {
  font-size: 0.92rem;
  color: #64748b;
  line-height: 1.7;
  margin: 0;
  flex: 1;
}

.blog-card-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: #2563EB;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  transition: gap 0.2s ease, color 0.2s ease;
}

.blog-card-link:hover {
  color: #1e40af;
  gap: 8px;
}

/* ----- BLOG HERO (listing page) ----- */
.blog-listing-hero {
  background: linear-gradient(135deg, #0f1f3d 0%, #1e3a5f 50%, #1e40af 100%);
  color: #ffffff;
  padding: 56px 0 40px;
  position: relative;
  overflow: hidden;
}

.blog-listing-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1.2' fill='rgba(255,255,255,0.06)'/%3E%3C/svg%3E");
}

.blog-listing-hero .container {
  position: relative;
}

.blog-listing-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 0.6rem;
}

.blog-listing-hero p {
  color: #bfdbfe;
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 600px;
}

/* ----- RESPONSIVE ----- */
@media (max-width: 768px) {
  .article-container {
    padding: 32px 16px 48px;
  }

  .related-articles {
    padding: 2rem 1.5rem;
  }

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

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

  .cta-box {
    padding: 1.5rem 1.25rem;
  }

  .blog-listing {
    padding: 32px 0 48px;
  }
}

@media (max-width: 480px) {
  .article-body h2 {
    font-size: 1.25rem;
  }

  .blog-hero h1 {
    font-size: 1.5rem;
  }

  .toc-box {
    padding: 1.2rem;
  }
}
