/* ================================================================
   GestionDoc ONEF — public.css v3
   Hero vert #0e8c38 + accent jaune doré
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
    --orange:        #f97316;
    --orange-light:  #fb923c;
    --orange-dark:   #ea6c0a;
    --orange-bg:     rgba(249,115,22,0.08);
    --orange-border: rgba(249,115,22,0.2);

    --green:         #16a34a;
    --green-light:   #4ade80;
    --green-bg:      rgba(22,163,74,0.08);
    --green-border:  rgba(22,163,74,0.2);

    /* Hero vert */
    --hero-green:      #0e8c38;
    --hero-green-mid:  #0a7530;
    --hero-green-dark: #085f27;
    --hero-accent:     #fbbf24; /* jaune doré — accent sur vert */

    --blue-bg:       rgba(59,130,246,0.08);
    --blue-border:   rgba(59,130,246,0.2);
    --blue-text:     #60a5fa;

    --text-primary:  #111827;
    --text-secondary:#4b5563;
    --text-muted:    #9ca3af;
    --border:        #e5e7eb;
    --bg:            #f8fafc;
    --white:         #ffffff;
    --dark:          #1a2a3a;
    --dark-mid:      #243447;

    --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg:  0 16px 40px rgba(0,0,0,0.12);
    --radius:     10px;
    --radius-lg:  16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

h1,h2,h3,h4 { font-family: 'Poppins', sans-serif; }
a { text-decoration: none; }

/* ── Navbar ──────────────────────────────────────────────────── */
.pub-navbar {
    background: beige;
    height: 62px;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.pub-navbar .container-xl {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.pub-brand { display: flex; align-items: center; gap: 0.75rem; }

.pub-brand-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--hero-green);
    line-height: 1.1;
}

.pub-brand-name span { color: var(--orange); }
.pub-brand-sub { font-size: 0.68rem; color: #6b7280; margin-top: 1px; white-space: nowrap; }

.pub-navbar-links { display: flex; align-items: center; gap: 4px; }

.pub-navbar-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: #4b5563;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    transition: all 0.15s;
}

.pub-navbar-link:hover {
    color: var(--hero-green);
    background: rgba(14,140,56,0.06);
}

.pub-navbar-link.active {
    color: var(--hero-green);
    background: rgba(14,140,56,0.08);
    font-weight: 600;
}

.pub-lang-switch {
    display: none;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.pub-lang-switch a {
    color: #9ca3af;
    text-decoration: none;
    padding: 0.2rem 0.35rem;
    border-radius: 0.35rem;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.pub-lang-switch a:hover {
    color: #4b5563;
    background-color: #f3f4f6;
}

.pub-lang-switch a.active {
    color: #f97316;
    background-color: #fff7ed;
}

.pub-lang-switch span {
    color: #d1d5db;
}

.pub-admin-link {
    display: none;
    font-size: 0.75rem;
    font-weight: 500;
    color: #4b5563;
    padding: 0.4rem 0.875rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.15s;
    margin-left: 0.5rem;
}

.pub-admin-link:hover { color: var(--hero-green); background: rgba(14,140,56,0.06); }

/* ── Hero ────────────────────────────────────────────────────── */
.pub-hero {
    background: linear-gradient(135deg, var(--hero-green) 0%, var(--hero-green-mid) 100%);
    padding: 4rem 0 3.5rem;
    position: relative;
    overflow: hidden;
    min-height: 460px;
    display: flex;
    align-items: center;
}

.pub-hero::before {
    content: '';
    position: absolute;
    top: -80px; right: 5%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 65%);
    pointer-events: none;
}

.pub-hero::after {
    content: '';
    position: absolute;
    bottom: -60px; left: 35%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 65%);
    pointer-events: none;
}

.pub-hero .container-xl {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 3rem;
    width: 100%;
}

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

.pub-hero-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

/* Badge eyebrow */
.pub-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 5px 14px;
    border-radius: 99px;
    margin-bottom: 1.25rem;
}

.pub-hero-dot {
    width: 7px; height: 7px;
    background: #fff;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.8); }
}

.pub-hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.75rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 0.875rem;
    max-width: 520px;
}

.pub-hero-title-accent { color: var(--hero-accent); }

.pub-hero-subtitle {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.65;
    margin-bottom: 2rem;
    max-width: 460px;
}

/* Barre de recherche */
.pub-search-bar {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 5px 5px 5px 1rem;
    max-width: 560px;
    gap: 8px;
    margin-bottom: 1rem;
    transition: all 0.18s;
}

.pub-search-bar:focus-within {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.18);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
}

.pub-search-icon { color: rgba(255,255,255,0.5); font-size: 0.9rem; flex-shrink: 0; }

.pub-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: #ffffff;
    min-width: 0;
}

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

.pub-search-btn {
    background: #ffffff;
    color: var(--hero-green-dark);
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1.25rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    flex-shrink: 0;
}

.pub-search-btn:hover {
    background: #f0fdf4;
    color: var(--hero-green-dark);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

/* Tags tendances */
.pub-search-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.pub-search-tags-label {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
}

.pub-search-tag {
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 3px 10px;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'DM Sans', sans-serif;
    text-decoration: none;
    display: inline-block;
}

.pub-search-tag:hover {
    color: #ffffff;
    border-color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.15);
}

/* Stats */
.pub-hero-stats {
    display: flex;
    gap: 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.pub-hero-stat {
    display: flex;
    flex-direction: column;
    padding-right: 2rem;
    margin-right: 2rem;
    border-right: 1px solid rgba(255,255,255,0.15);
}

.pub-hero-stat:last-child { border-right: none; padding-right: 0; margin-right: 0; }

.pub-hero-stat-value {
    font-family: 'Poppins', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--hero-accent);
    line-height: 1;
    letter-spacing: -0.03em;
}

.pub-hero-stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.5);
    margin-top: 5px;
}

/* Cartes doc flottantes */
.pub-hero-doc-card {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 14px 16px;
    width: 220px;
    transition: all 0.2s;
}

.pub-hero-doc-card:hover {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.3);
    transform: translateX(-4px);
}

.pub-hero-doc-type {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
}

.pub-hero-doc-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    margin-bottom: 7px;
}

.pub-hero-doc-meta {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.65);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.pub-hero-doc-meta i { font-size: 0.7rem; }

.pub-hero-doc-actions { display: flex; gap: 5px; }

.pub-hero-doc-btn {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    transition: all 0.15s;
}

.pub-hero-doc-btn.dl  { background: rgba(255,255,255,0.15); color: var(--hero-accent); }
.pub-hero-doc-btn.dl:hover  { background: rgba(255,255,255,0.25); color: #fff; }
.pub-hero-doc-btn.eye { background: rgba(0,0,0,0.1); color: rgba(255,255,255,0.7); }
.pub-hero-doc-btn.eye:hover { background: rgba(0,0,0,0.2); color: #fff; }

/* ── Main layout ─────────────────────────────────────────────── */
.pub-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

/* ── Filter panel ────────────────────────────────────────────── */
.pub-filter-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 76px;
}

.pub-filter-header {
    background: var(--bg);
    padding: 0.875rem 1.1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.pub-filter-header i { color: var(--orange); }

.pub-filter-reset {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: color 0.15s;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 3px;
}

.pub-filter-reset:hover { color: var(--orange); }

.pub-filter-group {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border);
}

.pub-filter-group:last-child { border-bottom: none; }

.pub-filter-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
    display: block;
}

.pub-filter-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color 0.15s;
}

.pub-filter-check input[type="radio"] { accent-color: var(--orange); }
.pub-filter-check:hover span { color: var(--text-primary); }

.pub-filter-select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.45rem 0.75rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: var(--bg);
    outline: none;
    transition: all 0.15s;
    cursor: pointer;
}

.pub-filter-select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-bg);
}

.pub-tags-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ── Tags ────────────────────────────────────────────────────── */
.pub-tag {
    display: inline-block;
    padding: 0.25em 0.7em;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 99px;
    font-size: 0.775rem;
    color: var(--text-secondary);
    transition: all 0.15s;
    cursor: pointer;
    text-decoration: none;
}

.pub-tag:hover, .pub-tag.active {
    background: var(--orange-bg);
    border-color: var(--orange-border);
    color: var(--orange-dark);
}

/* ── Results info ────────────────────────────────────────────── */
.pub-results-info { font-size: 0.875rem; color: var(--text-muted); }
.pub-results-info strong { color: var(--text-primary); font-weight: 700; }

/* ── Document cards ──────────────────────────────────────────── */
.pub-doc-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.pub-doc-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--orange-border);
}

.pub-doc-type {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25em 0.65em;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.pub-doc-type--rapport { background: var(--orange-bg);  color: var(--orange-dark); border: 1px solid var(--orange-border); }
.pub-doc-type--etude   { background: var(--green-bg);   color: var(--green);       border: 1px solid var(--green-border); }
.pub-doc-type--note    { background: var(--blue-bg);    color: #1d4ed8;            border: 1px solid var(--blue-border); }
.pub-doc-type--autre   { background: rgba(107,114,128,0.07); color: #4b5563; border: 1px solid var(--border); }

.pub-doc-icon { font-size: 2rem; color: #fca5a5; margin-bottom: 0.75rem; }

.pub-doc-body { flex: 1; }

.pub-doc-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.pub-doc-title a { color: inherit; transition: color 0.15s; }
.pub-doc-title a:hover { color: var(--orange); }

.pub-doc-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 0.75rem;
}

.pub-doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.pub-doc-meta i { color: var(--orange); margin-right: 2px; }

.pub-doc-structures { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.75rem; }

.pub-doc-structure-badge {
    font-size: 0.68rem;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.2em 0.5em;
    border-radius: 4px;
}

.pub-doc-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.875rem;
    border-top: 1px solid var(--border);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.pub-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.825rem;
    transition: all 0.15s;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    text-decoration: none;
}

.pub-btn-primary {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: #fff;
    border-color: var(--orange-dark);
}

.pub-btn-primary:hover {
    background: linear-gradient(135deg, var(--orange-light), var(--orange));
    color: #fff;
    box-shadow: 0 4px 14px rgba(249,115,22,0.3);
    transform: translateY(-1px);
}

.pub-btn-secondary {
    background: var(--bg);
    border-color: var(--border);
    color: var(--text-secondary);
}

.pub-btn-secondary:hover {
    background: var(--orange-bg);
    border-color: var(--orange-border);
    color: var(--orange-dark);
}

.pub-btn-sm { padding: 0.3rem 0.6rem; font-size: 0.775rem; }

/* ── Empty state ─────────────────────────────────────────────── */
.pub-empty { text-align: center; padding: 5rem 2rem; }
.pub-empty i { font-size: 3.5rem; color: var(--text-muted); opacity: 0.2; display: block; margin-bottom: 1.25rem; }
.pub-empty h3 { font-family: 'Poppins', sans-serif; font-size: 1.25rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.pub-empty p { color: var(--text-muted); font-size: 0.9rem; }

/* ── Detail page ─────────────────────────────────────────────── */
.pub-back-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color 0.15s;
    gap: 0.4rem;
}

.pub-back-link:hover { color: var(--orange); }

.pub-detail-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.pub-detail-header {
    padding: 1.75rem;
    border-bottom: 1px solid var(--border);
    border-top: 3px solid var(--orange);
}

.pub-detail-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0.75rem 0;
    line-height: 1.25;
}

.pub-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.825rem;
    color: var(--text-muted);
}

.pub-detail-meta i { color: var(--orange); margin-right: 0.3rem; }

.pub-detail-section {
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--border);
}

.pub-detail-section:last-child { border-bottom: none; }

.pub-detail-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.775rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.875rem;
}

.pub-detail-desc {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 0.95rem;
}

.pub-structures-list { display: flex; flex-direction: column; gap: 0.75rem; }

.pub-structure-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.pub-structure-icon {
    width: 36px; height: 36px;
    background: var(--orange-bg);
    border: 1px solid var(--orange-border);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--orange); font-size: 0.85rem;
    flex-shrink: 0;
}

.pub-structure-name { font-weight: 600; font-size: 0.875rem; color: var(--text-primary); }
.pub-structure-type { font-size: 0.775rem; color: var(--text-muted); }

/* ── Action card ─────────────────────────────────────────────── */
.pub-action-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    border-top: 3px solid var(--orange);
}

.pub-action-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1.1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.pub-action-icon { font-size: 2rem; color: #fca5a5; flex-shrink: 0; }
.pub-action-filename { font-weight: 600; font-size: 0.875rem; color: var(--text-primary); word-break: break-all; }
.pub-action-filesize { font-size: 0.775rem; color: var(--text-muted); margin-top: 2px; }

/* ── Similar docs ────────────────────────────────────────────── */
.pub-similar-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.pub-similar-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.pub-similar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all 0.15s;
    text-decoration: none;
}

.pub-similar-item:last-child { border-bottom: none; }
.pub-similar-item:hover { background: #fff9f5; color: var(--text-primary); }

.pub-similar-icon {
    width: 32px; height: 32px;
    background: var(--orange-bg);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: var(--orange); font-size: 0.8rem;
    flex-shrink: 0;
}

.pub-similar-name { font-size: 0.825rem; font-weight: 500; color: var(--text-primary); line-height: 1.3; }
.pub-similar-year { font-size: 0.75rem; color: var(--text-muted); }

/* ── Footer ──────────────────────────────────────────────────── */
.pub-footer {
    background: beige;
    border-top: 3px solid var(--orange);
    padding: 3rem 0 1.5rem;
    margin-top: 5rem;
}

.pub-footer .container-xl { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }

.pub-footer-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: var(--hero-green);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pub-footer-brand i { color: var(--orange); }
.pub-footer-text { font-size: 0.825rem; color: #475569; line-height: 1.65; }

.pub-footer-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #334155;
    margin-bottom: 0.875rem;
}

.pub-footer-links { list-style: none; }
.pub-footer-links li { margin-bottom: 0.45rem; }
.pub-footer-links a { font-size: 0.825rem; color: #475569; transition: color 0.15s; }
.pub-footer-links a:hover { color: var(--orange); }

.pub-footer-bottom {
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid #fb923c;
    font-size: 0.775rem;
    color: #334155;
    text-align: center;
}

/* ── Pagination ──────────────────────────────────────────────── */
.pagination { display: flex; gap: 0.25rem; list-style: none; align-items: center; }

.page-item .page-link {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    transition: all 0.15s;
    text-decoration: none;
    display: block;
}

.page-item .page-link:hover {
    background: var(--orange-bg);
    color: var(--orange-dark);
    border-color: var(--orange-border);
}

.page-item.active .page-link {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
    box-shadow: 0 2px 8px rgba(249,115,22,0.3);
}

.page-item.disabled .page-link { opacity: 0.4; pointer-events: none; }

/* ── Toggle vue ──────────────────────────────────────────────── */
.pub-view-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
}

.pub-view-btn {
    width: 34px; height: 34px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all 0.15s;
}

.pub-view-btn:hover { color: var(--text-secondary); background: var(--white); }

.pub-view-btn.active {
    background: var(--white);
    color: var(--orange);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ── Bloc liste groupé ───────────────────────────────────────── */
.pub-list-wrapper {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.pub-list-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.6rem 1rem;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.pub-list-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: all 0.15s;
}

.pub-list-row:last-child { border-bottom: none; }
.pub-list-row:hover { background: #fff9f5; }

.pub-list-type {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2em 0.55em;
    border-radius: 4px;
    white-space: nowrap;
    text-align: center;
}

.pub-list-title-compact { flex: 1; min-width: 0; }

.pub-list-title-compact a {
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.15s;
    display: block;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.35;
}

.pub-list-title-compact a:hover { color: var(--orange); }

.pub-list-tags-inline { display: flex; gap: 4px; margin-top: 3px; }

.pub-list-tag-sm {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 0.1em 0.45em;
    border-radius: 99px;
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── En-têtes triables ───────────────────────────────────────── */
.pub-list-sort {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.pub-list-sort:hover { color: var(--orange); }
.pub-list-sort.active { color: var(--orange); font-weight: 700; }
.pub-list-sort i { font-size: 0.65rem; opacity: 0.6; }
.pub-list-sort.active i { opacity: 1; }

/* ── Thématiques ─────────────────────────────────────────────── */
.pub-thematique-tag {
    display: inline-block;
    padding: 0.25em 0.7em;
    background: color-mix(in srgb, var(--thematique-color) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--thematique-color) 30%, transparent);
    border-radius: 99px;
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--thematique-color);
    transition: all 0.15s;
    cursor: pointer;
    text-decoration: none;
}

.pub-thematique-tag:hover,
.pub-thematique-tag.active {
    background: color-mix(in srgb, var(--thematique-color) 20%, transparent);
    color: var(--thematique-color);
    transform: translateY(-1px);
}

.pub-thematique-count {
    display: inline-block;
    margin-left: 0.4em;
    padding: 0 0.5em;
    border-radius: 99px;
    background: color-mix(in srgb, var(--thematique-color) 28%, transparent);
    font-size: 0.7rem;
    font-weight: 700;
}

/* ── Abonnement thématique ───────────────────────────────────── */
.pub-sub-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(249,115,22,0.08), rgba(249,115,22,0.03));
    border: 1px solid rgba(249,115,22,0.25);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.pub-sub-text {
    font-size: 0.85rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pub-sub-text i { color: var(--orange); }
.pub-sub-form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pub-sub-form input[type="email"] {
    padding: 0.5rem 0.85rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85rem;
    min-width: 220px;
    outline: none;
}
.pub-sub-form input[type="email"]:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,0.1); }
.pub-sub-form button {
    padding: 0.5rem 1rem;
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.pub-sub-form button:hover { background: #ea6c0a; }
.pub-sub-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}
.pub-sub-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.pub-thematique-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2em 0.6em;
    background: color-mix(in srgb, var(--thematique-color) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--thematique-color) 25%, transparent);
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--thematique-color);
}

.pub-doc-thematiques { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }

/* ── Date range ──────────────────────────────────────────────── */
.pub-date-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pub-date-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pub-date-active {
    font-size: 0.75rem;
    color: var(--orange-dark);
    background: var(--orange-bg);
    border: 1px solid var(--orange-border);
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    margin-top: 0.4rem;
    display: flex;
    align-items: center;
}

.pub-date-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.825rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.15s;
}

.pub-date-submit:hover {
    background: linear-gradient(135deg, var(--orange-light), var(--orange));
    box-shadow: 0 4px 12px rgba(249,115,22,0.3);
    transform: translateY(-1px);
}

/* ── Bannière Cahiers ────────────────────────────────────────── */
.pub-cahiers-banner {
    background: linear-gradient(135deg, var(--hero-green) 0%, var(--hero-green-mid) 100%);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.pub-cahiers-banner::before {
    content: '';
    position: absolute;
    top: -60px; left: -40px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 65%);
    pointer-events: none;
}

.pub-cahiers-banner .container-xl {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.pub-cahiers-left { flex: 0 0 300px; }

.pub-cahiers-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 0.3em 0.9em;
    border-radius: 99px;
    margin-bottom: 1rem;
}

.pub-cahiers-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 0.875rem;
}

.pub-cahiers-accent { color: var(--hero-accent); }

.pub-cahiers-desc {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.pub-cahiers-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    background: #ffffff;
    color: var(--hero-green-dark);
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.15s;
}

.pub-cahiers-btn:hover {
    background: #f0fdf4;
    color: var(--hero-green-dark);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.pub-cahiers-right { flex: 1; }

.pub-cahiers-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.45);
    margin-bottom: 0.875rem;
}

.pub-cahiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.pub-cahier-card {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    text-decoration: none;
    transition: all 0.15s;
}

.pub-cahier-card:hover {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.pub-cahier-cover {
    width: 44px; height: 56px;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 4px;
}

.pub-cahier-cover i { font-size: 1rem; color: rgba(255,255,255,0.9); }
.pub-cahier-year { font-size: 0.58rem; font-weight: 700; color: rgba(255,255,255,0.8); }
.pub-cahier-info { flex: 1; min-width: 0; }

.pub-cahier-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    margin-bottom: 4px;
}

.pub-cahier-meta { font-size: 0.68rem; color: rgba(255,255,255,0.5); margin-bottom: 4px; }

.pub-cahier-dl {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--hero-accent);
    display: flex;
    align-items: center;
}

/* ── Hero page Cahiers ───────────────────────────────────────── */
.pub-cahiers-hero {
    background: linear-gradient(135deg, var(--hero-green) 0%, var(--hero-green-mid) 100%);
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.pub-cahiers-hero::before {
    content: '';
    position: absolute;
    top: -80px; right: 5%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 65%);
    pointer-events: none;
}

.pub-cahiers-hero-content { position: relative; z-index: 1; max-width: 650px; }

.pub-cahiers-hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.75rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.875rem;
}

.pub-cahiers-hero-title span { color: var(--hero-accent); }

.pub-cahiers-hero-desc {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 540px;
}

.pub-cahiers-hero-stats {
    display: flex;
    gap: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.pub-cahiers-hero-stats > div { display: flex; flex-direction: column; }

.pub-cahiers-stat-val {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--hero-accent);
    line-height: 1;
    letter-spacing: -0.03em;
}

.pub-cahiers-stat-lbl {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.45);
    margin-top: 4px;
}

/* ── Cartes page dédiée Cahiers ──────────────────────────────── */
.pub-cahier-full-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.pub-cahier-full-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(14,140,56,0.3);
}

.pub-cahier-full-cover {
    height: 130px;
    background: linear-gradient(135deg, var(--hero-green), var(--hero-green-mid));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    position: relative;
    border-bottom: 3px solid var(--hero-accent);
}

.pub-cahier-full-cover i { font-size: 2.25rem; color: rgba(255,255,255,0.1); }

.pub-cahier-full-year {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--hero-accent);
    letter-spacing: -0.03em;
    position: absolute;
}

.pub-cahier-full-type {
    position: absolute;
    top: 8px; right: 8px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2em 0.55em;
    border-radius: 4px;
}

.pub-cahier-full-body { padding: 1rem 1.1rem; flex: 1; }

.pub-cahier-full-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.5rem;
}

.pub-cahier-full-title a { color: var(--text-primary); transition: color 0.15s; }
.pub-cahier-full-title a:hover { color: var(--hero-green); }

.pub-cahier-full-desc {
    font-size: 0.775rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 0.5rem;
}

.pub-cahier-full-meta { font-size: 0.75rem; color: var(--text-muted); }
.pub-cahier-full-meta i { color: var(--orange); font-size: 0.7rem; margin-right: 3px; }

.pub-cahier-full-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.875rem 1.1rem;
    border-top: 1px solid var(--border);
}

/* ── FAQ hero ────────────────────────────────────────────────── */
.pub-faq-hero {
    background: linear-gradient(135deg, var(--hero-green) 0%, var(--hero-green-mid) 100%);
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.pub-faq-hero::before {
    content: '';
    position: absolute;
    top: -80px; right: 5%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 65%);
    pointer-events: none;
}

.pub-faq-hero-content { position: relative; z-index: 1; max-width: 600px; }

.pub-faq-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.pub-faq-subtitle {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.65;
    margin-bottom: 2rem;
}

.pub-faq-search {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    gap: 0.75rem;
    max-width: 500px;
    transition: all 0.15s;
}

.pub-faq-search:focus-within {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.18);
}

.pub-faq-search i { color: rgba(255,255,255,0.5); font-size: 0.9rem; flex-shrink: 0; }

.pub-faq-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: #fff;
}

.pub-faq-search input::placeholder { color: rgba(255,255,255,0.45); }

/* ── FAQ items ───────────────────────────────────────────────── */
.pub-faq-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s;
}

.pub-faq-item:hover { border-color: rgba(14,140,56,0.25); }

.pub-faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    transition: all 0.15s;
}

.pub-faq-question:hover { color: var(--hero-green); }

.pub-faq-question.active {
    color: var(--hero-green);
    border-bottom: 1px solid var(--border);
}

.pub-faq-icon {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.pub-faq-question.active .pub-faq-icon {
    transform: rotate(180deg);
    color: var(--hero-green);
}

.pub-faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.pub-faq-answer.open { max-height: 600px; }

.pub-faq-answer-inner {
    padding: 1.1rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 991px) {
    .pub-hero .container-xl { flex-direction: column; }
    .pub-hero-right { display: none; }
    .pub-hero-title { font-size: 2rem; }
    .pub-navbar-links { display: none; }
    .pub-cahiers-banner .container-xl { flex-direction: column; }
    .pub-cahiers-left { flex: none; }
    .pub-cahiers-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
    .pub-hero { padding: 2.5rem 0 2rem; }
    .pub-hero-title { font-size: 1.75rem; }
    .pub-hero-stats { gap: 1rem; flex-wrap: wrap; }
    .pub-filter-panel { position: static; margin-bottom: 1.5rem; }
    .pub-main { padding: 1.5rem 1rem; }
    .pub-list-header { display: none; }
    .pub-list-row { flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem 1rem; }
    .pub-list-title-compact { flex-basis: calc(100% - 90px); }
    .pub-cahiers-grid { grid-template-columns: 1fr; }
    .pub-cahiers-title { font-size: 1.6rem; }
}


