/* ============================================
   CSS BLOG - ASPF
   Styles pour blog.html et blog/article-*.html
   ============================================ */

/* ---- Hero compact (page listing) ---- */
.blog-hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.blog-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(15, 31, 63, 0.88) 0%,
    rgba(59, 91, 168, 0.82) 100%
  );
  z-index: 1;
}

.blog-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  padding: 60px 20px;
}

.blog-hero-content h1 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.blog-hero-content p {
  font-size: 20px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Fil d'Ariane ---- */
.blog-breadcrumb {
  background: var(--light-bg);
  padding: 14px 0;
  border-bottom: 1px solid #f0e6e4;
  font-size: 14px;
  color: var(--text-gray);
}

.blog-breadcrumb a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.blog-breadcrumb a:hover {
  color: var(--secondary-blue);
  text-decoration: underline;
}

.blog-breadcrumb span {
  margin: 0 8px;
  color: #ccc;
}

.blog-breadcrumb .current {
  color: var(--text-dark);
  font-weight: 500;
}

/* ---- Badges de catégorie ---- */
.category-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-badge.assainissement {
  background: rgba(59, 91, 168, 0.12);
  color: var(--primary-blue);
}

.category-badge.serrurerie {
  background: rgba(239, 78, 72, 0.12);
  color: var(--accent-red);
}

.category-badge.plomberie {
  background: rgba(255, 140, 0, 0.12);
  color: var(--orange);
}

.category-badge.conseil {
  background: rgba(30, 58, 112, 0.12);
  color: var(--secondary-blue);
}

/* ---- Card article standard ---- */
.blog-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.13);
}

.blog-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.blog-card-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.blog-card-date {
  font-size: 13px;
  color: var(--text-gray);
}

.blog-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark-navy);
  margin-bottom: 12px;
  line-height: 1.4;
}

.blog-card-excerpt {
  font-size: 15px;
  color: var(--text-gray);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 20px;
}

.blog-card-link {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s, color 0.2s;
}

.blog-card-link:hover {
  color: var(--secondary-blue);
  gap: 10px;
}

/* ---- Card vedette ---- */
.blog-card-featured {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  transition: all 0.3s;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 50px;
}

.blog-card-featured:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.13);
}

.blog-card-featured .blog-card-featured-image {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
}

.blog-card-featured .blog-card-body {
  padding: 40px;
  justify-content: center;
}

.blog-card-featured .blog-card-title {
  font-size: 26px;
}

.blog-card-featured .blog-card-excerpt {
  font-size: 16px;
}

.featured-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-red);
  margin-bottom: 8px;
}

/* ---- Grille articles ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
}

/* ---- Layout article (page article) ---- */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 60px;
  align-items: start;
}

/* ---- Hero article ---- */
.article-hero {
  position: relative;
  height: 480px;
  overflow: hidden;
}

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

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 31, 63, 0.3) 0%,
    rgba(15, 31, 63, 0.7) 100%
  );
}

.article-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px;
  color: white;
}

.article-hero-content h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.25;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.4);
  max-width: 800px;
}

/* ---- Meta article ---- */
.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid #f0e6e4;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--text-gray);
}

.article-meta-item svg {
  flex-shrink: 0;
  color: var(--primary-blue);
}

/* ---- Corps de l'article ---- */
.article-body h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--dark-navy);
  margin: 40px 0 16px;
  line-height: 1.3;
}

.article-body h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--secondary-blue);
  margin: 30px 0 12px;
}

.article-body p {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-dark);
  margin-bottom: 22px;
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
  margin-bottom: 22px;
}

.article-body li {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.article-body blockquote {
  border-left: 4px solid var(--primary-blue);
  background: var(--light-bg);
  padding: 22px 28px;
  margin: 32px 0;
  border-radius: 0 12px 12px 0;
}

.article-body blockquote p {
  font-size: 18px;
  font-style: italic;
  color: var(--dark-navy);
  margin: 0;
  line-height: 1.7;
}

.article-body .article-inline-image {
  width: 100%;
  border-radius: 16px;
  margin: 32px 0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.article-body .image-caption {
  text-align: center;
  font-size: 14px;
  color: var(--text-gray);
  font-style: italic;
  margin-top: -24px;
  margin-bottom: 32px;
}

/* ---- Sidebar ---- */
.article-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.sidebar-widget {
  background: white;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.sidebar-widget-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark-navy);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--light-bg);
}

/* Widget auteur */
.author-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-name {
  font-weight: 700;
  color: var(--dark-navy);
  font-size: 15px;
}

.author-role {
  font-size: 13px;
  color: var(--text-gray);
}

.author-bio {
  font-size: 14px;
  color: var(--text-gray);
  line-height: 1.7;
}

/* Widget articles connexes */
.sidebar-article {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #f5f0ee;
  text-decoration: none;
  transition: all 0.2s;
}

.sidebar-article:last-child {
  border-bottom: none;
}

.sidebar-article:hover .sidebar-article-title {
  color: var(--primary-blue);
}

.sidebar-article-img {
  width: 70px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.sidebar-article-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
  transition: color 0.2s;
}

.sidebar-article-date {
  font-size: 12px;
  color: var(--text-gray);
  margin-top: 5px;
}

/* Widget catégories */
.sidebar-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f5f0ee;
  text-decoration: none;
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.sidebar-category:last-child {
  border-bottom: none;
}

.sidebar-category:hover {
  color: var(--primary-blue);
}

.sidebar-category-count {
  background: var(--light-bg);
  color: var(--text-gray);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
}

/* Widget CTA */
.sidebar-cta {
  background: linear-gradient(
    135deg,
    var(--dark-navy) 0%,
    var(--primary-blue) 100%
  ) !important;
  text-align: center;
  color: white;
}

.sidebar-cta .sidebar-widget-title {
  color: white;
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.sidebar-cta p {
  font-size: 14px;
  opacity: 0.85;
  line-height: 1.6;
  margin-bottom: 18px;
}

.sidebar-cta .btn-cta {
  font-size: 14px;
  padding: 12px 22px;
  width: 100%;
  justify-content: center;
}

/* ---- Tags article ---- */
.article-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 28px 0;
  border-top: 1px solid #f0e6e4;
  margin-top: 40px;
}

.article-tag {
  background: var(--light-bg);
  color: var(--text-gray);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s;
}

.article-tag:hover {
  background: var(--primary-blue);
  color: white;
}

/* ---- Section articles similaires ---- */
.related-articles {
  background: var(--light-bg);
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
  .blog-hero-content h1 {
    font-size: 36px;
  }

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

  .blog-card-featured .blog-card-featured-image {
    height: 260px;
    min-height: unset;
  }

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

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }

  .article-hero-content h1 {
    font-size: 30px;
  }
}

@media (max-width: 767px) {
  .blog-hero-content h1 {
    font-size: 28px;
  }

  .blog-hero-content p {
    font-size: 16px;
  }

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

  .article-hero {
    height: 320px;
  }

  .article-hero-content h1 {
    font-size: 24px;
  }

  .article-hero-content {
    padding: 24px;
  }

  .article-body h2 {
    font-size: 22px;
  }

  .article-body p {
    font-size: 16px;
  }
}
