/* ==========================================================================
   BLOG AVANCÉ — LE MONDE DU TRAVAIL
   Styles modernes, responsive & dark-mode pour la lecture et les interactions
   ========================================================================== */

/* Badges & Méta-données de lecture */
.blog-reading-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.blog-views-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
}

.blog-likes-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Bouton J'aime interactif */
.blog-like-button-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2.5rem 0 1.5rem;
}

.btn-blog-like {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.6rem;
  font-size: 1rem;
  font-weight: 700;
  color: #e11d48;
  background: rgba(225, 29, 72, 0.06);
  border: 2px solid rgba(225, 29, 72, 0.25);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.08);
}

.btn-blog-like:hover {
  background: rgba(225, 29, 72, 0.12);
  border-color: #e11d48;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.18);
}

.btn-blog-like.liked {
  background: #e11d48;
  color: #ffffff;
  border-color: #e11d48;
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.35);
}

.btn-blog-like .like-heart {
  font-size: 1.25rem;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-blog-like:hover .like-heart,
.btn-blog-like.liked .like-heart {
  transform: scale(1.2);
}

/* Sommaire de lecture automatique (Table of Contents) */
.blog-toc-card {
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0284c7;
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.blog-toc-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-toc-list li {
  margin: 0.35rem 0;
}

.blog-toc-list a {
  color: #475569;
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s ease, padding-left 0.15s ease;
  display: inline-block;
}

.blog-toc-list a:hover {
  color: #0284c7;
  padding-left: 0.35rem;
}

.blog-toc-list .toc-h3 {
  padding-left: 1.2rem;
  font-size: 0.85rem;
}

/* Profil Auteur enrichi */
.blog-author-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.blog-author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #0284c7;
  flex-shrink: 0;
  background: #e2e8f0;
}

.blog-author-avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.blog-author-info {
  flex: 1;
}

.blog-author-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.blog-author-role-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  background: #e0e7ff;
  color: #4338ca;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.blog-author-bio {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

/* Encart Pont avec le Forum */
.blog-forum-callout {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.blog-forum-callout-text h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0369a1;
  margin: 0 0 0.3rem;
}

.blog-forum-callout-text p {
  font-size: 0.9rem;
  color: #475569;
  margin: 0;
}

/* Tags Pills */
.blog-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.2rem 0;
}

.blog-tag-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.blog-tag-pill:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* Tri & Barre d'outils blog.html */
.blog-sort-select {
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}

.blog-sort-select:focus {
  border-color: #0284c7;
}

/* Lightbox pour la galerie d'images */
.blog-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
  margin: 2rem 0;
}

.blog-gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-gallery img:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Mode sombre */
[data-theme="dark"] .blog-toc-card,
[data-theme="dark"] .blog-author-card {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .blog-toc-title,
[data-theme="dark"] .blog-author-name {
  color: #f1f5f9;
}

[data-theme="dark"] .blog-toc-list a {
  color: #94a3b8;
}

[data-theme="dark"] .blog-toc-list a:hover {
  color: #38bdf8;
}

[data-theme="dark"] .blog-author-bio {
  color: #94a3b8;
}

[data-theme="dark"] .blog-forum-callout {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.3);
}

[data-theme="dark"] .blog-forum-callout-text h4 {
  color: #38bdf8;
}

[data-theme="dark"] .blog-forum-callout-text p {
  color: #cbd5e1;
}

[data-theme="dark"] .blog-sort-select {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}
