/**
 * Styles Template Archive - Liste d'Articles
 * Design moderne en grille avec badges catégories
 */

/* ============================================
   EN-TÊTE ARCHIVE
   ============================================ */

.archive-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 3rem 0;
    border-bottom: 2px solid #e2e8f0;
}

.archive-category-badge {
    margin-bottom: 1.5rem;
}

.archive-title {
    font-size: 3rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .archive-title {
        font-size: 2rem;
    }
}

.archive-description {
    font-size: 1.125rem;
    color: #4a5568;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ============================================
   GRILLE D'ARTICLES
   ============================================ */

/* Forcer pleine largeur sur page archive */
body.archive,
body.blog {
    overflow-x: hidden;
}

.site-main--archive,
.site-main--archive .container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    margin: 0 !important;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem;
    margin-bottom: 4rem;
    width: 100% !important;
    max-width: 100% !important;
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ============================================
   CARTE ARTICLE
   ============================================ */

.article-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Thumbnail */
.article-card__thumbnail {
    display: block;
    overflow: hidden;
    position: relative;
    padding-top: 60%; /* Ratio 5:3 */
    background: #f7fafc;
}

.article-card__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Contenu */
.article-card__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Catégories petites */
.article-card__categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.category-badge-small {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

/* Catégories - Couleurs identiques aux grandes */
.category-badge-small--autorisations-urbanisme {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.category-badge-small--procedures {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.category-badge-small--techniques {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.category-badge-small--reglementaires {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.category-badge-small--general {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.category-badge-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Titre */
.article-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.article-card__title a {
    color: #1a202c;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-card__title a:hover {
    color: #4299e1;
}

/* Meta */
.article-card__meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 1rem;
}

.article-card__date,
.article-card__reading-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Extrait */
.article-card__excerpt {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.article-card__excerpt p {
    margin: 0;
}

/* Lien */
.article-card__link {
    display: inline-flex;
    align-items: center;
    color: #4299e1;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.article-card__link:hover {
    color: #2b6cb0;
    gap: 0.5rem;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination .current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 1rem;
    background: #f7fafc;
    color: #2d3748;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #4299e1;
    color: white;
    transform: translateY(-2px);
}

.pagination .current {
    background: #4299e1;
    color: white;
}

.pagination .prev,
.pagination .next {
    font-weight: 700;
}

/* ============================================
   AUCUN ARTICLE
   ============================================ */

.no-articles {
    text-align: center;
    padding: 5rem 2rem;
    background: #f7fafc;
    border-radius: 16px;
    margin: 3rem 0;
}

.no-articles__icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
}

.no-articles__title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
}

.no-articles__text {
    font-size: 1.125rem;
    color: #718096;
    margin-bottom: 2rem;
}

.no-articles .btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.no-articles .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .archive-header {
        padding: 2rem 0;
        margin-bottom: 2rem;
    }

    .articles-grid {
        gap: 1.5rem;
    }

    .article-card__content {
        padding: 1rem;
    }

    .article-card__title {
        font-size: 1.25rem;
    }
}
