/* =============================================
   Blog — Mon7up
   Design moderne, cohérent avec homepage/boutique
   ============================================= */

/* ---- Variables (hérite de homepage.css :root) ---- */

/* ---- Hero blog ---- */
.blog-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 130px 0 50px;
    text-align: center;
}
.blog-hero__title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
}
.blog-hero__desc {
    color: #94a3b8;
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ---- Layout ---- */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* ---- Cards grille ---- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}
.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,.1);
}
.blog-card__img-wrap {
    position: relative;
    padding-top: 56%;
    overflow: hidden;
    background: #f1f5f9;
}
.blog-card__img-wrap img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.blog-card:hover .blog-card__img-wrap img {
    transform: scale(1.04);
}
.blog-card__body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.blog-card__category {
    display: inline-block;
    background: rgba(37,99,235,.08);
    color: #2563eb;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    align-self: flex-start;
    text-decoration: none;
}
.blog-card__category:hover {
    background: rgba(37,99,235,.15);
    color: #1d4ed8;
    text-decoration: none;
}
.blog-card__title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card__title a {
    color: inherit;
    text-decoration: none;
}
.blog-card__title a:hover {
    color: #2563eb;
}
.blog-card__excerpt {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 16px;
    flex: 1;
}
.blog-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #94a3b8;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}
.blog-card__author {
    font-weight: 600;
    color: #475569;
}
.blog-card__readmore {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    transition: gap .2s;
}
.blog-card__readmore:hover {
    gap: 8px;
    color: #1d4ed8;
    text-decoration: none;
}

/* ---- Sidebar ---- */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 90px;
    align-self: flex-start;
}
.blog-widget {
    background: #fff;
    border-radius: 16px;
    padding: 22px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.blog-widget__title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}
.blog-widget__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.blog-widget__list li {
    margin: 0;
}
.blog-widget__list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    margin: 0 -12px;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all .15s;
}
.blog-widget__list li a:hover {
    color: #6366f1;
    background: rgba(99,102,241,.06);
    text-decoration: none;
}
.blog-widget__list li a.is-active {
    color: #6366f1;
    font-weight: 700;
    background: rgba(99,102,241,.08);
}
.blog-widget__count {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

/* ---- Single article ---- */
.blog-article-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 130px 0 44px;
}
.blog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.blog-breadcrumb a {
    color: #94a3b8;
    text-decoration: none;
    transition: color .15s;
}
.blog-breadcrumb a:hover {
    color: #fff;
    text-decoration: none;
}
.blog-breadcrumb__sep {
    color: #475569;
}
.blog-article-hero__title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin: 0 0 16px;
    max-width: 800px;
}
.blog-article-hero__meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #94a3b8;
    font-size: 0.85rem;
    flex-wrap: wrap;
}
.blog-article-hero__meta i {
    margin-right: 5px;
    font-size: 0.8rem;
}

/* ---- Article content ---- */
.blog-article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}
.blog-article-main {
    min-width: 0;
}
.blog-article-content {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    margin-bottom: 32px;
}
.blog-article-content > img:first-child {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 28px;
}
.blog-article-content p {
    color: #475569;
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 20px;
}
.blog-article-content h2,
.blog-article-content h3 {
    color: #0f172a;
    margin-top: 28px;
    margin-bottom: 12px;
}
.blog-article-content a {
    color: #2563eb;
}
.blog-article-content img {
    max-width: 100%;
    border-radius: 8px;
}
.blog-article-content ul,
.blog-article-content ol {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 20px;
    padding-left: 24px;
}

/* ---- CTA dans article ---- */
.blog-article-cta {
    display: flex;
    justify-content: center;
    margin: 28px 0;
}
.blog-article-cta a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2563eb;
    color: #fff;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: background .15s;
}
.blog-article-cta a:hover {
    background: #1d4ed8;
    color: #fff;
    text-decoration: none;
}

/* ---- Partage social ---- */
.blog-share {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0 0;
    margin-top: 24px;
    border-top: 1px solid #f1f5f9;
}
.blog-share__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
}
.blog-share a {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all .15s;
}
.blog-share a:hover {
    background: #2563eb;
    color: #fff;
    text-decoration: none;
}
.blog-share__copy {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    border: none;
    cursor: pointer;
    transition: all .15s;
}
.blog-share__copy:hover {
    background: #2563eb;
    color: #fff;
}
.blog-share__copy.copied {
    background: #16a34a;
    color: #fff;
}
body[data-theme="dark"] .blog-share__copy { background: #334155; color: #94a3b8; }
body[data-theme="dark"] .blog-share__copy:hover { background: #2563eb; color: #fff; }
body[data-theme="dark"] .blog-share__copy.copied { background: #16a34a; color: #fff; }

/* ---- Articles connexes ---- */
.blog-related {
    margin-top: 0;
}
.blog-related__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 20px;
}
.blog-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.blog-related-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    text-decoration: none;
    color: inherit;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.blog-related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
    text-decoration: none;
    color: inherit;
}
.blog-related-card__img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.blog-related-card__title {
    padding: 12px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Pagination ---- */
.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
}
.blog-pagination a,
.blog-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}
.blog-pagination a {
    background: #fff;
    color: #475569;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.blog-pagination a:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    text-decoration: none;
}
.blog-pagination .active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,.3);
}

/* ---- Empty state ---- */
.blog-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}
.blog-empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}
.blog-empty p {
    font-size: 1rem;
    color: #64748b;
}

/* ---- Dark mode ---- */
body[data-theme="dark"] .blog-hero { background: linear-gradient(135deg, #0a0f1e 0%, #111827 100%); }
body[data-theme="dark"] .blog-article-hero { background: linear-gradient(135deg, #0a0f1e 0%, #111827 100%); }
body[data-theme="dark"] .blog-layout,
body[data-theme="dark"] .blog-article-layout { background: #0f172a; }

/* Cards */
body[data-theme="dark"] .blog-card { background: #1e293b; box-shadow: 0 2px 12px rgba(0,0,0,.2); }
body[data-theme="dark"] .blog-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,.3); }
body[data-theme="dark"] .blog-card__img-wrap { background: #334155; }
body[data-theme="dark"] .blog-card__category { background: rgba(96,165,250,.12); color: #60a5fa; }
body[data-theme="dark"] .blog-card__category:hover { background: rgba(96,165,250,.2); color: #93bbfd; }
body[data-theme="dark"] .blog-card__title,
body[data-theme="dark"] .blog-card__title a { color: #f1f5f9; }
body[data-theme="dark"] .blog-card__title a:hover { color: #60a5fa; }
body[data-theme="dark"] .blog-card__excerpt { color: #94a3b8; }
body[data-theme="dark"] .blog-card__footer { border-color: #334155; color: #64748b; }
body[data-theme="dark"] .blog-card__author { color: #94a3b8; }
body[data-theme="dark"] .blog-card__readmore { color: #60a5fa; }
body[data-theme="dark"] .blog-card__readmore:hover { color: #93bbfd; }

/* Sidebar */
body[data-theme="dark"] .blog-widget { background: #1e293b; box-shadow: 0 2px 12px rgba(0,0,0,.2); }
body[data-theme="dark"] .blog-widget__title { color: #f1f5f9; border-color: #334155; }
body[data-theme="dark"] .blog-widget__list li a { color: #94a3b8; }
body[data-theme="dark"] .blog-widget__list li a:hover { color: #818cf8; background: rgba(99,102,241,.1); }
body[data-theme="dark"] .blog-widget__list li a.is-active { color: #818cf8; background: rgba(99,102,241,.15); }
body[data-theme="dark"] .blog-widget__count { background: #334155; color: #94a3b8; }

/* Article content */
body[data-theme="dark"] .blog-article-content { background: #1e293b; box-shadow: 0 2px 12px rgba(0,0,0,.2); }
body[data-theme="dark"] .blog-article-content p { color: #cbd5e1; }
body[data-theme="dark"] .blog-article-content h2,
body[data-theme="dark"] .blog-article-content h3 { color: #f1f5f9; }
body[data-theme="dark"] .blog-article-content h4,
body[data-theme="dark"] .blog-article-content h5,
body[data-theme="dark"] .blog-article-content h6 { color: #e2e8f0; }
body[data-theme="dark"] .blog-article-content a { color: #60a5fa; }
body[data-theme="dark"] .blog-article-content a:hover { color: #93bbfd; }
body[data-theme="dark"] .blog-article-content ul,
body[data-theme="dark"] .blog-article-content ol { color: #cbd5e1; }
body[data-theme="dark"] .blog-article-content li { color: #cbd5e1; }
body[data-theme="dark"] .blog-article-content strong { color: #f1f5f9; }
body[data-theme="dark"] .blog-article-content blockquote { border-left-color: #334155; color: #94a3b8; background: rgba(51,65,85,.3); }
body[data-theme="dark"] .blog-article-content pre,
body[data-theme="dark"] .blog-article-content code { background: #0f172a; color: #e2e8f0; }
body[data-theme="dark"] .blog-article-content table { border-color: #334155; }
body[data-theme="dark"] .blog-article-content th { background: #0f172a; color: #f1f5f9; border-color: #334155; }
body[data-theme="dark"] .blog-article-content td { color: #cbd5e1; border-color: #334155; }

/* Share */
body[data-theme="dark"] .blog-share { border-color: #334155; }
body[data-theme="dark"] .blog-share__label { color: #94a3b8; }
body[data-theme="dark"] .blog-share a { background: #334155; color: #94a3b8; }
body[data-theme="dark"] .blog-share a:hover { background: #2563eb; color: #fff; }

/* Related articles */
body[data-theme="dark"] .blog-related__title { color: #f1f5f9; }
body[data-theme="dark"] .blog-related-card { background: #1e293b; box-shadow: 0 2px 12px rgba(0,0,0,.2); }
body[data-theme="dark"] .blog-related-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.3); }
body[data-theme="dark"] .blog-related-card__title { color: #f1f5f9; }

/* Pagination */
body[data-theme="dark"] .blog-pagination a { background: #1e293b; color: #94a3b8; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
body[data-theme="dark"] .blog-pagination a:hover { background: #6366f1; color: #fff; }
body[data-theme="dark"] .blog-pagination .active { background: #6366f1; color: #fff; }

/* Empty state */
body[data-theme="dark"] .blog-empty i { color: #475569; }
body[data-theme="dark"] .blog-empty p { color: #94a3b8; }

/* CTA */
body[data-theme="dark"] .blog-article-cta a { background: #3b82f6; }
body[data-theme="dark"] .blog-article-cta a:hover { background: #2563eb; }

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .blog-layout,
    .blog-article-layout {
        grid-template-columns: 1fr;
    }
    .blog-sidebar {
        position: static;
        order: 10;
        display: flex;
        flex-direction: column;
    }
    .blog-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 767px) {
    .blog-hero {
        padding: 110px 16px 36px;
    }
    .blog-hero__title {
        font-size: 1.8rem;
    }
    .blog-article-hero {
        padding: 110px 16px 32px;
    }
    .blog-article-hero__title {
        font-size: 1.5rem;
    }
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-layout,
    .blog-article-layout {
        padding: 24px 16px 40px;
        gap: 24px;
    }
    .blog-article-content {
        padding: 20px 18px;
    }
    .blog-related__grid {
        grid-template-columns: 1fr;
    }
    .blog-sidebar {
        grid-template-columns: 1fr;
    }
    .blog-related {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}
