/* ============================================
   GOOSSIPS SEO - Design System
   Typography: Space Grotesk + DM Sans
   ============================================ */

:root {
    /* Typography */
    --font-heading: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;

    /* Colors */
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-light: #e0f2fe;
    --accent: #f59e0b;
    --accent-light: #fef3c7;
    --success: #0d9488;
    --success-light: #ccfbf1;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fee2e2;

    /* Surfaces */
    --surface: #f8fafc;
    --card: #ffffff;

    /* Grays */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Radius */
    --radius: 12px;
    --radius-lg: 16px;
    --radius-pill: 50px;

    /* Shadows (blue-tinted) */
    --shadow: 0 1px 3px rgba(14,165,233,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 12px rgba(14,165,233,.08), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg: 0 12px 32px rgba(14,165,233,.1), 0 4px 8px rgba(0,0,0,.05);
    --shadow-hover: 0 16px 40px rgba(14,165,233,.14), 0 6px 12px rgba(0,0,0,.06);

    /* Header color (overridden per-page via inline CSS var) */
    --header-color: #0ea5e9;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(14,165,233,.25); }
    50% { box-shadow: 0 0 0 10px rgba(14,165,233,0); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ============================================
   GLOBAL RESET & BASE
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--gray-800);
    background: var(--surface);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.25;
    letter-spacing: -.02em;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

/* ============================================
   SITE LOGO (top-left, all pages except home)
   ============================================ */

.site-logo {
    position: fixed;
    top: 16px;
    left: 20px;
    z-index: 100;
    display: inline-block;
    transition: opacity .3s ease, transform .3s ease;
}
.site-logo img {
    height: 72px;
    width: auto;
    border-radius: var(--radius);
    mix-blend-mode: multiply;
    /* Réserve l'espace avant chargement pour éviter le CLS */
    aspect-ratio: 132 / 72;
}
.site-logo:hover {
    opacity: .85;
    transform: scale(1.03);
    text-decoration: none;
}

/* ============================================
   SEARCH PAGE - Public
   ============================================ */

.search-hero {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(14,165,233,.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(245,158,11,.08) 0%, transparent 40%),
        linear-gradient(135deg, #0c1222 0%, #0c4a6e 50%, #0369a1 100%);
    color: #fff;
    text-align: center;
    padding: 40px 32px 72px;
    position: relative;
}

.search-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.015'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.search-hero.has-results {
    padding: 32px 24px 24px;
}

.search-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 4vw + 0.5rem, 2.8rem);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -.03em;
    position: relative;
    z-index: 1;
}

.search-hero .subtitle {
    font-size: clamp(0.85rem, 1.5vw + 0.5rem, 1.15rem);
    opacity: .8;
    margin-bottom: 40px;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.search-hero.has-results h1 { font-size: clamp(1.05rem, 1.8vw + 0.5rem, 1.5rem); margin-bottom: 0; }
.search-hero.has-results .subtitle { display: none; }

/* Hero Logo (centered) */
.hero-logo {
    display: block;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}
.hero-logo-img {
    height: 90px;
    width: auto;
    border-radius: var(--radius);
    mix-blend-mode: screen;
    transition: transform .3s ease, opacity .3s ease;
}
.hero-logo:hover .hero-logo-img {
    transform: scale(1.05);
    opacity: .9;
}
.search-hero.has-results .hero-logo-img {
    height: 48px;
}
.search-hero.has-results .hero-logo {
    margin-bottom: 12px;
}

/* Hero Language Switcher (top right absolute) */
.hero-lang {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(12px);
    border-radius: 10px;
    text-decoration: none;
    transition: background .2s, transform .15s;
    border: 1px solid rgba(255,255,255,.2);
}
.hero-lang:hover {
    background: rgba(255,255,255,.25);
    transform: translateY(-2px);
    text-decoration: none;
}
.hero-lang svg { display: block; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.search-hero.has-results .hero-lang { padding: 6px 8px; top: 12px; right: 16px; }

.search-box {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.search-box input[type="text"] {
    width: 100%;
    padding: 18px 60px 18px 24px;
    font-size: 1.1rem;
    font-family: var(--font-body);
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-lg), 0 0 0 0 rgba(14,165,233,0);
    outline: none;
    transition: box-shadow .3s, border-color .3s;
    background: rgba(255,255,255,.97);
}

.search-box input[type="text"]:focus {
    border-color: rgba(14,165,233,.3);
    box-shadow: var(--shadow-lg), 0 0 0 6px rgba(14,165,233,.12);
}

.search-box button {
    position: absolute;
    right: 8px;
    top: 8px;
    bottom: 8px;
    width: 48px;
    border: none;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background .2s, transform .15s;
}

.search-box button:hover { background: var(--primary-dark); transform: scale(1.05); }

.search-filters {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px 20px 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
    z-index: 1;
}

.search-filters label {
    font-size: .85rem;
    color: rgba(255,255,255,.6);
    font-weight: 500;
}

.search-filters select,
.search-filters input[type="number"] {
    padding: 8px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: .85rem;
    font-family: var(--font-body);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.search-filters select:focus,
.search-filters input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14,165,233,.1);
}

/* Language Flag (fixed, inner pages) */
.lang-flag {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    background: rgba(255,255,255,.92);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    transition: box-shadow .2s, transform .15s;
    backdrop-filter: blur(12px);
}
.lang-flag:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    text-decoration: none;
}
.lang-flag svg { display: block; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.1); }

/* AJAX Search Preview */
.search-preview {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 440px;
    overflow-y: auto;
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s, visibility .2s, transform .2s;
    border: 1px solid rgba(14,165,233,.08);
}
.search-preview.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-preview .sp-item {
    display: block;
    padding: 14px 18px;
    text-decoration: none;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-100);
    transition: background .15s;
}
.search-preview .sp-item:last-of-type { border-bottom: none; }
.search-preview .sp-item:hover,
.search-preview .sp-item.sp-active { background: var(--primary-light); }

.search-preview .sp-title {
    font-family: var(--font-heading);
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
}
.search-preview .sp-title mark { background: #fef08a; padding: 0 2px; border-radius: 3px; }

.search-preview .sp-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: .76rem;
    color: var(--gray-500);
    flex-wrap: wrap;
}
.search-preview .sp-speaker { font-weight: 600; color: var(--gray-600); }
.search-preview .sp-date { color: var(--gray-500); }
.search-preview .sp-ai {
    background: var(--primary-light);
    color: var(--primary);
    padding: 1px 8px;
    border-radius: var(--radius-pill);
    font-size: .68rem;
    font-weight: 700;
}

.search-preview .sp-cats {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.search-preview .sp-tag {
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: .68rem;
    font-weight: 500;
}

.search-preview .sp-all {
    display: block;
    padding: 14px 18px;
    text-align: center;
    font-size: .85rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary);
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    text-decoration: none;
    transition: background .15s;
}
.search-preview .sp-all:hover { background: var(--primary-light); text-decoration: none; }

.search-preview .sp-empty {
    padding: 28px 18px;
    text-align: center;
    color: var(--gray-500);
    font-size: .88rem;
}

.search-preview .stars { font-size: .72rem; }

/* ============================================
   RESULTS
   ============================================ */

.results-container {
    max-width: 920px;
    margin: 0 auto;
    padding: 28px 24px 64px;
}

.results-meta {
    font-size: .9rem;
    font-family: var(--font-heading);
    color: var(--gray-500);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.result-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    transition: box-shadow .3s, transform .3s;
    border-left: 4px solid transparent;
    animation: fadeInUp .4s ease both;
}

.result-card:nth-child(2) { animation-delay: .05s; }
.result-card:nth-child(3) { animation-delay: .1s; }
.result-card:nth-child(4) { animation-delay: .15s; }
.result-card:nth-child(5) { animation-delay: .2s; }

.result-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
    border-left-color: var(--primary);
}

.result-card .result-title {
    font-family: var(--font-heading);
    font-size: clamp(0.95rem, 1.2vw + 0.5rem, 1.15rem);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 6px;
    letter-spacing: -.01em;
}

.result-card .result-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: .82rem;
    color: var(--gray-500);
}

.result-card .result-content {
    font-size: .95rem;
    color: var(--gray-600);
    line-height: 1.75;
}

.result-card .result-content mark {
    background: #fef08a;
    padding: 1px 4px;
    border-radius: 3px;
}

.result-card .result-tags {
    margin-top: 14px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: .75rem;
    font-family: var(--font-heading);
    font-weight: 500;
    background: var(--primary-light);
    color: var(--primary);
    transition: transform .15s, box-shadow .15s;
    cursor: pointer;
}

.tag:hover { transform: scale(1.05); }

.tag.tag-success { background: var(--success-light); color: var(--success); }
.tag.tag-warning { background: var(--warning-light); color: var(--warning); }

.stars { color: var(--accent); letter-spacing: 2px; }

.result-card .result-comment {
    margin-top: 14px;
    padding: 14px 18px;
    background: var(--gray-50);
    border-radius: var(--radius);
    font-size: .88rem;
    color: var(--gray-600);
    border-left: 3px solid var(--gray-300);
    font-style: italic;
}

.result-card .result-source {
    margin-top: 10px;
    font-size: .82rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 36px;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 6px;
    border-radius: var(--radius);
    font-size: .9rem;
    font-family: var(--font-heading);
    font-weight: 500;
    border: 1px solid var(--gray-200);
    background: var(--card);
    color: var(--gray-700);
    transition: all .2s;
}

.pagination a:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    text-decoration: none;
    transform: translateY(-1px);
}
.pagination .active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(14,165,233,.25);
}

/* ============================================
   SYNTHESES HOME (Homepage featured section)
   ============================================ */

.syntheses-home {
    max-width: 1100px;
    margin: 0 auto 12px;
    padding: 0 20px;
}

.syntheses-home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.syntheses-home-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: #7c3aed;
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: .85rem;
    transition: background .15s, transform .15s;
    white-space: nowrap;
}
.syntheses-home-cta:hover { background: #6d28d9; transform: translateX(2px); text-decoration: none; color: #fff; }
.syntheses-home-count {
    background: rgba(255, 255, 255, .22);
    padding: 2px 9px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
}

/* ============================================
   PAGES DE LISTE (syntheses, videos, articles)
   ============================================ */
.listing-container { max-width: 1200px; margin: 0 auto; padding: 100px 20px 48px; }
.breadcrumbs { font-size: .82rem; color: #64748b; margin-bottom: 16px; }
.breadcrumbs a { color: #64748b; text-decoration: none; }
.breadcrumbs a:hover { color: #1a73e8; text-decoration: underline; }
.breadcrumbs span { color: #1e293b; font-weight: 600; }

.listing-header { margin-bottom: 28px; }
.listing-label {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .72rem; font-weight: 700;
    padding: 4px 12px; border-radius: 999px;
    text-transform: uppercase; letter-spacing: .1em;
    background: #eff6ff; color: #1a73e8;
    margin-bottom: 10px;
}
.listing-label--youtube { background: #fee2e2; color: #dc2626; }
.listing-label--abondance { background: #dbeafe; color: #2563eb; }
.listing-title { font-size: 2rem; font-weight: 800; color: #0f172a; margin: 0 0 6px; }
.listing-count { color: #64748b; font-size: .95rem; margin: 0; }
.listing-empty { color: #94a3b8; font-style: italic; padding: 40px; text-align: center; }

/* Bloc pedagogique (explications par format) */
.listing-intro {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 18px;
    padding: 24px 28px;
    margin: 0 0 32px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    border-left: 5px solid var(--intro-accent, #3b82f6);
}
.listing-intro--synthese { --intro-accent: #7c3aed; background: linear-gradient(135deg, #faf5ff 0%, #fff 50%); }
.listing-intro--youtube  { --intro-accent: #dc2626; background: linear-gradient(135deg, #fef2f2 0%, #fff 50%); }
.listing-intro--abondance{ --intro-accent: #2563eb; background: linear-gradient(135deg, #eff6ff 0%, #fff 50%); }
.listing-intro--labs     { --intro-accent: #ea580c; background: linear-gradient(135deg, #fff7ed 0%, #fff 50%); }

.listing-intro-icon {
    font-size: 2.2rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2px;
}
.listing-intro-body h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--intro-accent, #1f2937);
    margin: 0 0 10px;
}
.listing-intro-body p {
    color: #334155;
    font-size: .95rem;
    line-height: 1.55;
    margin: 0 0 10px;
}
.listing-intro-bullets {
    list-style: none;
    padding: 0;
    margin: 12px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 6px 22px;
}
.listing-intro-bullets li {
    position: relative;
    padding-left: 22px;
    font-size: .88rem;
    color: #334155;
    line-height: 1.5;
}
.listing-intro-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--intro-accent, #3b82f6);
    transform: rotate(45deg);
}
.listing-intro-tip {
    margin-top: 14px !important;
    padding: 10px 14px;
    background: rgba(0, 0, 0, .03);
    border-radius: 8px;
    font-size: .88rem !important;
    color: #1e293b !important;
    border-left: 3px solid var(--intro-accent, #3b82f6);
}
.listing-intro-tip em { font-style: italic; color: var(--intro-accent, #334155); }

@media (max-width: 640px) {
    .listing-intro { grid-template-columns: 1fr; padding: 18px 16px; gap: 4px; }
    .listing-intro-icon { font-size: 1.6rem; padding: 0; justify-content: flex-start; }
    .listing-intro-body h2 { font-size: 1.02rem; }
    .listing-intro-bullets { grid-template-columns: 1fr; }
}

.declarations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.decl-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e7eb;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.decl-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .1);
    text-decoration: none;
}
.decl-card-img {
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #f1f5f9;
}
.decl-card-img--fallback {
    background: linear-gradient(135deg, #1e293b, #4f46e5);
}
.decl-card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.decl-card-title {
    font-size: .95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.decl-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: .78rem;
    color: #64748b;
    margin-top: auto;
}

.listing-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
}
.listing-page {
    padding: 10px 20px;
    background: #fff;
    color: #1e293b;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: .88rem;
    border: 1px solid #e5e7eb;
    transition: background .15s;
}
.listing-page:hover { background: #f1f5f9; text-decoration: none; color: #1a73e8; }
.listing-page-info { font-size: .85rem; color: #64748b; font-weight: 600; }

@media (max-width: 640px) {
    .listing-container { padding: 80px 14px 32px; }
    .listing-title { font-size: 1.4rem; }
    .declarations-grid { grid-template-columns: 1fr; gap: 14px; }
    .syntheses-home-cta { padding: 7px 14px; font-size: .8rem; }
}

.syntheses-home-label {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: .1em;
    background: #f5f3ff;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 6px;
}

.syntheses-home-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0;
}

.syntheses-home-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.synth-home-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}

.synth-home-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(124,58,237,.12);
    border-color: #c4b5fd;
}

.synth-home-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.synth-home-img--placeholder {
    background: linear-gradient(135deg, #4c1d95, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.synth-home-icon {
    font-size: 2rem;
    opacity: .7;
}

.synth-home-body {
    padding: 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.synth-home-topic {
    font-size: .72rem;
    font-weight: 700;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.synth-home-heading {
    font-size: .88rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
}

.synth-home-meta {
    display: flex;
    gap: 10px;
    font-size: .72rem;
    color: #9ca3af;
    margin-top: auto;
    padding-top: 6px;
}

.syntheses-home-more {
    margin-top: 14px;
    font-size: 0.85rem;
    color: #6b7280;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.syntheses-more-link {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 500;
}
.syntheses-more-link:hover { text-decoration: underline; }

.syntheses-more-sep {
    color: #d1d5db;
    margin: 0 2px;
}

@media (max-width: 900px) {
    .syntheses-home-grid { grid-template-columns: repeat(2, 1fr); }
    .syntheses-home-grid .synth-home-card:nth-child(n+5) { display: none; }
}

@media (max-width: 500px) {
    .syntheses-home-grid { grid-template-columns: 1fr; }
}

/* ============================================
   LATEST BY TYPE (Homepage)
   ============================================ */

/* ============================================
   DERNIERES PUBLICATIONS (V2) : HERO + 4 COLS VEDETTE+COMPACTS
   ============================================ */
.latest-by-type {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.latest-by-type-header { margin-bottom: 14px; }
.latest-by-type-label {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    color: #1a73e8;
    text-transform: uppercase;
    letter-spacing: .12em;
    background: #eff6ff;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 8px;
}
.latest-by-type-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}
.latest-by-type-subtitle {
    font-size: 1rem;
    font-weight: 700;
    color: #475569;
    margin: 32px 0 14px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* --- HERO (plus recent tous types confondus) --- */
.lbt-hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(15, 23, 42, .08);
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #e5e7eb;
    transition: transform .25s, box-shadow .25s;
    margin-bottom: 8px;
}
.lbt-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
}
.lbt-hero-img {
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #1e293b;
    min-height: 280px;
}
.lbt-hero-img--fallback {
    background: linear-gradient(135deg, var(--hero-accent, #3b82f6), #0f172a);
}
.lbt-hero-body {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}
.lbt-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--hero-accent, #3b82f6);
    color: #fff;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    width: fit-content;
}
.lbt-hero-title {
    margin: 0;
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.22;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lbt-hero-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .88rem;
    color: #64748b;
    font-weight: 500;
}
.lbt-hero-time {
    color: var(--hero-accent, #3b82f6);
    font-weight: 700;
}
.lbt-hero-meta span::before {
    content: '';
}
.lbt-hero-meta span + span {
    padding-left: 10px;
    border-left: 2px solid #e5e7eb;
}

/* --- 4 colonnes --- */
.latest-by-type-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.latest-col {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.latest-col:hover {
    box-shadow: 0 4px 16px rgba(15, 23, 42, .08);
}

.latest-col-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 3px solid var(--col-accent, #e5e7eb);
    background: linear-gradient(180deg, #fafbfc, #fff);
}
.latest-col-header h3 {
    margin: 0;
    font-size: .9rem;
    font-weight: 800;
    color: var(--col-accent, #0f172a);
    flex: 1;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.latest-col-icon { font-size: 1.15rem; }
.latest-col-count {
    font-size: .72rem;
    color: #64748b;
    font-weight: 700;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 999px;
}

.latest-col-intro {
    font-size: .78rem;
    color: #64748b;
    line-height: 1.45;
    margin: 0;
    padding: 0 16px 12px;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.2rem;
}

/* Vedette (1er item, avec image) */
.lbt-vedette { padding: 12px; }
.lbt-vedette-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    overflow: hidden;
    transition: transform .2s;
}
.lbt-vedette-link:hover { transform: translateY(-2px); }
.lbt-vedette-img {
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #f1f5f9;
    border-radius: 8px;
}
.lbt-vedette-img--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: rgba(255, 255, 255, .9);
    background: linear-gradient(135deg, var(--col-accent, #64748b), #0f172a);
}
.lbt-vedette-body { padding: 10px 4px 4px; }
.lbt-vedette-title {
    font-size: .88rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}
.lbt-vedette-meta {
    display: flex;
    gap: 8px;
    font-size: .74rem;
    color: #94a3b8;
    align-items: center;
}
.lbt-vedette-meta span + span {
    padding-left: 8px;
    border-left: 1px solid #e5e7eb;
}
.lbt-time, .lbt-compact-time {
    color: var(--col-accent, #3b82f6);
    font-weight: 700;
    white-space: nowrap;
}

/* Items compacts (pas d'image) */
.lbt-compact-list {
    list-style: none;
    padding: 0 14px;
    margin: 0;
    flex: 1;
    border-top: 1px solid #f1f5f9;
}
.lbt-compact-list li + li { border-top: 1px solid #f8fafc; }
.lbt-compact {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 0;
    text-decoration: none;
    color: inherit;
    transition: color .15s;
}
.lbt-compact:hover .lbt-compact-title { color: var(--col-accent, #1a73e8); }
.lbt-compact-title {
    font-size: .82rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lbt-compact-time {
    font-size: .7rem;
    font-style: italic;
}

/* Pied de colonne : Voir tout */
.lbt-more {
    display: block;
    padding: 12px 16px;
    text-align: center;
    font-size: .78rem;
    font-weight: 700;
    color: var(--col-accent, #3b82f6);
    text-decoration: none;
    border-top: 1px solid #f1f5f9;
    transition: background .15s;
}
.lbt-more:hover { background: #f8fafc; }

/* Responsive */
@media (max-width: 1100px) {
    .latest-by-type-columns { grid-template-columns: repeat(2, 1fr); }
    .lbt-hero { grid-template-columns: 1fr; }
    .lbt-hero-img { min-height: 200px; }
    .lbt-hero-body { padding: 20px; }
}
@media (max-width: 600px) {
    .latest-by-type-columns { grid-template-columns: 1fr; gap: 14px; }
    .lbt-hero-title { font-size: 1.2rem; }
    .lbt-hero-body { padding: 16px; gap: 8px; }
    .latest-by-type-title { font-size: 1.15rem; }
    .latest-by-type-subtitle { font-size: .85rem; margin: 24px 0 10px; }
}

/* ============================================
   CATEGORIES GRID (Homepage)
   ============================================ */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.category-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: box-shadow .3s, transform .3s;
    border-left: 4px solid var(--primary);
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
    text-decoration: none;
}

.category-card .category-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-card .category-count {
    font-size: .85rem;
    color: var(--gray-500);
    margin-top: 6px;
}

/* ============================================
   PAGE HEADER (shared: declaration, category, speaker, list)
   ============================================ */

.page-header {
    background:
        radial-gradient(ellipse at 20% 80%, rgba(255,255,255,.06) 0%, transparent 50%),
        linear-gradient(
            135deg,
            var(--header-color, #0ea5e9),
            color-mix(in srgb, var(--header-color, #0ea5e9), #0c1222 40%)
        );
    color: #fff;
    padding: 52px 24px;
    position: relative;
}

.page-header .container {
    max-width: 840px;
    margin: 0 auto;
}

.page-header .breadcrumb {
    font-size: .85rem;
    margin-bottom: 16px;
    opacity: .75;
    font-family: var(--font-body);
}

.page-header .breadcrumb a {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    transition: color .15s;
}

.page-header .breadcrumb a:hover { color: #fff; }

.page-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2.5vw + 0.6rem, 2rem);
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -.03em;
    line-height: 1.2;
}

.page-header .subtitle {
    font-size: 1.05rem;
    opacity: .85;
}

.page-header .meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: .9rem;
    opacity: .9;
    align-items: center;
}

.page-header .meta a {
    color: rgba(255,255,255,.9);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255,255,255,.4);
}

.page-header .meta a:hover { text-decoration-color: #fff; }

.page-header .stats {
    display: flex;
    gap: 20px;
    font-size: .92rem;
    opacity: .85;
    margin-top: 12px;
}

.page-header .stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-header .count {
    font-size: 1.05rem;
    opacity: .9;
}

.page-header .role {
    font-size: 1.05rem;
    opacity: .9;
    margin-bottom: 8px;
}

/* Wider header variant */
.page-header--wide .container { max-width: 960px; }
.page-header--wide h1 { font-size: clamp(1.4rem, 2.8vw + 0.6rem, 2.2rem); }

/* Centered header variant */
.page-header--center { text-align: center; }
.page-header--center h1 { font-size: clamp(1.4rem, 2.8vw + 0.6rem, 2.2rem); margin-bottom: 8px; }

/* ============================================
   PAGE CONTENT & LAYOUT
   ============================================ */

.page-content {
    max-width: 840px;
    margin: 0 auto;
    padding: 36px 24px 64px;
}

.page-content--wide {
    max-width: 1000px;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 36px;
}

/* ============================================
   SECTION CARDS (declaration page)
   ============================================ */

.section-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 28px 32px;
    margin-bottom: 24px;
    animation: fadeInUp .4s ease both;
}

.section-card h2 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-200);
    letter-spacing: -.01em;
}

.section-card .quote {
    border-left: 4px solid var(--primary);
    padding: 18px 22px;
    background: var(--primary-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 1.05rem;
    line-height: 1.75;
}

.section-card .editorial {
    border-left: 4px solid var(--accent);
    padding: 18px 22px;
    background: var(--accent-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

/* --- Declaration date + newer suggestion block --- */
.declaration-date-block {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-left: 4px solid #0284c7;
    border-radius: 0 10px 10px 0;
    padding: 16px 20px;
    margin: 0 0 20px;
}
.declaration-date-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.declaration-date-icon {
    font-size: 1.4rem;
    line-height: 1;
}
.declaration-date-label {
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #0369a1;
    margin-right: 6px;
}
.declaration-date-value {
    font-size: 1rem;
    font-weight: 700;
    color: #0c4a6e;
}
.declaration-date-ago {
    font-size: .82rem;
    color: #64748b;
    margin-left: 4px;
}
.declaration-newer {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #93c5fd;
}
.declaration-newer-badge {
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    color: #b45309;
    background: #fef3c7;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}
.declaration-newer-link {
    display: block;
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 12px 16px;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s;
}
.declaration-newer-link:hover {
    border-color: #60a5fa;
    box-shadow: 0 2px 8px rgba(59,130,246,.15);
}
.declaration-newer-title {
    display: block;
    font-size: .92rem;
    font-weight: 600;
    color: #1e40af;
    line-height: 1.4;
    margin-bottom: 4px;
}
.declaration-newer-meta {
    display: block;
    font-size: .78rem;
    color: #64748b;
    margin-bottom: 6px;
}
.declaration-newer-cta {
    font-size: .82rem;
    font-weight: 600;
    color: #2563eb;
}

.tldr-block {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-left: 4px solid #7c3aed;
    border-radius: 0 10px 10px 0;
    padding: 16px 20px;
    margin: 0 0 20px;
}
.tldr-label {
    flex-shrink: 0;
    background: #7c3aed;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    padding: 3px 9px;
    border-radius: 4px;
    margin-top: 2px;
}
.tldr-block p {
    margin: 0;
    font-size: .95rem;
    line-height: 1.65;
    color: #3b0764;
    font-weight: 500;
}

.ai-section h2 { color: #7c3aed; border-bottom-color: #7c3aed; }
.ai-section .content { line-height: 1.9; color: var(--gray-700); font-size: .95rem; }
.ai-section .content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 28px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-100);
    font-family: var(--font-heading);
}
.ai-section .content h3:first-child { margin-top: 0; }
.ai-section .content p { margin-bottom: 16px; }
.ai-section .content p:last-child { margin-bottom: 0; }
.ai-section .content ul { margin: 16px 0; padding-left: 24px; }
.ai-section .content li { margin-bottom: 10px; line-height: 1.75; }
.ai-section .content strong { color: var(--gray-900); }
.ai-section .content .alert {
    background: var(--accent-light);
    border-left: 4px solid var(--accent);
    padding: 18px 22px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 20px 0;
    line-height: 1.75;
}
.ai-section .content .summary {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
    padding: 18px 22px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 20px 0;
    line-height: 1.75;
}
.ai-section .content .checklist { list-style: none; padding: 0; }
.ai-section .content .checklist li { padding: 8px 0; border-bottom: 1px solid var(--gray-100); }
.ai-section .content .checklist li:last-child { border-bottom: none; }
.ai-section .content .checklist li::before { content: "\2713"; color: #10b981; font-weight: bold; margin-right: 10px; }

.source-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    margin-top: 16px;
    font-size: .85rem;
    color: var(--gray-500);
}

.source-card a { font-weight: 500; }

.featured-image {
    margin-bottom: 24px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: zoom-in;
    position: relative;
}

/* Overlay V2 : titre + auteur + date + categorie sur image sans texte */
.featured-image--overlay .fi-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 22px;
    color: #fff;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.55) 0%,
        rgba(0,0,0,0) 30%,
        rgba(0,0,0,0) 55%,
        rgba(0,0,0,.75) 100%
    );
}
.featured-image--overlay .fi-overlay-top {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.featured-image--overlay .fi-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.featured-image--overlay .fi-chip-cat {
    background: rgba(59, 130, 246, .85);
    color: #fff;
}
.featured-image--overlay .fi-chip-src {
    background: rgba(255, 255, 255, .18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .28);
}
.featured-image--overlay .fi-overlay-bottom {
    max-width: 90%;
}
.featured-image--overlay .fi-title {
    margin: 0 0 8px;
    font-size: clamp(1.3rem, 3.2vw, 2.1rem);
    font-weight: 800;
    line-height: 1.22;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.featured-image--overlay .fi-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: .88rem;
    color: rgba(255, 255, 255, .92);
    font-weight: 600;
}
.featured-image--overlay .fi-sep {
    opacity: .5;
}
@media (max-width: 640px) {
    .featured-image--overlay .fi-overlay { padding: 12px 14px; }
    .featured-image--overlay .fi-title { font-size: 1.1rem; line-height: 1.25; }
    .featured-image--overlay .fi-meta { font-size: .78rem; gap: 6px; }
}

/* Embed YouTube source */
/* YouTube source card (compact, thumbnail + play-to-embed) */
.yt-source-card {
    display: flex;
    gap: 14px;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    margin-top: 18px;
    overflow: hidden;
    transition: border-color .2s;
}
.yt-source-card:hover { border-color: #cbd5e1; }
.yt-source-card.playing {
    display: block;
    padding: 0;
    background: #000;
    border-color: #000;
}
.yt-source-thumb {
    position: relative;
    flex-shrink: 0;
    width: 140px;
    border-radius: 6px;
    overflow: hidden;
    border: none;
    cursor: pointer;
    padding: 0;
    background: #000;
    display: block;
}
.yt-source-thumb img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}
.yt-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.35);
    color: #fff;
    font-size: 1.5rem;
    transition: background .2s;
    border-radius: 6px;
}
.yt-source-thumb:hover .yt-play-icon { background: rgba(220,38,38,.75); }
.yt-source-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}
.yt-source-badge {
    font-size: .72rem;
    font-weight: 700;
    color: #dc2626;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.yt-source-label {
    font-size: .82rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}
.yt-source-link {
    font-size: .8rem;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 600;
    align-self: flex-start;
}
.yt-source-link:hover { text-decoration: underline; }
.yt-source-card iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    border: 0;
    border-radius: 10px;
}
@media (max-width: 480px) {
    .yt-source-thumb { width: 110px; }
}

/* ===== Recherches recentes sur la home ===== */
.home-recent-searches {
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: center; align-items: center;
    margin-top: 14px; max-width: 700px; margin-left: auto; margin-right: auto;
}
.hrs-label {
    font-size: .72rem; font-weight: 600; color: rgba(255,255,255,.5);
    text-transform: uppercase; letter-spacing: .5px;
    margin-right: 4px;
}
.hrs-chip {
    display: inline-block; padding: 5px 14px;
    background: rgba(255,255,255,.12); color: #fff;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 18px; font-size: .82rem; font-weight: 500;
    text-decoration: none; transition: all .15s;
    max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hrs-chip:hover {
    background: rgba(255,255,255,.25); border-color: rgba(255,255,255,.35);
    transform: translateY(-1px);
}
/* Max 4 chips sur mobile (8 sur desktop) */
@media (max-width: 768px) {
    .home-recent-searches .hrs-chip:nth-of-type(n+5) { display: none; }
}

/* ===== Mini search bar entre hero et image (declaration) ===== */
.decl-mini-search {
    max-width: 900px; margin: 0 auto;
    padding: 14px 20px 6px;
    display: flex; justify-content: center;
}
.decl-mini-form {
    display: flex; align-items: stretch;
    width: 440px; max-width: 100%;
    background: #fff; border: 2px solid #7c3aed;
    border-radius: 24px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(124,58,237,.12);
    transition: box-shadow .2s;
}
.decl-mini-form:focus-within {
    box-shadow: 0 4px 20px rgba(124,58,237,.2);
}
.decl-mini-form input {
    flex: 1; border: none; background: transparent;
    padding: 10px 16px; font-size: .9rem; outline: none;
    font-family: inherit; color: #1e293b;
}
.decl-mini-form input::placeholder { color: #7c3aed; font-size: .85rem; opacity: .6; }
.decl-mini-form button {
    background: #7c3aed; border: none; padding: 0 16px;
    cursor: pointer; font-size: 1rem; color: #fff;
    transition: background .15s;
}
.decl-mini-form button:hover { background: #6d28d9; }

/* ===== Bande de recherche top (au-dessus du hero) ===== */
.gsearch-topbar {
    background: #fff; border-bottom: 1px solid #e2e8f0;
    display: flex; align-items: center; justify-content: flex-end;
    padding: 8px 24px; position: relative; z-index: 90;
}

/* ===== Bouton loupe dans la topbar ===== */
.gsearch-trigger {
    width: 40px; height: 40px; border-radius: 50%;
    background: #f5f3ff; border: 1px solid #e2e8f0;
    cursor: pointer; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s; color: #7c3aed;
}
.gsearch-trigger:hover {
    background: #7c3aed; color: #fff;
    border-color: #7c3aed; box-shadow: 0 4px 16px rgba(124,58,237,.3);
    transform: scale(1.08);
}

/* ===== Modal overlay recherche ===== */
.gsearch-overlay {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 12vh;
}
.gsearch-overlay[hidden] { display: none; }
.gsearch-overlay .gsearch-backdrop {
    position: absolute; inset: 0;
    background: rgba(15,23,42,.6); backdrop-filter: blur(4px);
}
.gsearch-modal {
    position: relative; z-index: 1;
    width: 580px; max-width: 92vw;
    background: #fff; border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    overflow: hidden;
    animation: gsearchModalIn .2s ease;
}
@keyframes gsearchModalIn {
    from { opacity: 0; transform: translateY(-20px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.gsearch-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px 0;
}
.gsearch-modal-title {
    font-size: .78rem; font-weight: 700; color: #94a3b8;
    text-transform: uppercase; letter-spacing: .5px;
}
.gsearch-modal-close {
    background: none; border: none; cursor: pointer;
    font-size: 1.4rem; color: #94a3b8; padding: 0 4px;
    transition: color .15s;
}
.gsearch-modal-close:hover { color: #1e293b; }
.gsearch-modal-form {
    display: flex; align-items: stretch;
    margin: 12px 20px; border: 2px solid #e2e8f0;
    border-radius: 12px; overflow: hidden;
    transition: border-color .2s;
}
.gsearch-modal-form:focus-within { border-color: #7c3aed; }
.gsearch-modal-form input {
    flex: 1; border: none; padding: 14px 16px;
    font-size: 1.1rem; outline: none; font-family: inherit;
    color: #1e293b; background: #fff;
}
.gsearch-modal-form input::placeholder { color: #cbd5e1; }
.gsearch-modal-submit {
    background: #7c3aed; border: none; color: #fff;
    padding: 0 18px; cursor: pointer; font-size: 1.1rem;
    transition: background .15s;
}
.gsearch-modal-submit:hover { background: #6d28d9; }
.gsearch-recent {
    padding: 12px 20px 16px; border-top: 1px solid #f1f5f9;
}
.gsearch-recent-label {
    font-size: .7rem; font-weight: 700; color: #94a3b8;
    text-transform: uppercase; letter-spacing: .5px;
    margin-bottom: 8px; display: block;
}
.gsearch-recent-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gsearch-chip {
    display: inline-block; padding: 6px 14px;
    background: #f5f3ff; color: #6d28d9; border-radius: 20px;
    font-size: .85rem; text-decoration: none; font-weight: 500;
    transition: all .15s; max-width: 200px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gsearch-chip:hover { background: #ede9fe; transform: translateY(-1px); }

.gsearch-hint {
    font-size: .82rem; color: #94a3b8; margin-right: 12px;
}
.gsearch-hint kbd {
    display: inline-block; padding: 1px 6px; border: 1px solid #d1d5db;
    border-radius: 4px; font-size: .72rem; font-family: monospace;
    background: #f9fafb; color: #6b7280; margin-left: 6px;
}

@media (max-width: 768px) {
    .gsearch-topbar { padding: 6px 12px; }
    .gsearch-hint { display: none; }
    .gsearch-trigger { width: 36px; height: 36px; font-size: 1rem; }
    .gsearch-overlay { padding-top: 5vh; }
    .gsearch-modal-form input { font-size: 1rem; padding: 12px 14px; }
}

/* ===== Metadonnees video (duree / langues / date) ===== */
.yt-meta-pills {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin: 8px 0 10px;
}
.yt-meta-pill {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .78rem; font-weight: 600;
    padding: 3px 10px; border-radius: 12px;
    background: #f1f5f9; color: #475569;
    border: 1px solid #e2e8f0;
}
.yt-meta-pill.yt-meta-langs { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.yt-lang {
    font-size: .7rem; font-weight: 700;
    padding: 1px 6px; border-radius: 4px;
    background: #1e40af; color: #fff;
}
.yt-lang-on { background: #1e40af; }

/* ===== Menu : autres declarations de la video ===== */
.yt-siblings {
    margin-top: 14px;
    border: 1px solid #e2e8f0; border-radius: 10px;
    background: #fafafa;
    overflow: hidden;
}
.yt-siblings > summary {
    list-style: none; cursor: pointer;
    padding: 12px 16px;
    display: flex; align-items: center; gap: 10px;
    font-size: .88rem; font-weight: 600; color: #334155;
    user-select: none;
    transition: background .15s;
}
.yt-siblings > summary::-webkit-details-marker { display: none; }
.yt-siblings > summary:hover { background: #f1f5f9; }
.yt-siblings[open] > summary { border-bottom: 1px solid #e2e8f0; background: #fff; }
.yt-siblings-icon { font-size: 1rem; }
.yt-siblings-label { flex: 1; }
.yt-siblings-count {
    background: #7c3aed; color: #fff;
    font-size: .72rem; font-weight: 700;
    padding: 2px 9px; border-radius: 10px;
}
.yt-siblings-chevron { font-size: .7rem; color: #94a3b8; transition: transform .2s; }
.yt-siblings[open] > summary .yt-siblings-chevron { transform: rotate(180deg); }
.yt-siblings-list {
    list-style: none; margin: 0; padding: 8px;
    max-height: 400px; overflow-y: auto;
}
.yt-siblings-list li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px; align-items: center;
    padding: 8px 12px; border-radius: 6px;
    transition: background .12s;
}
.yt-siblings-list li + li { margin-top: 2px; }
.yt-siblings-list li:hover { background: #f1f5f9; }
.yt-sib-ts {
    font-family: ui-monospace, monospace; font-size: .78rem; font-weight: 700;
    color: #0d9488; background: #ccfbf1;
    padding: 2px 8px; border-radius: 5px;
    min-width: 48px; text-align: center;
}
.yt-sib-ts-none { background: #f1f5f9; color: #94a3b8; }
.yt-sib-link {
    color: #1e293b; text-decoration: none;
    font-size: .88rem; line-height: 1.4;
}
.yt-sib-link:hover { color: #7c3aed; text-decoration: underline; }
.yt-sib-flag {
    font-size: .8rem; color: #f59e0b;
    padding: 2px 6px; background: #fef3c7; border-radius: 4px;
}
@media (max-width: 600px) {
    .yt-siblings-list li { grid-template-columns: auto 1fr; }
    .yt-sib-flag { grid-column: 2; }
}

/* ===== Bloc "De la même vidéo" en bas de page ===== */
.yt-same-video {
    background: linear-gradient(135deg, #fff 0%, #fef2f2 100%);
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
}
.yt-same-video h2 {
    display: flex; align-items: center; gap: 10px;
    color: #991b1b;
}
.yt-same-count {
    background: #dc2626; color: #fff;
    font-size: .78rem; font-weight: 700;
    padding: 3px 10px; border-radius: 12px;
}
.yt-same-intro {
    font-size: .88rem; color: #64748b;
    margin: 0 0 16px; line-height: 1.5;
}
.yt-same-grid .yt-same-item {
    border-left: 3px solid #e2e8f0;
    transition: all .15s;
}
.yt-same-grid .yt-same-item:hover {
    border-left-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220,38,38,.1);
}
.yt-same-ts {
    font-family: ui-monospace, monospace; font-size: .78rem; font-weight: 700;
    color: #0d9488; background: #ccfbf1;
    padding: 2px 8px; border-radius: 5px;
}
.yt-same-pending {
    font-size: .75rem; font-weight: 600;
    color: #92400e; background: #fef3c7;
    padding: 2px 7px; border-radius: 5px;
}
.yt-same-source-link {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 14px; padding: 8px 14px;
    background: #991b1b; color: #fff;
    text-decoration: none; border-radius: 8px;
    font-size: .85rem; font-weight: 600;
    transition: background .15s;
}
.yt-same-source-link:hover { background: #dc2626; }

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9; /* Réserve l'espace avant chargement (évite CLS) */
}

/* Image Lightbox */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
    cursor: zoom-out;
}
.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}
.lightbox-overlay img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: 0 8px 40px rgba(0,0,0,.4);
    transform: scale(.92);
    transition: transform .3s ease;
}
.lightbox-overlay.active img {
    transform: scale(1);
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 1.4rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }

.declaration-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.declaration-tags .tag {
    font-size: .85rem;
    padding: 6px 16px;
}

/* ============================================
   DECLARATION LIST (category / speaker pages)
   ============================================ */

.decl-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.decl-card {
    display: block;
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px 26px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--header-color, var(--primary));
    transition: box-shadow .25s, transform .25s;
    text-decoration: none;
    color: inherit;
}

.decl-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    text-decoration: none;
}

.decl-card .title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--gray-900);
    margin-bottom: 6px;
    line-height: 1.4;
    letter-spacing: -.01em;
}

.decl-card .excerpt {
    font-size: .88rem;
    color: var(--gray-600);
    line-height: 1.65;
    margin-bottom: 8px;
}

.decl-card .meta {
    font-size: .82rem;
    color: var(--gray-500);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============================================
   SYNTHESIS LINK BLOCK (declaration -> synthese)
   ============================================ */

.synthesis-link-block { border-left: 4px solid #7c3aed; background: linear-gradient(135deg, #faf5ff 0%, #fff 100%); }
.synthesis-link-block h2 { color: #6d28d9; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin: 0 0 16px; }

.synthesis-link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

.synthesis-link-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    text-decoration: none;
    background: #fff;
    border: 1px solid #ddd6fe;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.synthesis-link-card:hover { box-shadow: 0 4px 16px rgba(124,58,237,0.15); transform: translateY(-2px); }

.synthesis-link-img {
    width: 90px;
    min-height: 90px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}
.synthesis-link-img--placeholder {
    background: linear-gradient(135deg, #4c1d95, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.synthesis-link-body { padding: 12px 14px 12px 0; flex: 1; min-width: 0; }
.synthesis-link-topic { font-size: 0.68rem; font-weight: 700; color: #7c3aed; text-transform: uppercase; letter-spacing: 0.06em; }
.synthesis-link-title { font-size: 0.88rem; font-weight: 600; color: #1f2937; line-height: 1.4; margin: 4px 0 6px; }
.synthesis-link-meta { font-size: 0.75rem; color: #9ca3af; margin-bottom: 8px; }
.synthesis-link-cta { font-size: 0.78rem; font-weight: 600; color: #7c3aed; }
.synthesis-link-card:hover .synthesis-link-cta { text-decoration: underline; }

/* ============================================
   RELATED DECLARATIONS GRID
   ============================================ */

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.related-item {
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    border-left: 3px solid var(--primary);
    transition: box-shadow .25s, transform .25s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
}

.related-item .title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: 6px;
    line-height: 1.4;
    color: var(--gray-800);
}

.related-item .meta {
    font-size: .8rem;
    color: var(--gray-400);
}

/* ============================================
   PREV / NEXT
   ============================================ */

.prev-next {
    display: flex;
    justify-content: space-between;
    margin-top: 36px;
    gap: 16px;
}

.prev-next a {
    flex: 1;
    padding: 18px 20px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: .9rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .25s, transform .2s;
}

.prev-next a:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
}

.prev-next .nav-label {
    font-size: .8rem;
    color: var(--gray-400);
}

.prev-next .nav-title {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--gray-900);
    margin-top: 4px;
}

/* ============================================
   SIDEBAR PANEL (categories / speakers)
   ============================================ */

.sidebar-panel {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 20px;
}

.sidebar-panel h3 {
    font-family: var(--font-heading);
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--gray-800);
}

.sidebar-panel a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: .88rem;
    color: var(--gray-600);
    text-decoration: none;
    border-bottom: 1px solid var(--gray-100);
    transition: color .15s;
}

.sidebar-panel a:last-child { border-bottom: none; }
.sidebar-panel a:hover { color: var(--gray-900); text-decoration: none; }
.sidebar-panel a.active { font-weight: 700; color: var(--gray-900); }
.sidebar-panel .count { margin-left: auto; font-size: .78rem; color: var(--gray-400); }

/* ============================================
   BIO CARD
   ============================================ */

.bio-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--header-color, var(--primary));
    font-size: .92rem;
    line-height: 1.8;
    color: var(--gray-600);
}

.description-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--header-color, var(--primary));
    font-size: .92rem;
    line-height: 1.75;
    color: var(--gray-600);
}

/* ============================================
   CAT CARDS (declarations-liste page)
   ============================================ */

.cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.cat-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow .3s, transform .3s;
}

.cat-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.cat-card-header {
    padding: 22px 26px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cat-card-header .dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cat-card-header .name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -.01em;
}

.cat-card-header .count {
    margin-left: auto;
    font-size: .85rem;
    font-family: var(--font-heading);
    color: var(--gray-400);
    white-space: nowrap;
}

.cat-card-preview { padding: 0 26px 8px; }

.cat-card-preview .preview-item {
    padding: 8px 0;
    border-top: 1px solid var(--gray-100);
}

.cat-card-preview .preview-item a {
    font-size: .88rem;
    color: var(--gray-600);
    text-decoration: none;
    line-height: 1.4;
    transition: color .15s;
}
.cat-card-preview .preview-item a:hover { color: var(--gray-900); }

.cat-card-preview .preview-meta {
    font-size: .75rem;
    color: var(--gray-400);
    margin-top: 2px;
}

.cat-card-footer { padding: 14px 26px 18px; }

.cat-card-footer a {
    display: inline-block;
    font-size: .88rem;
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: var(--radius);
    transition: all .2s;
}

.cat-card-footer a:hover { text-decoration: none; transform: translateY(-1px); }

/* ============================================
   ERROR PAGE (404)
   ============================================ */

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
    padding: 40px 24px;
}

.error-code {
    font-family: var(--font-heading);
    font-size: 10rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.05em;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 16px 0 8px;
}

.error-message {
    color: var(--gray-500);
    margin-bottom: 36px;
    font-size: 1rem;
}

.error-suggestions {
    text-align: left;
    max-width: 600px;
    margin: 0 auto 32px;
    padding: 24px;
    background: var(--gray-50);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

.error-suggestions h2 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 16px;
}

.error-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.error-suggestions li {
    padding: 8px 12px;
    border-radius: 8px;
    transition: background .15s;
}

.error-suggestions li:hover {
    background: var(--gray-100);
}

.error-suggestions a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

.error-suggestions a:hover {
    text-decoration: underline;
}

.error-suggestions .suggestion-meta {
    color: var(--gray-500);
    font-size: .85rem;
}

.error-actions {
    display: flex;
    gap: 12px;
}

/* ============================================
   BACK BUTTON
   ============================================ */

.back-link {
    text-align: center;
    margin-top: 32px;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 52px 24px 28px;
    margin-top: 0;
    font-size: .88rem;
    line-height: 1.7;
}

.site-footer .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

/* Row 1: About + Nav + Resources */
.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}

.footer-brand {
    margin-bottom: 16px;
}
.footer-logo {
    height: 32px;
    width: auto;
    border-radius: var(--radius);
    mix-blend-mode: screen;
    transition: opacity .3s ease;
}
.footer-brand:hover .footer-logo {
    opacity: .85;
}

.footer-heading {
    font-family: var(--font-heading);
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 12px;
    font-size: .9rem;
    letter-spacing: -.01em;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.footer-link {
    color: #94a3b8;
    text-decoration: none;
    transition: color .2s;
    font-size: .88rem;
}

.footer-link:hover { color: #e2e8f0; text-decoration: none; }

/* Row 2: Pillars */
.footer-pillars {
    border-top: 1px solid #1e293b;
    padding-top: 32px;
    margin-bottom: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 36px;
}

.footer-pillar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.footer-pillar-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.footer-pillar-label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.footer-pillar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-pillar-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color .2s;
}

.footer-pillar-link:hover { color: #e2e8f0; text-decoration: none; }

.footer-pillar-count {
    font-size: .75rem;
    color: #475569;
}

.footer-pillar-empty {
    color: #475569;
    font-size: .82rem;
}

/* Row 3: Popular declarations */
.footer-popular {
    border-top: 1px solid #1e293b;
    padding-top: 28px;
    margin-bottom: 28px;
}

.footer-popular-title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #cbd5e1;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 14px;
}

.footer-popular-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0 32px;
}

.footer-popular-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: .84rem;
    line-height: 1.45;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-bottom: 1px solid #1e293b;
    transition: color .2s;
}

.footer-popular-link:hover { color: #e2e8f0; text-decoration: none; }
.footer-popular-link:hover .footer-popular-text { color: #e2e8f0; }

.footer-popular-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-popular-date {
    color: #7c3aed;
    font-size: .72rem;
    font-weight: 600;
    font-family: var(--font-heading);
    letter-spacing: .3px;
}

.footer-popular-speaker {
    color: #475569;
    font-size: .72rem;
}

.footer-popular-text {
    color: #94a3b8;
    font-size: .83rem;
    line-height: 1.4;
    transition: color .2s;
}

/* Row 4: Copyright */
.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: .82rem;
    color: #64748b;
}

/* ============================================
   ADMIN LAYOUT
   ============================================ */

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--gray-900);
    color: #fff;
    padding: 0;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
}

.admin-sidebar .sidebar-brand {
    padding: 20px;
    border-bottom: 1px solid var(--gray-700);
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #fff;
    transition: background .15s;
}
.admin-sidebar .sidebar-brand:hover {
    background: rgba(255,255,255,.04);
    text-decoration: none;
    color: #fff;
}
.admin-sidebar .sidebar-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 10px;
    flex-shrink: 0;
}
.admin-sidebar .sidebar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.admin-sidebar .sidebar-brand-text strong {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.02em;
}
.admin-sidebar .sidebar-brand-text span {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gray-400);
    font-weight: 500;
}

.admin-sidebar nav { padding: 16px 0; }

.admin-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--gray-400);
    font-size: .9rem;
    transition: all .15s;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.admin-sidebar nav a:hover {
    color: #fff;
    background: rgba(255,255,255,.05);
    text-decoration: none;
}

.admin-sidebar nav a.active {
    color: #fff;
    background: rgba(255,255,255,.08);
    border-left-color: var(--primary);
}

.admin-sidebar nav .nav-section {
    padding: 20px 20px 8px;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gray-500);
    font-family: var(--font-heading);
}

/* Collapsible submenu */
.admin-sidebar .nav-submenu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: none;
    color: var(--gray-400);
    font-size: .9rem;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s;
    border-left: 3px solid transparent;
    text-align: left;
}

.admin-sidebar .nav-submenu-toggle:hover {
    color: #fff;
    background: rgba(255,255,255,.05);
}

.admin-sidebar .nav-submenu.open > .nav-submenu-toggle {
    color: #fff;
}

.admin-sidebar .nav-submenu-arrow {
    margin-left: auto;
    font-size: .7rem;
    transition: transform .2s;
}

.admin-sidebar .nav-submenu.open > .nav-submenu-toggle .nav-submenu-arrow {
    transform: rotate(90deg);
}

.admin-sidebar .nav-submenu-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
}

.admin-sidebar .nav-submenu.open > .nav-submenu-items {
    max-height: 500px;
}

.admin-sidebar .nav-submenu-items a {
    padding-left: 36px;
    font-size: .85rem;
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 0;
}

.admin-topbar {
    background: var(--card);
    padding: 16px 32px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-topbar h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
}

.admin-content {
    padding: 32px;
}

/* Stats cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
}

.stat-card .stat-label {
    font-size: .82rem;
    font-family: var(--font-heading);
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
}

.stat-card .stat-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-card .stat-sub {
    font-size: .8rem;
    color: var(--gray-400);
    margin-top: 2px;
}

.stat-card.stat-primary .stat-value { color: var(--primary); }
.stat-card.stat-success .stat-value { color: var(--success); }
.stat-card.stat-warning .stat-value { color: var(--warning); }

/* Cards & Panels */
.panel {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.panel-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
}

.panel-body { padding: 24px; }
.panel-body.no-pad { padding: 0; }

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: .78rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--gray-500);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: .9rem;
    vertical-align: middle;
}

.data-table tr:hover td { background: var(--gray-50); }

.data-table .cell-title {
    font-weight: 600;
    color: var(--gray-900);
}

.data-table .cell-url {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .82rem;
    color: var(--gray-500);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: .88rem;
    font-family: var(--font-heading);
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid var(--gray-300);
    background: var(--card);
    color: var(--gray-700);
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}

.btn:hover { background: var(--gray-50); border-color: var(--gray-400); text-decoration: none; transform: translateY(-1px); }

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

.btn-success {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

.btn-danger {
    background: var(--card);
    color: var(--danger);
    border-color: var(--danger);
}
.btn-danger:hover { background: var(--danger-light); }

.btn-sm { padding: 6px 12px; font-size: .8rem; }

.btn-group { display: flex; gap: 8px; }

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: .9rem;
    font-family: var(--font-body);
    transition: border-color .2s, box-shadow .2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14,165,233,.1);
}

.form-group textarea { min-height: 100px; resize: vertical; }
.form-group .form-help { font-size: .8rem; color: var(--gray-400); margin-top: 4px; }

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: .75rem;
    font-family: var(--font-heading);
    font-weight: 600;
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--primary-light); color: var(--primary); }

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-bar .progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-pill);
    transition: width .3s;
}

/* Log/Console */
.log-console {
    background: var(--gray-900);
    color: #a3e635;
    font-family: 'Courier New', monospace;
    font-size: .82rem;
    padding: 16px;
    border-radius: var(--radius);
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.8;
}

.log-console .log-info { color: #60a5fa; }
.log-console .log-success { color: #a3e635; }
.log-console .log-warning { color: #fbbf24; }
.log-console .log-error { color: #f87171; }

/* Keywords pills (for categories) */
.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.keyword-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: var(--gray-100);
    border-radius: var(--radius-pill);
    font-size: .8rem;
    color: var(--gray-600);
}

.keyword-pill .remove {
    cursor: pointer;
    color: var(--gray-400);
    font-weight: 700;
    margin-left: 2px;
}

.keyword-pill .remove:hover { color: var(--danger); }

/* Category color dots */
.cat-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}

.modal {
    background: var(--card);
    border-radius: var(--radius-lg);
    width: 560px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.modal-header .close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--gray-400);
    cursor: pointer;
    transition: color .15s;
}

.modal-header .close:hover { color: var(--gray-700); }

.modal-body { padding: 24px; }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 56px 24px;
    color: var(--gray-400);
}

.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 16px; }
.empty-state p { font-size: .95rem; }

/* No-results suggestions */
.suggest-section {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--gray-200);
}
.suggest-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-700);
    margin: 0 0 16px 0;
}
.suggest-cats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.suggest-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--white);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--gray-700);
    transition: box-shadow .2s, transform .15s;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.suggest-cat:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    transform: translateY(-1px);
}
.suggest-cat-name { font-weight: 600; font-size: .88rem; }
.suggest-cat-count {
    font-size: .78rem;
    color: var(--gray-400);
    font-weight: 600;
    background: var(--gray-50);
    padding: 2px 8px;
    border-radius: 10px;
}
.suggest-decls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.suggest-decls .result-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
    .footer-top > div:first-child { grid-column: 1 / -1; }
    .footer-pillars { gap: 24px; }
}

@media (max-width: 768px) {
    /* --- Site logo (inner pages) --- */
    .site-logo { top: 10px; left: 12px; }
    .site-logo img { height: 44px; }

    /* --- Hero: default (homepage, no results) --- */
    .search-hero {
        padding: 28px 16px 40px;
    }
    .hero-logo { margin-bottom: 12px; }
    .hero-logo-img { height: 52px; }
    .search-hero h1 { padding: 0 4px; }
    .search-hero .subtitle { margin-bottom: 24px; opacity: .75; }
    .search-box input[type="text"] {
        font-size: 1rem;
        padding: 14px 50px 14px 16px;
        border-radius: var(--radius-pill);
    }
    .search-box button {
        width: 42px;
        right: 6px;
        top: 6px;
        bottom: 6px;
        font-size: 1.1rem;
    }

    /* --- Hero: with results (compact bar) --- */
    .search-hero.has-results {
        padding: 16px 16px 16px;
    }
    .search-hero.has-results .hero-logo {
        margin-bottom: 10px;
    }
    .search-hero.has-results .hero-logo-img { height: 32px; }
    .search-hero.has-results h1 {
        margin-bottom: 0;
    }

    /* --- Language flag (hero, absolute) --- */
    .hero-lang {
        padding: 6px;
        top: 10px;
        right: 10px;
        border-radius: 8px;
        background: rgba(255,255,255,.18);
        border-color: rgba(255,255,255,.15);
    }
    .hero-lang span { display: none; }
    .hero-lang svg { width: 24px; height: 16px; }

    /* --- Language flag (fixed, inner pages) --- */
    .lang-flag {
        padding: 6px;
        top: 10px;
        right: 10px;
        border-radius: 8px;
    }
    .lang-flag span { display: none; }
    .lang-flag svg { width: 24px; height: 16px; }

    /* --- Search filters (horizontal scroll) --- */
    .search-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding: 12px 16px 0;
        scrollbar-width: none;
    }
    .search-filters::-webkit-scrollbar { display: none; }
    .search-filters select,
    .search-filters input[type="number"] {
        flex: 0 0 auto;
        min-width: 0;
        font-size: .8rem;
        padding: 8px 10px;
        white-space: nowrap;
    }

    /* --- Result cards --- */
    .results-container { padding: 20px 16px 48px; }
    .results-meta { font-size: .82rem; margin-bottom: 16px; padding-bottom: 10px; }
    .result-card {
        padding: 16px;
        margin-bottom: 12px;
        border-radius: var(--radius);
    }
    .result-card .result-meta { gap: 10px; font-size: .78rem; margin-bottom: 8px; }
    .result-card .result-content { font-size: .88rem; }
    .suggest-cats { grid-template-columns: repeat(2, 1fr); }
    .suggest-decls { grid-template-columns: 1fr; }

    /* --- Page headers (inner pages) --- */
    .page-header { padding: 32px 12px; }
    /* font-size handled by clamp() in base styles */

    /* --- Declaration page content --- */
    .page-content { padding: 24px 10px 48px; }
    .section-card { padding: 20px 14px; margin-bottom: 16px; border-radius: var(--radius); }
    .section-card h2 { font-size: 1.1rem; margin-bottom: 12px; padding-bottom: 10px; }
    .section-card .quote { padding: 14px 14px; font-size: .97rem; }
    .section-card .editorial { padding: 14px 14px; }
    .featured-image { margin-bottom: 16px; border-radius: var(--radius); }

    /* --- Layouts --- */
    .content-layout { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; }
    .footer-pillars { grid-template-columns: 1fr; gap: 28px; }
    .footer-popular-grid { grid-template-columns: 1fr 1fr; }
    .prev-next { flex-direction: column; }
    .categories-grid { grid-template-columns: 1fr 1fr; }
    .cats-grid {
        grid-template-columns: 1fr;
        gap: 0;
        background: var(--card);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow);
        overflow: hidden;
    }
    .cat-card {
        border-radius: 0;
        box-shadow: none;
        border-bottom: 1px solid var(--gray-100);
    }
    .cat-card:last-child { border-bottom: none; }
    .cat-card:hover { box-shadow: none; transform: none; }
    .cat-card-header {
        padding: 14px 16px;
        gap: 10px;
    }
    .cat-card-header .dot { width: 10px; height: 10px; }
    .cat-card-header .name { font-size: .95rem; }
    .cat-card-header .count {
        font-size: .78rem;
        background: var(--gray-100);
        padding: 2px 8px;
        border-radius: var(--radius-pill);
    }
    .cat-card-preview { display: none; }
    .cat-card-footer { display: none; }
    .cat-card-link {
        display: block;
        -webkit-tap-highlight-color: transparent;
    }
    .cat-card-link:hover { text-decoration: none !important; }
    .cat-card:active { background: var(--gray-50); }
    .cat-card-header::after {
        content: '\203A';
        font-size: 1.3rem;
        color: var(--gray-300);
        margin-left: 4px;
        flex-shrink: 0;
    }

    /* --- Admin --- */
    .admin-main { margin-left: 0; }
    .stats-row { grid-template-columns: 1fr 1fr; }

    .error-code { font-size: 6rem; }
}

@media (max-width: 480px) {
    /* --- Extra-small: tighter hero --- */
    .search-hero { padding: 24px 12px 32px; }
    .search-hero .subtitle { margin-bottom: 20px; }
    .hero-logo-img { height: 44px; }

    .search-hero.has-results { padding: 14px 12px 14px; }
    .search-hero.has-results .hero-logo-img { height: 28px; }
    /* has-results h1 font-size handled by clamp() */

    .search-box input[type="text"] {
        font-size: .95rem;
        padding: 12px 46px 12px 14px;
    }
    .search-box button { width: 38px; font-size: 1rem; }

    /* --- Filters: full-width stack --- */
    .search-filters {
        flex-direction: column;
        align-items: stretch;
        overflow-x: visible;
    }
    .search-filters select { width: 100%; font-size: .82rem; }

    /* --- Cards even tighter --- */
    .results-container { padding: 16px 12px 40px; }
    .result-card { padding: 14px; margin-bottom: 10px; }
    /* result-title font-size handled by clamp() */

    /* --- Declaration page even tighter --- */
    .page-content { padding: 20px 8px 40px; }
    .section-card { padding: 16px 12px; }
    .section-card .quote { padding: 12px; font-size: .93rem; }
    .section-card .editorial { padding: 12px; }

    .categories-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    .error-code { font-size: 4rem; }
    .footer-bottom { flex-direction: column; text-align: center; }

    /* --- Filtres pliables (480px) --- */
    .filter-toggle {
        display: flex;
        align-items: center;
        gap: 6px;
        background: rgba(255,255,255,.12);
        border: 1px solid rgba(255,255,255,.2);
        color: rgba(255,255,255,.9);
        font-size: .82rem;
        font-weight: 500;
        padding: 8px 14px;
        border-radius: var(--radius-pill);
        cursor: pointer;
        margin: 10px auto 0;
        font-family: var(--font-body);
    }
    .filter-toggle svg { transition: transform .3s ease; }
    .filter-toggle.open svg { transform: rotate(180deg); }
    .search-filters.collapsed select:not(:first-of-type) { display: none; }
}

/* ============================================
   WORD-BREAK (long URLs)
   ============================================ */

.quote, .ai-section .content, .result-card .result-content {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ============================================
   MOBILE BOTTOM NAVIGATION
   ============================================ */

.mobile-nav {
    display: none;
}

body.is-home .mobile-nav {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 90;
        background: rgba(15, 23, 42, .92);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid rgba(255,255,255,.08);
        padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
        justify-content: space-around;
        align-items: center;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 6px 12px;
        color: var(--gray-400);
        text-decoration: none;
        font-size: .65rem;
        font-weight: 500;
        letter-spacing: .02em;
        transition: color .2s ease;
        min-width: 56px;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-nav-item:hover,
    .mobile-nav-item:active {
        color: #fff;
        text-decoration: none;
    }

    .mobile-nav-item.active {
        color: var(--primary);
    }

    .mobile-nav-item.active svg {
        filter: drop-shadow(0 0 6px rgba(14,165,233,.4));
    }

    .mobile-nav-item svg {
        transition: transform .2s ease;
    }

    .mobile-nav-item:active svg {
        transform: scale(.9);
    }

    .mobile-nav-lang svg {
        border-radius: 2px;
        box-shadow: 0 0 0 1px rgba(255,255,255,.15);
    }

    /* Body padding to prevent content behind nav */
    body:not(.is-home) {
        padding-bottom: 64px;
    }

    /* Adjust footer bottom margin for mobile nav */
    footer {
        margin-bottom: 0;
    }

    /* Hide fixed lang flag on inner pages when mobile nav is visible */
    .lang-flag {
        display: none;
    }

    /* --- Result cards: always show accent border --- */
    .result-card {
        border-left-color: var(--primary);
    }
    .result-card:hover {
        transform: none;
    }

    /* --- Result content: 3-line clamp for scannability --- */
    .result-card .result-content {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* --- Search filters scroll indicator --- */
    .search-filters {
        position: relative;
    }
    .search-filters::after {
        content: '';
        position: sticky;
        right: 0;
        flex-shrink: 0;
        width: 28px;
        min-height: 1px;
        background: linear-gradient(to right, transparent, var(--header-color, #0c4a6e));
        pointer-events: none;
        border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
    }

    /* --- Declaration page: better reading experience --- */
    .section-card {
        padding: 20px clamp(14px, 3vw, 32px);
    }
    .section-card .quote {
        padding: 16px 18px;
        line-height: 1.8;
    }
    .ai-section .content h3 {
        margin: 20px 0 10px;
        font-size: 1rem;
    }

    /* --- Footer collapsible pillars --- */
    .footer-pillar-details {
        border-bottom: 1px solid rgba(255,255,255,.08);
    }
    .footer-pillar-details summary {
        list-style: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 0;
    }
    .footer-pillar-details summary::-webkit-details-marker { display: none; }
    .footer-pillar-details summary::after {
        content: '+';
        font-size: 1.2rem;
        color: var(--gray-400);
        font-weight: 300;
        transition: transform .2s ease;
    }
    .footer-pillar-details[open] summary::after {
        content: '\2212';
    }
    .footer-pillar-details .footer-pillar-nav {
        padding-bottom: 8px;
    }
    .footer-popular-link:nth-child(n+5) {
        display: none;
    }

    /* --- Admin sidebar: slide-over --- */
    .admin-sidebar {
        display: block !important;
        transform: translateX(-100%);
        transition: transform .3s cubic-bezier(.4,0,.2,1);
        z-index: 100;
    }
    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,.3);
    }
    .admin-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 60;
        width: 40px;
        height: 40px;
        background: var(--gray-800);
        border: 1px solid var(--gray-700);
        border-radius: var(--radius);
        color: #fff;
        cursor: pointer;
        font-size: 1.2rem;
    }
    .admin-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.4);
        z-index: 99;
    }
    .admin-sidebar-overlay.visible {
        display: block;
    }
}

/* Desktop: force footer pillars open */
@media (min-width: 769px) {
    .footer-pillar-details {
        display: block;
    }
    .footer-pillar-details summary {
        pointer-events: none;
    }
    .footer-pillar-details summary::after {
        display: none;
    }
    .footer-pillar-details .footer-pillar-nav {
        display: block !important;
    }
    .admin-menu-toggle {
        display: none;
    }
    .admin-sidebar-overlay {
        display: none !important;
    }
    .filter-toggle {
        display: none;
    }
}

/* ========================================
   COMMENTAIRES (front-office)
   ======================================== */
.comments-section {
    max-width: 860px;
    margin: 40px auto;
    padding: 0 20px;
}
.comments-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
}
.comments-count {
    font-weight: 400;
    font-size: .9rem;
    color: var(--gray-400);
}
.comments-empty {
    color: var(--gray-400);
    font-style: italic;
    margin-bottom: 24px;
}
.comments-list {
    margin-bottom: 28px;
}
.comment-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
}
.comment-item:last-child {
    border-bottom: none;
}
.comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.comment-author {
    font-weight: 600;
    font-size: .95rem;
    color: var(--gray-800);
}
.comment-date {
    font-size: .8rem;
    color: var(--gray-400);
}
.comment-body {
    font-size: .93rem;
    line-height: 1.6;
    color: var(--gray-600);
}

/* Formulaire commentaire */
.comment-form {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
}
.comment-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.comment-form-field {
    margin-bottom: 12px;
}
.comment-form-field label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 4px;
}
.comment-form-field input,
.comment-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: .9rem;
    font-family: inherit;
    background: #fff;
    transition: border-color .2s;
    box-sizing: border-box;
}
.comment-form-field input:focus,
.comment-form-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, .1);
}
.comment-form-field textarea {
    resize: vertical;
    min-height: 100px;
}
.comment-form-charcount {
    font-size: .75rem;
    color: var(--gray-400);
    text-align: right;
    margin-top: 4px;
}
.comment-form-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.comment-submit-btn {
    padding: 10px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}
.comment-submit-btn:hover {
    opacity: .88;
}
.comment-submit-btn:disabled {
    opacity: .5;
    cursor: default;
}
.comment-form-notice {
    font-size: .8rem;
    color: var(--gray-400);
    font-style: italic;
}
.comment-feedback {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 500;
}
.comment-feedback-success {
    background: #d1fae5;
    color: #065f46;
}
.comment-feedback-error {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 768px) {
    .comment-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .comments-section {
        padding: 0 16px;
    }
}

/* ========================================
   FAQ & TAGS SEO (front-office)
   ======================================== */
.faq-list, .labs-faq {
    border-top: 1px solid var(--gray-200);
}
.faq-item {
    border-bottom: 1px solid var(--gray-200);
}
.faq-question {
    padding: 14px 0;
    font-weight: 600;
    font-size: .95rem;
    color: var(--gray-800);
    cursor: pointer;
    list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::before {
    content: '+ ';
    color: var(--primary);
    font-weight: 700;
    margin-right: 6px;
}
details[open] > .faq-question::before { content: '- '; }
.faq-answer {
    padding: 0 0 14px 20px;
    font-size: .9rem;
    line-height: 1.6;
    color: var(--gray-600);
}
.seo-tags-block {
    margin: 16px 0 24px;
}
.seo-tags-label {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    color: var(--gray-500);
    margin-bottom: 8px;
}
.seo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.seo-tag-pill {
    display: inline-block;
    padding: 5px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    font-size: .8rem;
    color: var(--gray-600);
    text-decoration: none;
    transition: all .2s;
}
.seo-tag-pill:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* =============================================
   Google Tools Page
   ============================================= */
.tools-category { margin-bottom: 40px; }
.tools-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--gray-900);
}
.tools-category-title .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.tools-category-count {
    font-size: .8rem;
    font-weight: 500;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: 10px;
}
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.tool-card {
    display: grid;
    grid-template-columns: 48px 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--tool-color, var(--primary));
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, transform .2s;
}
.tool-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.tool-card-icon {
    font-size: 1.6rem;
    line-height: 1;
    text-align: center;
}
.tool-card-body { min-width: 0; }
.tool-card-name {
    font-size: 1rem;
    font-weight: 650;
    margin: 0 0 4px;
    color: var(--gray-900);
}
.tool-card-desc {
    font-size: .84rem;
    line-height: 1.45;
    color: var(--gray-600);
    margin: 0;
}
.tool-card-badge {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #059669;
    background: #ecfdf5;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}
.tool-card-arrow {
    font-size: 1.1rem;
    color: var(--gray-400);
    transition: transform .2s, color .2s;
}
.tool-card:hover .tool-card-arrow {
    transform: translateX(3px);
    color: var(--tool-color, var(--primary));
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .tool-card {
        grid-template-columns: 40px 1fr auto;
        padding: 16px;
    }
    .tool-card-badge { display: none; }
    .tool-card-desc { font-size: .8rem; }
}

.search-preview .sp-empty-cta{display:block;padding:18px;margin:6px;background:linear-gradient(135deg,#7c3aed,#5b21b6);color:#fff;font-weight:600;font-size:.92rem;text-align:center;text-decoration:none;border-radius:10px;transition:transform .12s,box-shadow .12s}
.search-preview .sp-empty-cta:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(124,58,237,.3);color:#fff;text-decoration:none}

.share-block{margin:28px 0 32px;padding:18px 22px;background:linear-gradient(135deg,#f8fafc 0%,#f1f5f9 100%);border:1px solid #e2e8f0;border-radius:14px;box-shadow:0 1px 3px rgba(15,23,42,.04)}
.share-block-label{display:flex;align-items:center;gap:8px;font-size:.82rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#475569;margin-bottom:14px}
.share-block-label .share-icon{font-size:1.05rem;line-height:1}
.share-buttons{display:flex;flex-wrap:wrap;gap:10px}
.share-btn{display:inline-flex;align-items:center;gap:8px;padding:9px 16px;border-radius:999px;font-size:.85rem;font-weight:600;color:#fff;background:#475569;border:none;cursor:pointer;text-decoration:none;transition:transform .15s ease,box-shadow .15s ease,filter .15s ease;box-shadow:0 2px 6px rgba(15,23,42,.08);line-height:1}
.share-btn:hover{transform:translateY(-1px);filter:brightness(1.06);box-shadow:0 4px 12px rgba(15,23,42,.15);color:#fff}
.share-btn:active{transform:translateY(0)}
.share-btn svg{display:block;flex-shrink:0}
.share-btn-text{white-space:nowrap}
.share-btn-facebook{background:#1877f2}
.share-btn-twitter{background:#0f172a}
.share-btn-linkedin{background:#0a66c2}
.share-btn-email{background:#0d9488}
.share-btn-copy{background:#64748b}
.share-btn-copy.share-btn-success{background:#10b981}
@media (max-width:640px){.share-block{padding:14px 16px;margin:22px 0}.share-buttons{gap:8px}.share-btn{padding:8px 12px;font-size:.8rem}.share-btn-text{display:none}.share-btn-copy.share-btn-success .share-btn-text{display:inline}}
