/* varlog — style.css */

/* Inter — auto-hébergée */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/inter-normal-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/inter-normal-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/inter-italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/inter-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── Variables ─────────────────────────── */
:root {
    /* Override Bootstrap link defaults */
    --bs-link-color:       #4f46e5;
    --bs-link-color-rgb:   79, 70, 229;
    --bs-link-hover-color: #4338ca;
    --bs-link-decoration:  none;
    --vl-accent:      #4f46e5;
    --vl-accent-dark: #4338ca;
    --vl-accent-soft: #e0e7ff;
    --vl-bg:          #f8fafc;
    --vl-surface:     #ffffff;
    --vl-border:      #e2e8f0;
    --vl-text:        #1e293b;
    --vl-muted:       #64748b;
    --vl-radius:      0.75rem;
    --vl-shadow-sm:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --vl-shadow-md:   0 4px 16px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
}

/* ─── Base ──────────────────────────────── */
body {
    background-color: var(--vl-bg) !important;
    color: var(--vl-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Navbar ────────────────────────────── */
.navbar {
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 55%, #7c3aed 100%) !important;
    border-bottom: none;
    box-shadow: 0 2px 24px rgba(79,70,229,.35);
    padding: 0.65rem 1.5rem;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff !important;
    letter-spacing: -0.5px;
    transition: opacity 0.15s;
    text-decoration: none !important;
}

.navbar-brand:hover {
    opacity: 0.85;
}

/* Caret du dropdown sur fond coloré */
.navbar-brand.dropdown-toggle::after {
    border-top-color: rgba(255,255,255,.7);
    vertical-align: .2em;
}

.navbar .nav-link {
    color: rgba(255,255,255,.85) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem !important;
    border-radius: 0.5rem;
    transition: color 0.15s, background 0.15s;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #fff !important;
    background-color: rgba(255,255,255,.15);
}

.navbar-toggler {
    border-color: rgba(255,255,255,.35);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2C255%2C255%2C0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdown catégories */
.navbar .dropdown-menu {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    padding: 0.5rem;
    min-width: 180px;
}

.navbar .dropdown-item {
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--vl-text);
    padding: 0.4rem 0.75rem;
    transition: background 0.12s, color 0.12s;
}

.navbar .dropdown-item:hover {
    background-color: var(--vl-accent-soft);
    color: var(--vl-accent);
}

.navbar .dropdown-item.active {
    background-color: var(--vl-accent);
    color: #fff;
}

/* ─── Category nav in navbar ─────────────── */

/* ─── Main ───────────────────────────────── */
main.container,
main.container-xl,
main.container-fluid {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

main.container {
    max-width: 980px;
}

/* ─── Headings ───────────────────────────── */
h1 {
    font-weight: 700;
    font-size: 1.75rem;
    letter-spacing: -0.5px;
    color: var(--vl-text);
}

h2 {
    font-weight: 600;
    letter-spacing: -0.3px;
}

/* ─── Liens globaux ─────────────────────── */
a {
    color: var(--vl-accent);
    text-decoration: none !important;
}

a:hover {
    color: var(--vl-accent-dark);
}

/* ─── Cards ─────────────────────────────── */

.card-cover {
    height: 120px;
    border-radius: var(--vl-radius) var(--vl-radius) 0 0;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

/* Couverture pleine largeur dans la vue article */
.article-cover {
    margin: 0;
    overflow: hidden;
    border-radius: var(--vl-radius) var(--vl-radius) 0 0;
    flex-shrink: 0;
}

.article-cover img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    display: block;
}

.article-cover--gradient {
    height: 160px;
    position: relative;
}

/* Hero : titre sur l'image */
.article-cover--hero {
    position: relative;
}

.article-cover--hero img {
    height: clamp(260px, 45vw, 480px);
}

.article-cover--hero.article-cover--gradient {
    height: clamp(200px, 35vw, 340px);
}

.article-hero-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.9rem 1.4rem 1.25rem;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.80) 0%,
        rgba(0,0,0,.32) 50%,
        transparent 100%
    );
}

.article-hero-top {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
    align-items: flex-start;
    min-height: 2rem;
}

.article-hero-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.article-hero-left  { flex: 1; min-width: 0; }

.article-hero-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.article-hero-text .cover-category {
    position: static;
    align-self: flex-start;
    margin-bottom: 0.55rem;
}

.article-hero-text .article-title {
    color: #fff;
    text-shadow: 0 1px 8px rgba(0,0,0,.5);
    margin-bottom: 0.3rem;
}

.article-hero-meta {
    font-size: 0.82rem;
    color: rgba(255,255,255,.72);
    margin: 0;
}

/* Boutons glass sur le hero */
.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.28rem 0.75rem;
    font-size: 0.73rem;
    font-weight: 600;
    color: #fff !important;
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}
.hero-btn:hover  { background: rgba(0,0,0,.58); color: #fff !important; }
.hero-btn--danger { border-color: rgba(239,68,68,.5); }
.hero-btn--danger:hover { background: rgba(180,30,30,.65); }

/* Score de notation dans le hero */
.hero-reactions {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.hero-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 100px;
    padding: .25rem .7rem;
    color: #fff;
    font-size: .875rem;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.hero-reaction-btn:hover,
.hero-reaction-btn--active {
    background: rgba(255,255,255,.32);
    border-color: rgba(255,255,255,.7);
}

.card-cover {
    position: relative;
}

.cover-category {
    position: absolute;
    bottom: 0.6rem;
    left: 0.75rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0, 0, 0, 0.28);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.card {
    border: 1px solid var(--vl-border) !important;
    border-radius: var(--vl-radius) !important;
    box-shadow: var(--vl-shadow-sm);
    background-color: var(--vl-surface);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.card-body {
    padding: 1.35rem 1.5rem;
}

.card-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--vl-text);
}

.article-title {
    font-weight: 800;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: var(--vl-text);
    margin-bottom: 0.5rem;
}

/* Override la couleur text-primary Bootstrap sur les card-title */
.card-title.text-primary {
    color: var(--vl-text) !important;
}

.card-title a,
.card-title a:visited {
    color: var(--vl-text) !important;
    transition: color 0.15s;
}

.card-title a:hover {
    color: var(--vl-accent) !important;
}

.card-text {
    color: var(--vl-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

/* Neutralise les borders colorées Bootstrap */
.card[class*="border-primary"],
.card[class*="border-warning"],
.card[class*="border-success"],
.card[class*="border-danger"] {
    border-color: var(--vl-border) !important;
}

/* ─── Ribbons (brouillon / avant-première) ── */
.draft-ribbon,
.premiere-ribbon,
.private-ribbon {
    position: absolute;
    top: 26px;
    right: -34px;
    width: 130px;
    text-align: center;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 0;
    transform: rotate(45deg);
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
}

.draft-ribbon    { background: #f59e0b; }
.premiere-ribbon { background: #6366f1; }
.private-ribbon  { background: #64748b; }

/* ─── Buttons ─────────────────────────────── */
.btn {
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
}

.btn-outline-primary {
    --bs-btn-color: var(--vl-accent);
    --bs-btn-border-color: var(--vl-accent);
    --bs-btn-hover-bg: var(--vl-accent);
    --bs-btn-hover-border-color: var(--vl-accent);
    --bs-btn-active-bg: var(--vl-accent-dark);
}

.btn-outline-secondary {
    --bs-btn-color: var(--vl-muted);
    --bs-btn-border-color: var(--vl-border);
    --bs-btn-hover-bg: var(--vl-bg);
    --bs-btn-hover-border-color: var(--vl-border);
    --bs-btn-hover-color: var(--vl-text);
}

.btn-success {
    background-color: var(--vl-accent) !important;
    border-color: var(--vl-accent) !important;
}

.btn-success:hover,
.btn-success:focus {
    background-color: var(--vl-accent-dark) !important;
    border-color: var(--vl-accent-dark) !important;
}

.btn-secondary {
    background-color: #f1f5f9 !important;
    border-color: var(--vl-border) !important;
    color: var(--vl-text) !important;
}

.btn-secondary:hover {
    background-color: #e2e8f0 !important;
    border-color: var(--vl-border) !important;
}

.btn-danger {
    --bs-btn-bg: #ef4444;
    --bs-btn-border-color: #ef4444;
    --bs-btn-hover-bg: #dc2626;
    --bs-btn-hover-border-color: #dc2626;
}

/* ─── Forms ──────────────────────────────── */
.form-control,
.form-select {
    border-color: var(--vl-border);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    background-color: var(--vl-surface);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--vl-accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--vl-text);
    margin-bottom: 0.375rem;
}

.form-check-input:checked {
    background-color: var(--vl-accent);
    border-color: var(--vl-accent);
}

textarea.form-control {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    min-height: 320px;
    resize: vertical;
}

/* ─── Alerts ─────────────────────────────── */
.alert {
    border-radius: var(--vl-radius);
    border: none;
    font-size: 0.9rem;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
}

/* ─── Left category sidebar ──────────────── */
.left-sidebar {
    position: sticky;
    top: 1.5rem;
}

.left-sidebar-section {
    margin-bottom: 1.5rem;
}

.left-sidebar-cat {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--vl-muted);
    text-decoration: none;
    margin-bottom: 0.4rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.4rem;
    transition: background 0.15s, color 0.15s;
}

.left-sidebar-cat:hover {
    background: var(--vl-accent-soft);
    color: var(--vl-accent);
}

.left-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.left-sidebar-list li {
    border-left: 2px solid var(--vl-border);
    padding-left: 0.6rem;
    margin-bottom: 0.3rem;
}

.left-sidebar-list li a {
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--vl-text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s;
}

.left-sidebar-list li a:hover {
    color: var(--vl-accent);
}

/* ─── Related articles sidebar ───────────── */
.related-sidebar {
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--vl-border) transparent;
}

/* ─── Post layout: colonnes sidebar fixe + article flexible ── */
@media (min-width: 992px) {
    .post-sidebar-col {
        flex: 0 0 260px;
        width: 260px;
        max-width: 260px;
        align-self: stretch;
    }
}

.related-sidebar-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--vl-muted);
    margin-bottom: 1rem;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.toc-list a {
    display: block;
    font-size: .8rem;
    line-height: 1.45;
    color: var(--vl-muted);
    padding: .25rem .5rem;
    border-left: 2px solid transparent;
    transition: color .15s, border-color .15s;
}

.toc-list a:hover,
.toc-list a.toc-active {
    color: var(--vl-accent);
    border-left-color: var(--vl-accent);
}

.toc-list a.toc-active {
    font-weight: 600;
}

.toc-h3 a {
    padding-left: 1.25rem;
    font-size: .775rem;
}

.toc-nav {
    display: flex;
    gap: .5rem;
    padding-top: .75rem;
    border-top: 1px solid var(--vl-border);
    margin-top: .25rem;
}

.toc-nav-btn {
    flex: 1;
    background: none;
    border: 1px solid var(--vl-border);
    border-radius: .5rem;
    padding: .3rem .4rem;
    font-size: .75rem;
    color: var(--vl-muted);
    cursor: pointer;
    transition: color .15s, border-color .15s;
}

.toc-nav-btn:hover {
    color: var(--vl-accent);
    border-color: var(--vl-accent);
}

.also-read-title {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--vl-muted);
    margin-bottom: .75rem;
}

.also-read-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.also-read-grid .related-card {
    flex: 1 1 200px;
    max-width: 280px;
    background: var(--vl-surface);
    border-radius: var(--vl-radius);
    padding: .65rem;
    box-shadow: var(--vl-shadow-sm);
    transition: box-shadow .15s, transform .15s;
}

.also-read-grid .related-card:hover {
    box-shadow: var(--vl-shadow-md);
    transform: translateY(-1px);
}

.related-card {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    text-decoration: none;
    color: var(--vl-text);
    padding: 0.65rem;
    border-radius: var(--vl-radius);
    transition: background 0.15s;
    margin-bottom: 0.25rem;
}

.related-card:hover {
    background: var(--vl-accent-soft);
    color: var(--vl-accent);
}

.related-card-thumb {
    width: 64px;
    height: 52px;
    border-radius: 0.5rem;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.related-card-body {
    flex: 1;
    min-width: 0;
}

.related-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card-date {
    font-size: 0.75rem;
    color: var(--vl-muted);
    margin-top: 0.2rem;
}

/* ─── Source / attachment cards (sidebar) ── */
.source-card {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    text-decoration: none;
    color: var(--vl-text);
    padding: 0.5rem 0.65rem;
    border-radius: var(--vl-radius);
    border: 1px solid var(--vl-border);
    background: var(--vl-surface);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.source-card:hover {
    border-color: var(--vl-accent);
    box-shadow: 0 0 0 3px rgba(79,70,229,.08);
    color: var(--vl-accent);
}

.source-card-thumb {
    width: 52px;
    height: 42px;
    border-radius: 0.4rem;
    flex-shrink: 0;
    background-color: var(--vl-accent-soft);
}

.source-card-thumb--pdf,
.source-card-thumb--link {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--vl-accent);
}

.source-card-body {
    flex: 1;
    min-width: 0;
}

.source-card-title {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.source-card-meta {
    font-size: 0.72rem;
    color: var(--vl-muted);
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Post content (Markdown rendu) ──────── */
.post-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--vl-text);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content a {
    color: var(--vl-accent);
    text-decoration: underline;
    text-decoration-color: var(--vl-accent-soft);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s;
}

.post-content a:hover {
    text-decoration-color: var(--vl-accent);
}

.post-content code {
    background: #f1f5f9;
    padding: 0.2em 0.45em;
    border-radius: 4px;
    font-size: 0.85em;
    color: #be185d;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.post-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem 1.5rem;
    border-radius: var(--vl-radius);
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 1.5rem 0;
}

.post-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

.post-content blockquote {
    border-left: 3px solid var(--vl-accent);
    padding: 0.5rem 0 0.5rem 1.25rem;
    margin: 1.5rem 0;
    color: var(--vl-muted);
    font-style: italic;
}

.post-content ul,
.post-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.post-content li {
    margin-bottom: 0.375rem;
}

.post-content img {
    max-width: 100%;
    border-radius: var(--vl-radius);
    margin: 1rem 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.post-content th,
.post-content td {
    padding: 0.625rem 1rem;
    border: 1px solid var(--vl-border);
    text-align: left;
}

.post-content th {
    background: var(--vl-bg);
    font-weight: 600;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--vl-border);
    margin: 2rem 0;
}

/* ─── Post grid — auto-fill columns ─────────── */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ─── Post list — date / meta ─────────────── */
.post-meta {
    font-size: 0.8rem;
    color: var(--vl-muted);
}

/* ─── Footer ─────────────────────────────── */
footer {
    border-top: 1px solid var(--vl-border);
    color: var(--vl-muted) !important;
    font-size: 0.85rem;
}

/* ─── Navbar tagline ────────────────────── */
.navbar-tagline {
    font-size: 0.68rem;
    font-weight: 400;
    color: rgba(255,255,255,.6);
    letter-spacing: 0;
    margin-top: 2px;
}

/* ─── Liste éditoriale ───────────────────── */
.posts-list {
    max-width: 720px;
    margin: 0 auto;
}

.post-entry {
    padding: 2rem 0;
    border-bottom: 1px solid var(--vl-border);
}

.post-entry:last-child {
    border-bottom: none;
}

.post-entry-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    line-height: 1.35;
    letter-spacing: -0.3px;
}

.post-entry-title a {
    color: var(--vl-text);
    text-decoration: none;
    transition: color 0.15s;
}

.post-entry-title a:hover {
    color: var(--vl-accent);
}

.post-entry-excerpt {
    color: var(--vl-muted);
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
    line-height: 1.65;
}

.post-entry-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.82rem;
    color: var(--vl-muted);
}

.post-entry-edit {
    color: var(--vl-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.post-entry-edit:hover {
    color: var(--vl-text);
}

.post-entry-read {
    color: var(--vl-accent);
    text-decoration: none;
    font-weight: 600;
    margin-left: auto;
    transition: opacity 0.15s;
}

.post-entry-read:hover {
    opacity: 0.75;
}

/* ─── Pagination ─────────────────────────── */
.pagination-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--vl-border);
    background: var(--vl-surface);
    color: var(--vl-text);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    border-color: var(--vl-accent);
    color: var(--vl-accent);
    background: var(--vl-accent-soft);
}

.pagination-btn.active {
    background: var(--vl-accent);
    border-color: var(--vl-accent);
    color: #fff;
}

.pagination-btn.disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.pagination-ellipsis {
    padding: 0 0.25rem;
    color: var(--vl-muted);
    font-size: 0.875rem;
}

/* ─── Footer ──────────────────────────────── */
footer {
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 55%, #7c3aed 100%);
    border-top: none;
    box-shadow: 0 -2px 24px rgba(79,70,229,.25);
    color: rgba(255,255,255,.85);
}

footer.py-5 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
footer.mt-5 { margin-top: 0 !important; }

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.footer-about strong {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    display: block;
    margin-bottom: 0.4rem;
    letter-spacing: -0.2px;
}

.footer-about p {
    font-size: 0.82rem;
    color: rgba(255,255,255,.75);
    margin: 0 0 0.5rem;
    line-height: 1.55;
}

.footer-about small {
    font-size: 0.78rem;
    color: rgba(255,255,255,.6);
}

.footer-about small a {
    color: rgba(255,255,255,.7);
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,.3);
    transition: color 0.15s;
}

.footer-about small a:hover {
    color: #fff;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.footer-nav a {
    font-size: 0.85rem;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-nav a:hover {
    color: #fff;
}

@media (max-width: 576px) {
    .footer-inner {
        flex-direction: column;
        gap: 1.5rem;
    }

    .footer-nav {
        align-items: flex-start;
        flex-direction: row;
        gap: 1rem;
    }
}

/* ─── Utilitaires ─────────────────────────── */
.text-muted {
    color: var(--vl-muted) !important;
}

.text-primary {
    color: var(--vl-accent) !important;
}

/* ─── Widget étoiles ──────────────────────── */

/* ─── Barre de recherche (navbar) ────────── */
.search-form {
    margin: 0 .5rem;
}

.search-input {
    width: 160px;
    transition: width .2s, background .15s;
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.25);
    border-radius: 0.5rem;
    color: #fff;
}

.search-input::placeholder {
    color: rgba(255,255,255,.5);
}

.search-input:focus {
    width: 220px;
    background: rgba(255,255,255,.22);
    border-color: rgba(255,255,255,.5);
    box-shadow: 0 0 0 2px rgba(255,255,255,.15);
    color: #fff;
}

@media (max-width: 991px) {
    .search-form { margin: .5rem 0; }
    .search-input, .search-input:focus { width: 100%; }
}

/* ─── Barre de recherche hero (accueil) ────── */
.hero-search {
    text-align: center;
    padding: 2.25rem 1rem 1.5rem;
}
.hero-search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: .5rem;
}
.hero-search-input {
    flex: 1;
    padding: .7rem 1.1rem;
    font-size: 1.05rem;
    border: 1.5px solid var(--vl-border);
    border-radius: .6rem;
    background: var(--vl-surface);
    color: var(--vl-text);
    transition: border-color .2s, box-shadow .2s;
}
.hero-search-input::placeholder { color: var(--vl-muted); }
.hero-search-input:focus {
    outline: none;
    border-color: var(--vl-accent);
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.hero-search-btn {
    padding: .7rem 1.3rem;
    background: var(--vl-accent);
    color: #fff;
    border: none;
    border-radius: .6rem;
    font-size: .95rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}
.hero-search-btn:hover { background: var(--vl-accent-dark); }
.hero-search-stats {
    margin-top: .8rem;
    font-size: .83rem;
    color: var(--vl-muted);
    letter-spacing: .01em;
}

/* ─── Page de recherche ───────────────────── */
.search-page { max-width: 780px; margin: 0 auto; }

.search-bar .input-group { max-width: 600px; }

.search-results { display: flex; flex-direction: column; gap: 2rem; }

.search-result {
    border-bottom: 1px solid var(--vl-border);
    padding-bottom: 1.5rem;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .25rem;
    font-size: .8rem;
}

.search-result-cat {
    background: var(--vl-surface);
    border: 1px solid var(--vl-border);
    border-radius: 20px;
    padding: 1px 10px;
    color: var(--vl-muted);
    text-decoration: none;
}

.search-result-cat:hover { color: var(--vl-accent); }

.search-result-date { color: var(--vl-muted); }

.search-result-title {
    font-size: 1.15rem;
    margin: 0 0 .4rem;
}

.search-result-title a {
    color: var(--vl-text);
    text-decoration: none;
}

.search-result-title a:hover { color: var(--vl-accent); }

.search-result-snippet {
    font-size: .9rem;
    color: var(--vl-muted);
    margin: 0;
    line-height: 1.6;
}

.search-result-snippet mark {
    background: rgba(250, 204, 21, .35);
    color: inherit;
    border-radius: 2px;
    padding: 0 2px;
}

/* ── Tag cloud ────────────────────────────────────────────────── */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    padding: 1.25rem 0;
    border-top: 1px solid var(--vl-border, #e5e7eb);
}

.tag-cloud-item {
    display: inline-flex;
    align-items: center;
    gap: .3em;
    padding: .25em .75em;
    border-radius: 999px;
    border: 1px solid var(--vl-border, #e5e7eb);
    background: transparent;
    color: var(--vl-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
    font-size: .85rem !important;
}

.tag-cloud-item:hover {
    background: var(--vl-accent);
    border-color: var(--vl-accent);
    color: #fff;
}

.tag-cloud-item.active {
    background: var(--vl-accent);
    border-color: var(--vl-accent);
    color: #fff;
    font-weight: 600;
}

.tag-count {
    font-size: .8em;
    opacity: .7;
}

.tag-cloud-reset {
    margin-left: auto;
    font-size: .85rem;
    color: var(--vl-muted);
    text-decoration: none;
}

.tag-cloud-reset:hover { color: var(--vl-accent); }

/* ─── Profil public auteur ───────────────── */

.author-profile-hero {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.author-avatar {
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: var(--vl-accent);
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 .25rem;
}

.author-profile-link {
    font-size: .875rem;
    color: var(--vl-muted);
}

.author-profile-link:hover { color: var(--vl-accent); }

.liens-cta {
    display: inline-block;
    margin-top: .625rem;
    padding: .5rem 1.25rem;
    border-radius: 100px;
    background: var(--vl-accent);
    color: #fff;
    font-size: .875rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s, transform .15s;
}
.liens-cta:hover {
    background: var(--vl-accent-dark);
    color: #fff;
    transform: translateY(-1px);
}

.author-bio-wrap {
    flex: 1;
}

.author-profile-bio {
    margin: 0 0 .25rem;
    color: var(--vl-muted);
    line-height: 1.7;
    font-size: .9375rem;
}

.author-profile-bio.bio-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bio-toggle {
    background: none;
    border: none;
    padding: 0;
    color: var(--vl-accent);
    font-size: .875rem;
    cursor: pointer;
    text-decoration: underline;
}

/* ─── Page "Mes liens" ───────────────────── */

.liens-page {
    max-width: 520px;
    margin: 0 auto;
    padding: 3rem 1.25rem 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.liens-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.liens-avatar {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    background: var(--vl-accent);
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.liens-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.liens-bio {
    font-size: .9375rem;
    color: var(--vl-muted);
    line-height: 1.6;
    margin: 0;
}

.liens-sep {
    width: 100%;
    border: none;
    border-top: 1.5px solid var(--vl-border);
    margin: 0;
}

.liens-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.liens-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    width: 100%;
    padding: 1.125rem 1.75rem;
    border-radius: 100px;
    border: none;
    background: var(--btn-bg, var(--vl-accent));
    text-align: center;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    transition: filter .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.liens-item:hover {
    color: #fff;
    filter: brightness(1.12);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
}

.liens-item-title { font-size: 1.125rem; }

.liens-item-desc {
    font-size: .85rem;
    font-weight: 400;
    color: rgba(255,255,255,.8);
}

.liens-footer {
    font-size: .8rem;
    color: var(--vl-muted);
}
.liens-footer a { color: inherit; }
.liens-footer a:hover { color: var(--vl-accent); }

.liens-bg { background: #f1f5f9; }

/* ─── Agrégateur de flux ─────────────────── */

.flux-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 52rem;
}

.flux-item {
    border-left: 3px solid var(--vl-border);
    padding-left: 1rem;
}

.flux-item-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    font-size: .8rem;
    color: var(--vl-muted);
    margin-bottom: .25rem;
}

.flux-author {
    font-weight: 600;
    color: var(--vl-accent);
    text-decoration: none;
}
.flux-author:hover { text-decoration: underline; }

.flux-feed-name::before { content: '·'; margin-right: .5rem; }

.flux-date::before { content: '·'; margin-right: .5rem; }

.flux-item-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 .25rem;
}

.flux-item-title a {
    color: var(--vl-text);
    text-decoration: none;
}
.flux-item-title a:hover { color: var(--vl-accent); }

.flux-item-summary {
    font-size: .875rem;
    color: var(--vl-muted);
    margin: 0;
    line-height: 1.6;
}

/* Bouton flottant "+" — nouvel article */
.fab-new {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1050;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: var(--vl-accent);
    color: #fff;
    font-size: 1.75rem;
    line-height: 3.25rem;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(79,70,229,.45);
    transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
    user-select: none;
}
.fab-new:hover,
.fab-new:focus {
    background: var(--vl-accent-dark);
    color: #fff;
    box-shadow: 0 6px 20px rgba(79,70,229,.55);
    transform: scale(1.08);
}

/* ─── Homepage sections ─────────────────────────────────────────── */
.home-section { margin-top: 3rem; }
.home-section--first { margin-top: 0; }

.home-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--vl-muted);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}
.home-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--vl-border);
}
.home-section-title-sub {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}
.home-section-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--vl-accent);
    color: #fff;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
}

/* ─── Hero card homepage ────────────────────────────────────────── */
.home-hero-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: var(--vl-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--vl-shadow-md);
    transition: box-shadow 0.2s, transform 0.2s;
}
.home-hero-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.14); transform: translateY(-2px); }

.home-hero-card-cover {
    position: relative;
    height: 340px;
    background-size: cover;
    background-position: center;
}
.home-hero-card-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,15,30,.75) 0%, rgba(10,15,30,.15) 55%, transparent 100%);
}
.home-hero-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    background: var(--vl-accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
}
.home-hero-card-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 1.5rem;
    z-index: 1;
    color: #fff;
}
.home-hero-card-cat {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.8;
    margin-bottom: 0.35rem;
}
.home-hero-card-title {
    font-size: clamp(1.3rem, 3vw, 1.9rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.45rem;
}
.home-hero-card-excerpt {
    font-size: 0.9rem;
    opacity: 0.78;
    margin: 0 0 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home-hero-card-date {
    font-size: 0.8rem;
    opacity: 0.65;
}

@media (max-width: 640px) {
    .home-hero-card-cover { height: 240px; }
}

/* ─── More link ─────────────────────────────────────────────────── */
.home-more-link { margin-top: 1.25rem; text-align: center; }

/* ─── Compact list (récemment mis à jour, redécouvertes) ────────── */
.home-compact-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.6rem;
}
.home-compact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.875rem;
    background: var(--vl-surface);
    border: 1px solid var(--vl-border);
    border-radius: var(--vl-radius);
    text-decoration: none;
    color: var(--vl-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.home-compact-item:hover {
    border-color: var(--vl-accent);
    box-shadow: var(--vl-shadow-sm);
    color: var(--vl-text);
}
.home-compact-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}
.home-compact-meta { flex: 1; min-width: 0; }
.home-compact-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home-compact-date {
    font-size: 0.75rem;
    color: var(--vl-muted);
    margin-top: 0.15rem;
}
