/* Styles pour la page d'index des articles */

/* === ARTICLES INDEX STYLING === */

/* Conteneur principal */
.articles-index {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Grille des articles */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Carte d'article */
.article-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Image de l'article */
.article-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .article-card-image {
  transform: scale(1.05);
}

/* Contenu de la carte */
.article-card-content {
  padding: 1.5rem;
}

/* Titre de l'article */
.article-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.article-card-title a:hover {
  color: #3b82f6;
}

/* Extrait de l'article */
.article-card-excerpt {
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Métadonnées de l'article */
.article-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #9ca3af;
}

.article-card-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-card-reading-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Catégorie de l'article */
.article-card-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Tags de l'article */
.article-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.article-card-tag {
  padding: 0.25rem 0.5rem;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 6px;
  font-size: 0.75rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.article-card-tag:hover {
  background: #e5e7eb;
  color: #374151;
}

/* Bouton "Lire plus" */
.article-card-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #3b82f6;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

.article-card-read-more:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .articles-index {
    padding: 1rem;
  }
  
  .article-card-content {
    padding: 1rem;
  }
}

/* === FILTRES ET RECHERCHE === */

.articles-filters {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  border: 1px solid #e5e7eb;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.filter-label {
  font-weight: 500;
  color: #374151;
  margin-right: 0.5rem;
}

.filter-select {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  color: #374151;
  font-size: 0.875rem;
}

.filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* === PAGINATION === */

.articles-pagination {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.5rem;
}

.pagination li {
  margin: 0;
}

.pagination a,
.pagination span {
  display: block;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  text-decoration: none;
  color: #374151;
  transition: all 0.2s ease;
}

.pagination a:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.pagination .current {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.pagination .disabled {
  color: #9ca3af;
  cursor: not-allowed;
}

/* === ÉTAT VIDE === */

.articles-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: #6b7280;
}

.articles-empty-icon {
  font-size: 4rem;
  color: #d1d5db;
  margin-bottom: 1rem;
}

.articles-empty-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.articles-empty-message {
  font-size: 1.125rem;
  margin-bottom: 2rem;
}
