/* ==========================================================================
   ARCHIVE / CATEGORY STYLES - JurojinNet
   ========================================================================== */

/* ==========================================================================
   ARCHIVE HEADER
   ========================================================================== */

.archive-header {
    background: linear-gradient(135deg, #f8f7ff 0%, #f0eeff 50%, #faf9ff 100%);
    border-bottom: 1px solid #e8e6f5;
    padding: 2rem 0;
}

.archive-header .container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.archive-header__breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.archive-header__breadcrumb a {
    color: #6b7280;
    transition: color 0.15s;
}

.archive-header__breadcrumb a:hover {
    color: #6366f1;
}

.archive-header__breadcrumb svg {
    width: 12px;
    height: 12px;
    color: #9ca3af;
}

.archive-header__content {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
}

.archive-header__main {
    flex: 1;
}

.archive-header__title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.375rem;
    line-height: 1.2;
}

.archive-header__description {
    font-size: 0.9375rem;
    color: #4b5563;
    max-width: 540px;
    line-height: 1.6;
    margin: 0;
}

.archive-header__stats {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6366f1;
    background: #eef2ff;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    white-space: nowrap;
}

.archive-header__stats svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   MAIN LAYOUT
   ========================================================================== */

.archive-main {
    padding: 2.5rem 0 4rem;
    background: #fafbfc;
}

.archive-main .container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.archive-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 3rem;
}

/* ==========================================================================
   FEATURED ARTICLE
   ========================================================================== */

.featured {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eaeef3;
    margin-bottom: 2.5rem;
    transition: box-shadow 0.25s, border-color 0.25s;
}

.featured:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.featured__image {
    position: relative;
    overflow: hidden;
}

.featured__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.4s ease;
}

.featured:hover .featured__image img {
    transform: scale(1.02);
}

.featured__badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ffffff;
    background: rgba(99, 102, 241, 0.92);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    z-index: 1;
    text-decoration: none;
    transition: background 0.15s;
}

.featured__badge:hover {
    background: rgba(79, 70, 229, 1);
}

.featured__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

.featured__tag {
    display: inline-flex;
    align-self: flex-start;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6366f1;
    background: #eef2ff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.featured__tag:hover {
    background: #6366f1;
    color: #ffffff;
}

.featured__title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    margin-bottom: 0.625rem;
}

.featured__title a {
    color: inherit;
    text-decoration: none;
}

.featured__title a:hover {
    color: #6366f1;
}

.featured__excerpt {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.featured__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

.featured__meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.featured__meta svg {
    width: 14px;
    height: 14px;
    color: #9ca3af;
}

.featured__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6366f1;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.featured__cta:hover {
    gap: 0.75rem;
}

.featured__cta svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   MEDIUM CARDS
   ========================================================================== */

.medium-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.medium-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eaeef3;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.medium-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.medium-card__image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.medium-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.medium-card:hover .medium-card__image img {
    transform: scale(1.03);
}

.medium-card__tag {
    position: absolute;
    top: 0.625rem;
    left: 0.625rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ffffff;
    background: rgba(99, 102, 241, 0.92);
    padding: 0.2rem 0.45rem;
    border-radius: 3px;
    text-decoration: none;
    transition: background 0.15s;
}

.medium-card__tag:hover {
    background: rgba(79, 70, 229, 1);
}

.medium-card__content {
    padding: 1rem 1.125rem 1.125rem;
}

.medium-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.medium-card__title a {
    color: inherit;
    text-decoration: none;
}

.medium-card__title a:hover {
    color: #6366f1;
}

.medium-card__meta {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* ==========================================================================
   COMPACT LIST
   ========================================================================== */

.compact-section {
    margin-bottom: 2rem;
}

.compact-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid #eaeef3;
}

.compact-section__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0;
}

.compact-list {
    display: flex;
    flex-direction: column;
}

.compact-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}

.compact-item:last-child {
    border-bottom: none;
}

.compact-item:hover {
    background: #f9fafb;
    margin: 0 -0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    border-radius: 6px;
}

.compact-item__thumb {
    width: 60px;
    height: 38px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.compact-item__thumb--placeholder {
    background: #e5e7eb;
}

.compact-item__main {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 0;
}

.compact-item__tag {
    flex-shrink: 0;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6366f1;
    background: #eef2ff;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.compact-item__tag:hover {
    background: #6366f1;
    color: #ffffff;
}

.compact-item__title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.compact-item__title a {
    color: inherit;
    text-decoration: none;
}

.compact-item__title a:hover {
    color: #6366f1;
}

.compact-item__date {
    flex-shrink: 0;
    font-size: 0.8125rem;
    color: #9ca3af;
}

/* Load more button */
.load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.875rem 1.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6366f1;
    background: #ffffff;
    border: 1px solid #e2e4e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-more:hover {
    background: #f8f7ff;
    border-color: #c7d2fe;
}

.load-more svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.load-more:hover svg {
    transform: translateY(2px);
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.sidebar {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: fit-content;
}

.sidebar__block {
    background: #ffffff;
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid #eaeef3;
}

.sidebar__title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 0.875rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
}

/* Popular list */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.popular-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f9fafb;
    text-decoration: none;
    transition: color 0.15s;
}

.popular-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-item:first-child {
    padding-top: 0;
}

.popular-item:hover {
    color: #6366f1;
}

.popular-item__rank {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #6366f1;
    background: #eef2ff;
    border-radius: 4px;
}

.popular-item__title {
    font-size: 0.8125rem;
    color: #4b5563;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-item:hover .popular-item__title {
    color: #6366f1;
}

/* Newsletter */
.sidebar__block--newsletter {
    background: linear-gradient(135deg, #f8f7ff 0%, #f0eeff 100%);
    border-color: #e8e6f5;
}

.newsletter__text {
    font-size: 0.8125rem;
    color: #4b5563;
    line-height: 1.5;
    margin: 0 0 0.875rem 0;
}

.newsletter__form {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.newsletter__input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-family: inherit;
    font-size: 0.8125rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    color: #1f2937;
    transition: border-color 0.15s;
}

.newsletter__input:focus {
    outline: none;
    border-color: #6366f1;
}

.newsletter__input::placeholder {
    color: #9ca3af;
}

.newsletter__btn {
    width: 100%;
    padding: 0.625rem 1rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #ffffff;
    background: #6366f1;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.newsletter__btn:hover {
    background: #4f46e5;
}

/* Categories list */
.categories-list {
    display: flex;
    flex-direction: column;
}

.categories-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #4b5563;
    text-decoration: none;
    border-bottom: 1px solid #f9fafb;
    transition: color 0.15s;
}

.categories-list__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.categories-list__item:first-child {
    padding-top: 0;
}

.categories-list__item:hover {
    color: #6366f1;
}

.categories-list__count {
    font-size: 0.75rem;
    color: #9ca3af;
    background: #f9fafb;
    padding: 0.125rem 0.4rem;
    border-radius: 4px;
}

/* Tags cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.tags-cloud__item {
    font-size: 0.8125rem;
    color: #4b5563;
    background: #f3f4f6;
    padding: 0.3rem 0.625rem;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.15s;
}

.tags-cloud__item:hover {
    background: #eef2ff;
    color: #6366f1;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eaeef3;
}

.pagination__item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
}

.pagination__item:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.pagination__item--active,
.pagination__item.current {
    background: #6366f1;
    border-color: #6366f1;
    color: #ffffff;
}

.pagination__item--active:hover,
.pagination__item.current:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;
}

.pagination__item--disabled {
    opacity: 0.35;
    pointer-events: none;
}

.pagination__item svg {
    width: 16px;
    height: 16px;
}

.pagination__ellipsis,
.pagination__item.dots {
    padding: 0 0.25rem;
    color: #9ca3af;
    background: transparent;
    border: none;
}

/* No posts */
.no-posts {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
    font-size: 1rem;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .archive-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .sidebar__block {
        margin-bottom: 0;
    }

    /* Masquer les tags sur tablette (redondants) */
    .sidebar__block:last-child {
        display: none;
    }

    /* Newsletter prend toute la largeur */
    .sidebar__block--newsletter {
        grid-column: 1 / -1;
        order: 10;
    }
}

@media (max-width: 768px) {
    .archive-header__content {
        flex-direction: column;
        align-items: flex-start;
    }

    .archive-header__stats {
        margin-top: 0.75rem;
    }

    .featured {
        grid-template-columns: 1fr;
    }

    .featured__image {
        aspect-ratio: 16/9;
    }

    .featured__image img {
        position: relative;
    }

    .featured__content {
        padding: 1.25rem;
    }

    .featured__title {
        font-size: 1.125rem;
    }

    .medium-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .archive-header__title {
        font-size: 1.5rem;
    }

    .compact-item {
        grid-template-columns: 50px 1fr;
        grid-template-rows: auto auto;
        gap: 0.375rem 0.75rem;
    }

    .compact-item__thumb {
        width: 50px;
        height: 32px;
        grid-row: span 2;
        align-self: center;
    }

    .compact-item__main {
        grid-column: 2;
    }

    .compact-item__date {
        grid-column: 2;
        font-size: 0.6875rem;
    }

    .compact-item__tag {
        display: none;
    }

    .load-more {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }
}