/*
Theme Name: Neo Brutalist Premium
Theme URI: https://example.com/
Author: Antigravity AI
Description: Un thème personnalisé Néo-Brutaliste.
Version: 1.3.0
*/
:root {
	--bg: #ffb6c1; /* Light pink background outside */
	--container-bg: #f4f0e6; /* Beige inside */
	--primary: #004dff; /* Blue box */
	--accent: #ccff00; /* Lime green */
	--accent-pink: #ffa8d5; /* Avatar box pink */
	--border-width: 4px;
	--border-color: #000;
	--shadow: 8px 8px 0px var(--border-color);
	--shadow-hover: 12px 12px 0px var(--border-color);
}
body {
	font-family: 'Work Sans', sans-serif;
	margin: 0;
	padding: 2rem;
	background-color: var(--bg);
	color: #000;
	font-size: 18px;
	line-height: 1.6;
}
.site-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	background: var(--container-bg);
	border: var(--border-width) solid var(--border-color);
	box-shadow: var(--shadow);
	display: flex;
}
/* LEFT SIDEBAR (Lime Green) */
.left-rail {
	width: 120px;
	background: var(--accent);
	border-right: var(--border-width) solid var(--border-color);
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 2rem 0;
}
.logo-rs {
	font-family: 'Titan One', cursive;
	font-size: 3rem;
	color: #ffa8d5;
	text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
	letter-spacing: 2px;
	margin-bottom: auto;
}
.progress-container {
	margin-top: auto;
	width: 40px;
	height: 300px;
	border: 3px solid var(--border-color);
	position: relative;
	background: transparent;
}
.progress-fill {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 65%;
	background: #ffa8d5;
	border-top: 3px solid var(--border-color);
}

/* MAIN CONTENT */
.main-wrapper {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

/* Header */
.brutalist-nav {
    width: 100%;
    border-bottom: 4px solid #000;
    background: #f4f0e6;
}
.nav-links {
    display: flex;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.nav-links a {
    flex: 1;
    text-align: center;
    padding: 1rem;
    border-right: 4px solid #000;
    font-family: 'Titan One', cursive;
    font-size: 1.1rem;
    color: #000;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.2s;
    white-space: nowrap;
}
.nav-links a:last-child {
    border-right: none;
}
.nav-links a:hover, .nav-links a.active {
    background: #ccff00;
    text-decoration: none;
}

/* Feed */
.feed-container {
    padding: 3rem;
    background: #f4f0e6;
    flex-grow: 1;
}
.page-title {
    font-family: 'Titan One', cursive;
    font-size: 4rem; 
    margin: 0 0 3rem 0; 
    text-shadow: 4px 4px 0px #ccff00;
    line-height: 1.1;
    font-weight: normal;
}
.brutalist-card {
    background: #fff;
    border: 4px solid #000;
    box-shadow: 8px 8px 0px #000;
    margin-bottom: 3rem;
    display: flex;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}
.brutalist-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0px #000;
}
.card-img-box {
    width: 300px;
    border-right: 4px solid #000;
    overflow: hidden;
    flex-shrink: 0;
}
.card-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}
.card-content-box {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card-content-box h2 {
    font-family: 'Titan One', cursive;
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    font-weight: normal;
    line-height: 1.1;
}
.card-meta {
    background: #ccff00;
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 2px solid #000;
    font-weight: bold;
    align-self: flex-start;
}

/* Single Post */
.hero-split {
    display: flex;
    border-bottom: 4px solid #000;
}
.hero-title-box {
    flex: 1;
    background: var(--primary);
    padding: 3rem;
    border-right: 4px solid #000;
    display: flex;
    align-items: center;
}
.hero-title-box h1 {
    color: #fff;
    text-shadow: 4px 4px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
    font-size: 4rem;
    line-height: 1.1;
    margin: 0;
    font-family: 'Titan One', cursive;
    font-weight: normal;
}
.hero-image-box {
    flex: 1;
    background: #fff;
    overflow: hidden;
}
.hero-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}
.meta-bar {
    display: flex;
    background: var(--accent-pink);
    border-bottom: 4px solid #000;
    padding: 1rem 2rem;
    align-items: center;
    gap: 2rem;
}
.avatar {
    width: 32px;
    height: 32px;
    border: 2px solid #000;
    border-radius: 50%;
}
.author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.content-row-wrapper {
    display: flex;
}

.main-body-group {
    flex: 9;
    display: flex;
    flex-direction: column;
}

.article-and-toc {
    display: flex;
}

html {
    scroll-behavior: smooth;
}

.article-body {
    flex: 3;
    padding: 3rem;
    background: #fff;
    border-right: 4px solid var(--border-color);
}
.article-body p { margin-bottom: 2rem; word-break: break-word; font-size: 1rem; }

/* Brutalist Link Highlighting for SEO CTR */
.article-body p a, .article-body li a {
    color: #000;
    text-decoration: none;
    font-weight: 800;
    background: var(--accent);
    border: 2px solid #000;
    padding: 0.1rem 0.3rem;
    box-shadow: 2px 2px 0 #000;
    transition: all 0.2s ease;
    display: inline-block; /* ensures the margins/shadows don't break lines awkwardly */
}
.article-body p a:hover, .article-body li a:hover {
    background: var(--accent-pink);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #000;
}
.single-post-article .article-and-toc .article-body h2 {
    font-family: 'Titan One', cursive;
    font-size: 2.5rem;
    margin: 3rem 0 1.5rem 0;
    font-weight: normal;
    color: #000;
    text-shadow: 3px 3px 0 var(--accent);
    line-height: 1.3;
    text-transform: uppercase;
}
.article-body blockquote {
	border-left: var(--border-width) solid var(--primary);
	padding-left: 1rem;
	font-style: italic;
	font-weight: bold;
}
.article-body ul, .article-body ol {
    margin-bottom: 2rem;
    padding-left: 2rem;
    font-weight: 600;
}
.article-body li {
    margin-bottom: 0.5rem;
}
.article-body li::marker {
    color: var(--primary);
    font-weight: bold;
}
.single-post-article .article-and-toc .article-body figure, 
.single-post-article .article-and-toc .article-body .wp-block-table {
    margin: 3rem 0;
}
.single-post-article .article-and-toc .article-body table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 4px solid #000;
    box-shadow: 8px 8px 0 #000;
}
/* Style the head or the first row if there is no proper thead */
.single-post-article .article-and-toc .article-body table th,
.single-post-article .article-and-toc .article-body table thead td,
.single-post-article .article-and-toc .article-body table thead th {
    background: var(--accent);
    padding: 1.2rem;
    border: 4px solid #000;
    font-family: 'Titan One', cursive;
    text-transform: uppercase;
    font-size: 1.2rem;
    font-weight: normal;
    color: #000;
    text-align: left;
}
/* The standard cells */
.single-post-article .article-and-toc .article-body table td {
    padding: 1.2rem;
    border: 4px solid #000;
    font-weight: 600;
    color: #000;
}

.toc-column {
    flex: 1;
    background: #f4f0e6;
    border-right: 4px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    align-self: flex-start;
}

.toc-box {
    background: var(--accent);
    padding: 2rem;
    border-bottom: 4px solid #000;
}
.toc-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.toc-box li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.2);
    font-size: 0.9rem;
}

.newsletter-cta {
    background: var(--primary);
    padding: 3rem;
    color: #fff;
    text-align: center;
    border-bottom: 4px solid var(--border-color);
    border-right: 4px solid var(--border-color);
}
.newsletter-cta h2 {
    text-shadow: 2px 2px 0 #000;
    font-size: 2.2rem;
    font-family: 'Titan One', cursive;
    margin: 0 0 1rem 0;
}

.social-column {
    flex: 1;
    background: #f4f0e6;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 3rem;
    gap: 3rem;
}
.social-icon {
    width: 32px;
    height: 32px;
    color: #000;
    cursor: pointer;
}
.social-icon:hover {
    color: var(--primary);
}
.cta-form {
    display: flex;
    margin-top: 1.5rem;
}
.cta-form input {
    flex: 1;
    padding: 0.75rem;
    border: 3px solid #000;
    border-right: none;
    font-family: inherit;
    font-weight: bold;
}
.cta-form button {
    background: var(--accent-pink);
    color: #000;
    border: 3px solid #000;
    padding: 0.75rem 1rem;
    font-family: 'Titan One', cursive;
    cursor: pointer;
    transition: 0.2s;
}

@media (max-width: 900px) {
    body { padding: 0.5rem; }
    .site-wrapper { flex-direction: column; }
    .left-rail { width: 100%; border-right: none; border-bottom: var(--border-width) solid var(--border-color); padding: 1rem; flex-direction: row; justify-content: space-between; }
    .progress-container { display: none; }
    .logo-rs { margin: 0; }
    
    .nav-links { flex-direction: column; }
    .nav-links a { flex: 0 0 auto; border-right: none; border-bottom: 4px solid #000; }
    .nav-search { border-left: none !important; border-bottom: 4px solid #000; justify-content: center; width: 100%; }
    
    .page-title { font-size: 2.5rem; text-shadow: 2px 2px 0px #ccff00; margin-bottom: 2rem; }
    .brutalist-card { flex-direction: column; }
    .card-img-box { width: 100%; height: 250px; border-right: none; border-bottom: 4px solid #000; }
    .feed-container { padding: 1.5rem; }
    .card-content-box h2 { font-size: 1.8rem; }
    
    .hero-split, .content-split, .meta-bar { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .hero-title-box, .article-body { border-right: none; border-bottom: 4px solid #000; padding: 1.5rem; }
    .hero-title-box h1 { font-size: 2.2rem; text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; }
    
    /* New 3-columns responsive fixes */
    .content-row-wrapper { flex-direction: column; }
    .main-body-group { flex: 1; }
    .article-and-toc { flex-direction: column; }
    
    .toc-column { border-right: none; border-bottom: 4px solid #000; }
    .newsletter-cta { border-right: none; }
    
    .social-column { 
        flex-direction: row; 
        padding-top: 1rem; 
        padding-bottom: 1rem;
        gap: 1.5rem; 
        justify-content: center;
        border-top: 4px solid #000;
        background: var(--container-bg);
    }
    
    .cta-form { flex-direction: column; gap: 0.5rem; }
    .cta-form input { border-right: 3px solid #000; }
}

/* EXTRACTED INLINE STYLES */

/* Header */
#scroll-progress-text {
    margin-top: 10px; font-family: 'Titan One'; font-size: 0.9rem; transform: rotate(-90deg); margin-bottom: 30px;
}
.nav-search {
    padding: 1rem 2rem; border-left: 4px solid #000; display:flex; align-items:center; flex-grow: 1; justify-content: flex-end;
}
.nav-search-form {
    display: flex;
}
.nav-search-input {
    border: 3px solid #000; padding: 0.5rem; border-right:none; font-weight: bold;
}
.nav-search-btn {
    background: var(--accent-pink); border: 3px solid #000; padding: 0.5rem 1rem; font-family: 'Titan One', cursive; cursor: pointer;
}

/* Single */
.single-main-container {
    padding: 0; display: flex; flex-direction: column;
}
.author-info-name {
    font-weight: bold;
}
.publish-date-label {
    font-weight: bold; margin-right: 5px;
}
.toc-link {
    color:#000; text-decoration:none;
}
.author-bio-box {
    margin-top: 3rem; padding: 2rem; background: var(--accent-pink); border: 4px solid var(--border-color); box-shadow: 4px 4px 0 var(--border-color);
}
.author-bio-box h3 {
    font-family: 'Titan One', cursive; margin-bottom: 1rem; text-transform: uppercase; font-size: 1.5rem;
}
.author-bio-box p {
    margin-bottom: 0; font-weight: 600; font-size: 1rem;
}
.toc-box h3 {
    font-family: 'Work Sans', sans-serif; font-size: 1rem; border-bottom: 2px solid #000; padding-bottom: 0.5rem; margin-bottom: 1rem;
}
.newsletter-cta p {
    font-weight: 600;
}
.infinite-scroll-trigger {
    height: 1px; width: 100%;
}
.infinite-loading-spinner {
    text-align:center; padding: 4rem 2rem; font-family:'Titan One', cursive; font-size: 2rem; background: var(--accent); border: 4px solid #000; box-shadow: 8px 8px 0 #000; margin: 2rem 0; text-transform:uppercase;
}
.infinite-scroll-separator {
    border-top: 8px dashed #000; margin: 4rem 0;
}

/* Skeleton loader */
.brutalist-card-skeleton {
    background: #fff;
    border: 4px solid #000;
    box-shadow: 8px 8px 0 #000;
    margin-bottom: 3rem;
    display: flex;
    min-height: 200px;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* TOC Active */
.toc-box li a.active-toc {
    background: #ccff00;
    border: 2px solid #000;
    padding: 0.2rem 0.5rem;
    box-shadow: 2px 2px 0 #000;
    font-weight: bold;
    display: inline-block;
    transform: translate(-2px, -2px);
    transition: all 0.2s ease;
}

/* Web Stories Bar */
.web-stories-bar {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 2rem;
    border-bottom: 4px solid #000;
    background: #ffa8d5;
    align-items: center;
}
.web-story-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid #000;
    box-shadow: 2px 2px 0 #000;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.2s;
    display: block;
    cursor: pointer;
}
.web-story-circle:hover {
    transform: scale(1.1);
}
.web-stories-label {
    font-family: 'Titan One', cursive;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-right: 1rem;
}

/* Footer / Popup */
.popup-overlay {
    position:fixed; bottom:-100%; right:20px; z-index:9999; transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.popup-card {
    background:var(--accent); border:4px solid #000; box-shadow:8px 8px 0 #000; max-width:400px; width:100%; position:relative; display:flex; flex-direction:column; padding:0;
}
.popup-close-btn {
    position:absolute; top:-15px; right:-15px; background:var(--accent-pink); border:4px solid #000; font-family:'Titan One', cursive; cursor:pointer; width:45px; height:45px; font-size:1.5rem; transition: transform 0.2s; box-shadow: 4px 4px 0 #000; z-index: 10;
}
.popup-img-wrapper {
    height:150px; width:100%; border-bottom:4px solid #000; overflow:hidden;
}
.popup-img {
    width:100%; height:100%; object-fit:cover;
}
.popup-img-placeholder {
    height:80px; width:100%; border-bottom:4px solid #000; background:repeating-linear-gradient(45deg, var(--container-bg), var(--container-bg) 10px, #000 10px, #000 12px);
}
.popup-content {
    padding:1.5rem;
}
.popup-label {
    display:inline-block; text-transform:uppercase; font-size:0.8rem; font-weight:800; margin-bottom:0.5rem; letter-spacing:1px; padding: 0.2rem 0.5rem; background: var(--container-bg); border: 2px solid #000;
}
.popup-title {
    font-family:'Titan One', cursive; font-size:1.4rem; margin-bottom:1rem; line-height:1.2; color: #000;
}
.popup-cta {
    display:block; text-align:center; background:var(--primary); color:#fff; border:4px solid #000; padding:0.8rem 1rem; font-family:'Titan One', cursive; text-decoration:none; box-shadow: 4px 4px 0 #000; transition: transform 0.2s;
}
.popup-cta:hover {
    transform:translate(-2px, -2px); box-shadow: 6px 6px 0 #000;
}
.popup-close-btn:hover {
    transform:translate(-2px, -2px);
}
