/*
Theme Name: VDL Media Theme
Theme URI: http://example.com/dsa-media
Author: Alexnchains
Description: Thème optimisé pour des blogs de qualité.
Version: 3.5
*/

/* 1. RESET & GLOBALS */
:root {
    /* Valeurs par défaut si le PHP échoue */
    --accent-light: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --text-grey: #4b5563;
    --container-width: 1240px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-body); /* Variable pour le mode nuit */
    color: var(--text-color); /* Variable pour le mode nuit */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
a:hover { color: var(--brand-blue); } /* DYNAMIQUE */
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; object-fit: cover; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 1.5rem; }
.tag { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand-blue); display: inline-block; margin-bottom: 0.5rem; }

/* =========================================
   2. HEADER & NAVIGATION (STYLE PRESSE)
   ========================================= */

/* Top Bar (Ticker) - Inchangé */
.top-bar { background: #000000; color: var(--white); font-size: 0.8rem; padding: 0.5rem 0; height: 40px; display: flex; align-items: center; }
.top-bar .container { display: flex; align-items: center; width: 100%; }
.ticker-label { background-color: var(--brand-yellow); color: var(--brand-dark); padding: 2px 8px; border-radius: 2px; font-weight: 800; margin-right: 1rem; font-size: 0.7rem; text-transform: uppercase; white-space: nowrap; z-index: 2; }
.dynamic-ticker { flex: 1; position: relative; height: 20px; overflow: hidden; }
.ticker-item { position: absolute; top: 0; left: 0; width: 100%; opacity: 0; transform: translateY(10px); transition: all 0.5s ease-in-out; pointer-events: none; }
.ticker-item.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.ticker-item a { font-weight: 500; font-size: 0.85rem; color: #e5e7eb; }

/* HEADER GLOBAL */
header {
    background: var(--white);
    position: relative;
    z-index: 100;
}

/* --- LIGNE MILIEU (Burger / Logo / CTA) --- */
.header-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    height: 80px;
}

.header-col { flex: 1; display: flex; align-items: center; }
.header-col.left { justify-content: flex-start; }
.header-col.center { justify-content: center; }
.header-col.right { justify-content: flex-end; }

/* Logo */
.logo h1 { font-size: 1.8rem; font-weight: 800; margin: 0; line-height: 1; font-family: var(--font-headers); text-align: center; }
.logo a { color: var(--brand-dark); text-decoration: none; }
.logo img { max-height: 50px; width: auto; }

/* Bouton Burger Presse (Desktop & Mobile) */
.menu-toggle-presse {
    background: none; border: 1px solid var(--border-color); border-radius: 30px;
    padding: 8px 16px; cursor: pointer; display: flex; align-items: center; gap: 10px;
    transition: all 0.2s ease;
}
.menu-toggle-presse:hover { border-color: var(--brand-dark); background: #f9fafb; }

.burger-icon { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.burger-icon span { display: block; width: 100%; height: 2px; background-color: var(--brand-dark); }
.burger-label { font-weight: 700; font-size: 0.9rem; color: var(--brand-dark); font-family: var(--font-headers); }

/* Bouton Contact (Jaune style Le Parisien ou Vert selon palette) */
.btn-subscribe {
    background: var(--brand-yellow); /* Jaune pour l'appel à l'action */
    color: var(--brand-dark) !important;
    padding: 0.6rem 1.2rem;
    border-radius: 30px; /* Rond */
    font-weight: 700;
    font-size: 0.9rem;
    transition: background 0.2s;
    text-align: center;
    white-space: nowrap;
}
.btn-subscribe:hover { background: #eab308; } /* Jaune plus foncé */


/* --- LIGNE BAS (Menu Scrollable) --- */
.header-nav-row {
    border-bottom: 3px solid #121212; /* Ligne forte en bas */
    background: white;
}

.nav-scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 1.5rem; /* Espace pour les flèches */
}

.scroll-nav-container {
    flex: 1;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
    scroll-behavior: smooth;
    padding: 0 10px;
}
.scroll-nav-container::-webkit-scrollbar { display: none; /* Chrome/Safari */ }

.horizontal-nav ul {
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.horizontal-nav a {
    display: block;
    padding: 1rem 0;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    color: var(--brand-dark);
    border-bottom: 3px solid transparent; /* Pour l'état hover */
    margin-bottom: -3px; /* Astuce pour coller à la bordure du bas */
    font-family: var(--font-headers);
}

.horizontal-nav a:hover {
    color: var(--brand-blue);
    border-bottom-color: var(--brand-blue);
}

/* Flèches de scroll (Desktop) */
.nav-arrow {
    background: white;
    border: none;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-grey);
    cursor: pointer;
    z-index: 2;
    padding: 0 10px;
    height: 100%;
    display: none; /* Caché par défaut, affiché via JS si débordement */
}
.nav-arrow:hover { color: var(--brand-dark); font-weight: 800; }

@media (min-width: 1024px) {
    .nav-arrow { display: block; } /* Visible sur desktop */
}

/* =========================================
   HEADER MOBILE & SCROLL FIX
   ========================================= */
@media (max-width: 1024px) {
    
    /* 1. Header Sticky */
    header { 
        position: sticky !important; 
        top: 0; 
        padding: 0; 
        height: auto;
        width: 100%;
        overflow: hidden; /* Évite le scroll horizontal de la page entière */
    }
    
    /* 2. LIGNE 1 : Burger / Logo / Contact */
    .header-main-row {
        height: 60px;
        padding: 0 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
        background: white; /* Sécurité transparence */
    }

    /* BURGER */
    .header-col.left { flex: 0 0 auto; width: 40px; justify-content: flex-start; }
    .menu-toggle-presse { border: none; padding: 0; background: transparent; }
    .burger-label { display: none; }
    .burger-icon { width: 24px; }
    .burger-icon span { height: 3px; background-color: var(--brand-dark); }

    /* LOGO */
    .header-col.center { 
        position: absolute; left: 50%; transform: translateX(-50%); width: auto; z-index: 1; text-align: center;
    }
    .logo h1 { font-size: 1.2rem; white-space: nowrap; margin: 0; }
    .logo img { max-height: 35px; width: auto; }

    /* CONTACT */
    .header-col.right { display: flex !important; flex: 0 0 auto; justify-content: flex-end; }
    .btn-subscribe { font-size: 0.7rem; padding: 6px 12px; height: auto; line-height: 1; white-space: nowrap; display: inline-block; }

    /* 3. LIGNE 2 : MENU HORIZONTAL (SCROLL FIX) */
    .header-nav-row { 
        display: block !important; /* Force l'affichage */
        height: 50px;
        background: white;
        border-bottom: 1px solid #e5e7eb;
        width: 100%;
    }
    
    /* On retire le padding du wrapper pour laisser toute la place */
    .nav-scroll-wrapper {
        padding: 0 !important;
        width: 100%;
        height: 100%;
        display: block; /* Important pour le scroll */
    }
    
    /* Cache les flèches */
    .nav-arrow { display: none !important; }
    
    /* Le conteneur qui scroll */
    .scroll-nav-container {
        display: flex;
        width: 100%;
        height: 100%;
        overflow-x: auto !important; /* Scroll horizontal forcé */
        -webkit-overflow-scrolling: touch; /* Fluidité iOS */
        padding: 0 15px; /* Petit espace au début/fin */
        scrollbar-width: none; /* Cache scrollbar Firefox */
        align-items: center;
    }
    
    /* Cache scrollbar Chrome/Safari */
    .scroll-nav-container::-webkit-scrollbar { display: none; }
    
    /* Ajustement des liens */
    .scroll-nav-container ul {
        display: flex;
        gap: 1.5rem;
        padding-right: 20px; /* Marge de fin pour le scroll */
        margin: 0;
        height: 100%;
        align-items: center;
    }
    
    .scroll-nav-container a {
        font-size: 0.85rem;
        white-space: nowrap; /* Empêche le retour à la ligne */
        padding: 0;
        line-height: 50px; /* Centre verticalement */
    }
}

/* 3. MENU DRAWER */
.mobile-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 900; opacity: 0; visibility: hidden; transition: all 0.3s ease; backdrop-filter: blur(2px); }
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }
.mobile-menu-drawer { position: fixed; top: 0; left: 0; width: 85%; max-width: 320px; height: 100vh; background: var(--white); z-index: 999; transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 4px 0 15px rgba(0,0,0,0.1); display: flex; flex-direction: column; }
.mobile-menu-drawer.active { transform: translateX(0); }
.drawer-header { padding: 1.5rem; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; background: #121212; color: white; }
.drawer-header h3 { font-size: 1.2rem; font-weight: 800; margin: 0; font-family: var(--font-headers); }
.btn-close-menu { background: none; border: none; color: white; font-size: 2rem; cursor: pointer; line-height: 1; }
.drawer-content { padding: 1.5rem; overflow-y: auto; }
.drawer-content ul { display: flex; flex-direction: column; gap: 0; }
.drawer-content li { border-bottom: 1px solid #f3f4f6; }
.drawer-content a { display: block; padding: 1rem 0; font-size: 1.1rem; font-weight: 600; color: var(--brand-dark); font-family: var(--font-headers); }

/* 4. HOMEPAGE */
.une-section { background: var(--white); padding: 3rem 0; border-bottom: 1px solid var(--border-color); }
.une-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2.5rem; }
.main-article .thumbnail { width: 100%; height: 400px; border-radius: 4px; margin-bottom: 1rem; object-position: center; }
.main-article h2 { font-size: 2.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 0.75rem; letter-spacing: -0.02em; color: var(--brand-dark); font-family: var(--font-headers); }
.chapeau { font-family: var(--font-body); font-size: 1.15rem; color: var(--text-grey); margin-bottom: 1rem; }
.meta { font-size: 0.85rem; color: #9ca3af; font-weight: 500; margin-top: 0.5rem; font-family: var(--font-headers); }
.secondary-articles { display: flex; flex-direction: column; gap: 2rem; border-left: 1px solid var(--border-color); padding-left: 2rem; }
.sub-article img { height: 150px; width: 100%; border-radius: 4px; margin-bottom: 0.8rem; }
.sub-article h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.3; margin: 0; color: var(--brand-dark); font-family: var(--font-headers); }
.main-content-area { padding: 3rem 0; display: grid; grid-template-columns: 2.5fr 1fr; gap: 4rem; }
.feed-article { display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem; margin-bottom: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--border-color); }
.feed-article img { height: 160px; width: 100%; border-radius: 4px; object-fit: cover; }
.feed-info h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.3; margin-top: 0; font-family: var(--font-headers); }
.feed-excerpt { font-family: var(--font-body); color: var(--text-grey); font-size: 1rem; margin-bottom: 0.5rem; }
.sidebar-box { background: var(--white); border: 1px solid var(--border-color); padding: 1.5rem; margin-bottom: 2rem; border-radius: 4px; }
.sidebar-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 1rem; border-bottom: 2px solid var(--brand-green); padding-bottom: 0.5rem; display: inline-block; color: var(--brand-dark); font-family: var(--font-headers); }
.widget ul li { margin-bottom: 0.8rem; border-bottom: 1px solid #f3f4f6; padding-bottom: 0.8rem; }
.widget ul li a { font-weight: 600; font-size: 0.95rem; display: block; color: var(--text-main); font-family: var(--font-headers); }

/* 5. SINGLE ARTICLE */
.single-post-wrapper { width: 100%; }
.article-header { margin-bottom: 3rem; text-align: left; position: relative !important; z-index: 1; }
.entry-title { font-size: 3rem; font-weight: 800; line-height: 1.1; margin: 0.5rem 0 1.5rem 0; letter-spacing: -0.03em; color: var(--brand-dark); font-family: var(--font-headers) !important; }
.entry-meta { font-family: var(--font-headers); font-size: 0.95rem; color: var(--text-grey); margin-bottom: 2rem; border-top: 1px solid var(--border-color); padding-top: 1rem; }
.featured-image-container { margin-bottom: 2rem; }
.featured-image-container img { width: 100%; border-radius: 4px; height: auto; }
.article-body-grid { display: grid; grid-template-columns: 240px 1fr; gap: 3rem; align-items: start; }
.article-content-inner { max-width: 800px; width: 100%; }

/* Sommaire Desktop */
.toc-sidebar-desktop { display: none; }
@media (min-width: 1024px) {
    .toc-sidebar-desktop { display: block; height: 100%; }
    .sticky-toc-wrapper { position: sticky; top: 100px; }
    .toc-header { font-weight: 800; font-size: 0.85rem; text-transform: uppercase; color: var(--text-grey); margin-bottom: 1.2rem; font-family: var(--font-headers); }
    .toc-list-container { padding-left: 0; border: none; }
    #dsa-toc-desktop ul { margin: 0; padding: 0; }
    #dsa-toc-desktop a { display: block; padding: 8px 12px; margin-bottom: 6px; font-size: 0.9rem; color: var(--text-grey); text-decoration: none; border-radius: 6px; transition: all 0.2s ease; font-family: var(--font-headers); }
    #dsa-toc-desktop a:hover { background-color: #f3f4f6; }
    #dsa-toc-desktop a.active { background-color: var(--brand-blue-light); color: var(--brand-blue); font-weight: 700; }
}

/* --- B. SOMMAIRE MOBILE (CAPSULE LARGE & CENTRÉE) --- */
.mobile-toc-accordion { display: none; }

@media (max-width: 1024px) {
    .mobile-toc-accordion {
        display: block;
        position: fixed;
        bottom: 25px;
        left: 50%;
        transform: translateX(-50%);
        
        /* LARGEUR AUGMENTÉE */
        width: 300px; 
        max-width: 90%;
        z-index: 9999;
        
        /* Design Capsule */
        background: white; 
        border: 1px solid var(--brand-blue); 
        border-radius: 50px; 
        box-shadow: 0 6px 20px rgba(0,0,0,0.15); 
        overflow: visible; /* Important pour que la liste puisse sortir */
    }

    /* Le Bouton (Grille pour centrage parfait) */
    .mobile-toc-accordion summary {
        padding: 0.9rem 1.5rem;
        cursor: pointer;
        list-style: none;
        background: transparent; /* Fix bug rectangle */
        
        /* GRILLE : Icone | Texte | Icone */
        display: grid;
        grid-template-columns: 24px 1fr 24px; 
        align-items: center;
        gap: 10px;
    }
    .mobile-toc-accordion summary::-webkit-details-marker { display: none; }

    /* Icone Gauche */
    .toc-icon-left {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        color: var(--brand-blue);
    }

    /* Texte du milieu */
    .toc-label {
        text-align: center; /* Centrage du texte */
        font-family: var(--font-headers);
        font-weight: 700;
        font-size: 1.05rem; 
        color: var(--brand-blue);
        text-transform: none;
        white-space: nowrap;
    }

    /* Icone Droite (Flèche) */
    .toc-icon-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        color: var(--brand-blue);
    }

    /* Animation de la flèche */
    .chevron-icon { transition: transform 0.3s ease; }
    .mobile-toc-accordion details[open] summary .chevron-icon { transform: rotate(180deg); }

    /* La Liste (S'ouvre vers le HAUT) */
    #dsa-toc-mobile-body {
        position: absolute;
        bottom: 100%; 
        left: 0;
        width: 100%;
        margin-bottom: 12px; /* Espace entre bouton et liste */
        
        max-height: 55vh;
        overflow-y: auto;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 16px; /* Coins un peu moins ronds pour la liste */
        padding: 1rem;
        box-shadow: 0 5px 25px rgba(0,0,0,0.15);
        display: none; 
    }
    
    .mobile-toc-accordion details[open] #dsa-toc-mobile-body { display: block; }
    
    /* Liens */
    #dsa-toc-mobile-body ul { margin: 0; padding: 0; }
    #dsa-toc-mobile-body li { margin-bottom: 0; border-bottom: 1px solid #f3f4f6; }
    #dsa-toc-mobile-body a { 
        display: block; 
        padding: 0.8rem 0; 
        color: var(--text-main); 
        font-weight: 500; 
        font-size: 0.95rem; 
        text-decoration: none; 
    }
}

/* --- COMPATIBILITÉ DARK MODE (CORRECTIF RECTANGLE DÉFINITIF) --- */

/* 1. Le conteneur principal (La Capsule) */
body.dark-mode .mobile-toc-accordion {
    background-color: #1e1e1e !important; /* Seul lui doit avoir la couleur */
    border-color: #555 !important;
}

/* 2. FORCER LA TRANSPARENCE SUR L'INTÉRIEUR */
/* C'est ici que le rectangle disparaît */
body.dark-mode .mobile-toc-accordion details,
body.dark-mode .mobile-toc-accordion summary {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 3. SÉCURITÉ : Si une couleur persiste, on force l'arrondi sur le summary */
body.dark-mode .mobile-toc-accordion summary {
    border-radius: 50px !important;
}

/* 4. Couleurs des textes et icônes */
body.dark-mode .toc-label { color: #ffffff !important; }
body.dark-mode .toc-icon-left,
body.dark-mode .toc-icon-right { color: #ffffff !important; }

/* 5. La liste déroulante (Le menu qui s'ouvre) */
body.dark-mode #dsa-toc-mobile-body {
    background-color: #1e1e1e !important;
    border-color: #333 !important;
}
body.dark-mode #dsa-toc-mobile-body a {
    color: #e0e0e0 !important;
    border-bottom-color: #333;
}

/* CONTENU & TYPOGRAPHIE (DYNAMIQUE) */
.content { font-family: var(--font-body); font-size: 1.125rem; color: #333; line-height: 1.8; }
.content p { margin-bottom: 1.5rem; }
.content h2, .content h3, .content h4 { font-family: var(--font-headers) !important; color: var(--brand-dark); margin-top: 3rem; margin-bottom: 1.5rem; line-height: 1.25; }
.content h2 { font-weight: 800; font-size: 1.8rem; position: relative; padding-bottom: 10px; }
.content h2::after { content: ''; position: absolute; bottom: 0; left: 0; width: 60px; height: 4px; background-color: var(--brand-green); border-radius: 2px; }
.content h3 { font-weight: 700; font-size: 1.4rem; margin-top: 2.5rem; margin-bottom: 1rem; }
.content ul { list-style: disc !important; padding-left: 1.5rem; margin-bottom: 1.5rem; }
.content ol { list-style: decimal !important; padding-left: 1.5rem; margin-bottom: 1.5rem; }
.content li { margin-bottom: 0.5rem; }

/* Auteur */
.dsa-author-box { margin-top: 5rem; padding: 2.5rem; background-color: var(--white); border: 1px solid var(--border-color); border-radius: 8px; display: flex; align-items: center; gap: 2rem; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05); }
.author-avatar img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 3px solid var(--brand-green); padding: 2px; background: white; }
.author-info h4 { margin: 0 0 0.5rem 0; font-size: 1.3rem; font-weight: 800; color: var(--brand-dark); font-family: var(--font-headers); }
.author-bio { font-size: 0.95rem; color: var(--text-grey); margin-bottom: 1rem; font-family: var(--font-body); line-height: 1.5; }
.author-links a { font-size: 0.8rem; font-weight: 700; color: var(--brand-blue); text-transform: uppercase; border: 1px solid var(--brand-blue); padding: 5px 10px; border-radius: 4px; transition: all 0.2s; font-family: var(--font-headers); }
.author-links a:hover { background: var(--brand-blue); color: white; }

/* Commentaires */
#comments { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid #e5e7eb; }
#comments h3 { font-family: var(--font-headers); font-weight: 800; font-size: 1.5rem; margin-bottom: 2rem; }
.comment-list { margin: 0; padding: 0; list-style: none; }
.comment-body { background: #f9fafb; padding: 1.5rem; border-radius: 8px; margin-bottom: 1.5rem; border: 1px solid #e5e7eb; }
.comment-meta { font-size: 0.85rem; color: #6b7280; margin-bottom: 0.5rem; font-weight: 600; font-family: var(--font-headers); }
.comment-content p { font-size: 1rem; margin-bottom: 1rem; }
.comment-respond { background: white; margin-top: 3rem; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 0.5rem; font-size: 0.9rem; font-family: var(--font-headers); }
.comment-form textarea, .comment-form input { width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 6px; margin-bottom: 1.5rem; font-family: inherit; }
.form-submit .submit { background-color: var(--brand-dark); color: white; padding: 12px 24px; border: none; border-radius: 4px; font-weight: 700; cursor: pointer; font-family: var(--font-headers); }

/* 6. FOOTER */
footer { background: #000000; color: #9ca3af; padding: 5rem 0; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; }
.footer-brand h4 { color: var(--white); font-size: 1.5rem; margin-bottom: 1rem; font-weight: 800; font-family: var(--font-headers); }
.footer-col h4 { color: var(--white); margin-bottom: 1.2rem; font-weight: 700; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 0.05em; font-family: var(--font-headers); }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col a:hover { color: var(--white); text-decoration: underline; }

/* 7. RESPONSIVE */
@media (max-width: 1024px) {
    .une-grid, .main-content-area { grid-template-columns: 1fr; gap: 3rem; }
    .article-body-grid { grid-template-columns: 1fr; gap: 2rem; margin-top: 0; }
    .toc-sidebar-desktop { display: none; }
    .article-content-inner { max-width: 100%; }
    .main-nav { display: none; }
    .menu-toggle { display: block; }
}
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .secondary-articles { border-left: none; padding-left: 0; border-top: 1px solid var(--border-color); padding-top: 2rem; }
}
@media (max-width: 768px) {
    .container { padding-left: 1.25rem; padding-right: 1.25rem; }
    .article-content-inner { padding: 0 5px; }
    .feed-article { grid-template-columns: 1fr; }
    .entry-title { font-size: 2rem; }
    .dsa-author-box { flex-direction: column; text-align: center; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* =========================================
   8. FIX FINAL : TABLEAUX SCROLLABLES & LAYOUT
   ========================================= */

/* 1. SÉCURITÉ CONTENEUR (CRUCIAL POUR LE SCROLL) */
/* Permet au contenu de rétrécir même s'il y a un tableau large dedans */
.article-content-inner {
    min-width: 0; /* L'astuce magique pour CSS Grid */
    width: 100%;
    max-width: 100%;
}

/* 2. MEDIA (Images 100% max) */
.content img, 
.content video, 
.content iframe {
    max-width: 100% !important;
    height: auto !important;
}

/* 3. TABLEAUX (SCROLL HORIZONTAL) */
/* On force le tableau à être un bloc qui scroll */
.content table,
.wp-block-table {
    display: block !important; /* Force le comportement bloc */
    width: 100% !important;
    overflow-x: auto !important; /* Barre de défilement horizontale */
    -webkit-overflow-scrolling: touch; /* Fluidité iOS */
    margin-bottom: 2rem;
    border-collapse: collapse;
}

/* Style des cellules */
.content th, 
.content td {
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
    text-align: left;
    
    /* Empêche le texte de se casser sur 3 lignes, force la largeur */
    white-space: nowrap; 
    min-width: 120px; 
}

.content th {
    background-color: #f3f4f6;
    color: var(--brand-dark);
    font-weight: 700;
}

/* Scrollbar visuelle pour indiquer qu'on peut scroller */
.content table::-webkit-scrollbar {
    height: 6px;
}
.content table::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
.content table::-webkit-scrollbar-track {
    background: #f1f1f1;
}

/* ==========================================================================
   LAYOUT HOMEPAGE : BLOCS MAGAZINES (CATÉGORIES)
   ========================================================================== */

.category-magazine-block {
    margin-bottom: 5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 3rem;
}
.category-magazine-block:last-child { border-bottom: none; }

/* 1. EN-TÊTE DU BLOC */
.cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--brand-dark); /* Ligne couleur texte */
    padding-bottom: 1rem;
}

.cat-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1;
    color: var(--brand-dark); /* Couleur dynamique */
    font-family: var(--font-headers);
}

.btn-cat-link {
    background-color: var(--brand-yellow); /* Jaune dynamique */
    color: var(--brand-dark);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    transition: opacity 0.2s;
}
.btn-cat-link:hover { opacity: 0.8; }


/* 2. GRILLE PRINCIPALE (Gros Gauche / Liste Droite) */
.cat-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 3rem;
}

/* 3. CARTE PRINCIPALE (GAUCHE) */
.cat-main-content { margin-top: 1.5rem; }

.cat-main-content h3 {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
    font-family: var(--font-headers);
}
.cat-main-content h3 a { color: var(--brand-dark); text-decoration: none; }

.cat-excerpt {
    font-size: 1rem;
    color: var(--text-grey);
    line-height: 1.6;
    font-family: var(--font-body);
}

/* 4. LISTE DROITE */
.cat-list-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.cat-small-card {
    display: grid;
    grid-template-columns: 160px 1fr; /* Image fixe | Texte */
    gap: 1.5rem;
    align-items: start;
}

.cat-small-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0;
    margin-top: 0.5rem;
    font-family: var(--font-headers);
}
.cat-small-content h4 a { color: var(--brand-dark); text-decoration: none; }

/* 5. METADONNÉES (Tags & Dates) */
.cat-meta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-headers);
}

.cat-tag {
    background-color: var(--brand-blue-light); /* Fond clair dynamique */
    color: var(--brand-blue); /* Texte bleu dynamique */
    padding: 2px 8px;
    border-radius: 4px;
}

.cat-date { color: #9ca3af; font-weight: 500; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .cat-grid { grid-template-columns: 1fr; gap: 2rem; }
    
    .cat-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .cat-header h2 { font-size: 2rem; }
    
    .cat-small-card { 
        grid-template-columns: 120px 1fr; 
        gap: 1rem; 
    }
}

@media (max-width: 600px) {
    .cat-small-card { grid-template-columns: 1fr; }
    .cat-small-img img { width: 100% !important; height: 180px !important; }
}

/* ==========================================================================
   STYLE PAGE CATEGORIE (SLIDER & HEADER)
   ========================================================================== */

/* 1. HEADER CATÉGORIE */
.category-header-section { margin-bottom: 3rem; border-bottom: 1px solid var(--border-color); padding-bottom: 2rem; }
.cat-page-title {
    font-family: var(--font-headers);
    font-size: 3.5rem; /* Très gros titre */
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: 1rem;
    line-height: 1.1;
}
.cat-page-desc {
    font-size: 1.1rem;
    color: var(--text-grey);
    max-width: 800px;
    line-height: 1.6;
    font-family: var(--font-body);
}

/* ==========================================================================
   SLIDER CATÉGORIE (VRAI SLIDE FLUIDE)
   ========================================================================== */

.category-hero-slider {
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden; /* Cache ce qui dépasse */
}

/* Fenêtre de visualisation */
.slider-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* La bande qui bouge */
.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out; /* L'effet de slide fluide */
    width: 100%;
}

/* Chaque slide prend 100% de la largeur du conteneur */
.slide-item {
    min-width: 100%;
    box-sizing: border-box;
}

.slide-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* Styles inchangés (Image, Texte...) */
.slide-image img { width: 100%; height: 400px; object-fit: cover; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.slide-content h2 { font-size: 2.2rem; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; margin-top: 0.5rem; font-family: var(--font-headers); }
.slide-content h2 a { color: var(--brand-dark); text-decoration: none; }
.slide-meta { margin-bottom: 1rem; font-size: 0.85rem; display: flex; align-items: center; gap: 1rem; }
.slide-meta .tag { background: var(--brand-blue-light); color: var(--brand-blue); padding: 2px 8px; border-radius: 4px; margin: 0; }
.slide-meta .date { color: #9ca3af; font-weight: 600; }
.slide-excerpt { font-size: 1.05rem; color: var(--text-grey); margin-bottom: 2rem; line-height: 1.6; font-family: var(--font-body); }
.btn-slide-read { display: inline-block; background-color: var(--brand-yellow); color: var(--brand-dark); font-weight: 700; padding: 0.8rem 1.5rem; border-radius: 4px; text-transform: none; font-size: 0.95rem; transition: opacity 0.2s; font-family: var(--font-headers); }
.btn-slide-read:hover { opacity: 0.9; color: black; }

/* Points */
.slider-dots { text-align: center; margin-top: 1.5rem; }
.dot { cursor: pointer; height: 12px; width: 12px; margin: 0 5px; background-color: #e5e7eb; border-radius: 50%; display: inline-block; border: none; padding: 0; transition: background-color 0.3s; }
.dot.active, .dot:hover { background-color: var(--brand-yellow); transform: scale(1.2); }

/* Responsive */
@media (max-width: 1024px) {
    .slide-grid { grid-template-columns: 1fr; gap: 2rem; }
    .slide-image img { height: 250px; }
}

/* ==========================================================================
   STYLE HERO ARTICLE : CENTRÉ & MAÎTRISÉ
   ========================================================================== */

/* CONTENEUR GLOBAL (Non Sticky garanti) */
.article-hero-compact {
    margin-bottom: 2rem;
    position: relative !important; /* Force le non-sticky */
    top: auto !important;
    z-index: 1;
    text-align: center; /* Tout centrer par défaut (optionnel, sinon retirer) */
}

/* 1. TITRE */
.entry-title {
    font-family: var(--font-headers) !important;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    color: #111827;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    text-align: left; /* Titre aligné à gauche */
}

/* 2. META DONNÉES (Auteur/Date) */
.hero-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
    font-family: var(--font-headers);
    font-size: 0.9rem;
    color: var(--text-grey);
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    text-align: left;
}
.author-name { text-transform: uppercase; font-weight: 700; color: #111827; }

/* 3. IMAGE (Petite, Centrée, Naturelle) */
.hero-figure {
    display: block;
    margin: 0 auto 2rem auto; /* Marges auto pour centrer le bloc */
    width: 100%;
    text-align: center; /* Centre l'image si elle est inline */
}

.hero-figure img {
    /* C'est ici qu'on maîtrise la taille */
    max-width: 500px; /* Largeur max fixée (ajustable) */
    width: 100%;      /* S'adapte si l'écran est plus petit que 500px */
    height: auto;     /* Garde le ratio naturel */
    
    display: inline-block; /* Permet le centrage */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* Légère ombre pour détacher */
}

/* 4. CHAPEAU */
.article-lead {
    font-family: var(--font-body);
    font-size: 1.25rem;
    line-height: 1.6;
    color: #111827;
    font-weight: 500;
    margin-top: 1rem;
    text-align: left; /* Texte aligné à gauche */
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .entry-title { font-size: 1.8rem; }
    
    /* Sur mobile, l'image prend la largeur dispo mais reste centrée */
    .hero-figure img { 
        max-width: 100%; 
    }
}

/* =========================================
   STYLE "EN BREF" (ENCART)
   ========================================= */
.en-bref-box {
    background-color: var(--brand-blue-light); /* Fond clair du thème */
    padding: 2rem;
    border-radius: 8px;
    margin: 2.5rem 0;
    /* Suppression de la bordure à gauche */
}

/* Le titre à l'intérieur */
.en-bref-box h2, 
.en-bref-box h3 {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
    font-size: 1.4rem !important;
    color: var(--brand-dark);
}

/* La liste à l'intérieur */
.en-bref-box ul {
    margin-bottom: 0 !important;
    padding-left: 1.5rem !important;
    list-style: disc !important;
}

.en-bref-box li {
    margin-bottom: 0.5rem;
}

/* =========================================
   FIX TAILLE TITRES MOBILE (VERSION COMPACTE)
   (A coller tout à la fin de style.css)
   ========================================= */

@media (max-width: 768px) {
    
    /* 1. Titre H1 des pages Catégories */
    .cat-page-title {
        font-size: 1.8rem !important; /* Était 2.2rem */
        line-height: 1.1;
        margin-bottom: 0.5rem;
    }

    /* 2. Homepage : Titre "A la Une" */
    .main-article h2 {
        font-size: 1.5rem !important; /* Était 1.8rem */
        line-height: 1.2;
    }

    /* 3. Homepage : Titre principal des blocs Catégories */
    .cat-main-content h3 {
        font-size: 1.4rem !important; /* Était 1.6rem */
        line-height: 1.25;
    }

    /* 4. Article seul : Titre H1 */
    .entry-title {
        font-size: 1.7rem !important; /* Était 1.9rem */
        line-height: 1.2;
    }
    
    /* 5. Slider : Titre dans le slider */
    .slide-content h2 {
        font-size: 1.3rem !important; /* Était 1.5rem */
    }

    /* 6. Titres H2 et H3 DANS le corps de l'article */
    .content h2 {
        font-size: 1.4rem !important;
        margin-top: 2rem !important;
    }
    .content h3 {
        font-size: 1.2rem !important;
        margin-top: 1.5rem !important;
    }
}

/* =========================================
   RÉDUCTION TAILLE TEXTE (MOBILE)
   (A coller tout à la fin de style.css)
   ========================================= */

@media (max-width: 768px) {
    
    /* 1. Corps de l'article (Paragraphes et Listes) */
    /* On passe de 1.125rem (18px) à 1rem (16px) */
    .content, 
    .content p, 
    .content li {
        font-size: 1rem !important; 
        line-height: 1.6;
    }

    /* 2. Chapeau (Introduction en gras) */
    .article-lead {
        font-size: 1.1rem !important; /* Un peu plus grand que le texte */
        line-height: 1.5;
    }

    /* 3. Extraits sur la page d'accueil et catégories */
    .feed-excerpt, 
    .cat-excerpt, 
    .slide-excerpt,
    .small-excerpt {
        font-size: 0.9rem !important; /* Plus petit pour les résumés */
        line-height: 1.5;
    }

    /* 4. Métadonnées (Auteur, Date) */
    .entry-meta, 
    .cat-meta-row,
    .slide-meta {
        font-size: 0.8rem !important;
    }
}

/* ==========================================================================
   MAILLAGE INTERNE & NAVIGATION
   ========================================================================== */

/* --- 1. FIL D'ARIANE (BREADCRUMBS) --- */
.breadcrumbs {
    font-size: 0.8rem;
    color: var(--text-grey);
    margin-bottom: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    font-family: var(--font-headers);
}
.breadcrumbs a { color: var(--text-grey); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand-blue); text-decoration: underline; }
.breadcrumbs .sep { margin: 0 8px; color: #cbd5e0; }


/* --- 2. ARTICLES SIMILAIRES (BAS DE PAGE) --- */
.related-posts-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.related-title {
    font-family: var(--font-headers);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--brand-dark);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.related-card .related-img img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
    transition: opacity 0.2s;
}
.related-card .related-img:hover img { opacity: 0.9; }

.related-content .tag { margin-bottom: 0.5rem; }

.related-content h4 {
    font-family: var(--font-headers);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0.5rem;
}
.related-content h4 a { color: var(--brand-dark); text-decoration: none; }


/* --- 3. NAVIGATION AUTRES CATÉGORIES (PAGE CAT) --- */
.other-cats-section {
    margin-top: 4rem;
    padding: 3rem;
    background-color: var(--accent-light);
    border-radius: 8px;
    text-align: center;
}

.other-cats-title {
    font-family: var(--font-headers);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-grey);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.other-cats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.cat-pill {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-weight: 700;
    color: var(--brand-dark);
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: var(--font-headers);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.cat-pill:hover {
    background: var(--brand-blue);
    color: white;
    border-color: var(--brand-blue);
    transform: translateY(-2px);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .related-grid { grid-template-columns: 1fr; gap: 2rem; }
    .other-cats-section { padding: 2rem 1rem; }
    .cat-pill { width: 100%; text-align: center; } /* Boutons larges sur mobile */
}

/* =========================================
   BLOC "LES PLUS LUS" (TRENDING BAR)
   ========================================= */

.trending-bar-section {
    background-color: #121212; /* Fond Primaire Sombre */
    color: white;
    padding: 1.5rem 0;
    border-bottom: 4px solid var(--brand-yellow); /* Touche de couleur accent */
    margin-bottom: 2rem;
}

.trending-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Titre à gauche */
.trending-label h3 {
    font-family: var(--font-headers);
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0;
    white-space: nowrap;
    color: var(--brand-yellow); /* Jaune pour ressortir */
    line-height: 1;
}

/* Liste des articles */
.trending-list {
    display: flex;
    gap: 1.5rem;
    flex: 1;
    overflow-x: auto; /* Scroll horizontal si besoin */
    scrollbar-width: none; /* Cache scrollbar Firefox */
    -ms-overflow-style: none; /* IE */
    padding-bottom: 5px; /* Espace pour le scroll tactile */
}
.trending-list::-webkit-scrollbar { display: none; }

/* Item individuel */
.trending-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 200px; /* Largeur min pour lisibilité */
    max-width: 220px;
    text-decoration: none;
    transition: opacity 0.2s;
    position: relative;
    padding-right: 15px;
    border-right: 1px solid rgba(255,255,255,0.1); /* Séparateur subtil */
}
.trending-item:last-child { border-right: none; }
.trending-item:hover { opacity: 0.8; }

/* Le Numéro (1, 2, 3...) */
.trend-rank {
    font-family: var(--font-headers);
    font-size: 2rem;
    font-weight: 800;
    color: rgba(255,255,255,0.2); /* Blanc transparent */
    line-height: 0.8;
}

/* Infos Texte */
.trend-title {
    display: block;
    font-family: var(--font-headers);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.3;
    color: white;
    margin-bottom: 4px;
    /* Coupe après 2 lignes */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trend-views {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
    text-transform: uppercase;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .trending-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .trending-list {
        width: 100%;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch; /* Scroll fluide mobile */
    }
    
    .trending-item {
        min-width: 240px; /* Plus large sur mobile pour le doigt */
    }
}

/* ==========================================================================
   NOUVEAU HEADER "SPLIT" (2 Colonnes Desktop)
   ========================================================================== */

.article-hero-split {
    display: grid;
    grid-template-columns: 1.2fr 1fr; /* Texte un peu plus large que l'image */
    gap: 4rem;
    align-items: center; /* Centrage vertical */
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color); /* Séparation légère tout en bas */
}

/* --- PARTIE GAUCHE : TEXTE --- */
.hero-text-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Breadcrumbs (Fil d'ariane) */
.breadcrumbs {
    font-size: 0.8rem;
    color: var(--text-grey);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-headers);
}
.breadcrumbs a { color: var(--text-grey); text-decoration: none; }
.breadcrumbs .sep { margin: 0 8px; color: #cbd5e0; }

/* Titre */
.entry-title {
    font-family: var(--font-headers) !important;
    font-size: 3rem; /* Gros titre impactant */
    font-weight: 800;
    line-height: 1.1;
    color: var(--brand-dark);
    margin-top: 0;
    margin-bottom: 1.5rem;
}

/* Métas */
.hero-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
    font-family: var(--font-headers);
    font-size: 0.9rem;
    color: var(--text-grey);
}
.author-name { font-weight: 700; color: var(--brand-dark); text-transform: uppercase; }
.sep { color: #cbd5e0; }

/* Chapeau (Intro) */
.article-lead {
    font-family: var(--font-body);
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-main);
    padding-left: 1.5rem;
    border-left: 4px solid var(--brand-yellow); /* Petite touche couleur */
}
.article-lead p { margin: 0; }


/* --- PARTIE DROITE : IMAGE --- */
.hero-image-side {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.hero-image-side img {
    width: 100%;
    height: 100%;
    max-height: 500px; /* Limite hauteur */
    object-fit: cover; /* Remplit sans déformer */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); /* Ombre douce pour détacher du fond */
}


/* --- RESPONSIVE MOBILE --- */
@media (max-width: 1024px) {
    .article-hero-split {
        grid-template-columns: 1fr; /* Une seule colonne */
        gap: 2rem;
        padding-bottom: 2rem;
        margin-bottom: 2rem;
    }

    /* On inverse l'ordre sur mobile si on veut l'image en premier ? 
       Ici je garde Texte en premier comme demandé précédemment */
    
    .entry-title { font-size: 2rem; }
    
    .hero-image-side {
        min-height: auto;
        order: -1; /* Optionnel : Mettre order: -1 si vous voulez l'image AU DESSUS du titre sur mobile finalement */
    }
    
    .hero-image-side img {
        max-height: 300px;
        width: 100%;
    }
    
    .article-lead {
        font-size: 1.1rem;
        padding-left: 0;
        border-left: none;
    }
}

/* ==========================================================================
   PATCH FINAL : ANTI-STICKY & DESIGN ÉPURÉ (FOND BLANC)
   ========================================================================== */

/* 1. DESIGN ÉPURÉ (Plus de cadre blanc sur fond gris) */
body {
    background-color: #ffffff !important; /* Fond blanc uni partout */
}

/* On enlève la bordure du header pour que ça fonde dans la page */
.article-hero-split {
    border-bottom: none !important;
}

/* 2. STOP STICKY MOBILE (Le header scrolle avec la page) */
@media (max-width: 1024px) {
    
    /* Force le menu principal à ne pas rester collé */
    header { 
        position: relative !important; 
        top: auto !important;
        height: auto !important;
    }

    /* Force le bloc titre/image à rester à sa place */
    .article-hero-split,
    .header-main-row {
        position: relative !important;
        top: auto !important;
    }
}

/* =========================================
   DARK MODE & SWITCH
   ========================================= */

/* =========================================
   DARK MODE & SWITCH (CORRECTIF FOND)
   ========================================= */


/* 2. FORCER LES FONDS SOMBRES */
/* On cible le body ET tous les conteneurs qui sont blancs par défaut */
body.dark-mode,
body.dark-mode header,
body.dark-mode .header-nav-row,
body.dark-mode .header-main-row,
body.dark-mode .mobile-menu-drawer,
body.dark-mode .une-section,
body.dark-mode .main-content-area,
body.dark-mode .feed-article, 
body.dark-mode .sidebar-box,
body.dark-mode .category-hero-slider,
body.dark-mode .trending-item,
body.dark-mode .nav-arrow,
body.dark-mode .mobile-toc-accordion summary,
body.dark-mode #dsa-toc-mobile-body,
body.dark-mode .dsa-author-box,
body.dark-mode .cat-pill,
body.dark-mode .article-content-inner,
body.dark-mode .comment-respond,
body.dark-mode .comment-body {
    background-color: var(--bg-body) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

/* Cas spécifiques pour les éléments "surélevés" (Cartes, inputs...) */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode .cat-tag,
body.dark-mode .tag,
body.dark-mode content th,
body.dark-mode tr:nth-child(even) {
    background-color: var(--bg-element) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

/* Inversion des liens et textes */
body.dark-mode a { color: var(--text-color); }
body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4,
body.dark-mode .logo a { 
    color: var(--brand-dark) !important; 
}

/* Gestion du logo (Si c'est une image sombre, on peut ajouter un filtre) */
body.dark-mode .logo img {
    filter: brightness(0) invert(1); /* Rend le logo blanc si c'est un PNG noir */
}

/* Burger Menu en blanc */
body.dark-mode .burger-icon span {
    background-color: white !important;
}

/* Switch Toggle Style */
.dark-mode-toggle { display: flex; align-items: center; justify-content: space-between; }
.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--brand-blue); }
input:checked + .slider:before { transform: translateX(24px); }

/* =========================================
   PATCH FINAL : FIX COULEURS DARK MODE
   (A coller à la toute fin du fichier)
   ========================================= */

/* 1. HEADER & FOOTER (DOIVENT RESTER SOMBRES) */
/* On force une couleur sombre fixe, on ignore l'inversion des variables */
body.dark-mode .top-bar,
body.dark-mode footer,
body.dark-mode .drawer-header {
    background-color: #020617 !important; /* Noir très profond */
    color: #ffffff !important;
}

/* Le texte et les liens dans le footer doivent rester clairs */
body.dark-mode footer a,
body.dark-mode footer p,
body.dark-mode footer li,
body.dark-mode .top-bar a {
    color: #e2e8f0 !important;
}

/* 2. MENU NAVIGATION (Le fond doit être sombre, pas blanc) */
body.dark-mode header,
body.dark-mode .header-main-row,
body.dark-mode .header-nav-row,
body.dark-mode .scroll-nav-container {
    background-color: #1e293b !important; /* Gris bleuté sombre */
    border-color: #334155 !important;
}

/* 3. BLOC "EN BREF" (Visibilité Texte) */
body.dark-mode .en-bref-box {
    background-color: #1e293b !important; /* Fond sombre */
    border-color: #334155 !important; /* Bordure discrète */
}
body.dark-mode .en-bref-box h2,
body.dark-mode .en-bref-box h3 {
    color: var(--brand-blue) !important; /* Titre en bleu pour contraste */
}
body.dark-mode .en-bref-box li,
body.dark-mode .en-bref-box p {
    color: #f1f5f9 !important; /* Texte en blanc */
}

/* 4. TABLEAUX (Fix Fond et Texte) */
body.dark-mode .content table,
body.dark-mode .wp-block-table {
    border-color: #334155 !important;
}

body.dark-mode .content th {
    background-color: #0f172a !important; /* En-tête tableau très sombre */
    color: #ffffff !important;
    border-color: #334155 !important;
}

body.dark-mode .content td {
    background-color: #1e293b !important; /* Cellules sombres */
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

/* Alternance des lignes tableau (Zebra) */
body.dark-mode .content tr:nth-child(even) td {
    background-color: #263344 !important; /* Légèrement plus clair */
}

/* =========================================
   PATCH FINAL DARK MODE : TEXTE & NAV CAT
   ========================================= */

/* 1. CORRECTION TEXTE ARTICLE (Illisible actuellement) */
body.dark-mode .content,
body.dark-mode .content p,
body.dark-mode .content li,
body.dark-mode .content strong,
body.dark-mode .article-lead {
    color: #e2e8f0 !important; /* Force le texte en gris très clair */
}

/* Force les titres Hn en blanc pur */
body.dark-mode .content h1,
body.dark-mode .content h2,
body.dark-mode .content h3,/* =========================================
   DARK MODE & SWITCH (VERSION NEUTRE / MONOCHROME)
   ========================================= */

/* 1. SWITCH TOGGLE (Style du bouton) */
.dark-mode-toggle-container { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); }
.theme-switch { display: inline-block; height: 26px; position: relative; width: 50px; }
.theme-switch input { display: none; }
.slider { background-color: #ccc; bottom: 0; cursor: pointer; left: 0; position: absolute; right: 0; top: 0; transition: .4s; border-radius: 34px; }
.slider:before { background-color: #fff; bottom: 3px; content: ""; height: 20px; left: 3px; position: absolute; transition: .4s; width: 20px; border-radius: 50%; }

/* MODIFICATION ICI : Le fond devient gris foncé au lieu de bleu quand actif */
input:checked + .slider { background-color: #666666; } 
input:checked + .slider:before { transform: translateX(24px); }


/* 2. VARIABLES DARK MODE (NOIR & GRIS NEUTRE) */
body.dark-mode {
    /* Couleurs de fond */
    --bg-body: #121212 !important;        /* Noir Mat */
    --bg-element: #1e1e1e !important;     /* Gris Foncé (Header/Cards) */
    --border-color: #333333 !important;   /* Bordures discrètes */
    
    /* Couleurs de texte */
    --text-color: #e0e0e0 !important;     /* Blanc cassé (Lecture) */
    --brand-dark: #ffffff !important;     /* Titres en blanc */
    --text-grey: #a0a0a0 !important;      /* Méta données */
    
    /* Couleurs de marque adaptées */
    --brand-blue-light: #252525 !important; /* Fonds colorés deviennent gris */
    
    /* Nouvelle variable pour remplacer le bleu partout */
    --accent-neutral: #ffffff !important;   /* Blanc pur pour les accents */
}


/* 3. APPLICATION DES FONDS (GLOBAL) */
body.dark-mode,
body.dark-mode .main-content-area,
body.dark-mode .article-content-inner,
body.dark-mode .article-body-grid,
body.dark-mode .feed-article,
body.dark-mode .trending-item,
body.dark-mode .nav-arrow,
body.dark-mode .mobile-toc-accordion summary,
body.dark-mode #dsa-toc-mobile-body,
body.dark-mode .dsa-author-box,
body.dark-mode .cat-pill,
body.dark-mode .comment-respond,
body.dark-mode .comment-body,
body.dark-mode .content td,
body.dark-mode .other-cats-section,
body.dark-mode .category-hero-slider {
    background-color: var(--bg-body) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

/* 4. ÉLÉMENTS SURÉLEVÉS (GRIS FONCÉ #1E1E1E) */
body.dark-mode header,
body.dark-mode .header-main-row,
body.dark-mode .header-nav-row,
body.dark-mode .scroll-nav-container,
body.dark-mode .mobile-menu-drawer,
body.dark-mode .sidebar-box,
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode .cat-tag,
body.dark-mode .tag,
body.dark-mode .content th,
body.dark-mode .content tr:nth-child(even),
body.dark-mode .en-bref-box {
    background-color: var(--bg-element) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

/* 5. ÉLÉMENTS NOIRS (Ticker / Footer / Drawer Header) */
body.dark-mode .top-bar,
body.dark-mode footer,
body.dark-mode .drawer-header {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #333 !important;
}
body.dark-mode footer a, 
body.dark-mode footer p,
body.dark-mode .top-bar a {
    color: #cccccc !important;
}

/* 6. TYPOGRAPHIE & LIENS */
body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode .logo a,
body.dark-mode .entry-title,
body.dark-mode .cat-page-title,
body.dark-mode .article-lead,
body.dark-mode .content strong {
    color: #ffffff !important;
}

body.dark-mode .content,
body.dark-mode .content p,
body.dark-mode .content li {
    color: #e0e0e0 !important;
}

body.dark-mode a { color: inherit; }

/* MODIFICATION ICI : Survol en blanc pur au lieu de bleu */
body.dark-mode a:hover { 
    color: #ffffff !important; 
    text-decoration: underline; /* Ajout soulignement pour bien voir le lien */
}

/* 7. SPÉCIFIQUE : BLOC "EN BREF" */
/* MODIFICATION ICI : Titres en blanc au lieu de bleu */
body.dark-mode .en-bref-box h2,
body.dark-mode .en-bref-box h3 {
    color: #ffffff !important;
}

/* 8. SPÉCIFIQUE : TABLEAUX */
body.dark-mode .content table, 
body.dark-mode .wp-block-table {
    border-color: #333 !important;
}
body.dark-mode .content th {
    background-color: #252525 !important;
    color: white !important;
}

/* 9. SPÉCIFIQUE : MENU DEROULANT MOBILE */
body.dark-mode .mobile-toc-accordion summary {
    background-color: #1e1e1e !important;
    /* MODIFICATION ICI : Bordure grise au lieu de bleu */
    border-top-color: #555555 !important; 
}

/* 10. LOGO & ICONES (Inversion) */
body.dark-mode .logo img { filter: brightness(0) invert(1); }
body.dark-mode .burger-icon span { background-color: #ffffff !important; }
body.dark-mode .content h4 {
    color: #ffffff !important;
}

/* 2. CORRECTION BLOC "AUTRES RUBRIQUES" (Le fond blanc moche) */
body.dark-mode .other-cats-section {
    background-color: #1e293b !important; /* Fond gris bleuté sombre */
    border: 1px solid #334155; /* Légère bordure */
}

/* Le titre "EXPLORER..." qui était invisible */
body.dark-mode .other-cats-title {
    color: #94a3b8 !important; /* Gris clair */
}

/* Les boutons (Pills) à l'intérieur */
body.dark-mode .cat-pill {
    background-color: #0f172a !important; /* Fond très sombre */
    color: #f1f5f9 !important; /* Texte blanc */
    border-color: #334155 !important;
    box-shadow: none;
}

body.dark-mode .cat-pill:hover {
    background-color: var(--brand-blue) !important;
    border-color: var(--brand-blue) !important;
    color: white !important;
}

/* =================================================================
   PATCH CORRECTIF FINAL (NEUTRE / MONOCHROME)
   A placer tout à la fin du fichier CSS
   ================================================================= */

/* 1. CORRECTION BOUTON MENU (HEADER) - VERSION CORRIGÉE */

/* Le conteneur du bouton : fond transparent et bordure grise */
body.dark-mode .menu-toggle-presse {
    background-color: transparent !important;
    border-color: #666666 !important;
}

/* Au survol : fond gris foncé */
body.dark-mode .menu-toggle-presse:hover {
    background-color: #333333 !important;
    border-color: #ffffff !important;
}

/* LES LIGNES (ICÔNE) : Doivent avoir un FOND blanc pour être visibles */
body.dark-mode .burger-icon span {
    background-color: #ffffff !important; 
}

/* LE TEXTE "Menu" : Doit avoir un fond TRANSPARENT et une COULEUR blanche */
body.dark-mode .burger-label {
    color: #ffffff !important;
    background-color: transparent !important; /* C'est ça qui enlève le rectangle blanc */
}


/* 2. CORRECTION TABLEAUX (SUPPRESSION DU BLEU) */
/* En-tête du tableau : Gris foncé */
body.dark-mode .content th {
    background-color: #252525 !important;
    color: #ffffff !important;
    border-color: #404040 !important;
}
/* Lignes paires (Zebra) : Gris très foncé (au lieu du bleu) */
body.dark-mode .content tr:nth-child(even) td {
    background-color: #1a1a1a !important; 
    color: #e0e0e0 !important;
    border-color: #404040 !important;
}
/* Lignes normales */
body.dark-mode .content td {
    background-color: #121212 !important;
    border-color: #404040 !important;
}
/* Survol d'une ligne : Gris moyen pour surbrillance neutre */
body.dark-mode .content tr:hover td {
    background-color: #333333 !important;
    transition: background-color 0.2s ease;
}


/* 3. CORRECTION BLOC "AUTRES RUBRIQUES" (BAS DE PAGE) */
/* Le conteneur global : Gris foncé neutre */
body.dark-mode .other-cats-section {
    background-color: #1e1e1e !important; 
    border: 1px solid #333333 !important;
}
/* Le titre "Explorer..." */
body.dark-mode .other-cats-title {
    color: #cccccc !important;
}
/* Les boutons (Pills) : Noir avec bordure grise */
body.dark-mode .cat-pill {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #444444 !important;
    box-shadow: none !important;
}
/* Survol des boutons : Deviennent blancs (inversion) */
body.dark-mode .cat-pill:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
    transform: translateY(-2px);
}


/* 4. CORRECTION GÉNÉRALE DES LIENS (SURVOL) */
/* Tout lien survolé devient blanc pur souligné (plus de bleu) */
body.dark-mode a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}
/* Exception pour le logo (pas de soulignement) */
body.dark-mode .logo a:hover {
    text-decoration: none !important;
}

/* 5. CORRECTION SOMMAIRE DESKTOP (HOVER & ACTIVE) */

/* 1. Le lien ACTIF (En cours de lecture) */
/* Actuellement bleu sombre -> On le passe en Gris Foncé avec texte Blanc */
body.dark-mode #dsa-toc-desktop a.active {
    background-color: #333333 !important; /* Gris foncé */
    color: #ffffff !important; /* Texte blanc */
    font-weight: 700 !important;
    border-left: 4px solid #ffffff !important; /* Petite barre blanche à gauche pour repérer */
}

/* 2. Le lien AU SURVOL (Hover) */
/* Actuellement fond blanc (invisible) -> On le passe en Gris un peu plus clair */
body.dark-mode #dsa-toc-desktop a:hover {
    background-color: #252525 !important; /* Gris anthracite */
    color: #ffffff !important;
    text-decoration: none !important; /* Pas de soulignement, c'est un bloc */
}

/* 3. Les liens par DÉFAUT */
/* On s'assure qu'ils sont bien gris clair sur fond transparent */
body.dark-mode #dsa-toc-desktop a {
    color: #a0a0a0 !important;
    background-color: transparent !important;
}

/* 6. SUPPRESSION DES CADRES GRIS (HERO & CATÉGORIES) */

/* Page Article : Le bloc Titre + Image devient transparent */
body.dark-mode .article-hero-split,
body.dark-mode .article-hero-compact {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding-left: 0 !important; /* Sécurité alignement */
    padding-right: 0 !important;
}

/* Page Catégorie : Le bandeau de titre devient transparent */
body.dark-mode .category-header-section {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Sécurité supplémentaire : Si un élément 'header' traîne dedans */
body.dark-mode .article-hero-split header,
body.dark-mode .category-header-section header {
    background-color: transparent !important;
    border: none !important;
}

/* Dans la section DARK MODE */
body.dark-mode .trending-bar-section {
    background-color: #262626 !important; /* Gris anthracite (plus clair que le fond noir) */
    border-bottom-color: #facc15 !important; /* On garde la ligne jaune */
}

/* CORRECTION TRENDING BAR (DARK MODE) - HARMONISATION */

/* 1. La barre globale : Gris Anthracite */
body.dark-mode .trending-bar-section {
    background-color: #1f1f1f !important; /* Gris foncé propre */
    border-bottom-color: #facc15 !important; /* Ligne jaune */
}

/* 2. Les articles à l'intérieur : Fond TRANSPARENT */
/* C'est cette ligne qui enlève les carrés noirs moches */
body.dark-mode .trending-item {
    background-color: transparent !important; 
    border-right: 1px solid rgba(255,255,255,0.1) !important; /* Séparateur discret */
}

/* 3. Le texte : Blanc */
body.dark-mode .trend-title,
body.dark-mode .trend-rank,
body.dark-mode .trending-label h3 {
    color: #ffffff !important;
}

/* =========================================
   NOUVEAU HERO : STYLE BRANDING (V3 - FINAL)
   ========================================= */

.hero-branding-section {
    padding: 5rem 0;
    border-bottom: 1px solid var(--border-color);
    
    /* FOND : Dégradé subtil du Blanc vers la couleur claire du thème */
    background: linear-gradient(135deg, #ffffff 0%, var(--brand-blue-light) 100%);
    
    position: relative;
    overflow: hidden;
}

.hero-branding-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

/* Texte */
.hero-brand-tag {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-blue);
    margin-bottom: 1.5rem;
}

.hero-brand-title {
    font-family: var(--font-headers);
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1.05;
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.03em;
    color: #121212;
}

.hero-brand-desc {
    font-family: var(--font-body);
    /* MODIFICATION : Taille réduite sur Desktop */
    font-size: 1.15rem; 
    line-height: 1.6;
    margin-bottom: 2.5rem;
    color: var(--text-grey);
    max-width: 90%;
}

/* Boutons */
.hero-brand-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-brand-primary {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 1rem;
    background-color: #121212; 
    color: #ffffff;
    font-family: var(--font-headers);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.btn-brand-primary:hover {
    background-color: var(--brand-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.btn-brand-secondary {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    font-size: 1rem;
    background-color: #ffffff;
    color: #121212;
    font-family: var(--font-headers);
}
.btn-brand-secondary:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

/* Visuel */
.hero-brand-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.brand-img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    border-radius: 20px; 
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.15);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .hero-branding-grid { 
        grid-template-columns: 1fr; 
        gap: 3rem; 
        text-align: center; 
    }
    
    .hero-brand-title { 
        font-size: 2.5rem; /* Titre plus petit sur mobile */
    }

    .hero-brand-desc { 
        margin: 0 auto 2rem auto; 
        /* MODIFICATION : Taille encore plus petite sur Mobile */
        font-size: 1rem; 
    }
    
    .hero-brand-actions { 
        justify-content: center; 
    }
    
    .brand-img { 
        max-height: 300px; 
    }
    
    /* MODIFICATION : On laisse l'ordre naturel (Texte en haut, Image en bas) */
    .hero-brand-visual { 
        order: 0; 
        margin-top: 1rem;
    } 
}

/* =========================================
   COMPATIBILITÉ DARK MODE (HERO BRANDING)
   ========================================= */
body.dark-mode .hero-branding-section {
    background: var(--bg-body) !important;
    border-color: var(--border-color) !important;
}
body.dark-mode .hero-brand-title {
    color: #ffffff !important;
}
body.dark-mode .hero-brand-desc {
    color: #e0e0e0 !important;
}
body.dark-mode .btn-brand-primary {
    background-color: #ffffff !important;
    color: #000000 !important;
}
body.dark-mode .btn-brand-primary:hover {
    background-color: var(--brand-blue) !important;
    color: #ffffff !important;
}
body.dark-mode .btn-brand-secondary {
    background-color: #1f1f1f !important;
    color: #ffffff !important;
    border-color: #333 !important;
}
body.dark-mode .btn-brand-secondary:hover {
    background-color: #333 !important;
}
body.dark-mode .brand-img {
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
    opacity: 0.9;
}

/* FIX ESPACEMENT TITRE FIL INFO */
.page-header {
    margin-bottom: 3rem !important; /* Augmente l'espace sous le titre */
    padding-bottom: 1rem;
    border-bottom: 1px solid transparent; /* Optionnel : retire ou ajoute une ligne */
}

/* =========================================
   NOUVEAU FOOTER (STYLE ÉLÉGANT)
   ========================================= */

.site-footer {
    background-color: #111111; /* Noir profond */
    color: #999999; /* Gris clair pour le texte */
    padding: 5rem 0 2rem 0;
    margin-top: auto;
    font-family: var(--font-body);
    border-top: 1px solid #222; /* Séparation subtile avec le contenu */
}

/* GRILLE 4 COLONNES */
.footer-grid-modern {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr; /* La 1ère colonne est plus large */
    gap: 4rem;
    margin-bottom: 4rem;
}

/* COLONNE 1 : MARQUE */
.footer-logo img {
    max-width: 180px;
    height: auto;
    margin-bottom: 1.5rem;
    /* MAGIE : Rend le logo blanc s'il est noir */
    filter: brightness(0) invert(1); 
    opacity: 0.9;
}

.footer-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #888;
}

/* TITRES DES COLONNES */
.footer-heading {
    color: #ffffff;
    font-family: var(--font-headers); /* Ou 'Playfair Display' si dispo */
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em; /* Espacement des lettres élégant */
    margin-bottom: 1.5rem;
    margin-top: 0;
}

/* LISTES DE LIENS */
.footer-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-list li {
    margin-bottom: 0.8rem;
}

.footer-list a {
    color: #999;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-list a:hover {
    color: #ffffff;
    text-decoration: none;
}

/* RÉSEAUX SOCIAUX */
.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icons a {
    color: #ffffff;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    opacity: 1;
    transform: translateY(-3px);
}

/* COPYRIGHT (BAS DE PAGE) */
.footer-bottom {
    border-top: 1px solid #222; /* Ligne fine grise */
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

/* RESPONSIVE MOBILE */
@media (max-width: 900px) {
    .footer-grid-modern {
        grid-template-columns: 1fr 1fr; /* 2 colonnes sur tablette */
        gap: 3rem;
    }
}

@media (max-width: 600px) {
    .footer-grid-modern {
        grid-template-columns: 1fr; /* 1 colonne sur mobile */
        gap: 2.5rem;
        text-align: center;
    }
    
    .footer-logo img { margin: 0 auto 1.5rem auto; }
    .social-icons { justify-content: center; }
}

/* COMPATIBILITÉ DARK MODE (Sécurité) */
body.dark-mode .site-footer {
    background-color: #000000 !important;
    border-top-color: #222 !important;
}

/* =========================================
   BLOCS AUTEUR (LARGE & WIDGET)
   ========================================= */

/* --- 1. GRAND BLOC (BAS D'ARTICLE) --- */
.dsa-author-box {
    margin-top: 4rem;
    padding: 2.5rem;
    background-color: #f9fafb; /* Gris très clair par défaut */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: flex-start; /* Aligné en haut */
    gap: 2rem;
}

.author-avatar img {
    border-radius: 50%;
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.author-info { flex: 1; }

.author-name {
    font-family: var(--font-headers);
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 0.8rem 0;
    color: #121212;
}

.author-bio {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-grey);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.btn-author-posts {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--brand-blue);
    color: var(--brand-blue);
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 4px;
    text-transform: uppercase;
    transition: all 0.2s;
}
.btn-author-posts:hover {
    background-color: var(--brand-blue);
    color: white;
}

/* --- 2. PETIT WIDGET (SIDEBAR) --- */
.widget_dsa_author_widget {
    text-align: center; /* Centré pour la sidebar */
}

.author-widget-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.author-widget-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 2px solid var(--border-color);
}

.author-widget-name {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    font-family: var(--font-headers);
}

.author-widget-bio {
    font-size: 0.9rem;
    color: var(--text-grey);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.author-widget-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand-blue);
    text-transform: uppercase;
}

/* --- 3. COMPATIBILITÉ DARK MODE --- */
body.dark-mode .dsa-author-box {
    background-color: #1e1e1e !important; /* Gris foncé */
    border-color: #333 !important;
}
body.dark-mode .author-name,
body.dark-mode .author-widget-name {
    color: #ffffff !important;
}
body.dark-mode .author-bio,
body.dark-mode .author-widget-bio {
    color: #b0b0b0 !important;
}
body.dark-mode .author-avatar img {
    border-color: #333 !important;
}
body.dark-mode .btn-author-posts {
    border-color: #ffffff !important;
    color: #ffffff !important;
}
body.dark-mode .btn-author-posts:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
}

/* FIX MOBILE : CENTRAGE BLOC AUTEUR */
@media (max-width: 768px) {
    .dsa-author-box {
        flex-direction: column; /* Empile l'image au-dessus du texte */
        align-items: center;    /* Centre l'image horizontalement */
        text-align: center;     /* Centre le texte */
        gap: 1.5rem;            /* Ajuste l'espace entre image et texte */
    }

    .author-avatar {
        margin: 0 auto; /* Sécurité supplémentaire pour l'image */
    }
    
    .author-info {
        width: 100%; /* S'assure que le texte prend toute la largeur */
    }
}

/* =========================================
   STYLE BLOC IA & AUTEUR SIMPLE
   ========================================= */

/* 1. AUTEUR SIMPLE (EN HAUT DE L'ARTICLE) */
.author-name-simple {
    font-weight: 600;
    text-transform: none; /* Pas de majuscules */
    font-size: 0.95rem;   /* Taille réduite */
    color: var(--brand-dark);
}

/* 2. BLOC RÉSUMÉ IA */
.ai-summary-container {
    margin-bottom: 2.5rem;
}

.ss-box {
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.ss-title {
    font-weight: 700;
    text-align: center;
    margin: 0 0 1rem 0;
    color: var(--brand-dark);
    font-family: var(--font-headers);
    font-size: 0.95rem;
}

.ss-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.btn-ai {
    width: 100%;
    padding: 10px 12px;
    font-weight: 600;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.2s;
    border-radius: 6px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-ai:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Couleurs des boutons IA */
.btn-chatgpt { background: #10a37f; }
.btn-perplexity { background: #22bfa5; } /* Couleur Perplexity Teal */
.btn-google { background: #ea4335; }
.btn-grok { background: #000000; }

/* 3. COMPATIBILITÉ DARK MODE (BLOC IA) */
body.dark-mode .ss-box {
    background: #1e1e1e !important;
    border-color: #333 !important;
}
body.dark-mode .ss-title {
    color: #ffffff !important;
}
body.dark-mode .btn-grok {
    background: #333333; /* Grok devient gris foncé car le fond est noir */
    border: 1px solid #555;
}

/* =========================================
   STYLE HERO SINGLE (OUTILS & META)
   ========================================= */

/* 1. BARRE D'OUTILS */
.article-tools-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tool-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-label {
    font-size: 0.85rem;
    color: #6b7280; /* Gris moyen */
    font-weight: 500;
}

/* Liste d'icônes */
.tool-icons-list {
    display: flex;
    gap: 8px;
}

.tool-icon-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #9ca3af; /* Gris clair par défaut */
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    text-decoration: none; /* Pour les liens <a> */
}

/* Taille des SVGs */
.tool-icon-btn svg {
    width: 24px;
    height: 24px;
}

/* Hover Effects */
.tool-icon-btn:hover {
    color: var(--brand-blue); /* Devient bleu au survol */
    transform: translateY(-2px);
}
/* Le SVG path doit hériter de la couleur du bouton pour changer au survol */
.tool-icon-btn:hover svg path {
    fill: currentColor; 
}


/* 2. META (STYLE FINARY) */
.article-meta-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.meta-avatar img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.meta-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.meta-author {
    font-size: 0.9rem;
    color: var(--text-grey);
}

.author-strong {
    font-weight: 700;
    color: var(--brand-dark);
}

.meta-details {
    font-size: 0.8rem;
    color: #9ca3af;
}

.dot { margin: 0 4px; }


/* 3. RESPONSIVE MOBILE (ORDRE SPÉCIFIQUE) */
@media (max-width: 1024px) {
    .article-hero-split {
        display: flex;
        flex-direction: column;
    }
    
    /* Ordre Mobile : Breadcrumb > Titre > Outils > Meta > Image */
    .hero-text-side { order: 1; }
    .hero-image-side { order: 2; margin-top: 1.5rem; }
    
    .article-tools-row {
        gap: 1.5rem; /* Moins d'espace */
        margin-bottom: 1.5rem;
    }
}


/* 4. DARK MODE COMPATIBILITY */
body.dark-mode .tool-label { color: #a0a0a0 !important; }

body.dark-mode .tool-icon-btn { color: #666 !important; }
body.dark-mode .tool-icon-btn:hover { color: #fff !important; }

/* Force le remplissage blanc des SVG en dark mode au survol */
body.dark-mode .tool-icon-btn svg path { fill: #666; }
body.dark-mode .tool-icon-btn:hover svg path { fill: #fff; }

body.dark-mode .author-strong { color: #fff !important; }
body.dark-mode .meta-details { color: #888 !important; }

/* FIX META DOT (Séparateur) */
.article-meta-modern .dot {
    background-color: transparent !important; /* Enlève le rond gris/jaune */
    color: #9ca3af !important; /* Gris discret */
    font-size: 1rem;
    line-height: 1;
    margin: 0 6px;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    display: inline-block;
    pointer-events: none; /* Rend non-cliquable */
}