/*--------------------------------------------------------------
# Blog Posts — liste des tutoriels
# Les styles des filtres (sidebar, chips, pagination…) sont
# partagés dans sections/filters.css
--------------------------------------------------------------*/
.blog-posts .article {
  background-color: var(--surface-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s, box-shadow 0.3s;
  margin-bottom: 0;
}

.blog-posts .article:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.blog-posts .post-img {
  max-height: 280px;
  overflow: hidden;
}

.blog-posts .post-img img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.blog-posts .article:hover .post-img img {
  transform: scale(1.04);
}

.blog-posts .post-img-placeholder {
  width: 100%;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: color-mix(in srgb, var(--default-color), transparent 92%);
  color: color-mix(in srgb, var(--default-color), transparent 60%);
  font-size: 52px;
}

.blog-posts .title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 20px 20px 12px;
}

.blog-posts .title a {
  color: var(--heading-color);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-posts .title a:hover {
  color: var(--accent-color);
}

.blog-posts .meta-top {
  padding: 0 20px;
  margin-bottom: 14px;
}

.blog-posts .meta-top ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.blog-posts .meta-top ul li {
  font-size: 13px;
  gap: 6px;
}

.blog-posts .meta-top ul li i {
  font-size: 14px;
  color: var(--accent-color);
}

.blog-posts .meta-top ul li a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-posts .meta-top ul li a:hover {
  color: var(--accent-color);
}

.blog-posts .content {
  padding: 0 20px 20px;
}

.blog-posts .content p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-color);
  margin-bottom: 16px;
}

.blog-posts .read-more a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-color);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.2s, color 0.2s;
}

.blog-posts .read-more a::after {
  content: "\F138";
  font-family: "bootstrap-icons";
  font-size: 15px;
}

.blog-posts .read-more a:hover {
  color: color-mix(in srgb, var(--accent-color), #000 15%);
  gap: 10px;
}

/*--------------------------------------------------------------
# Recent posts widget
--------------------------------------------------------------*/
.sidebar .recent-posts-widget .post-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 92%);
}

.sidebar .recent-posts-widget .post-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar .recent-posts-widget .post-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.sidebar .recent-posts-widget .post-item-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background-color: color-mix(in srgb, var(--default-color), transparent 92%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: color-mix(in srgb, var(--default-color), transparent 60%);
  flex-shrink: 0;
}

.sidebar .recent-posts-widget .post-item h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.4;
}

.sidebar .recent-posts-widget .post-item h4 a {
  color: var(--heading-color);
  text-decoration: none;
  transition: color 0.2s;
}

.sidebar .recent-posts-widget .post-item h4 a:hover {
  color: var(--accent-color);
}

.sidebar .recent-posts-widget .post-item time {
  font-size: 12px;
}

/*--------------------------------------------------------------
# Posts grid — animation à l'apparition / re-render Livewire
--------------------------------------------------------------*/
@keyframes posts-fadein {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.blog-posts .posts-grid {
  animation: posts-fadein 0.35s ease-out both;
}

.blog-posts .posts-grid.posts-loading {
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.15s;
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media (max-width: 991px) {
  .sidebar {
    margin-top: 40px;
  }
}

@media (max-width: 575px) {
  .blog-posts .post-img img,
  .blog-posts .post-img-placeholder {
    height: 220px;
  }
}

/*--------------------------------------------------------------
# Post authors — avatars in meta
--------------------------------------------------------------*/
.post-meta-authors {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-avatars {
  display: inline-flex;
  flex-shrink: 0;
}

.author-avatars img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface-color, #fff);
  margin: 0 !important;
}

.author-avatars img + img {
  margin-left: -10px !important;
}
