/* Styles spécifiques pour le blog */

/* Header du blog */
.blog-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 120px 0 60px;
  text-align: center;
}

.blog-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.blog-header p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Layout principal du blog */
.blog-main {
  padding: 60px 0;
  background-color: #f8fafc;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 40px;
  align-items: start;
}

/* Sidebar */
.blog-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-widget h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

/* Liste des catégories */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  margin-bottom: 8px;
}

.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  color: #64748b;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.category-list a:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}

.category-list .count {
  background-color: #e2e8f0;
  color: #64748b;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Articles récents */
.recent-post {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.recent-post:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.recent-post-icon {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
  font-size: 1.5rem;
}

.recent-post-content h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
}

.recent-post-content a {
  color: #1e293b;
  text-decoration: none;
}

.recent-post-content a:hover {
  color: #667eea;
}

.recent-post-content .date {
  font-size: 0.8rem;
  color: #64748b;
}

/* Boîte de recherche */
.search-box {
  display: flex;
  gap: 8px;
}

.search-box input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9rem;
}

.search-box button {
  padding: 10px 12px;
  background-color: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-box button:hover {
  background-color: #5a67d8;
}

/* Filtres */
.blog-filters {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #64748b;
}

.filter-group select {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9rem;
  background-color: white;
}

/* Grille d'articles */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.blog-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.blog-icon {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 4rem;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-icon {
  transform: scale(1.05);
}

.blog-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: #667eea;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.blog-content {
  padding: 20px;
}

.blog-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: #64748b;
}

.blog-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.blog-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
  color: #1e293b;
}

.blog-content p {
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 16px;
}

.blog-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: gap 0.3s ease;
}

.blog-link:hover {
  gap: 8px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination button {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  background-color: white;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.pagination button:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}

.pagination button.active {
  background-color: #667eea;
  color: white;
  border-color: #667eea;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
  .blog-header {
    padding: 160px 0 60px;
  }

  .blog-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .blog-sidebar {
    position: static;
    order: 2;
  }

  .blog-content {
    order: 1;
  }

  .blog-filters {
    flex-direction: column;
    gap: 16px;
  }

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

  .blog-icon {
    height: 150px;
    font-size: 3rem;
  }

  .recent-post-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .blog-header h1 {
    font-size: 2rem;
  }

  .blog-header p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .blog-main {
    padding: 40px 0;
  }

  .blog-header {
    padding: 60px 0 40px;
  }

  .blog-header h1 {
    font-size: 1.8rem;
  }

  .sidebar-widget {
    padding: 16px;
  }

  .blog-content {
    padding: 16px;
  }

  .blog-icon {
    height: 120px;
    font-size: 2.5rem;
  }

  .recent-post-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* Animation de chargement */
.loading {
  text-align: center;
  padding: 40px;
  color: #64748b;
}

.loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  border-top-color: #667eea;
  animation: spin 1s ease-in-out infinite;
  margin-left: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Message d'état vide */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #1e293b;
}

.empty-state p {
  font-size: 0.9rem;
}
