/* ================================================================
   article.css — PDF Recap Blog · Template Article
   Palette UI    : Teal (alignée sur le site principal)
   Palette contenu : Bleu conservé (liens article, blockquotes, callouts)
   ================================================================ */

/* ── Variables ───────────────────────────────────────────────── */
:root {
    /* Teal — éléments UI (badges, sidebar, navigation, CTA) */
    --teal:        #0891b2;
    --teal-dark:   #0e7490;
    --teal-light:  #f0fdfe;
    --teal-mid:    #a5f3fc;

    /* Bleu — contenu éditorial (liens article, blockquotes, callouts) */
    --blue:        #2563eb;
    --blue-dark:   #1d4ed8;
    --blue-light:  #eff6ff;

    /* Texte & surfaces */
    --ink:         #111827;
    --ink-soft:    #1f2937;
    --body:        #374151;
    --muted:       #6b7280;
    --muted-light: #9ca3af;
    --border:      #e5e7eb;
    --border-soft: #f3f4f6;
    --bg:          #f9fafb;
    --white:       #ffffff;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,.09), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.1),  0 4px 8px rgba(0,0,0,.06);
}

*, *::before, *::after { box-sizing: border-box; }

/* ── Barre de progression — dégradé teal ─────────────────────── */
#reading-progress {
    position: fixed;
    top: 0; left: 0;
    z-index: 9999;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--teal), var(--teal-mid));
    transition: width .1s linear;
    border-radius: 0 2px 2px 0;
}

/* ================================================================
   TYPOGRAPHIE ARTICLE
   Liens/blockquotes/callouts = bleu (standard lecture)
   ================================================================ */

.article-body {
    font-family: 'Source Serif 4', 'Lora', Georgia, serif;
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--body);
}

.article-body h2 {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.625rem; font-weight: 700; color: var(--ink);
    margin: 2.75rem 0 1rem; line-height: 1.3;
    letter-spacing: -.015em; scroll-margin-top: 5rem;
}
.article-body h3 {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.25rem; font-weight: 600; color: var(--ink-soft);
    margin: 2rem 0 .75rem; scroll-margin-top: 5rem;
}
.article-body h4 {
    font-family: 'Inter', sans-serif;
    font-size: 1rem; font-weight: 700; color: var(--ink-soft);
    margin: 1.5rem 0 .5rem; letter-spacing: .01em;
}

.article-body p       { margin: 0 0 1.35rem; }
.article-body p.lead  {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem; font-weight: 500;
    color: var(--ink); line-height: 1.7;
}

.article-body ul,
.article-body ol { padding-left: 1.5rem; margin: 0 0 1.35rem; }
.article-body li { margin-bottom: .5rem; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }

.article-body a {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    font-weight: 500;
    transition: color .15s;
}
.article-body a:hover { color: var(--blue-dark); }

.article-body strong { font-weight: 700; color: var(--ink); }

.article-body blockquote {
    border-left: 3px solid var(--blue);
    margin: 2rem 0; padding: 1rem 1.5rem;
    background: var(--blue-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic; color: #1e40af;
    font-family: 'Inter', sans-serif;
}
.article-body blockquote p { margin: 0; font-size: .975rem; }

.article-body figure     { margin: 2.25rem 0; }
.article-body figcaption {
    font-family: 'Inter', sans-serif; font-size: .8rem;
    color: var(--muted); text-align: center;
    margin-top: .65rem; font-style: italic; line-height: 1.5;
}

.article-body hr { border: none; border-top: 1px solid var(--border); margin: 2.75rem 0; }

.article-body code {
    background: var(--border-soft); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: .125rem .4rem;
    font-size: .875rem; font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    color: #dc2626;
}
.article-body pre {
    background: #0f172a; color: #e2e8f0;
    border-radius: var(--radius-lg); padding: 1.5rem;
    overflow-x: auto; font-size: .875rem; margin: 2rem 0;
    line-height: 1.7; box-shadow: var(--shadow-md);
}
.article-body pre code { background: none; border: none; color: inherit; padding: 0; font-size: inherit; }

.article-body table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 2rem 0; font-family: 'Inter', sans-serif; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.article-body thead th { background: #1e3a8a; color: var(--white); padding: .75rem 1rem; text-align: left; font-weight: 600; font-size: .8rem; letter-spacing: .03em; }
.article-body tbody td { padding: .65rem 1rem; border-bottom: 1px solid var(--border); color: var(--body); vertical-align: top; }
.article-body tbody tr:nth-child(even) td { background: var(--bg); }
.article-body tbody tr:last-child td { border-bottom: none; }
.article-body .table-caption { font-size: .78rem; color: var(--muted); text-align: center; font-style: italic; margin-top: -.75rem; margin-bottom: 1.25rem; font-family: 'Inter', sans-serif; }

/* ================================================================
   CALLOUT — bleu (contenu éditorial)
   ================================================================ */
.callout { border-left: 3px solid var(--blue); background: var(--blue-light); padding: 1.1rem 1.35rem; margin: 2rem 0; border-radius: 0 var(--radius-md) var(--radius-md) 0; font-family: 'Inter', sans-serif; }
.callout--tip    { border-color: #059669; background: #ecfdf5; }
.callout--warn   { border-color: #d97706; background: #fffbeb; }
.callout--danger { border-color: #dc2626; background: #fef2f2; }
.callout-label { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .4rem; color: var(--blue); }
.callout--tip    .callout-label { color: #059669; }
.callout--warn   .callout-label { color: #d97706; }
.callout--danger .callout-label { color: #dc2626; }
.callout p { font-size: .9375rem; margin: 0; }

/* ================================================================
   EN-TÊTE ARTICLE — badge & initiales teal
   ================================================================ */

.badge-cat {
    display: inline-flex; align-items: center;
    background: var(--teal-light); color: var(--teal-dark);
    border-radius: 9999px; font-size: .7rem; font-weight: 800;
    padding: .25rem .85rem; letter-spacing: .07em;
    text-transform: uppercase; font-family: 'Inter', sans-serif;
    text-decoration: none; transition: background .15s, color .15s;
}
.badge-cat:hover { background: #cffafe; color: var(--teal-dark); }

.article-meta-row {
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
    font-family: 'Inter', sans-serif; font-size: .8125rem; color: var(--muted);
    padding: 1.1rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.article-meta-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 2px var(--white), 0 0 0 3px var(--border); }

.article-meta-initials {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--teal-light); color: var(--teal-dark);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .875rem; flex-shrink: 0;
    box-shadow: 0 0 0 2px var(--white), 0 0 0 3px var(--border);
}

.article-meta-author-name { font-weight: 700; color: var(--ink); font-size: .875rem; }
.article-meta-sep         { color: var(--border); font-size: .75rem; margin: 0 .1rem; }
.article-meta-dates       { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; font-size: .8rem; }
.article-meta-dates time  { color: var(--muted); }
.article-meta-dates .updated-badge { display: inline-flex; align-items: center; gap: .2rem; background: #f0fdf4; color: #15803d; border-radius: 9999px; padding: .1rem .55rem; font-size: .72rem; font-weight: 600; border: 1px solid #bbf7d0; }

/* ================================================================
   COUVERTURE
   ================================================================ */
.cover-figure { margin-bottom: 2.5rem; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-lg); position: relative; }
.cover-figure img { width: 100%; height: auto; display: block; }
.cover-figure figcaption { background: rgba(17,24,39,.65); color: rgba(255,255,255,.8); font-family: 'Inter', sans-serif; font-size: .75rem; padding: .5rem 1rem; text-align: center; font-style: italic; position: absolute; bottom: 0; left: 0; right: 0; backdrop-filter: blur(4px); }

/* ================================================================
   SIDEBAR PARTAGE & CTA — lien teal
   ================================================================ */
.share-sidebar { position: sticky; top: 5.5rem; }

.share-icon-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--white); color: var(--muted-light); transition: color .15s, border-color .15s, background .15s, transform .15s; text-decoration: none; cursor: pointer; font-size: .875rem; }
.share-icon-btn:hover { color: var(--ink); border-color: #9ca3af; background: var(--bg); transform: translateY(-1px); }

.share-text-link { display: inline-flex; align-items: center; gap: .4rem; font-family: 'Inter', sans-serif; font-size: .8rem; color: var(--muted); font-weight: 500; text-decoration: none; transition: color .15s; }
.share-text-link:hover { color: var(--ink); }

.sidebar-cta        { border-top: 2px solid var(--ink); padding-top: 1.35rem; }
.sidebar-cta-label  { font-family: 'Inter', sans-serif; font-size: .65rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-light); margin-bottom: .65rem; display: block; }
.sidebar-cta-title  { font-family: 'Lora', Georgia, serif; font-size: .975rem; font-weight: 700; color: var(--ink); line-height: 1.45; margin-bottom: .5rem; }
.sidebar-cta-desc   { font-family: 'Inter', sans-serif; font-size: .8rem; color: var(--muted); line-height: 1.6; margin-bottom: 1.1rem; }
.sidebar-cta-link   { display: inline-flex; align-items: center; gap: .35rem; font-family: 'Inter', sans-serif; font-size: .8125rem; font-weight: 700; color: var(--teal); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .15s, color .15s; }
.sidebar-cta-link:hover { border-color: var(--teal); color: var(--teal-dark); }

/* ================================================================
   CTA INLINE — bouton teal
   ================================================================ */
.cta-inline { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 1.75rem 0; margin: 3rem 0; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cta-inline-text { flex: 1; min-width: 0; }
.cta-inline-text p { font-family: 'Inter', sans-serif; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-light); margin: 0 0 .35rem; }
.cta-inline-text strong { font-family: 'Lora', Georgia, serif; font-size: 1.075rem; font-weight: 700; color: var(--ink); display: block; line-height: 1.4; }
.cta-inline-link { display: inline-flex; align-items: center; gap: .4rem; background: var(--teal); color: var(--white); padding: .65rem 1.35rem; border-radius: var(--radius-sm); font-family: 'Inter', sans-serif; font-size: .8125rem; font-weight: 700; letter-spacing: .02em; text-decoration: none; white-space: nowrap; transition: background .15s, transform .15s; flex-shrink: 0; }
.cta-inline-link:hover { background: var(--teal-dark); transform: translateY(-1px); }

/* ================================================================
   BLOC AUTEUR — initiales & label teal
   ================================================================ */
.author-box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 1.75rem 2rem; display: flex; gap: 1.5rem; align-items: flex-start; margin-top: 3rem; }
.author-box-avatar img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: var(--shadow-sm); }
.author-box-initials { width: 76px; height: 76px; border-radius: 50%; background: var(--teal-light); color: var(--teal-dark); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.35rem; flex-shrink: 0; font-family: 'Inter', sans-serif; }
.author-box-content   { flex: 1; min-width: 0; }
.author-box-label     { font-family: 'Inter', sans-serif; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--teal); margin-bottom: .3rem; display: block; }
.author-box-name      { font-family: 'Inter', sans-serif; font-size: 1.1rem; font-weight: 800; color: var(--ink); line-height: 1.3; margin-bottom: .15rem; }
.author-box-expertise { font-family: 'Inter', sans-serif; font-size: .8125rem; color: var(--muted); margin-bottom: .75rem; }
.author-box-bio       { font-family: 'Inter', sans-serif; font-size: .875rem; color: #4b5563; line-height: 1.7; margin-bottom: 1rem; }

.author-socials { display: flex; align-items: center; gap: .5rem; margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--border); }
.author-social-link { display: inline-flex; align-items: center; gap: .4rem; font-family: 'Inter', sans-serif; font-size: .78rem; font-weight: 600; color: var(--muted); text-decoration: none; padding: .3rem .7rem; border: 1px solid var(--border); border-radius: 9999px; background: var(--white); transition: color .15s, border-color .15s, background .15s; }
.author-social-link:hover { color: var(--ink); border-color: #9ca3af; background: var(--bg); }

/* ================================================================
   FIL D'ARIANE — hover teal
   ================================================================ */
.breadcrumb { display: flex; align-items: center; gap: .4rem; font-family: 'Inter', sans-serif; font-size: .8rem; color: var(--muted); margin-bottom: 2rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb-current { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }

/* ================================================================
   ARTICLES SIMILAIRES — catégorie & hover teal
   ================================================================ */
.related-card { background: var(--white); border-radius: var(--radius-xl); border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .25s, transform .25s; }
.related-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.related-card-img-wrapper { overflow: hidden; aspect-ratio: 16/9; display: block; }
.related-card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; display: block; }
.related-card:hover .related-card-img-wrapper img { transform: scale(1.04); }
.related-card-body { padding: 1.25rem 1.35rem 1.5rem; }
.related-card-cat { font-family: 'Inter', sans-serif; font-size: .68rem; font-weight: 800; color: var(--teal); text-transform: uppercase; letter-spacing: .08em; display: block; margin-bottom: .5rem; }
.related-card-title { font-family: 'Lora', Georgia, serif; font-size: 1rem; font-weight: 700; color: var(--ink); line-height: 1.45; margin-bottom: .5rem; transition: color .15s; }
.related-card:hover .related-card-title { color: var(--teal); }
.related-card-excerpt { font-family: 'Inter', sans-serif; font-size: .8125rem; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-card-read-time { font-family: 'Inter', sans-serif; font-size: .75rem; color: var(--muted-light); display: flex; align-items: center; gap: .3rem; margin-top: .75rem; }

/* ================================================================
   TOC — actif teal
   ================================================================ */
.toc-link { display: block; font-family: 'Inter', sans-serif; font-size: .84rem; color: var(--muted); padding: .25rem 0 .25rem .65rem; text-decoration: none; border-left: 2px solid transparent; line-height: 1.5; transition: color .15s, padding-left .15s; }
.toc-link:hover { color: var(--body); padding-left: .85rem; }
.toc-link.active { color: var(--teal); font-weight: 600; border-left-color: var(--teal); }

/* ================================================================
   TOAST
   ================================================================ */
.copy-toast { position: fixed; bottom: 1.75rem; left: 50%; transform: translateX(-50%) translateY(1.5rem); background: var(--ink); color: var(--white); padding: .65rem 1.35rem; border-radius: var(--radius-lg); font-family: 'Inter', sans-serif; font-size: .875rem; font-weight: 500; opacity: 0; transition: opacity .25s, transform .25s; z-index: 9999; pointer-events: none; box-shadow: var(--shadow-lg); white-space: nowrap; }
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1023px) { .share-sidebar { display: none; } }
@media (max-width: 767px) {
    .article-body { font-size: 1rem; line-height: 1.8; }
    .article-body h2 { font-size: 1.4rem; }
    .article-body h3 { font-size: 1.15rem; }
    .author-box { flex-direction: column; gap: 1rem; padding: 1.25rem; }
    .author-box-initials, .author-box-avatar img { width: 60px; height: 60px; font-size: 1.1rem; }
    .cta-inline { flex-direction: column; gap: 1rem; }
    .cta-inline-link { width: 100%; justify-content: center; }
    .article-meta-row { gap: .5rem; }
}
@media (max-width: 479px) { .breadcrumb-current { max-width: 140px; } }