/* ============================================
   DESIGN SYSTEM — ArtisanSmart Blog
   Shared across index + all articles
   ============================================ */
:root {
    --sky: #0ea5e9;
    --sky-dark: #0284c7;
    --sky-light: #e0f2fe;
    --sky-50: #f0f9ff;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --amber-500: #f59e0b;
    --amber-100: #fef3c7;
    --green-500: #22c55e;
    --green-100: #dcfce7;
    --red-500: #ef4444;
    --white: #ffffff;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
    --shadow-hover: 0 16px 48px rgba(0,0,0,0.14);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { overflow-x: hidden; }

body {
    font-family: var(--font-body);
    color: var(--slate-800);
    background: var(--slate-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
}


/* ---- READING PROGRESS BAR ---- */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--sky);
    z-index: 9999;
    transition: width 0.1s linear;
    width: 0%;
}

/* ---- HEADER ---- */
.blog-header {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--slate-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--slate-900);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--sky);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 16px;
    font-family: var(--font-display);
}

.logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
}

.logo-text span { color: var(--sky); }

.logo-badge {
    font-size: 11px;
    font-weight: 500;
    color: var(--slate-500);
    background: var(--slate-100);
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-nav a {
    text-decoration: none;
    color: var(--slate-700);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: var(--transition);
}

.header-nav a:hover { background: var(--slate-100); color: var(--slate-900); }
.header-nav a.active { background: var(--sky-light); color: var(--sky-dark); }

.header-cta {
    background: var(--sky) !important;
    color: white !important;
    font-weight: 600 !important;
}

.header-cta:hover { background: var(--sky-dark) !important; }

@media (max-width: 768px) {
    .header-nav .hide-mobile { display: none; }
    .header-nav { display: none; }
}

/* ---- BREADCRUMB ---- */
.breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    font-size: 13px;
    color: var(--slate-400);
}

.breadcrumb a {
    color: var(--slate-500);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover { color: var(--sky); }
.breadcrumb span { margin: 0 6px; }

/* ---- ARTICLE HERO ---- */
.article-hero {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.article-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--sky-light);
    color: var(--sky-dark);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    text-decoration: none;
    margin-bottom: 16px;
    transition: var(--transition);
}

.article-category:hover { background: var(--sky); color: white; }

.article-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(28px, 4.5vw, 44px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--slate-900);
    margin-bottom: 20px;
}

.article-subtitle {
    font-size: 18px;
    color: var(--slate-500);
    line-height: 1.7;
    margin-bottom: 24px;
}

.article-meta-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid var(--slate-200);
}

.meta-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sky-light), var(--sky));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.meta-author-info { font-size: 14px; }
.meta-author-name { font-weight: 600; color: var(--slate-900); }
.meta-author-role { color: var(--slate-400); font-size: 12px; }

.meta-separator {
    width: 1px;
    height: 32px;
    background: var(--slate-200);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--slate-500);
}

.meta-item i { color: var(--slate-400); }

.meta-updated { color: var(--slate-700); font-weight: 500; }
.meta-updated i { color: var(--sky); }

/* ---- MAIN LAYOUT ---- */
.article-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
    overflow: hidden;
}

@media (max-width: 960px) {
    .article-layout { grid-template-columns: 1fr; overflow: visible; }
    .article-sidebar { display: none; }
}

/* ---- ARTICLE CONTENT ---- */
.article-content {
    max-width: 720px;
    width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    overflow: hidden;
}

.article-content h2 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--slate-900);
    margin: 48px 0 16px;
    line-height: 1.3;
    scroll-margin-top: 80px;
}

.article-content h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--slate-900);
    margin: 32px 0 12px;
    line-height: 1.35;
    scroll-margin-top: 80px;
}

.article-content p {
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--slate-700);
    margin-bottom: 20px;
}

.article-content strong { color: var(--slate-900); }

.article-content a {
    color: var(--sky);
    text-decoration: underline;
    text-decoration-color: rgba(14,165,233,0.3);
    text-underline-offset: 3px;
    transition: var(--transition);
}

.article-content a:hover { text-decoration-color: var(--sky); }

.article-content ul, .article-content ol {
    margin: 0 0 20px 24px;
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--slate-700);
}

.article-content li { margin-bottom: 8px; }

.article-content img {
    width: 100%;
    border-radius: var(--radius);
    margin: 24px 0;
    box-shadow: var(--shadow-md);
}

/* Callout boxes */
.callout {
    padding: 20px 24px;
    border-radius: var(--radius);
    margin: 28px 0;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.callout-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.callout-body { flex: 1; font-size: 15px; line-height: 1.7; }
.callout-body > strong:first-child { display: block; margin-bottom: 4px; }

.callout-info { background: var(--sky-50); border: 1px solid var(--sky-light); }
.callout-info .callout-icon { background: var(--sky-light); color: var(--sky-dark); }

.callout-warning { background: var(--amber-100); border: 1px solid #fde68a; }
.callout-warning .callout-icon { background: #fde68a; color: #b45309; }

.callout-success { background: var(--green-100); border: 1px solid #bbf7d0; }
.callout-success .callout-icon { background: #bbf7d0; color: #15803d; }

.callout-danger { background: #fef2f2; border: 1px solid #fecaca; }
.callout-danger .callout-icon { background: #fecaca; color: #dc2626; }

/* Blockquote */
.article-content blockquote {
    border-left: 4px solid var(--sky);
    padding: 16px 24px;
    margin: 28px 0;
    background: var(--sky-50);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 17px;
    font-style: italic;
    color: var(--slate-700);
    line-height: 1.7;
}

/* Table */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Table scroll wrapper for mobile */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.table-scroll table {
    margin: 0;
    box-shadow: none;
    min-width: 600px;
}

.article-content thead { background: var(--slate-900); color: white; }
.article-content th { padding: 12px 16px; text-align: left; font-weight: 600; }
.article-content td { padding: 12px 16px; border-bottom: 1px solid var(--slate-100); }
.article-content tbody tr:hover { background: var(--sky-50); }

@media (max-width: 768px) {
    .article-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .article-content th, .article-content td { padding: 10px 12px; font-size: 13px; }
}

/* Inline CTA */
.inline-cta {
    background: linear-gradient(135deg, var(--slate-900) 0%, #1e3a5f 100%);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 40px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.inline-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(14,165,233,0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.inline-cta h3 {
    font-family: var(--font-display);
    color: white;
    font-size: 22px;
    margin-bottom: 8px;
    position: relative;
}

.inline-cta p {
    color: var(--slate-400) !important;
    font-size: 15px !important;
    margin-bottom: 20px !important;
    position: relative;
}

.btn-primary {
    background: var(--sky);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    position: relative;
}

.btn-primary:hover {
    background: var(--sky-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(14,165,233,0.3);
}

a.btn-primary {
    color: white !important;
    text-decoration: none !important;
}

/* ---- FAQ SECTION ---- */
.faq-section { margin: 48px 0; }
.faq-section h2 { margin-top: 0 !important; }

.faq-item {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    margin-bottom: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover { border-color: var(--slate-300); }

.faq-question {
    width: 100%;
    padding: 16px 20px;
    background: var(--white);
    border: none;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--slate-900);
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.faq-question i {
    transition: transform 0.3s;
    color: var(--slate-400);
    font-size: 13px;
}

.faq-item.open .faq-question i { transform: rotate(180deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer { max-height: 500px; }

.faq-answer-inner {
    padding: 0 20px 16px;
    font-size: 15px;
    color: var(--slate-600);
    line-height: 1.7;
}

/* ---- SIDEBAR ---- */
.article-sidebar {
    position: sticky;
    top: 80px;
}

.sidebar-toc {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.sidebar-toc h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.toc-list { list-style: none; }

.toc-list a {
    display: block;
    padding: 6px 0 6px 14px;
    font-size: 14px;
    color: var(--slate-500);
    text-decoration: none;
    border-left: 2px solid var(--slate-200);
    transition: var(--transition);
    line-height: 1.4;
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--sky-dark);
    border-left-color: var(--sky);
    background: var(--sky-50);
    border-radius: 0 6px 6px 0;
}

.toc-list .toc-h3 { padding-left: 28px; font-size: 13px; }

/* Sidebar CTA */
.sidebar-cta {
    background: linear-gradient(135deg, var(--sky-50), #dbeafe);
    border: 1px solid var(--sky-light);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}

.sidebar-cta-icon {
    width: 48px;
    height: 48px;
    background: var(--sky);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 12px;
}

.sidebar-cta h4 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 8px;
}

.sidebar-cta p {
    font-size: 13px;
    color: var(--slate-500);
    margin-bottom: 16px;
    line-height: 1.6;
}

.sidebar-cta .btn-primary { width: 100%; justify-content: center; font-size: 14px; padding: 12px; }

/* ---- SHARE BAR ---- */
.share-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
    margin-top: 40px;
    border-top: 1px solid var(--slate-200);
}

.share-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-500);
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--slate-200);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-500);
    font-size: 16px;
    text-decoration: none;
    transition: var(--transition);
}

.share-btn:hover {
    border-color: var(--sky);
    color: var(--sky);
    background: var(--sky-50);
}

/* ---- RELATED ARTICLES ---- */
.related-section {
    max-width: 1200px;
    margin: 48px auto;
    padding: 48px 20px 0;
    border-top: 1px solid var(--slate-200);
}

.related-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .related-grid { grid-template-columns: 1fr; gap: 16px; }
}

.related-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.related-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.related-card .tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--sky-dark);
    background: var(--sky-light);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

.related-card h4 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--slate-900);
    margin-bottom: 8px;
}

.related-card p {
    font-size: 14px;
    color: var(--slate-500);
    line-height: 1.6;
}

/* ---- FOOTER ---- */
.blog-footer {
    background: var(--slate-900);
    color: var(--slate-400);
    padding: 48px 20px 24px;
    margin-top: 48px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-inner { grid-template-columns: 1fr; } }

.footer-brand p { font-size: 14px; line-height: 1.7; margin-top: 12px; }

.footer-col h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-300);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: var(--slate-400);
    text-decoration: none;
    font-size: 14px;
    padding: 4px 0;
    transition: var(--transition);
}

.footer-col a:hover { color: var(--sky); }

.footer-bottom {
    max-width: 1200px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

/* ═══ MOBILE HAMBURGER ═══ */
.header-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--slate-700);
    font-size: 20px;
    line-height: 1;
}
@media (max-width: 768px) {
    .header-hamburger { display: flex; align-items: center; }
    .header-nav {
        display: none;
        position: fixed;
        top: 64px; left: 0; right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--slate-200);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        padding: 12px 20px 16px;
        gap: 4px;
        z-index: 99;
    }
    .header-nav.open { display: flex; }
    .header-nav a { padding: 12px 16px; border-radius: 10px; font-size: 15px; }
    .header-nav a.active { background: var(--sky-light); color: var(--sky-dark); }
    .header-nav .header-cta { margin-top: 8px; text-align: center; padding: 14px; }
}

/* ═══ FOOTER SOCIAL ═══ */
.footer-social { display: flex; gap: 12px; margin-top: 4px; }
.footer-social a {
    color: var(--slate-500); font-size: 16px;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; border: 1px solid rgba(255,255,255,0.08);
    transition: var(--transition);
}
.footer-social a:hover { color: var(--sky); background: rgba(14,165,233,0.1); }
.footer-bottom {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
}

/* ═══ LOGO BADGE ═══ */
.logo-badge {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    background: var(--sky-light); color: var(--sky-dark);
    padding: 2px 7px; border-radius: 4px; letter-spacing: 0.5px;
}

.download-cta.cta-paradoxe {
    background: linear-gradient(to right, #f0f9ff, #e0f2fe);
    border: none;
    border-left: 5px solid var(--sky); /* Bande bleue sur le côté gauche */
    box-shadow: var(--shadow-md);
}
