/*
 Theme Name: Astra Child
 Description: Thème enfant Astra avec Hero Banner personnalisé
 Template: astra
 Version: 1.2.0
*/

/* ========================================
   HERO BANNER - Single Posts
   ======================================== */

body,
#page {
    background-color: #ffffff; /* ou autre couleur neutre */
}

.hero-banner-single-post {
    position: relative;
    width: 100%;
    min-height: 500px;
    
    /* Image de fond */
    background-image: url('https://bmgautomations.com/wp-content/themes/astra-child/images/hero-bg.avif');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    
    /* Flexbox pour structure verticale */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    
    /* Couleur de secours si image ne charge pas */
    background-color: #2c3e50;
    
    overflow: hidden;
    z-index: 10;
}

/* Overlay sombre */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
}

/* ========================================
   HEADER dans le Hero
   ======================================== */

.hero-header-wrapper {
    position: relative;
    z-index: 100;
    padding: 20px 0;
    background: transparent !important;
    box-shadow: none !important;
}

.hero-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo dans le Hero */
.hero-header-wrapper .site-branding img {
    max-height: 50px;
    width: auto;
}

.hero-header-wrapper .site-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
}

/* Menu dans le Hero */
.hero-header-wrapper .main-navigation {
    display: flex;
}

.hero-header-wrapper .main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.hero-header-wrapper .main-menu li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.hero-header-wrapper .main-menu li a:hover {
    opacity: 0.8;
}

/* Bouton menu mobile */
.menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
}

/* ========================================
   CONTENU du Hero (titre article)
   ======================================== */

.hero-content-wrapper {
    position: relative;
    z-index: 50;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 80px 20px 60px;
    text-align: center;
    color: #ffffff;
}

.hero-post-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 20px 0;
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-post-subtitle {
    font-size: 20px;
    font-weight: 300;
    line-height: 1.6;
    margin: 0 0 30px 0;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
}

.hero-post-meta {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

.hero-post-separator {
    margin: 0 12px;
}

/* ========================================
   CONTENU de l'article (sous le Hero)
   🔥 CORRECTION DE LA LARGEUR 🔥
   ======================================== */

/* Force la largeur maximale du container */
.single-post .ast-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* Zone principale de l'article */
.single-post-content {
    background: #ffffff;
    padding: 60px 0;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    float: none !important;
}

/* Article lui-même */
.single-post article {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* Contenu de l'article */
.entry-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333333;
    max-width: 100%;
    width: 100%;

}

/* CORRECTION : Titres avec bon interligne */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin-top: 40px;
    margin-bottom: 20px;
    line-height: 1.4 !important;
    color: #1a1a1a;
    font-weight: 700;
}

.entry-content h2 {
    font-size: 32px;
    line-height: 1.3 !important;
    margin-top: 50px;
}

.entry-content h3 {
    font-size: 26px;
    line-height: 1.35 !important;
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content ul,
.entry-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

/* Footer de l'article (catégories, tags) */
.entry-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
    font-size: 15px;
}

.post-categories,
.post-tags {
    margin-bottom: 10px;
}

/* ========================================
   NAVIGATION Article précédent/suivant
   🔥 CORRECTION DE L'AFFICHAGE 🔥
   ======================================== */

.post-navigation {
    max-width: 800px;
    margin: 40px auto 60px;
    padding: 0;
    border-top: 2px solid #e0e0e0;
    padding-top: 30px;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.nav-previous,
.nav-next {
    flex: 1;
    min-width: 250px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.nav-previous:hover,
.nav-next:hover {
    background: #e9ecef;
}

.nav-previous {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-subtitle {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 600;
}

.nav-title {
    display: block;
    font-size: 16px;
    color: #212529;
    font-weight: 600;
    line-height: 1.4;
}

.nav-previous a,
.nav-next a {
    text-decoration: none;
    color: inherit;
}

.nav-previous a:hover .nav-title,
.nav-next a:hover .nav-title {
    color: #007bff;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .hero-header-wrapper .main-navigation {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero-post-title {
        font-size: 36px;
    }
    
    .hero-post-subtitle {
        font-size: 18px;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .nav-previous,
    .nav-next {
        text-align: left;
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .hero-banner-single-post {
        min-height: 400px;
    }
    
    .hero-content-wrapper {
        padding: 60px 15px 40px;
    }
    
    .hero-post-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .hero-post-subtitle {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .hero-post-meta {
        font-size: 13px;
    }
    
    .single-post-content {
        padding: 40px 0;
    }
    
    .entry-content {
        font-size: 16px;
    }
    
    .entry-content h2 {
        font-size: 24px;
    }
    
    .entry-content h3 {
        font-size: 20px;
    }
    
    .single-post .ast-container {
        padding: 0 15px !important;
    }
}

@media (max-width: 480px) {
    .hero-post-title {
        font-size: 24px;
    }
    
    .hero-header-inner {
        padding: 0 15px;
    }
    
    .nav-previous,
    .nav-next {
        padding: 15px;
    }
    
    .nav-title {
        font-size: 14px;
    }
}

/* ========================================
   FORCER l'affichage correct (anti-conflit Astra)
   ======================================== */

/* Empêche Astra de mettre le contenu en colonne */
.single-post #primary {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    display: block !important;
    margin: 0 !important;
}

.single-post #primary.content-area {
    width: 100% !important;
}

/* Cache la sidebar sur les articles */
.single-post .sidebar,
.single-post #secondary {
    display: none !important;
}

/* Reset des marges Astra */
.single-post .site-content {
    padding: 0 !important;
    margin: 0 !important;
}

.single-post #content {
    padding: 0 !important;
}

/* Force le layout pleine largeur */
.single-post .ast-separate-container #primary {
    margin: 0 !important;
    padding: 0 !important;
}

/* Supprime les bordures/marges Astra */
.single-post .ast-article-single {
    padding: 0 !important;
    margin: 0 !important;
}

/* ========================================
   CORRECTION FINALE - Centrage parfait de l'article
   ======================================== */

/* Container de l'article - largeur optimale */
.single-post .ast-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 !important; /* Pas de padding sur le container */
}

/* Zone de contenu principal */
.single-post #content {
    width: 100% !important;
    max-width: 100% !important;
}

/* Article - prend toute la largeur disponible */
.single-post article {
    max-width: 100% !important; /* Prend 100% du container */
    width: 100% !important;
    margin: 0 !important;
    padding: 0 80px !important; /* Marge intérieure symétrique */
    box-sizing: border-box;
}

/* Contenu de l'article - parfaitement centré */
.single-post .entry-content {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* Navigation - même largeur */
.single-post .post-navigation {
    max-width: 100% !important;
    padding: 0 80px !important; /* Même marge que l'article */
    margin: 40px 0 60px !important;
    box-sizing: border-box;
}

/* Footer de l'article */
.single-post .entry-footer {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* RESPONSIVE - Réduction des marges sur petits écrans */
@media (max-width: 1024px) {
    .single-post article {
        padding: 0 60px !important;
    }
    
    .single-post .post-navigation {
        padding: 0 60px !important;
    }
}

@media (max-width: 768px) {
    .single-post article {
        padding: 0 30px !important;
    }
    
    .single-post .post-navigation {
        padding: 0 30px !important;
    }
}

@media (max-width: 480px) {
    .hero-post-title {
        font-size: 24px;
    }
    
    .hero-header-inner {
        padding: 0 15px;
    }
    
    /* CORRECTION : Padding mobile pour l'article */
    .single-post article {
        padding: 0 20px !important;
    }
    
    .single-post .entry-content {
        padding: 0 5px !important; /* Marge intérieure supplémentaire */
    }
    
    .single-post .post-navigation {
        padding: 0 20px !important;
    }
    
    .nav-previous,
    .nav-next {
        padding: 15px;
    }
    
    .nav-title {
        font-size: 14px;
    }
}