/*
Theme Name: Quelle Config Blog
Theme URI: https://quelle-config.com/blog
Description: Theme blog sur-mesure repliquant le design de quelle-config.com (dark gaming). Reutilise styles.css du site principal pour une coherence parfaite header/footer.
Author: Quelle Config
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: quelle-config-blog
*/

/* =========================================================
   Blog styles — s'appuie sur les variables CSS de /styles.css
   (--primary, --bg-dark, --bg-card, --text-primary, etc.)
   ========================================================= */

.blog-wrap {
    max-width: var(--container, 1200px);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Hero / page header ---------- */
.blog-page-head {
    padding: 56px 0 28px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}
.blog-page-head h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.blog-page-head .blog-page-sub {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-top: 10px;
    max-width: 680px;
}

/* ---------- Breadcrumb (reprend le style du site) ---------- */
.blog-breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 24px 0 0;
}
.blog-breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.blog-breadcrumb a:hover { color: var(--primary-light); }
.blog-breadcrumb .sep { margin: 0 8px; color: var(--border-light); }

/* ---------- Grille d'articles ---------- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    padding-bottom: 64px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.post-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
    box-shadow: var(--shadow), var(--shadow-glow);
}
.post-card__thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-surface);
}
.post-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.post-card:hover .post-card__thumb img { transform: scale(1.05); }
.post-card__thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    background: linear-gradient(135deg, var(--bg-card-hover), var(--bg-surface));
}
.post-card__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.post-card__meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.post-card__cat {
    color: var(--primary-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
}
.post-card__cat:hover { color: var(--secondary); }
.post-card__title {
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
}
.post-card__title a { color: var(--text-primary); text-decoration: none; }
.post-card__title a:hover { color: var(--primary-light); }
.post-card__excerpt {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 18px;
    flex: 1;
}
.post-card__more {
    color: var(--primary-light);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    align-self: flex-start;
}
.post-card__more:hover { color: var(--secondary); }

/* ---------- Article (single / page) ---------- */
.article-shell {
    max-width: 760px;
    margin: 0 auto;
    padding-bottom: 72px;
}
.article-header { margin-bottom: 32px; }
.article-header h1 {
    font-size: clamp(1.9rem, 4.2vw, 2.7rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.article-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.88rem;
}
.article-meta a { color: var(--primary-light); text-decoration: none; }
.article-meta a:hover { color: var(--secondary); }
.article-cover {
    width: 100%;
    border-radius: var(--radius-lg);
    margin: 8px 0 36px;
    border: 1px solid var(--border);
}

/* Typographie du corps d'article */
.article-body { font-size: 1.06rem; line-height: 1.8; color: var(--text-primary); }
.article-body > * + * { margin-top: 1.25em; }
.article-body h2 {
    font-size: 1.7rem;
    font-weight: 700;
    margin-top: 2em;
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.article-body h3 { font-size: 1.32rem; font-weight: 700; margin-top: 1.6em; }
.article-body h4 { font-size: 1.12rem; font-weight: 700; margin-top: 1.4em; }
.article-body p { color: var(--text-primary); }
.article-body a { color: var(--primary-light); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--secondary); }
.article-body ul, .article-body ol { padding-left: 1.4em; color: var(--text-primary); }
.article-body li { margin-top: 0.5em; }
.article-body li::marker { color: var(--primary); }
.article-body img, .article-body figure img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.article-body figure { margin: 1.5em 0; }
.article-body figcaption { color: var(--text-muted); font-size: 0.85rem; text-align: center; margin-top: 8px; }
.article-body blockquote {
    border-left: 3px solid var(--primary);
    padding: 4px 0 4px 20px;
    color: var(--text-secondary);
    font-style: italic;
}
.article-body code {
    font-family: var(--font-mono);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.88em;
}
.article-body pre {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    overflow-x: auto;
}
.article-body pre code { background: none; border: none; padding: 0; }
.article-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.article-body th, .article-body td {
    border: 1px solid var(--border);
    padding: 10px 12px;
    text-align: left;
}
.article-body th { background: var(--bg-card); color: var(--text-primary); }

/* Tags + footer d'article */
.article-tags { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 10px; }
.article-tags a {
    font-size: 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 999px;
    text-decoration: none;
    transition: var(--transition);
}
.article-tags a:hover { border-color: var(--primary); color: var(--primary-light); }

.article-cta {
    margin-top: 48px;
    padding: 28px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-surface));
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    text-align: center;
}
.article-cta h3 { font-size: 1.25rem; margin-bottom: 8px; }
.article-cta p { color: var(--text-secondary); margin-bottom: 18px; }

/* ---------- Pagination ---------- */
.blog-pagination {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 16px 0 72px;
    flex-wrap: wrap;
}
.blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}
.blog-pagination .page-numbers:hover { border-color: var(--primary); color: var(--primary-light); }
.blog-pagination .page-numbers.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ---------- Empty state ---------- */
.blog-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}
.blog-empty .blog-empty__icon { font-size: 3.5rem; margin-bottom: 16px; }

/* ---------- Search form ---------- */
.blog-search { display: flex; gap: 10px; max-width: 460px; }
.blog-search input[type="search"] {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-family: var(--font-main);
    font-size: 0.95rem;
}
.blog-search input[type="search"]:focus { outline: none; border-color: var(--primary); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .post-grid { grid-template-columns: 1fr; gap: 20px; }
    .blog-page-head { padding: 36px 0 22px; }
}
