/*
Theme Name: Le Pot aux Faits
Theme URI: https://lepotauxfaits.fr/blog/
Author: Le Pot aux Faits
Description: Thème éditorial WordPress assorti au site Astro principal.
Version: 0.2.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: le-pot-aux-faits
*/

:root {
    --lpf-bg: #f4f1e8;
    --lpf-surface: #fffdf7;
    --lpf-ink: #171717;
    --lpf-muted: #69675f;
    --lpf-line: #d9d4c7;
    --lpf-lime: #d9ff43;
    --lpf-blue: #3157ff;
    --lpf-orange: #ff6d38;
    --lpf-container: 1180px;
    --lpf-display: "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
    --lpf-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: linear-gradient(180deg, #f8f5ed, var(--lpf-bg));
    color: var(--lpf-ink);
    font: 16px/1.65 var(--lpf-body);
}
a { color: inherit; text-underline-offset: .2em; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 {
    font-family: var(--lpf-display);
    font-weight: 900;
    letter-spacing: -.04em;
    line-height: .96;
    text-transform: uppercase;
}
h1 { font-size: clamp(3rem, 7vw, 6.5rem); }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
p { color: var(--lpf-muted); }
.lpf-container { width: min(calc(100% - 40px), var(--lpf-container)); margin-inline: auto; }

/* Header */
.lpf-header {
    position: sticky;
    z-index: 20;
    top: 0;
    border-bottom: 1px solid #1717171c;
    background: #f8f5edee;
    backdrop-filter: blur(16px);
}
.lpf-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 30px; }
.lpf-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.lpf-brand-mark { display: block; width: 42px; height: 42px; border-radius: 12px; object-fit: cover; }
.lpf-brand-name { display: block; font-family: var(--lpf-display); font-size: 1rem; font-weight: 900; line-height: 1; text-transform: uppercase; }
.lpf-brand-tagline { display: block; margin-top: 5px; color: var(--lpf-muted); font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lpf-nav { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.lpf-nav ul { display: flex; flex-wrap: wrap; gap: 22px; margin: 0; padding: 0; list-style: none; }
.lpf-nav a { font-size: .82rem; font-weight: 800; text-decoration: none; }
.lpf-nav a:hover, .lpf-nav a:focus-visible { color: var(--lpf-blue); }

/* Shared page and archives */
.lpf-main { padding: 40px 0 120px; }
.lpf-archive-header { padding: 65px 0 48px; border-bottom: 1px solid var(--lpf-line); }
.lpf-archive-header p { max-width: 680px; font-size: 1.1rem; }
.lpf-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-top: 48px; }
.lpf-post-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--lpf-line); border-radius: 20px; background: var(--lpf-surface); box-shadow: 0 14px 30px #1717170d; }
.lpf-post-card-image { display: block; width: 100%; height: 210px; object-fit: cover; }
.lpf-post-card-body { padding: 22px; }
.lpf-post-card-meta { color: var(--lpf-blue); font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.lpf-post-card h2 { margin: 16px 0 10px; font-size: 2rem; }
.lpf-post-card h2 a { text-decoration: none; }
.lpf-post-card-excerpt { font-size: .92rem; }

/* Article hero */
.lpf-reading-progress { position: fixed; z-index: 100; top: 0; left: 0; width: 100%; height: 4px; background: var(--lpf-blue); transform: scaleX(0); transform-origin: left center; }
.lpf-article-hero { padding: 82px 0 70px; }
.lpf-hero-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr); gap: clamp(44px, 7vw, 110px); align-items: center; }
.lpf-hero-copy { min-width: 0; }
.lpf-category-link { display: inline-flex; margin-bottom: 24px; color: var(--lpf-blue); font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-decoration: none; text-transform: uppercase; }
.lpf-category-link::before { content: ""; width: 28px; height: 3px; margin: .6em 10px 0 0; background: var(--lpf-ink); }
.lpf-article-title { max-width: 680px; margin: 0 0 30px; font-size: clamp(3.25rem, 5.2vw, 5.8rem); overflow-wrap: anywhere; }
.lpf-article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; color: var(--lpf-muted); font-size: .82rem; }
.lpf-author { display: inline-flex; align-items: center; gap: 10px; color: var(--lpf-ink); }
.lpf-avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--lpf-ink); color: var(--lpf-lime); font-size: .72rem; font-weight: 900; }
.lpf-author div { display: grid; line-height: 1.15; }
.lpf-author span { color: var(--lpf-muted); font-size: .7rem; }
.lpf-author strong { font-size: .82rem; }
.lpf-meta-details { display: inline-flex; flex-wrap: wrap; gap: 18px; }
.lpf-featured { position: relative; min-width: 0; margin: 0; }
.lpf-featured-image, .lpf-featured-art { display: block; width: 100%; aspect-ratio: 1.15 / 1; min-height: 370px; border: 1px solid var(--lpf-ink); border-radius: 24px; object-fit: cover; box-shadow: 12px 12px 0 var(--lpf-lime); }
.lpf-featured-art { display: grid; place-items: center; background: radial-gradient(circle at 35% 25%, #d9ff43 0 15%, transparent 16%), linear-gradient(135deg, #3157ff, #171717 62%, #ff6d38); color: #fff; font-family: var(--lpf-display); font-size: clamp(2rem, 5vw, 4rem); line-height: .85; text-align: center; }

/* Article reading layout */
.lpf-article-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(230px, 280px); gap: clamp(48px, 8vw, 110px); align-items: start; justify-content: center; }
.lpf-entry-content { min-width: 0; color: var(--lpf-ink); font-size: 1.08rem; line-height: 1.78; }
.lpf-entry-content > *:first-child { margin-top: 0; }
.lpf-entry-content p { margin: 0 0 1.25em; }
.lpf-entry-content h2 { margin: 70px 0 22px; padding-top: 12px; border-top: 1px solid var(--lpf-line); font-size: clamp(2.3rem, 5vw, 4.8rem); }
.lpf-entry-content h3 { margin: 44px 0 16px; font-size: clamp(1.7rem, 3vw, 2.7rem); }
.lpf-entry-content h4 { margin: 30px 0 10px; font-size: 1.15rem; letter-spacing: .02em; }
.lpf-entry-content ul, .lpf-entry-content ol { margin: 0 0 1.5em; padding-left: 1.35rem; }
.lpf-entry-content li { margin: .35em 0; padding-left: .25em; }
.lpf-entry-content li::marker { color: var(--lpf-blue); font-weight: 900; }
.lpf-entry-content blockquote,
.lpf-entry-content .wp-block-quote {
    position: relative;
    max-width: 100%;
    margin: 38px 0;
    padding: 26px 110px 26px 28px;
    border: 2px solid var(--lpf-ink);
    border-radius: 0 18px 18px 18px;
    background: var(--lpf-lime);
    color: var(--lpf-ink);
    box-shadow: 7px 7px 0 var(--lpf-ink);
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.lpf-entry-content blockquote::after,
.lpf-entry-content .wp-block-quote::after {
    content: "“";
    position: absolute;
    top: -13px;
    right: 24px;
    color: #1717173d;
    font-family: Georgia, serif;
    font-size: 7rem;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
}
.lpf-entry-content blockquote p,
.lpf-entry-content .wp-block-quote p { margin: 0 0 .8em; color: inherit; }
.lpf-entry-content blockquote p:last-child,
.lpf-entry-content .wp-block-quote p:last-child { margin-bottom: 0; }
.lpf-entry-content blockquote cite,
.lpf-entry-content .wp-block-quote cite,
.lpf-entry-content .wp-block-quote__citation {
    display: block;
    margin-top: 14px;
    color: #17171799;
    font-size: .78rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.45;
}
.lpf-entry-content table { width: 100%; margin: 34px 0; border-collapse: collapse; background: var(--lpf-surface); font-size: .92rem; }
.lpf-entry-content th, .lpf-entry-content td { padding: 13px 15px; border: 1px solid var(--lpf-line); text-align: left; vertical-align: top; }
.lpf-entry-content th { background: var(--lpf-ink); color: #fff; font-weight: 900; }
.lpf-entry-content figure { margin: 38px 0; }
.lpf-entry-content figure img { display: block; width: 100%; border-radius: 18px; }
.lpf-entry-content figcaption { margin-top: 8px; color: var(--lpf-muted); font-size: .78rem; }
.lpf-entry-content .wp-block-button__link { display: inline-flex; padding: 13px 19px; border-radius: 999px; background: var(--lpf-ink); color: #fff; font-weight: 800; text-decoration: none; }
.lpf-article-sidebar { position: sticky; top: 104px; min-width: 0; }
.lpf-sidebar-card { margin-bottom: 20px; padding: 22px; border: 1px solid var(--lpf-line); border-radius: 18px; background: var(--lpf-surface); box-shadow: 0 12px 25px #1717170b; }
.lpf-sidebar-card h2 { margin: 7px 0 16px; font-size: 1.55rem; }
.lpf-sidebar-kicker { margin: 0; color: var(--lpf-blue); font-size: .68rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.lpf-toc { display: grid; gap: 2px; }
.lpf-toc:empty::after { content: "Le sommaire apparaîtra ici."; color: var(--lpf-muted); font-size: .86rem; }
.lpf-toc a { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 9px 7px; border-radius: 8px; color: var(--lpf-muted); font-size: .82rem; line-height: 1.3; text-decoration: none; }
.lpf-toc a::before { content: attr(data-index); color: var(--lpf-blue); font-size: .64rem; font-weight: 900; }
.lpf-toc a:hover, .lpf-toc a:focus-visible, .lpf-toc a.is-active { background: var(--lpf-lime); color: var(--lpf-ink); }
.lpf-sidebar-note { background: var(--lpf-ink); color: #fff; }
.lpf-sidebar-note p:not(.lpf-sidebar-kicker) { color: #fff; font-size: .86rem; line-height: 1.55; }
.lpf-sidebar-note h2 { color: #fff; }
.lpf-sidebar-link { display: inline-flex; margin-top: 5px; color: var(--lpf-lime); font-size: .82rem; font-weight: 900; }

/* Footer */
.lpf-footer { padding: 58px 0 24px; background: var(--lpf-ink); color: #fff; }
.lpf-footer p { color: #ffffff99; }
.lpf-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 45px; }
.lpf-footer-grid > div:not(:first-child) { display: flex; flex-direction: column; gap: 9px; }
.lpf-footer-grid strong { text-transform: uppercase; }
.lpf-footer-grid a:hover, .lpf-footer-grid a:focus-visible { color: var(--lpf-lime); }
.lpf-footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 20px; border-top: 1px solid #ffffff22; color: #ffffff88; font-size: .76rem; }

@media (max-width: 980px) {
    .lpf-hero-grid { grid-template-columns: 1fr; gap: 42px; }
    .lpf-article-title { max-width: 900px; }
    .lpf-featured { max-width: 760px; }
    .lpf-article-layout { grid-template-columns: minmax(0, 760px); justify-content: start; }
    .lpf-article-sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .lpf-sidebar-card { margin: 0; }
}
@media (max-width: 860px) {
    .lpf-post-grid { grid-template-columns: repeat(2, 1fr); }
    .lpf-nav { gap: 14px; }
}
@media (max-width: 620px) {
    .lpf-container { width: calc(100% - 32px); }
    .lpf-header-inner { min-height: 66px; }
    .lpf-nav { display: none; }
    .lpf-post-grid, .lpf-footer-grid, .lpf-article-sidebar { grid-template-columns: 1fr; }
    .lpf-main { padding: 28px 0 70px; }
    .lpf-archive-header, .lpf-article-hero { padding-top: 42px; }
    .lpf-article-hero { padding-bottom: 45px; }
    .lpf-article-title { font-size: clamp(2.8rem, 13vw, 4.5rem); }
    .lpf-article-meta, .lpf-meta-details { align-items: flex-start; gap: 12px; }
    .lpf-featured-image, .lpf-featured-art { min-height: 250px; aspect-ratio: 1.15 / 1; border-radius: 18px; box-shadow: 7px 7px 0 var(--lpf-lime); }
    .lpf-article-layout { gap: 30px; }
    .lpf-entry-content { font-size: 1rem; }
    .lpf-entry-content h2 { margin-top: 48px; font-size: clamp(2.1rem, 13vw, 3.6rem); }
    .lpf-entry-content h3 { margin-top: 34px; }
    .lpf-entry-content table { display: block; overflow-x: auto; white-space: nowrap; }
    .lpf-footer-bottom { display: block; }
    .lpf-footer-bottom span { display: block; margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
