/*
Theme Name: Redactions Neo
Theme URI: https://redactions.fr
Author: Olivier
Description: Thème WordPress Néo-Brutaliste pour redactions.fr
Version: 1.0.0
Text Domain: redactions-neo
*/

/* ==========================================================================
   DESIGN TOKENS - NÉO-BRUTALISME ÉDITORIAL
   ========================================================================== */
:root {
    /* Couleurs Stark & Vibrant */
    --bg-color: #F4F4F0;       /* Papier recyclé très clair */
    --text-color: #0F0F0F;     /* Noir presque pur pour un contraste brutal */
    --accent-yellow: #D1FF1A;  /* Jaune néon / acide */
    --accent-pink: #FF3366;    /* Rose électrique */
    --accent-blue: #3366FF;    /* Bleu tech */
    
    /* Typographie Audacieuse (Nouvelle) */
    --font-heading: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    
    /* Brutal UI Elements */
    --border-thickness: 3px;
    --border: var(--border-thickness) solid var(--text-color);
    --shadow-neo: 8px 8px 0px var(--text-color);
    --shadow-neo-hover: 4px 4px 0px var(--text-color);
    --radius-sharp: 0px;       /* Bords carrés ou très arrondis, pas d'entre-deux */
    --radius-round: 24px;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img, video, iframe, figure {
    max-width: 100%;
    height: auto;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Bruit de fond (Grain texture) pour un rendu "magazine brut" */
.noise-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.05;
    background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox=%220 0 200 200%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cfilter id=%22noiseFilter%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.65%22 numOctaves=%223%22 stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23noiseFilter)%22/%3E%3C/svg%3E');
}

h1, h2, h3, h4, h5, h6, .logo, .ticker, .btn-neo, .tag {
    font-family: var(--font-heading);
    text-transform: uppercase;
    line-height: 1.1;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    border-bottom: var(--border);
    background: #FFFFFF;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
}

.logo {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.05em;
}

.main-nav, .main-nav ul {
    display: flex;
    gap: 3.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    padding: 0.5rem 0;
    overflow: hidden;
}

/* Soulignement stylé au survol */
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: var(--border-thickness);
    background: var(--text-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.main-nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ==========================================================================
   BUTTONS (Néo-brutalistes)
   ========================================================================== */
.btn-neo {
    background: var(--accent-yellow);
    border: var(--border);
    padding: 1rem 2rem;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: var(--shadow-neo);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
    cursor: pointer;
    border-radius: var(--radius-sharp);
}

.btn-neo:hover {
    transform: translate(4px, 4px);
    box-shadow: var(--shadow-neo-hover);
    background: var(--accent-pink);
    color: #FFF;
    border-color: var(--text-color);
}

.btn-large {
    font-size: 1.3rem;
    padding: 1.2rem 3rem;
}

.btn-small {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    background: #FFF;
}

/* ==========================================================================
   TICKER (Bandeau défilant dynamique)
   ========================================================================== */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    background: var(--text-color);
    color: var(--accent-yellow);
    padding: 0.8rem 0;
    border-top: var(--border);
}

.ticker {
    display: flex;
    white-space: nowrap;
    animation: ticker 20s linear infinite;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.ticker-item {
    padding: 0 2rem;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    padding: 5rem 3rem;
    max-width: 1600px;
    margin: 0 auto;
}

.hero-text-marquee h1 {
    font-size: clamp(5rem, 15vw, 12rem);
    font-weight: 700;
    white-space: nowrap;
    margin-bottom: 3rem;
    letter-spacing: -0.05em;
    color: var(--text-color);
    margin-left: -2rem; /* Casse un peu la grille */
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 6rem;
    align-items: center;
}

.hero-copy p {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 3rem;
    max-width: 600px;
    line-height: 1.4;
}

.hero-visual {
    border: var(--border);
    box-shadow: var(--shadow-neo);
    border-radius: var(--radius-round);
    overflow: hidden;
    height: 550px;
    background: var(--text-color);
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2); /* Image N&B au départ */
    transition: filter 0.6s ease, transform 0.6s ease;
}

.hero-visual:hover img {
    filter: grayscale(0%); /* Revient en couleur */
    transform: scale(1.05);
}

/* ==========================================================================
   BENTO GRID SECTION (Articles)
   ========================================================================== */
.bento-section {
    padding: 8rem 3rem;
    max-width: 1600px;
    margin: 0 auto;
    border-top: var(--border);
    background: #FFFFFF;
}

.section-header h2 {
    font-size: clamp(3.5rem, 7vw, 6rem);
    margin-bottom: 4rem;
    letter-spacing: -0.03em;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 3rem;
}

/* Cards de base */
.bento-card {
    background: #FFF;
    border: var(--border);
    box-shadow: var(--shadow-neo);
    border-radius: var(--radius-round);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover {
    transform: translate(-6px, -6px);
    box-shadow: 14px 14px 0px var(--text-color);
}

/* Article mis en avant (prend 2 colonnes) */
.featured {
    grid-column: span 2;
    flex-direction: row;
}

.card-image-wrap {
    border-bottom: var(--border);
    height: 300px;
    flex-shrink: 0;
    overflow: hidden;
}

.featured .card-image-wrap {
    border-bottom: none;
    border-right: var(--border);
    width: 50%;
    height: auto;
}

.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.bento-card:hover .card-image-wrap img {
    transform: scale(1.05);
}

.card-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Tags dynamiques */
.tag {
    background: var(--accent-blue);
    color: #FFF;
    border: 2px solid var(--text-color);
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    border-radius: 50px;
    align-self: flex-start;
    margin-bottom: 1.5rem;
}
.tag-pink { background: var(--accent-pink); }
.tag-yellow { background: var(--accent-yellow); color: var(--text-color); }

.bento-card h3 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.bento-card p {
    font-size: 1.15rem;
    color: #444;
    margin-bottom: 2rem;
}

.read-more {
    margin-top: auto;
    font-weight: 700;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 1.1rem;
}

.bg-dark {
    background: var(--text-color);
    color: #FFF;
}
.text-white { color: #FFF !important; }
.opacity-80 { opacity: 0.8; }
.mt-auto { margin-top: auto; }

/* ==========================================================================
   RESPONSIVE DESIGN (Global)
   ========================================================================== */
@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }
    .featured {
        grid-column: span 2;
    }
    .hero-grid {
        gap: 3rem;
    }
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-visual {
        height: 400px;
    }
    .main-nav {
        display: none;
    }
    .header-inner {
        padding: 1rem 1.5rem;
    }
    .hero, .bento-section {
        padding: 4rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .featured {
        grid-column: span 1;
        flex-direction: column;
    }
    .featured .card-image-wrap {
        width: 100%;
        border-right: none;
        border-bottom: var(--border);
        height: 250px;
    }
}

/* ==========================================================================
   SINGLE POST LAYOUT
   ========================================================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
}

.single-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 5rem;
    padding-top: 5rem;
    padding-bottom: 8rem;
    align-items: start;
}

.single-header {
    margin-bottom: 3rem;
}

.single-header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem); /* Réduit car Syne est très large */
    margin: 1.5rem 0;
    letter-spacing: -0.02em;
    font-weight: 800;
    line-height: 1.1;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.single-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
    border-top: var(--border);
    border-bottom: var(--border);
    margin-top: 2rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--text-color);
    object-fit: cover;
}

.meta-info strong {
    display: block;
    font-size: 1.1rem;
    font-family: var(--font-heading);
}

.meta-info span {
    font-size: 0.9rem;
    color: #555;
}

.single-hero-image {
    border: var(--border);
    box-shadow: var(--shadow-neo);
    border-radius: var(--radius-round);
    overflow: hidden;
    margin-bottom: 4rem;
    height: 500px;
}

.single-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   SINGLE CONTENT & TYPOGRAPHY
   ========================================================================== */
.single-main {
    min-width: 0; /* Empêche le contenu de casser la grille (Grid Blowout) */
}

.single-content {
    font-size: 1.25rem;
    line-height: 1.8;
}

.single-content img {
    border-radius: 12px;
    border: var(--border-thickness) solid var(--text-color);
    margin: 2rem auto;
    display: block;
}

.single-content p {
    margin-bottom: 2rem;
}

.single-content .lead {
    font-size: 1.6rem;
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--text-color);
    margin-bottom: 3rem;
}

.single-content h2 {
    font-size: 2.5rem;
    margin: 4rem 0 2rem;
    padding-bottom: 1rem;
    border-bottom: var(--border-thickness) solid var(--text-color);
}

.single-content h3 {
    font-size: 1.8rem;
    margin: 3rem 0 1.5rem;
}

.single-content ul {
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.single-content li {
    margin-bottom: 1rem;
    position: relative;
    list-style: square;
}

.single-content blockquote {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    padding: 2.5rem;
    border: var(--border);
    background: var(--accent-yellow);
    box-shadow: var(--shadow-neo);
    margin: 3rem 0;
    text-transform: uppercase;
}

/* EXTERNAL LINKS (Mise en avant ultra-visible) */
.external-link {
    background: var(--text-color);
    color: var(--accent-yellow);
    padding: 0.2rem 0.6rem;
    font-weight: 700;
    font-family: var(--font-heading);
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 4px 4px 0px var(--accent-pink);
    text-decoration: none;
    margin: 0 0.3rem;
}

.external-link:hover {
    background: var(--accent-pink);
    color: #FFF;
    transform: translate(-3px, -3px);
    box-shadow: 7px 7px 0px var(--text-color);
}

/* CTA Box dans le contenu */
.cta-box {
    border: var(--border);
    padding: 3rem;
    background: #FFF;
    box-shadow: var(--shadow-neo);
    border-radius: var(--radius-round);
    margin: 4rem 0;
    text-align: center;
}
.cta-box h3 { font-size: 2rem; margin-bottom: 1rem; }

/* ==========================================================================
   SIDEBAR & WIDGETS
   ========================================================================== */
.sticky-sidebar {
    position: sticky;
    top: 120px;
}

.widget {
    border: var(--border);
    background: #FFF;
    padding: 2.5rem;
    box-shadow: var(--shadow-neo);
    margin-bottom: 3rem;
    border-radius: var(--radius-round);
}

.widget h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--text-color);
    padding-bottom: 0.5rem;
}

.neo-toc {
    list-style: none;
    padding: 0;
}

.neo-toc li {
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.neo-toc a {
    color: #444;
    transition: color 0.2s ease;
    font-weight: 500;
}

.neo-toc a:hover {
    color: var(--accent-pink);
}

.neo-toc .toc-h2 {
    font-weight: 700;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    border-bottom: 2px solid var(--text-color);
    padding-bottom: 0.5rem;
}

.neo-toc .toc-h3 {
    padding-left: 1.5rem;
    font-size: 0.95rem;
    position: relative;
}

.neo-toc .toc-h3::before {
    content: '↳';
    position: absolute;
    left: 0;
    color: var(--accent-pink);
}

.neo-input {
    width: 100%;
    padding: 1rem;
    border: var(--border);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    margin-top: 1rem;
    border-radius: 4px;
}
.neo-input:focus {
    background: var(--bg-color);
}

@media (max-width: 1024px) {
    .single-layout {
        grid-template-columns: 1fr; /* La sidebar passe en bas sur les petits écrans */
        gap: 3rem;
    }
    .single-hero-image {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    .hero-text-marquee h1 {
        margin-left: 0;
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
    .single-layout {
        padding-top: 2rem;
    }
    .single-header h1 {
        font-size: 2.2rem;
    }
    .single-hero-image {
        height: 250px;
        margin-bottom: 2rem;
    }
    .single-content h2 {
        font-size: 1.8rem;
    }
    .single-content blockquote {
        font-size: 1.3rem;
        padding: 1.5rem;
    }
    .widget {
        padding: 1.5rem;
    }
    .cta-box {
        padding: 1.5rem;
    }
    .cta-box h3 {
        font-size: 1.5rem;
    }
}
