/* blog.css — index du blog + page article (charte SyndiLibre) */

/* ============ INDEX ============ */
.blog-hero { padding-top: 120px; }
.blog-feat {
    display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
    background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
    box-shadow: 0 30px 70px -38px rgba(43,18,89,0.25);
}
.blog-feat-media {
    background: linear-gradient(160deg, var(--violet-darker), var(--violet-darkest));
    position: relative; min-height: 320px; overflow: hidden;
    display: flex; align-items: flex-end; padding: 32px;
}
.blog-feat-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.blog-feat-img.on { opacity: 1; }
.blog-feat-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,10,40,0.15) 0%, rgba(20,10,40,0.55) 100%); }
.blog-feat-dots { position: absolute; bottom: 18px; right: 22px; display: flex; gap: 6px; z-index: 2; }
.blog-feat-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.45); transition: background .3s, width .3s; }
.blog-feat-dots span.on { background: #fff; width: 18px; border-radius: 100px; }
.blog-feat-tagrow { position: relative; display: flex; gap: 8px; flex-wrap: wrap; }
.blog-feat-body { padding: 40px 40px; display: flex; flex-direction: column; }
.blog-eyebrow { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--violet); margin-bottom: 14px; }
.blog-feat-title { font-size: clamp(24px, 3vw, 34px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; color: var(--ink); margin-bottom: 14px; }
.blog-feat-excerpt { font-size: 15.5px; color: var(--ink-3); line-height: 1.6; margin-bottom: 22px; }
.blog-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-4); margin-top: auto; }
.blog-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-5); }
.blog-feat-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; font-weight: 500; font-size: 14.5px; color: var(--violet); }

.blog-tag {
    font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em;
    padding: 4px 11px; border-radius: 100px; white-space: nowrap;
}
.blog-tag.light { background: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.blog-tag.solid { background: var(--violet-soft); color: var(--violet-deep); }

/* filtres */
.blog-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 36px; }
.blog-filter {
    font-size: 13.5px; padding: 8px 16px; border-radius: 100px;
    border: 1px solid var(--line); background: #fff; color: var(--ink-3); cursor: pointer; transition: all .15s;
}
.blog-filter:hover { border-color: var(--violet-lighter); }
.blog-filter.active { background: var(--violet); border-color: var(--violet); color: #fff; }

/* grille d'articles */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.blog-card {
    display: flex; flex-direction: column; background: #fff;
    border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.blog-card:hover { transform: translateY(-4px); border-color: var(--violet-lighter); box-shadow: 0 20px 48px -24px rgba(43,18,89,0.22); }
.blog-card-media {
    height: 170px; position: relative; overflow: hidden;
    background: linear-gradient(160deg, var(--violet-soft), var(--violet-softer));
    display: flex; align-items: flex-end; padding: 16px;
}
.blog-card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.blog-card:hover .blog-card-img { transform: scale(1.05); }
.blog-card-media .blog-tag { position: relative; z-index: 1; }
.blog-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.blog-card-title { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; color: var(--ink); margin: 12px 0 8px; }
.blog-card-excerpt { font-size: 13.5px; color: var(--ink-3); line-height: 1.55; margin-bottom: 16px; }
.blog-card .blog-meta { font-size: 12px; }

.blog-empty { text-align: center; color: var(--ink-4); padding: 50px 0; font-size: 14px; grid-column: 1 / -1; }

/* newsletter */
.blog-news {
    background: linear-gradient(165deg, var(--violet-darker), var(--violet-darkest)); color: #fff;
    border-radius: 20px; padding: 44px 44px; text-align: center; position: relative; overflow: hidden;
}
.blog-news::before { content: ""; position: absolute; top: -40%; right: -10%; width: 500px; height: 500px; background: radial-gradient(circle, rgba(167,139,250,0.2), transparent 60%); }
.blog-news h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px; position: relative; }
.blog-news p { font-size: 15px; color: rgba(255,255,255,0.8); max-width: 52ch; margin: 0 auto 24px; position: relative; line-height: 1.6; }
.blog-news-form { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; position: relative; }
.blog-news-form input { flex: 1; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.1); border-radius: 10px; padding: 12px 16px; font-size: 14px; font-family: var(--font); color: #fff; outline: none; }
.blog-news-form input::placeholder { color: rgba(255,255,255,0.6); }
.blog-news-form input:focus { border-color: var(--violet-lighter); }
.blog-news-form button { background: #fff; color: var(--violet-darker); border: none; border-radius: 10px; padding: 12px 22px; font-size: 14px; font-weight: 600; font-family: var(--font); cursor: pointer; white-space: nowrap; }

/* ============ ARTICLE ============ */
.article-head { padding-top: 120px; max-width: 800px; margin: 0 auto; text-align: center; }
.article-tagrow { display: flex; gap: 8px; justify-content: center; margin-bottom: 22px; }
.article-h1 { font-size: clamp(30px, 4.4vw, 50px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); margin-bottom: 22px; text-wrap: balance; }
.article-meta { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 14px; color: var(--ink-4); }
.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-5); }
.article-hero-band {
    height: 220px; border-radius: 20px; margin: 40px auto 0; max-width: 980px; position: relative; overflow: hidden;
    background: linear-gradient(160deg, var(--violet-darker), var(--violet-darkest));
    display: flex; align-items: center; justify-content: center;
}
.article-hero-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, rgba(167,139,250,0.25), transparent 55%); }
.article-hero-band svg { width: 92px; height: 92px; opacity: 0.92; position: relative; }

.article-body { max-width: 720px; margin: 0 auto; }
.article-body > p { font-size: 17px; line-height: 1.75; color: var(--ink-2); margin-bottom: 22px; }
.article-body > p:first-of-type::first-letter {
    font-size: 58px; font-weight: 600; float: left; line-height: 0.86;
    padding: 4px 12px 0 0; color: var(--violet);
}
.article-body h2 {
    font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2;
    color: var(--ink); margin: 44px 0 18px; padding-top: 8px;
}
.article-body h2::before { content: ""; display: block; width: 44px; height: 3px; border-radius: 2px; background: var(--violet); margin-bottom: 18px; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body em { font-style: italic; }
.article-pullquote {
    margin: 36px 0; padding: 24px 28px; background: var(--violet-softer); border-left: 3px solid var(--violet);
    border-radius: 10px; font-size: 19px; font-style: italic; line-height: 1.5; color: var(--violet-darker);
}

.article-share { max-width: 720px; margin: 48px auto 0; padding-top: 28px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.article-share-label { font-size: 14px; color: var(--ink-4); }
.article-share-btns { display: flex; gap: 10px; }
.article-share-btns a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-3); transition: all .15s; }
.article-share-btns a:hover { border-color: var(--violet); color: var(--violet); background: var(--violet-softer); }

/* articles liés */
.article-related { max-width: 980px; margin: 0 auto; }

@media (max-width: 980px) {
    .blog-feat { grid-template-columns: 1fr; }
    .blog-feat-media { min-height: 200px; }
    .blog-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
    .blog-grid { grid-template-columns: 1fr; }
    .blog-news-form { flex-direction: column; }
    .article-body > p { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .blog-card { transition: none; } }

/* ============ ILLUSTRATIONS D'ARTICLE ============ */
/* Les figures restent dans la largeur du corps de texte. */
.article-fig {
    width: 100%;
    margin: 44px 0;
}
.article-fig.wide { width: 100%; }
.article-fig .article-schema, .article-fig .article-photo-wrap { cursor: zoom-in; }
.article-fig .article-schema, .article-fig .article-photo { transition: box-shadow .2s; }
.article-fig:hover .article-schema { box-shadow: 0 14px 40px -22px rgba(43,18,89,0.3); }

/* lightbox */
.lb-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(18, 9, 36, 0.92);
    display: flex; align-items: center; justify-content: center;
    padding: 32px; opacity: 0; pointer-events: none; transition: opacity .2s ease;
    cursor: zoom-out;
}
.lb-overlay.open { opacity: 1; pointer-events: auto; }
.lb-overlay > * { max-width: 96vw; max-height: 92vh; }
.lb-overlay img { width: auto; height: auto; max-width: 96vw; max-height: 92vh; border-radius: 12px; box-shadow: 0 30px 90px rgba(0,0,0,0.6); }
.lb-overlay svg { width: min(1300px, 96vw); height: auto; max-height: 92vh; background: #fff; border-radius: 14px; padding: 16px; box-sizing: border-box; }
.lb-close {
    position: fixed; top: 20px; right: 24px; width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.25);
    display: grid; place-items: center; cursor: pointer; font-size: 20px; z-index: 2001;
}
.lb-close:hover { background: rgba(255,255,255,0.25); }
.lb-hint { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.6); font-size: 12.5px; font-family: var(--font-mono); z-index: 2001; }
.article-fig figcaption {
    margin-top: 12px; font-size: 13px; color: var(--ink-4); line-height: 1.5; text-align: center;
    font-style: italic;
}
.article-fig figcaption strong { color: var(--ink-3); font-style: normal; font-weight: 600; }

/* photo */
.article-photo { width: 100%; border-radius: 16px; display: block; box-shadow: 0 24px 60px -30px rgba(43,18,89,0.32); }
.article-photo-wrap { position: relative; border-radius: 16px; overflow: hidden; }
.article-photo-wrap .ph-credit {
    position: absolute; bottom: 8px; right: 10px; font-size: 10px; color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.35); padding: 2px 7px; border-radius: 100px; backdrop-filter: blur(4px);
}

/* schéma / dessin */
.article-schema { width: 100%; height: auto; display: block; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; }
.article-schema.plain { background: #fff; }

@media (max-width: 1040px) {
    .article-fig, .article-fig.wide { width: 100%; }
}

/* retour blog (en haut de l'article) */
.article-back {
    position: sticky; top: 64px; z-index: 40;
    background: rgba(255,255,255,0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.article-back-inner { width: var(--container); margin: 0 auto; padding: 12px 0; display: flex; align-items: center; gap: 18px; }
.article-back-title { font-size: 13.5px; color: var(--ink-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.article-back a {
    display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
    font-size: 14px; font-weight: 500; color: var(--ink-2); transition: color .15s;
}
.article-back a:hover { color: var(--violet); }
.article-back a svg { transition: transform .15s; }
.article-back a:hover svg { transform: translateX(-3px); }
