/* ============================================================
   PF2026 — Article / Page layout (single.php, page.php)
   Source : Pokemon-France.com Redesign/article.html
   ============================================================ */

/* ---------- Layout 3 colonnes ---------- */
.article-layout {
    display: grid;
    grid-template-columns: 240px 1fr 220px;
    gap: 32px;
    align-items: start;
    padding: 28px 0 80px;
}
.article-layout--no-toc { grid-template-columns: 1fr 220px; }
.article-layout--simple { grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; }

/* ---------- TOC sticky ---------- */
.toc {
    position: sticky;
    top: 82px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
}
.toc-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--ink-faint);
    margin-bottom: 12px;
}
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 2px; padding: 0; }
.toc-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-light);
    border-radius: var(--r-xs);
    transition: all .15s;
    text-decoration: none;
    line-height: 1.3;
}
.toc-item a:hover { background: var(--cream); color: var(--ink); }
.toc-item a.active {
    background: var(--yellow-bg);
    color: var(--ink);
    font-weight: 700;
}
.toc-item a.active::before {
    content: '';
    width: 3px;
    height: 14px;
    background: var(--yellow);
    border-radius: 2px;
    flex-shrink: 0;
}

.toc-progress {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.toc-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-faint);
    margin-bottom: 6px;
}
.toc-progress-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.toc-progress-fill {
    height: 100%;
    width: 0;
    background: var(--yellow);
    border-radius: 2px;
    transition: width .15s linear;
}

/* ---------- Cover ---------- */
.article-cover {
    width: 100%;
    aspect-ratio: 21/9;
    object-fit: cover;
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: 28px;
    background: linear-gradient(135deg, #1A3A8F 0%, #5060E1 50%, #9141CB 100%);
    position: relative;
    display: flex;
    align-items: flex-end;
}
.article-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .55;
}
.article-cover-content {
    position: relative;
    z-index: 2;
    padding: 36px 48px;
}
.article-cover-tag {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 4px 12px;
    background: rgba(255, 255, 255, .15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: var(--r-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: white;
    margin-bottom: 12px;
}
.article-cover-title {
    font-size: 32px;
    font-weight: 700;
    color: white;
    letter-spacing: -.04em;
    line-height: 1.1;
    max-width: 720px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

/* ---------- Header / meta ---------- */
.article-header { margin-bottom: 32px; }
.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.article-author { display: flex; align-items: center; gap: 10px; }
.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--type-dragon));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}
.author-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.author-grade {
    font-size: 11px;
    color: var(--ink-light);
    display: flex;
    align-items: center;
    gap: 4px;
}
.meta-sep { color: var(--border); }
.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--ink-light);
    font-weight: 500;
}

.article-title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1.15;
    color: var(--ink);
    margin-bottom: 16px;
}
.article-intro {
    font-size: 17px;
    color: var(--ink-mid);
    line-height: 1.7;
    border-left: 3px solid var(--yellow);
    padding-left: 18px;
    margin-bottom: 32px;
    font-weight: 400;
}

/* ---------- Body ---------- */
.article-body {
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--ink-mid);
}
.article-body h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.03em;
    color: var(--ink);
    margin: 40px 0 16px;
    padding-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    scroll-margin-top: 90px;
}
.article-body h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--yellow);
    border-radius: 2px;
    flex-shrink: 0;
}
.article-body h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
    margin: 28px 0 12px;
    letter-spacing: -.02em;
    scroll-margin-top: 90px;
}
.article-body p { margin-bottom: 18px; }
.article-body strong { font-weight: 700; color: var(--ink); }
.article-body a {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-color: rgba(26, 58, 143, .3);
}
.article-body a:hover { text-decoration-color: var(--blue); }
.article-body img { border-radius: var(--r-sm); margin: 18px 0; }
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    font-size: 13.5px;
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border);
}
.article-body table th,
.article-body table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}
.article-body table th {
    background: var(--cream);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--ink-light);
}
.article-body blockquote {
    margin: 22px 0;
    padding: 16px 18px;
    background: var(--cream);
    border-left: 3px solid var(--yellow);
    border-radius: var(--r-sm);
    color: var(--ink-mid);
    font-style: italic;
}

/* ---------- Sidebar (right) ---------- */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 82px;
}
.sidebar-widget {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
}
.sidebar-widget-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ink-faint);
}
.sidebar-related-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.sidebar-related-item:last-child { border-bottom: none; }
.sidebar-related-item:hover { background: var(--cream); }
.sidebar-related-cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--type-plante);
}
.sidebar-related-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.35;
}

/* ---------- Bottom of post ---------- */
.post-bottom {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}
.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.post-tag {
    padding: 6px 13px;
    background: var(--cream);
    border-radius: var(--r-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-light);
    transition: all .15s;
    text-decoration: none;
}
.post-tag:hover { background: var(--border); color: var(--ink); }

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 20px;
}
.related-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: all .2s cubic-bezier(.16, 1, .3, 1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}
.related-card-thumb {
    aspect-ratio: 16/9;
    background: var(--cream);
    overflow: hidden;
}
.related-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.related-card-body { padding: 12px 14px; }
.related-card-cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--ink-light);
    margin-bottom: 4px;
}
.related-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
}

/* ---------- Comments / Passlord CTA ---------- */
.comments-section { margin-top: 48px; }
.comment-header {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.03em;
    color: var(--ink);
    margin-bottom: 20px;
}
.comment-passlord-cta {
    background: linear-gradient(135deg, #1A1040, #2D1B69);
    border-radius: var(--r-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.comment-passlord-text { color: white; }
.comment-passlord-text h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}
.comment-passlord-text p {
    font-size: 13px;
    color: rgba(255, 255, 255, .6);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .article-layout,
    .article-layout--no-toc { grid-template-columns: 1fr; }
    .toc, .article-sidebar { display: none; }
    .article-cover-content { padding: 24px; }
    .article-cover-title { font-size: 24px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .comment-passlord-cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
    .article-title { font-size: 26px; }
    .related-grid { grid-template-columns: 1fr; }
}
