/* ==========================================================================
   DGCBF — Système de design
   Sobre, administratif, sans dégradés.
   ========================================================================== */

:root {
    --navy: #0f2d5c;
    --navy-dark: #0a2148;
    --blue: #1d4f91;
    --blue-hover: #163e73;
    --blue-soft: #e8eef7;
    --accent: #e9b10b;
    --ink: #1e2430;
    --muted: #5b6474;
    --line: #dde1e7;
    --line-strong: #c5ccd6;
    --surface: #f4f6f9;
    --white: #ffffff;
    --danger: #b42318;
    --success: #1f7a4d;
    --gabon-green: #009e60;
    --gabon-yellow: #fcd116;
    --gabon-blue: #3a75c4;
    --radius: 6px;
    --font: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* Compatibilité avec les anciennes variables */
    --primary-color: var(--navy);
    --secondary-color: var(--navy-dark);
    --accent-color: var(--accent);
    --text-color: var(--ink);
    --muted-color: var(--muted);
    --border-color: var(--line);
    --light-bg: var(--surface);
}

/* --- Base ---------------------------------------------------------------- */

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font);
    color: var(--navy);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

a {
    color: var(--blue);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--blue-hover);
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.text-muted {
    color: var(--muted) !important;
}

.text-primary {
    color: var(--blue) !important;
}

.lead {
    font-size: 1.15rem;
    color: var(--muted);
    font-weight: 400;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 3000;
    background: var(--navy);
    color: #fff;
    padding: 0.5rem 1rem;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    color: #fff;
}

/* --- Liseré national ----------------------------------------------------- */

.gov-stripe {
    display: flex;
    height: 5px;
}

.gov-stripe span {
    flex: 1;
}

.gov-stripe span:nth-child(1) { background: var(--gabon-green); }
.gov-stripe span:nth-child(2) { background: var(--gabon-yellow); }
.gov-stripe span:nth-child(3) { background: var(--gabon-blue); }

/* --- Bandeau utilitaire ---------------------------------------------------- */

.topbar {
    background: var(--navy-dark);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.82rem;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 40px;
}

.topbar-official {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-official i {
    color: var(--accent);
}

.topbar-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.topbar-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.topbar-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.topbar-links i {
    margin-right: 0.4rem;
    opacity: 0.7;
}

.topbar-sep {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
}

.lang-switch {
    display: flex;
    gap: 2px;
    padding: 2px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.lang-switch a {
    padding: 0.1rem 0.5rem;
    border-radius: 3px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.lang-switch a:hover {
    color: #fff;
    text-decoration: none;
}

.lang-switch a.active {
    background: #fff;
    color: var(--navy);
}

.lang-switch-light {
    background: var(--surface);
    border: 1px solid var(--line);
}

.lang-switch-light a {
    color: var(--muted);
}

.lang-switch-light a.active {
    background: var(--navy);
    color: #fff;
}

@media (max-width: 991.98px) {
    .topbar-hide-md {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .topbar-official span {
        display: none;
    }
    .topbar-official::after {
        content: 'Site officiel';
    }
    .topbar-hide-sm {
        display: none;
    }
}

/* --- En-tête --------------------------------------------------------------- */

.site-header {
    background: var(--white);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.brand img {
    height: 76px;
    width: auto;
    flex-shrink: 0;
}

.brand-divider {
    width: 1px;
    align-self: stretch;
    margin: 0.35rem 0;
    background: var(--line-strong);
}

.brand-overline {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.1rem;
}

.brand-name {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.brand-sub {
    display: block;
    font-size: 0.92rem;
    color: var(--ink);
    line-height: 1.3;
    margin-top: 0.15rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header-search {
    display: flex;
    width: 280px;
}

.header-search input {
    border: 1px solid var(--line-strong);
    border-right: 0;
    border-radius: var(--radius) 0 0 var(--radius);
    padding: 0.55rem 0.8rem;
    font-size: 0.92rem;
    width: 100%;
    min-width: 0;
}

.header-search input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: inset 0 0 0 1px var(--blue);
}

.header-search button {
    border: 1px solid var(--navy);
    background: var(--navy);
    color: #fff;
    padding: 0 0.9rem;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.header-search button:hover {
    background: var(--blue);
    border-color: var(--blue);
}

.header-cta {
    padding: 0.55rem 1rem;
    font-size: 0.92rem;
}

.menu-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 0.5rem 0.85rem;
    font-weight: 600;
    color: var(--navy);
}

@media (max-width: 1199.98px) {
    .header-search {
        width: 220px;
    }
    .brand-sub {
        max-width: 300px;
    }
}

@media (max-width: 991.98px) {
    .header-search,
    .header-cta,
    .site-nav {
        display: none;
    }
    .menu-toggle {
        display: inline-flex;
    }
    .brand img {
        height: 54px;
    }
    .brand-name {
        font-size: 1.35rem;
    }
    .brand-sub {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .brand-divider {
        display: none;
    }
    .brand img {
        height: 46px;
    }
    .brand-overline {
        font-size: 0.65rem;
    }
}

/* --- Navigation principale ---------------------------------------------------- */

.site-nav {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.site-nav .nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
}

.site-nav .nav-link-main {
    display: block;
    padding: 0.95rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.site-nav .nav-link-main:hover {
    color: var(--blue);
    background: var(--surface);
}

.site-nav .active > .nav-link-main {
    color: var(--navy);
    border-bottom-color: var(--blue);
}

.site-nav .dropdown-toggle::after {
    border: 0;
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    vertical-align: 0;
    margin-left: 0.4rem;
    font-size: 0.75rem;
}

.site-nav .dropdown-menu {
    border: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 8px 20px rgba(15, 45, 92, 0.08);
    padding: 0.5rem;
    margin-top: 0 !important;
    min-width: 260px;
}

.site-nav .dropdown-item {
    border-radius: 4px;
    padding: 0.55rem 0.75rem;
    font-size: 0.95rem;
    color: var(--ink);
}

.site-nav .dropdown-item:hover,
.site-nav .dropdown-item.active {
    background: var(--blue-soft);
    color: var(--navy);
}

/* Menu mobile (offcanvas Bootstrap) */
.mobile-nav .offcanvas-header {
    border-bottom: 1px solid var(--line);
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list > li {
    border-bottom: 1px solid var(--line);
}

.mobile-nav-list a {
    display: block;
    padding: 0.85rem 0;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

.mobile-nav-list a.active {
    color: var(--blue);
}

.mobile-nav-list ul {
    list-style: none;
    padding: 0 0 0.6rem 1rem;
    margin: 0;
}

.mobile-nav-list ul a {
    padding: 0.4rem 0;
    font-weight: 400;
    color: var(--muted);
}

/* --- En-tête de page ------------------------------------------------------- */

.page-head {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 2.25rem 0 2.5rem;
}

.page-head .breadcrumb {
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.page-head .breadcrumb a {
    color: var(--muted);
}

.page-head .breadcrumb-item.active {
    color: var(--ink);
}

.page-head h1 {
    margin-bottom: 0.5rem;
    max-width: 860px;
}

.page-head .lead {
    margin-bottom: 0;
    max-width: 720px;
}

/* Sous-navigation de rubrique */
.subnav {
    border-bottom: 1px solid var(--line);
    background: var(--white);
}

.subnav ul {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.subnav a {
    display: block;
    white-space: nowrap;
    padding: 0.8rem 1rem;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    border-bottom: 3px solid transparent;
}

.subnav a:hover {
    color: var(--blue);
}

.subnav a.active {
    color: var(--navy);
    border-bottom-color: var(--blue);
}

/* --- Sections --------------------------------------------------------------- */

.section {
    padding: 4rem 0;
}

.section-sm {
    padding: 2.5rem 0;
}

.section-alt {
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-head h2 {
    margin-bottom: 0.35rem;
}

.section-head p {
    margin: 0;
    color: var(--muted);
    max-width: 640px;
}

.overline {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 0.5rem;
}

/* --- Boutons et liens ----------------------------------------------------------- */

.btn-dg,
.btn-primary-dgcbf {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--blue);
    border: 1px solid var(--blue);
    color: #fff;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-dg:hover,
.btn-primary-dgcbf:hover {
    background: var(--blue-hover);
    border-color: var(--blue-hover);
    color: #fff;
}

.btn-dg:disabled,
.btn-primary-dgcbf:disabled {
    background: var(--line-strong);
    border-color: var(--line-strong);
    color: var(--white);
}

.btn-dg-outline,
.btn-outline-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    border: 1px solid var(--blue);
    color: var(--blue);
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.btn-dg-outline:hover,
.btn-outline-primary:hover {
    background: var(--blue-soft);
    border-color: var(--blue);
    color: var(--blue-hover);
}

.btn-sm.btn-outline-primary,
.btn-sm.btn-dg-outline {
    padding: 0.3rem 0.75rem;
    font-size: 0.875rem;
}

.btn-dg-light {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    border: 1px solid var(--white);
    color: var(--navy);
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius);
    text-decoration: none;
}

.btn-dg-light:hover {
    background: var(--blue-soft);
    color: var(--navy);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--blue);
}

.link-arrow::after {
    content: '\f061';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.8em;
    transition: transform 0.15s ease;
}

.link-arrow:hover {
    text-decoration: underline;
}

.link-arrow:hover::after {
    transform: translateX(3px);
}

/* --- Tuiles (liens d'accès) ----------------------------------------------------- */

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tile:hover {
    border-color: var(--blue);
    box-shadow: 0 0 0 1px var(--blue);
    color: var(--ink);
}

.tile-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.tile-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.35rem;
}

.tile-text {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 0;
    flex: 1;
}

.tile-more {
    margin-top: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--blue);
}

.tile-more::after {
    content: ' \2192';
}

/* --- Cartes ------------------------------------------------------------------ */

.card-dg {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
}

.card-dg-sm {
    padding: 1.25rem;
}

@media (max-width: 575.98px) {
    .card-dg {
        padding: 1.25rem;
    }
}

.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.news-card:hover {
    border-color: var(--line-strong);
}

.news-card-img {
    aspect-ratio: 16 / 9;
    background: var(--surface);
    overflow: hidden;
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem 1.25rem 1.5rem;
}

.news-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.6rem;
}

.news-card-title {
    font-size: 1.08rem;
    line-height: 1.35;
    margin-bottom: 0.5rem;
}

.news-card-title a {
    color: var(--navy);
    text-decoration: none;
}

.news-card-title a::after {
    content: '';
    position: absolute;
    inset: 0;
}

.news-card {
    position: relative;
}

.news-card:hover .news-card-title a {
    text-decoration: underline;
}

.news-card-excerpt {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

.tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--blue);
    background: var(--blue-soft);
    padding: 0.2rem 0.55rem;
    border-radius: 3px;
}

.tag-neutral {
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
}

/* --- Listes de documents ------------------------------------------------------ */

.doc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.doc-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid var(--line);
}

.doc-item:last-child {
    border-bottom: 0;
}

.doc-icon {
    flex-shrink: 0;
    width: 38px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 3px;
    color: var(--danger);
    font-size: 1.1rem;
    background: var(--white);
}

.doc-body {
    flex: 1;
    min-width: 0;
}

.doc-title {
    font-size: 1.02rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.doc-title a {
    color: var(--navy);
    text-decoration: none;
}

.doc-title a:hover {
    text-decoration: underline;
}

.doc-description {
    color: var(--muted);
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

.doc-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0;
}

.doc-meta span + span::before {
    content: '·';
    margin: 0 0.5rem;
}

.doc-actions {
    flex-shrink: 0;
    align-self: center;
}

@media (max-width: 575.98px) {
    .doc-item {
        flex-wrap: wrap;
        padding: 1rem;
    }
    .doc-actions {
        width: 100%;
        padding-left: 54px;
    }
}

/* --- Navigation latérale ------------------------------------------------------- */

.side-nav {
    position: sticky;
    top: 80px;
    border-left: 2px solid var(--line);
}

.side-nav-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    padding-left: 1rem;
    margin-bottom: 0.5rem;
}

.side-nav a {
    display: block;
    padding: 0.5rem 1rem;
    margin-left: -2px;
    border-left: 2px solid transparent;
    color: var(--ink);
    text-decoration: none;
}

.side-nav a:hover {
    color: var(--blue);
}

.side-nav a.active {
    border-left-color: var(--blue);
    color: var(--navy);
    font-weight: 700;
}

.side-nav .count {
    float: right;
    color: var(--muted);
    font-size: 0.85rem;
}

/* --- Chiffres clés -------------------------------------------------------------- */

.stats-band {
    background: var(--navy);
    color: #fff;
}

.stat {
    padding: 0.5rem 0;
}

.stat-value {
    display: block;
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
}

.stat-label {
    display: block;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 0.25rem;
}

.stats-band .stat {
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
}

.stats-light .stat-value {
    color: var(--navy);
}

.stats-light .stat-label {
    color: var(--muted);
}

/* --- Encadrés ------------------------------------------------------------------- */

.callout {
    background: var(--blue-soft);
    border-left: 4px solid var(--blue);
    padding: 1.25rem 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.callout-title {
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.35rem;
}

.alert-dg-success {
    background: #e9f5ee;
    border-left: 4px solid var(--success);
    color: #154d32;
    padding: 0.9rem 1.1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.quote {
    border-left: 4px solid var(--accent);
    padding: 0.5rem 0 0.5rem 1.5rem;
    margin: 0;
}

.quote p {
    font-size: 1.25rem;
    line-height: 1.5;
    color: var(--navy);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.quote cite {
    font-style: normal;
    color: var(--muted);
    font-size: 0.95rem;
}

/* --- Listes ------------------------------------------------------------------- */

.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.check-list li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: 0.45rem;
}

.check-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0.1rem;
    font-size: 0.8rem;
    color: var(--blue);
}

.def-list {
    margin: 0;
    border-top: 1px solid var(--line);
}

.def-list > div {
    display: grid;
    grid-template-columns: minmax(130px, 38%) 1fr;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
}

.def-list dt {
    font-weight: 600;
    color: var(--muted);
    font-size: 0.92rem;
}

.def-list dd {
    margin: 0;
}

.link-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--line);
}

.link-list li {
    border-bottom: 1px solid var(--line);
}

.link-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
}

.link-list a::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    color: var(--blue);
}

.link-list a:hover {
    color: var(--blue);
}

.link-list small {
    display: block;
    font-weight: 400;
    color: var(--muted);
}

/* Étapes numérotées */
.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step;
}

.steps li {
    position: relative;
    padding: 0 0 1.75rem 3.5rem;
    counter-increment: step;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.steps li::after {
    content: '';
    position: absolute;
    left: calc(1.125rem - 1px);
    top: 2.5rem;
    bottom: 0.25rem;
    width: 2px;
    background: var(--line);
}

.steps li:last-child {
    padding-bottom: 0;
}

.steps li:last-child::after {
    display: none;
}

.steps h3 {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
    padding-top: 0.35rem;
}

.steps p {
    color: var(--muted);
    margin: 0;
}

/* --- Personnes ------------------------------------------------------------------ */

.person {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.avatar {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--navy);
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar-lg {
    width: 120px;
    height: 120px;
    font-size: 2rem;
}

.person-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.1rem;
}

.person-role {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 0.35rem;
}

/* --- Organigramme ---------------------------------------------------------------- */

.org-top {
    background: var(--navy);
    color: #fff;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.org-top strong {
    display: block;
    font-size: 1.1rem;
}

.org-top span {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.92rem;
}

.org-group {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    height: 100%;
}

.org-group-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--line);
    margin: 0;
}

.org-units {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
}

.org-unit {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--navy);
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    background: var(--surface);
}

/* --- Contenu éditorial --------------------------------------------------------- */

.prose {
    max-width: 70ch;
    line-height: 1.75;
}

.prose h2 {
    font-size: 1.35rem;
    margin: 2rem 0 0.75rem;
}

.prose ul {
    padding-left: 1.25rem;
}

.prose li {
    margin-bottom: 0.35rem;
}

/* --- Formulaires ------------------------------------------------------------- */

.form-label {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

.form-control,
.form-select {
    border-color: var(--line-strong);
    border-radius: var(--radius);
    padding: 0.6rem 0.8rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(29, 79, 145, 0.15);
}

.form-check-input:checked {
    background-color: var(--blue);
    border-color: var(--blue);
}

.required {
    color: var(--danger);
}

.optional {
    font-weight: 400;
    color: var(--muted);
    font-size: 0.85rem;
}

/* --- Pagination --------------------------------------------------------------- */

.pagination .page-link {
    color: var(--blue);
    border-color: var(--line);
}

.pagination .page-item.active .page-link {
    background: var(--navy);
    border-color: var(--navy);
}

/* --- Pied de page -------------------------------------------------------------- */

.site-footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-main {
    padding: 3.5rem 0 2.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.footer-brand img {
    width: 56px;
    height: 56px;
    background: #fff;
    border-radius: 50%;
    padding: 6px;
    object-fit: contain;
}

.footer-brand strong {
    display: block;
    color: #fff;
    font-size: 1.15rem;
}

.footer-title {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.55rem;
}

.footer-contact li {
    display: flex;
    gap: 0.6rem;
}

.footer-contact i {
    width: 1rem;
    margin-top: 0.3rem;
    color: var(--accent);
}

.footer-social {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.footer-social a:hover {
    background: #fff;
    color: var(--navy);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.1rem 0;
    font-size: 0.85rem;
}

.footer-bottom ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* --- Retour en haut ------------------------------------------------------------ */

.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    background: var(--white);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

/* --- Images de remplacement --------------------------------------------------- */

.img-placeholder {
    background: var(--surface);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

/* --- Menu mobile : recherche ------------------------------------------------ */

.mobile-nav .header-search {
    display: flex !important;
}

/* --- Fiches documents --------------------------------------------------------- */

.doc-cat-avis { --cat: #1d4f91; --cat-soft: #e8eef7; }
.doc-cat-conventions { --cat: #1f7a4d; --cat-soft: #e6f3ec; }
.doc-cat-rapports { --cat: #a35a00; --cat-soft: #fbefe0; }
.doc-cat-textes { --cat: #5b3f9e; --cat-soft: #efeaf8; }

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr));
    gap: 1rem;
}

.doc-card {
    position: relative;
    display: flex;
    gap: 1.25rem;
    align-items: stretch;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.doc-card:hover {
    border-color: var(--cat, var(--blue));
    box-shadow: 0 4px 14px rgba(15, 45, 92, 0.07);
}

/* Vignette « feuille de document » */
.doc-sheet-thumb {
    position: relative;
    flex-shrink: 0;
    width: 74px;
    height: 96px;
    background: var(--white);
    border: 1px solid var(--line-strong);
    border-top: 4px solid var(--cat, var(--blue));
    border-radius: 3px;
    padding: 0.5rem 0.55rem;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.doc-sheet-thumb::after {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 14px;
    height: 14px;
    background: var(--cat-soft, var(--blue-soft));
    border-left: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
}

.doc-sheet-type {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--danger);
}

.doc-sheet-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 0.45rem;
}

.doc-sheet-lines span {
    height: 3px;
    border-radius: 2px;
    background: var(--line);
}

.doc-sheet-lines span:nth-child(2) { width: 80%; }
.doc-sheet-lines span:nth-child(4) { width: 60%; }

.doc-sheet-year {
    margin-top: auto;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--cat, var(--navy));
}

.doc-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.doc-card-cat {
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cat, var(--blue));
    background: var(--cat-soft, var(--blue-soft));
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    margin-bottom: 0.45rem;
}

.doc-card-title {
    font-size: 1.02rem;
    line-height: 1.35;
    margin-bottom: 0.3rem;
}

.doc-card-title a {
    color: var(--navy);
    text-decoration: none;
}

.doc-card-title a::after {
    content: '';
    position: absolute;
    inset: 0;
}

.doc-card:hover .doc-card-title a {
    text-decoration: underline;
}

.doc-card-text {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 0.65rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doc-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    list-style: none;
    padding: 0;
    margin: auto 0 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.doc-card-meta i {
    margin-right: 0.35rem;
    color: var(--line-strong);
}

.doc-card-action {
    align-self: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--navy);
    position: relative;
    z-index: 1;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.doc-card:hover .doc-card-action {
    background: var(--cat, var(--navy));
    border-color: var(--cat, var(--navy));
    color: #fff;
}

@media (max-width: 575.98px) {
    .doc-card {
        gap: 1rem;
        padding: 1rem;
    }
    .doc-sheet-thumb {
        width: 56px;
        height: 74px;
    }
    .doc-card-action {
        display: none;
    }
}

/* Tuiles de catégories documentaires */
.cat-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 4px solid var(--cat);
    border-radius: var(--radius);
    padding: 1.35rem 1.35rem 1.15rem;
    color: var(--ink);
    text-decoration: none;
    transition: box-shadow 0.15s ease;
}

.cat-tile:hover {
    color: var(--ink);
    box-shadow: 0 4px 14px rgba(15, 45, 92, 0.08);
}

.cat-tile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.cat-tile-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    background: var(--cat-soft);
    color: var(--cat);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.cat-tile-count {
    text-align: right;
    line-height: 1;
}

.cat-tile-count strong {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--cat);
}

.cat-tile-count span {
    font-size: 0.75rem;
    color: var(--muted);
}

.cat-tile-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.35rem;
}

.cat-tile-text {
    flex: 1;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.cat-tile-more {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--cat);
}

.cat-tile:hover .cat-tile-more {
    text-decoration: underline;
}

.min-w-0 {
    min-width: 0;
}

/* L'en-tête mobile n'affiche que le logo et le bouton Menu */
@media (max-width: 991.98px) {
    .header-actions .header-cta,
    .header-actions .header-search {
        display: none;
    }
}

/* Images de remplacement : plus discrètes */
img[src$="Placeholders.svg"] {
    object-fit: contain !important;
    padding: 12%;
    background: var(--surface);
    opacity: 0.35;
}
