/* Tag Page SEO - Frontend styles */

.tpseo-main { padding: 24px 0 48px; }

.tpseo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.tpseo-tag-page { color: inherit; }

/* Header : description + image (comme sur le mockup) */
.tpseo-header {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 32px;
}

.tpseo-header-text { min-width: 0; }

.tpseo-title {
    font-size: clamp(1.75rem, 2.5vw, 2.5rem);
    line-height: 1.2;
    margin: 0 0 16px;
    font-weight: 700;
}

.tpseo-content {
    font-size: 1rem;
    line-height: 1.65;
}
.tpseo-content h2 { font-size: 1.5rem; margin: 1.5em 0 .5em; }
.tpseo-content h3 { font-size: 1.25rem; margin: 1.25em 0 .5em; }
.tpseo-content p  { margin: 0 0 1em; }
.tpseo-content ul, .tpseo-content ol { margin: 0 0 1em 1.25em; }
.tpseo-content a { text-decoration: underline; }
.tpseo-content img { max-width: 100%; height: auto; border-radius: 6px; }
.tpseo-content table { width: 100%; border-collapse: collapse; }
.tpseo-content th, .tpseo-content td { border: 1px solid #e5e7eb; padding: 8px; text-align: left; }

.tpseo-header-image {
    margin: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: #f3f4f6;
}
.tpseo-header-image img,
.tpseo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Grid des articles */
.tpseo-posts { margin-top: 24px; }

.tpseo-posts-title {
    font-size: 1.5rem;
    margin: 0 0 16px;
    font-weight: 700;
}

.tpseo-posts-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.tpseo-card {
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.tpseo-card:hover { transform: translateY(-2px); }

.tpseo-card-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.tpseo-card-thumb {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 6px;
    background: #f3f4f6;
    margin-bottom: 8px;
}
.tpseo-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}
.tpseo-card:hover .tpseo-card-thumb img { transform: scale(1.04); }

.tpseo-card-title {
    font-size: .95rem;
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
}

/* Pagination */
.tpseo-pagination { margin-top: 32px; }
.tpseo-pagination .page-numbers {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    padding: 0;
    margin: 0;
}
.tpseo-pagination .page-numbers li a,
.tpseo-pagination .page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    font-size: .9rem;
    background: #fff;
    color: inherit;
}
.tpseo-pagination .page-numbers li span.current {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.tpseo-empty {
    padding: 24px;
    background: #f9fafb;
    border-radius: 8px;
    text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .tpseo-posts-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .tpseo-header {
        grid-template-columns: 1fr;
    }
    .tpseo-header-image {
        order: -1;
        aspect-ratio: 16 / 9;
        max-width: 100%;
    }
    .tpseo-posts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .tpseo-posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tpseo-title { font-size: 1.5rem; }
}
