/* ============================================
   BLOG STYLES - CVpourTous (Design Moderne)
   Couleurs DevTek avec design attractif
   ============================================ */

/* Variables */
:root {
    --primary-color: #1e73b1;
    --secondary-color: #ee722b;
    --primary-dark: #155b8a;
    --text-dark: #172b4d;
    --text-light: #5e6c84;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
}

/* Blog Header - Hero Section */
.blog-header {
    background: linear-gradient(135deg, #1e73b1 0%, #155b8a 100%);
    padding: 100px 0 80px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>') repeat;
    opacity: 0.3;
}

.blog-header .container {
    position: relative;
    z-index: 1;
}

.blog-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    animation: fadeInDown 0.6s ease;
}

.blog-header h1 i {
    margin-right: 15px;
}

.blog-header .lead {
    font-size: 1.25rem;
    opacity: 0.95;
    font-weight: 400;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Featured Articles Section */
.featured-articles {
    padding: 80px 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.featured-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.featured-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(30, 115, 177, 0.2);
}

.featured-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.featured-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.featured-card:hover .featured-image img {
    transform: scale(1.1);
}

.featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--secondary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(238, 114, 43, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.featured-content {
    padding: 25px;
}

.article-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.article-meta .category {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.article-meta .date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.article-meta .views {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.featured-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
    line-height: 1.35;
}

.featured-content h3 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-content h3 a:hover {
    color: var(--primary-color);
}

.featured-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.7;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 115, 177, 0.3);
}

.read-more:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(30, 115, 177, 0.4);
    color: white;
}

/* Blog Content */
.blog-content {
    padding: 80px 0;
    background: white;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

/* Search Info */
.search-info {
    background: linear-gradient(135deg, rgba(30, 115, 177, 0.1), rgba(30, 115, 177, 0.05));
    padding: 20px 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-color);
    font-size: 1rem;
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(30, 115, 177, 0.1);
}

.search-info strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    gap: 35px;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    height: 200px;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(30, 115, 177, 0.15);
}

.article-image {
    width: 280px;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: var(--text-dark);
    line-height: 1.3;
}

.article-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-read-more:hover {
    gap: 12px;
    color: var(--primary-dark);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.page-link {
    padding: 12px 20px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 30px;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.sidebar-widget h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-widget h3 i {
    color: var(--primary-color);
}

/* Search Form */
.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 115, 177, 0.1);
}

.search-form button {
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 600;
}

.search-form button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 115, 177, 0.3);
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-light);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.category-list a:hover,
.category-list a.active {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.category-list .count {
    background: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.category-list a:hover .count,
.category-list a.active .count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Recent Posts */
.recent-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts li {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.recent-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-posts a {
    display: flex;
    gap: 15px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.recent-posts a:hover {
    transform: translateX(5px);
}

.recent-posts img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.recent-post-info {
    flex: 1;
}

.recent-post-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    transition: color 0.3s ease;
    line-height: 1.4;
}

.recent-posts a:hover h4 {
    color: var(--primary-color);
}

.recent-post-info .date {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* No Articles */
.no-articles {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.no-articles i {
    color: var(--border-color);
    margin-bottom: 20px;
    font-size: 4rem;
}

.no-articles p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ============================================
   ARTICLE DETAIL PAGE
   ============================================ */

.blog-article {
    padding: 60px 0;
    background: var(--bg-light);
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.article-main {
    background: white;
    border-radius: 15px;
    padding: 50px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

/* Article Header */
.article-category {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.article-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.meta-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.article-featured-image {
    width: 100%;
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 40px;
}

.article-content p {
    margin-bottom: 20px;
}

/* Article Tags */
.article-tags {
    margin-bottom: 30px;
    padding: 25px;
    background: var(--bg-light);
    border-radius: 12px;
}

.article-tags h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-tags h4 i {
    color: var(--primary-color);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 8px 16px;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
}

/* Share Buttons */
.article-share {
    margin-bottom: 40px;
    padding: 25px;
    background: var(--bg-light);
    border-radius: 12px;
}

.article-share h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: white;
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.linkedin {
    background: #0077b5;
}

.share-btn.email {
    background: #5e6c84;
}

/* Related Articles */
.related-articles {
    margin-bottom: 40px;
}

.related-articles h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-articles h3 i {
    color: var(--primary-color);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.related-card {
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.related-image {
    width: 100%;
    height: 140px;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-card:hover .related-image img {
    transform: scale(1.1);
}

.related-content {
    padding: 15px;
}

.related-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.related-content h4 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-content h4 a:hover {
    color: var(--primary-color);
}

.related-content .date {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Article Navigation */
.article-navigation {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(30, 115, 177, 0.3);
}

.btn-back:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(30, 115, 177, 0.4);
    color: white;
}

/* Author Widget */
.author-widget {
    text-align: center;
}

.author-avatar {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.author-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 10px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .blog-layout,
    .article-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
    }

    .article-card {
        flex-direction: column;
        height: auto;
    }

    .article-image {
        width: 100%;
        height: 220px;
    }
}

@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 2rem;
    }

    .blog-header {
        padding: 60px 0 40px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .featured-articles,
    .blog-content {
        padding: 50px 0;
    }

    .featured-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .article-main {
        padding: 30px 20px;
    }

    .article-title {
        font-size: 1.8rem;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .blog-header h1 {
        font-size: 1.5rem;
    }

    .pagination {
        gap: 5px;
    }

    .page-link {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}
