/*
 Theme Name:   Safety Blog Child
 Description:  Design Final Consolidé - Zéro Vert / Full Inter / Mobile Tables Fix
 Template:     zeelinear
 Version:      2.1.0
*/

/* --- 1. CONFIGURATION GLOBALE & POLICE --- */
/* On impose Inter sur absolument TOUT pour la cohérence avec la HP */
* {
    font-family: 'Inter', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

:root {
    --primary: #007f96;    /* Bleu expert */
    --accent: #d8b631;     /* Doré Safety */
    --text: #334155;       /* Anthracite moderne (adieu le noir sale) */
    --bg: #f8fafc;         /* Gris clair Discover-ready */
    --white: #ffffff;
    --border: #e2e8f0;
}

html, body { 
    width: 100% !important; 
    margin: 0 !important; 
    padding: 0 !important; 
    overflow-x: hidden !important;
    background: var(--bg) !important;
}

/* --- 2. NETTOYAGE RADICAL DU PARENT (zeelinear) --- */
/* On tue la bande verte et les éléments 2012 */
#header, #logo, #mainnav, .post-format, .post-body::before, .pf-icon { 
    display: none !important; 
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* --- 3. STRUCTURE & LAYOUT (ZERO SQUASH) --- */
#wrapper {
    width: 100% !important;
    max-width: 900px !important; /* Format magazine premium */
    margin: 0 auto !important;
    padding: 0 !important;
    background: var(--white) !important;
    border: none !important;
    box-shadow: 0 0 50px rgba(0,0,0,0.05) !important;
}

#wrap { 
    width: 92% !important; 
    margin: 0 auto !important; 
    padding: 30px 0 !important; 
}

/* On force le contenu sur 100% pour supprimer les décalages du parent */
.type-post .post-body, .type-post .post-content {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    background: transparent !important;
}

/* --- 4. TYPOGRAPHIE (STYLE HP) --- */
h1, h2, h3, .post-title, .post-title a {
    color: var(--primary) !important;
    font-weight: 800 !important; /* Poids massif Discover */
    letter-spacing: -0.03em !important;
    text-decoration: none !important;
}

.post-title { font-size: 38px !important; line-height: 1.2 !important; margin-bottom: 20px !important; }

h2 {
    font-size: 28px !important;
    border-left: 5px solid var(--accent) !important; /* Rappel doré */
    padding-left: 15px !important;
    margin: 1.5em 0 1em !important;
}

.entry p { font-size: 18px !important; line-height: 1.8 !important; color: var(--text) !important; margin-bottom: 25px !important; }

/* --- 5. IMAGES WEBP & STABILITÉ --- */
img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* --- 6. FIX TABLEAUX RESPONSIVE (ANTI-SQUASH) --- */
/* Permet le scroll horizontal sur mobile pour les comparatifs mutuelles */
.entry table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 30px 0 !important;
    border-radius: 8px !important;
    border: 1px solid var(--border) !important;
}

.entry table th, .entry table td {
    min-width: 150px !important; /* Empêche l'écrasement des colonnes */
    padding: 15px !important;
    font-size: 15px !important;
    border-bottom: 1px solid var(--border) !important;
    text-align: left !important;
}

th { background: #f1f5f9 !important; color: var(--primary) !important; font-weight: 700 !important; }
td { background: #fff !important; }
tr:last-child td { border-bottom: none !important; }

/* --- 7. HEADER & BOUTONS --- */
.safety-header { background: var(--accent) !important; padding: 15px 0 !important; }
.btn-safety-blue { background: var(--primary) !important; color: #fff !important; font-weight: 700 !important; padding: 10px 20px; border-radius: 5px; }

.postmeta {
    float: none !important;
    width: 100% !important;
    margin: 0 0 30px 0 !important;
    padding: 15px 0 !important;
    border-top: 1px solid var(--border) !important;
    border-bottom: 1px solid var(--border) !important;
    display: flex !important;
    gap: 20px !important;
    font-size: 14px !important;
}

/* --- 8. RESPONSIVE FINAL --- */
@media (max-width: 768px) {
    #wrapper { width: 100% !important; max-width: 100% !important; }
    #wrap { width: 90% !important; padding: 20px 0 !important; }
    .post-title { font-size: 26px !important; }
    .safety-nav, .safety-auth { display: none; } /* Cache le menu desktop sur mobile */
    
    /* Indicateur visuel de scroll pour les tableaux */
    .entry table {
        box-shadow: inset -15px 0 15px -15px rgba(0,0,0,0.1) !important;
    }
}