/* Blog Sidebar Styles */

/* Sidebar Container */
.blog-sidebar {
    position: sticky;
    top: 80px;
    padding-left: 30px;
}

.sidebar-widget {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sidebar-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* Formulaire de recherche sidebar */
.blog-search-form {
    margin: 0;
}

.blog-search-input-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
}

.blog-search-input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    height: 42px !important;
    padding: 0 18px !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    background: #f8f8f8 !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

.blog-search-input:focus {
    outline: none !important;
    border-color: #333 !important;
    background: #fff !important;
}

.blog-search-btn {
    background: #333 !important;
    border: none !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    flex: 0 0 36px !important;
}

.blog-search-btn:hover {
    background: #000 !important;
    transform: scale(1.05) !important;
}

.blog-search-btn svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
}

/* Formulaire de recherche large (page résultats) */
.blog-search-form-large {
    margin: 0;
    max-width: 800px;
}

.blog-search-input-wrapper-large {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
}

.blog-search-input-large {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    height: 50px !important;
    padding: 0 20px !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    background: #f8f8f8 !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

.blog-search-input-large:focus {
    outline: none !important;
    border-color: #333 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05) !important;
}

.blog-search-btn-large {
    background: #333 !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    flex: 0 0 40px !important;
}

.blog-search-btn-large:hover {
    background: #000 !important;
    transform: scale(1.05) !important;
}

.blog-search-btn-large svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
}

/* Cards des derniers articles */
.blog-card {
    margin-bottom: 20px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
}

.blog-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.blog-card:last-child {
    margin-bottom: 0;
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f0f0f0;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 18px;
}

.blog-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-date {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* Page de résultats de recherche */
.blog-search-header {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Titre et recherche sur la même ligne */
.blog-search-header-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
    background: #fff !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 8px !important;
    padding: 25px 30px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.blog-search-title {
    flex: 0 0 70% !important;
    max-width: 70% !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #333 !important;
    line-height: 1.2 !important;
    display: inline-block !important;
    width: auto !important;
    float: none !important;
}

.blog-search-form-inline {
    flex: 0 0 30% !important;
    max-width: 30% !important;
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
    display: block !important;
}

.blog-search-form-inline .blog-search-input-wrapper-large {
    width: 100% !important;
    max-width: 100% !important;
}

.results-count {
    display: block;
    color: #666;
    font-size: 16px;
}

.results-count p {
    margin: 0;
}

.blog-search-results {
    margin-top: 30px;
}

.blog-search-result-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.blog-search-result-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.result-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
}

.result-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.result-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.result-title a:hover {
    color: #000;
    text-decoration: underline;
}

.result-date {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px 0;
}

.result-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 15px 0;
}

.result-link {
    display: inline-block;
    color: #333;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.result-link:hover {
    color: #000;
    text-decoration: underline;
}

.no-results {
    text-align: center !important;
    padding: 60px 20px !important;
    background: #fff !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 8px !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.no-results p {
    font-size: 18px !important;
    color: #666 !important;
    margin: 0 auto !important;
    text-align: center !important;
    max-width: 600px !important;
}

/* Article container amélioré */
.article-container {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.article-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.article-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin: 30px 0 20px 0;
    line-height: 1.3;
}

.article-meta {
    font-size: 14px;
    color: #666;
    margin: 0 0 30px 0;
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.article-content h2 {
    font-size: 26px;
    font-weight: 600;
    color: #333;
    margin: 40px 0 20px 0;
}

.article-content h3 {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 30px 0 15px 0;
}

.article-content p {
    margin: 0 0 20px 0;
}

.article-content ul,
.article-content ol {
    margin: 0 0 20px 0;
    padding-left: 30px;
}

.article-content li {
    margin: 0 0 10px 0;
}

/* Responsive */
@media (max-width: 991px) {
    .blog-sidebar {
        padding-left: 0;
        margin-top: 40px;
        position: static;
    }
    
    .article-container {
        padding: 25px;
    }
    
    .article-title {
        font-size: 28px;
    }
}

@media (max-width: 767px) {
    .blog-sidebar {
        margin-top: 30px;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
    
    .blog-card-image {
        height: 150px;
    }
    
    .blog-search-header {
        padding: 20px;
    }
    
    .blog-search-input-large {
        height: 44px !important;
        font-size: 15px !important;
    }
    
    .blog-search-btn-large {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        flex: 0 0 36px !important;
    }
    
    .blog-search-btn-large svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .blog-search-header-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 20px !important;
    }
    
    .blog-search-title {
        flex: none !important;
        font-size: 22px !important;
        text-align: center !important;
    }
    
    .blog-search-form-inline {
        flex: none !important;
        width: 100% !important;
    }
    
    .result-image {
        height: 150px;
        margin-bottom: 20px;
    }
    
    .result-title {
        font-size: 20px;
    }
    
    .article-container {
        padding: 20px;
    }
    
    .article-title {
        font-size: 24px;
    }
}
