/**
 * Styles pour la page d'archive des articles
 * Utilise les couleurs et polices du thème GRIM
 */

/* Violet GRIM principal */
:root {
    --grim-violet: #6646ff;
    --grim-violet-dark: #5535ee;
    --grim-violet-light: #8875ff;
}

/* Archive Header */
.archive-header h1 {
    font-family: var(--font-heading, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.archive-description {
    font-family: var(--font-body, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    line-height: 1.6;
}

/* Articles Grid */
.articles-grid {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Article Card */
.article-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.article-card:hover {
    transform: translateY(-4px);
    border-color: var(--grim-violet);
}

/* Article Thumbnail */
.article-thumbnail {
    position: relative;
    background-color: #f3f4f6;
}

.article-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-card:hover .article-thumbnail::after {
    opacity: 1;
}

/* Article Content */
.article-title {
    font-family: var(--font-heading, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    font-weight: 700;
    line-height: 1.3;
}

.article-title a {
    text-decoration: none;
    color: inherit;
}

.article-excerpt {
    font-family: var(--font-body, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    line-height: 1.6;
}

/* Line clamp utility for excerpt */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Categories */
.article-categories a {
    transition: all 0.2s ease;
}

.article-categories a:hover {
    background-color: var(--grim-violet);
    color: white;
}

/* Read More Link */
.read-more {
    transition: all 0.2s ease;
}

.read-more:hover svg {
    transform: translateX(4px);
}

.read-more svg {
    transition: transform 0.2s ease;
}

/* Pagination */
.pagination a,
.pagination span {
    font-family: var(--font-body, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    font-weight: 500;
}

.pagination .current {
    background-color: var(--grim-violet);
    border-color: var(--grim-violet);
}

/* No Posts Section */
.no-posts {
    font-family: var(--font-body, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}

.no-posts h2 {
    font-family: var(--font-heading, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .archive-header h1 {
        font-size: 2rem;
    }

    .articles-grid {
        gap: 1.5rem;
    }

    .article-card {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    .article-card {
        background-color: #1f2937;
        border-color: rgba(255, 255, 255, 0.1);
    }

    .article-title,
    .archive-header h1 {
        color: #f9fafb;
    }

    .article-excerpt,
    .article-meta {
        color: #d1d5db;
    }
}

/* Skeleton Loading (pour optimisation future) */
.article-card.loading {
    pointer-events: none;
}

.article-card.loading .article-thumbnail {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Accessibilité */
.article-card:focus-within {
    outline: 2px solid var(--grim-violet);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .pagination,
    .article-categories {
        display: none;
    }

    .article-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}
