/* blog.css - Version fusionnée : Nouveau hero + Ancien visuel articles/sidebar */

/* ========================================
   VARIABLES
======================================== */
:root {
    --primary-color: #e74c3c;
    --secondary-color: #f39c12;
    --dark-bg: #1C1B2F;
    --light-bg: #FFECD9;
    --text-dark: #1C1B2F;
    --text-light: #666;
    
    --font-nunito: 'Nunito', sans-serif;
    --font-open-sans: 'Open Sans', sans-serif;
    --font-caveat: 'Caveat', cursive;
    
    --primary-orange: var(--secondary-color);
    --secondary-orange: var(--primary-color);
    --dark-blue: var(--dark-bg);
    --light-blue: #3498db;
    --cream: var(--light-bg);
    --white: #ffffff;
    --gray-light: #f8f9fa;
    --gray-medium: #6c757d;
    --gray-dark: #343a40;
    
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.2);
    --gradient-primary: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

/* ========================================
   BASE
======================================== */
body {
    background-color: var(--cream);
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    line-height: 1.6;
    color: var(--gray-dark);
    overflow-x: hidden;
}

/* ========================================
   HERO PRINCIPAL - NOUVELLE VERSION (Documents 1-2)
======================================== */
.main-hero {
    width: 100%;
    background: linear-gradient(to bottom, 
        var(--dark-blue) 0%, 
        var(--dark-blue) 45%, 
        var(--cream) 45%, 
        var(--cream) 100%);
    padding: 60px 20px;
    position: relative;
    isolation: isolate;
}

.main-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    grid-template-rows: auto auto;
    gap: 20px 50px;
    position: relative;
    padding-top:32px;
    padding:24px;
}

/* ZONE 1 : IMAGE */
.hero-image-container {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.hero-image-desktop img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

/* ZONE 2 : TITRE (Sur le bleu) */
.hero-text-content {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    padding-bottom: 20px;
}

.main-title {
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 16px;
    margin-bottom: 10px;
}

.main-subtitle {
    color: var(--primary-orange);
    font-size: 42px;
    line-height: 1.1;
    margin: 0;
}

.main-subtitle .highlight {
    font-family: 'Caveat', cursive;
    font-size: 52px;
    display: block;
}

/* ZONE 3 : TEXTE (Sur le crème) */
.hero-overlay-box {
    grid-column: 2;
    grid-row: 2;
    color: var(--gray-dark);
}

.hero-overlay-box p {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-points {
    list-style: none;
    padding: 0;
}

.hero-points li {
    margin-bottom: 10px;
    font-size: 15px;
}

/* ========================================
   CONTAINER PRINCIPAL - ANCIENNE VERSION (Documents 3-4)
======================================== */
.blog-container {
    max-width: 1440px;
    margin: 40px auto;
    padding: 0 20px 0 60px;
    position: relative;
    isolation: isolate;
}

.blog-header {
    margin: 30px 0 25px 0;
}

/* ========================================
   BLOG HERO - Section inférieure - ANCIENNE VERSION
======================================== */
.blog-hero {
    color: var(--gray-dark);
    padding: 25px 0;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    z-index: 4;
    display: flex;
    justify-content: center;
}

.hero-overlay {
    max-width: 100%;
    text-align: center;
    padding: 0 15px;
}

.hero-overlay p {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
    color: var(--gray-dark);
    line-height: 1.5;
}

/* ========================================
   LAYOUT PRINCIPAL - ANCIENNE VERSION
======================================== */
.main-layout {
    max-width: 1220px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 400px;
    grid-template-areas: "articles sidebar";
    gap: 40px;
    position: relative;
    padding:24px;
}

.articles-section {
    grid-area: articles;
    min-width: 0;
}

.sidebar {
    grid-area: sidebar;
}

/* ========================================
   GRILLE DES ARTICLES - ANCIENNE VERSION
======================================== */
.articles-section {
    grid-area: articles;
    min-width: 0;
}

.articles-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 30px;
    width: 100%;
}

/* ========================================
   CARTE ARTICLE - ANCIENNE VERSION
======================================== */
.article-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    border: 1px solid rgba(0,0,0,0.05);
}

.article-card:hover {
    transform: translateY(-10px);
}

.article-image {
    height: 200px;
    position: relative;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--white);
}

.article-category {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.badge.prevention {
    background: var(--primary-orange);
}

.badge.restructuration {
    background: var(--light-blue);
}

.badge.accompanment {
    background: var(--dark-blue);
}

.article-content {
    padding: 25px;
}

.article-meta {
    margin-bottom: 12px;
}

.date {
    color: var(--gray-medium);
    font-size: 13px;
    font-weight: 600;
}

.article-title {
    margin-bottom: 12px;
}

.article-title a {
    text-decoration: none;
    color: var(--dark-blue);
    font-size: 20px;
    font-weight: 700;
}

.article-title a:hover {
    color: var(--primary-orange);
}

.article-excerpt {
    color: var(--gray-medium);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.article-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.read-more {
    color: var(--primary-orange);
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: var(--secondary-orange);
    transform: translateX(5px);
}

/* ========================================
   SIDEBAR WIDGETS - ANCIENNE VERSION
======================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: var(--white);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.widget-title {
    color: var(--dark-blue);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Widget Recherche */
.search-widget {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.search-form {
    display: flex;
    background: var(--white);
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.search-form:focus-within {
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.2);
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    font-size: 15px;
    outline: none;
    border: 2px solid var(--gray-light);
    border-radius: 25px;
    color: var(--gray-dark);
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-orange);
}

.search-input::placeholder {
    color: var(--gray-medium);
    opacity: 0.7;
}

/* Widget Catégories */
.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.category-link {
    display: block;
    padding: 12px;
    margin-bottom: 10px;
    background: var(--cream);
    color: var(--dark-blue);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.category-link.active {
    background: var(--primary-orange);
    color: white;
}

/* Widget CTA */
.btn-rdv {
    display: block;
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    color: white;
    text-align: center;
    padding: 15px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-rdv:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* ========================================
   PAGINATION - ANCIENNE VERSION
======================================== */
.pagination-wrapper {
    margin: 40px 0 50px 0;
    display: flex;
    justify-content: center;
}

.pagination-nav {
    width: 100%;
    max-width: 600px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.page-item {
    display: inline-block;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 8px 12px;
    background: var(--white);
    color: var(--dark-blue);
    text-decoration: none;
    border-radius: 10px;
    font-family: var(--font-nunito);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: var(--shadow);
}

.page-link:hover {
    background: var(--primary-orange);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.page-item.active .page-link {
    background: var(--primary-orange);
    color: var(--white);
    border-color: var(--primary-orange);
    cursor: default;
}

/* ========================================
   NO ARTICLES
======================================== */
.no-articles {
    grid-column: 1 / -1 !important;
    text-align: center;
    padding: 50px 30px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom:23px;
}

.no-articles h3 {
    color: var(--dark-blue);
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.no-articles p {
    color: var(--gray-medium);
    font-size: 1rem;
}

/* ========================================
   RESPONSIVE MOBILE
======================================== */
@media (max-width: 768px) {
    .blog-container {
        padding: 0 20px;
    }
    .sidebar{
        padding-top:32px;
    }
    .main-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .main-hero {
        background: var(--dark-blue);
    }
    
    .hero-image-container { 
        display: none; 
    }
    
    .hero-text-content {
        grid-column: 1;
        grid-row: 1;
    }
    
    .hero-overlay-box { 
        grid-column: 1;
        grid-row: 2;
        color: white; 
    }
    
    .main-layout { 
        grid-template-columns: 1fr;
        grid-template-areas: 
            "sidebar"
            "articles";
    }
    
    .articles-grid {
        grid-template-columns: 1fr !important;
    }
}