/* =============================================================================
 * MASSACRES.CD — En-tête gouvernemental commun (toutes les pages publiques)
 * Bandeau « Ministère des Droits Humains », navigation, menu mobile, lien
 * d'évitement. Autonome : n'utilise aucune variable des feuilles de page.
 * ============================================================================= */

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 2000;
    background: #0a1628;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 0 0 6px 6px;
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus { top: 0; outline: 3px solid #c9a227; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.flag-strip { height: 4px; background: linear-gradient(90deg, #007FFF 0 33%, #F7D618 33% 50%, #CE1126 50% 100%); }

.gov-banner {
    position: relative;
    z-index: 1000;
    background: #0a1628;
    color: #fff;
    border-bottom: 3px solid #c9a227;
    font-family: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
    line-height: 1.4;
}

.gov-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.625rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.gov-banner-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
    min-width: 0;
    border-radius: 6px;
}
.gov-banner-identity:hover { color: #fff; }

.gov-banner-emblem {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(201, 162, 39, .6);
}

.gov-banner-text { display: flex; flex-direction: column; min-width: 0; }
.gov-banner-country { font-size: 0.7rem; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: #e2e8f0; }
.gov-banner-ministry { font-size: 0.95rem; font-weight: 700; }
.gov-banner-platform { font-size: 0.75rem; color: #cbd5e0; }

.gov-nav { display: flex; align-items: center; gap: 0.25rem; }
.gov-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.8rem;
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}
.gov-nav a:hover,
.gov-nav a.active,
.gov-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .12); }
.gov-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 #c9a227; }
/* neutralise les styles .gov-nav de app.css (partagé avec admin/) sur la page de connexion */
.gov-banner .gov-nav a { border: 0; white-space: normal; }
.gov-nav a.gov-nav-cta { background: #c53030; color: #fff; font-weight: 600; margin-left: 0.25rem; }
.gov-nav a.gov-nav-cta:hover { background: #9b2c2c; }

.gov-banner a:focus-visible,
.gov-menu-toggle:focus-visible { outline: 3px solid #c9a227; outline-offset: 2px; }

.gov-menu-toggle { display: none; }

/* Menu mobile : actif seulement si le JS est présent (sinon la nav reste visible) */
@media (max-width: 1080px) {
    .js .gov-menu-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        min-height: 44px;
        min-width: 44px;
        padding: 0 0.875rem;
        border: 1px solid rgba(255, 255, 255, .3);
        border-radius: 6px;
        background: transparent;
        color: #fff;
        font: 600 0.9rem/1 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
        cursor: pointer;
        flex-shrink: 0;
    }
    .gov-menu-icon,
    .gov-menu-icon::before,
    .gov-menu-icon::after {
        display: block;
        width: 18px;
        height: 2px;
        background: currentColor;
        border-radius: 1px;
        transition: transform .2s ease, background-color .2s ease;
    }
    .gov-menu-icon { position: relative; }
    .gov-menu-icon::before,
    .gov-menu-icon::after { content: ''; position: absolute; left: 0; }
    .gov-menu-icon::before { top: -6px; }
    .gov-menu-icon::after { top: 6px; }
    .gov-menu-toggle[aria-expanded="true"] .gov-menu-icon { background: transparent; }
    .gov-menu-toggle[aria-expanded="true"] .gov-menu-icon::before { transform: translateY(6px) rotate(45deg); }
    .gov-menu-toggle[aria-expanded="true"] .gov-menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

    .js .gov-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 1rem 1rem;
        background: #0a1628;
        border-bottom: 3px solid #c9a227;
        box-shadow: 0 12px 24px rgba(0, 0, 0, .25);
    }
    .js .gov-nav.is-open { display: flex; }
    .js .gov-nav a { min-height: 48px; padding: 0 1rem; font-size: 1rem; border-bottom: 1px solid rgba(255, 255, 255, .08); }
    .js .gov-nav a.gov-nav-cta { margin: 0.75rem 0 0; justify-content: center; border-bottom: 0; }

    /* Sans JS : la navigation passe à la ligne */
    html:not(.js) .gov-banner-inner { flex-wrap: wrap; }
    html:not(.js) .gov-nav { flex-wrap: wrap; }
}

@media (max-width: 420px) {
    .gov-banner-inner { padding: 0.5rem 1rem; gap: 0.5rem; }
    .gov-banner-emblem { width: 40px; height: 40px; }
    .gov-banner-country { font-size: 0.62rem; letter-spacing: 0.6px; }
    .gov-banner-ministry { font-size: 0.85rem; }
    /* masqué visuellement mais lu par les lecteurs d'écran (nom accessible du bouton) */
    .gov-menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@media (max-width: 360px) {
    .gov-banner-platform { display: none; }
}

/* =============================================================================
 * Pied de page institutionnel commun (même rendu que l'accueil)
 * ============================================================================= */
.site-footer {
    position: relative;
    background: #0a1628;
    color: #fff;
    padding: 3.5rem 0 0;
    margin-top: 4rem;
    font-family: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    text-align: left;
}
/* rappel du drapeau, comme dans le bandeau du haut */
.site-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #007FFF 0 33%, #F7D618 33% 50%, #CE1126 50% 100%); }
.site-footer h3, .site-footer h4, .site-footer p, .site-footer ul { margin: 0; padding: 0; }
.site-footer .container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.site-footer a:focus-visible { outline: 3px solid #c9a227; outline-offset: 2px; }

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; padding-bottom: 2.5rem; }
.footer-logo { display: block; width: auto; height: 72px; max-width: 100%; margin-bottom: 1.25rem; }
.footer-brand h3 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.5rem; font-weight: 600; margin-bottom: 0.75rem; color: #fff; }
.footer-brand p { font-size: 0.875rem; color: #cbd5e0; line-height: 1.7; max-width: 400px; }
.footer-brand p + p { margin-top: 0.75rem; }

/* Titres de colonne : dorés, distincts des liens */
.footer-links h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #c9a227;
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(201,162,39,.35);
}
.footer-links ul { list-style: none; display: flex; flex-direction: column; }
.footer-links a {
    display: inline-flex;
    align-items: flex-start;   /* chevron aligné sur la 1re ligne si le libellé passe à la ligne */
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.625rem 0;
    line-height: 1.45;
    font-size: 0.9375rem;
    color: #e2e8f0;
    text-decoration: none;
    transition: color .25s ease;
}
.footer-links a::before { content: '›'; color: #c9a227; font-weight: 700; transition: transform .25s ease; }
.footer-links a:hover { color: #fff; text-decoration: underline; text-decoration-color: #c9a227; text-underline-offset: 4px; }
.footer-links a:hover::before { transform: translateX(3px); }

.footer-bottom-band { background: #070f1c; }
.footer-bottom { padding: 1.25rem 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem 2rem; }
.footer-copyright { font-size: 0.75rem; color: #cbd5e0; }
.footer-powered { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; font-size: 0.75rem; color: #cbd5e0; }
.footer-powered-badge { display: inline-flex; align-items: center; background: rgba(201,162,39,.12); border: 1px solid rgba(201,162,39,.45); color: #c9a227; padding: 0.25rem 0.75rem; border-radius: 4px; font-weight: 700; letter-spacing: 0.5px; }
.footer-top { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 44px; padding: 0 1rem; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; color: #fff; font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.footer-top:hover { color: #0a1628; background: #c9a227; border-color: #c9a227; }

@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    .footer-grid { gap: 2rem 1.5rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-powered { justify-content: center; }
}
@media print {
    .site-footer { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    .gov-nav a, .gov-menu-icon, .gov-menu-icon::before, .gov-menu-icon::after { transition: none; }
}

@media print {
    .gov-nav, .gov-menu-toggle, .skip-link { display: none !important; }
    .gov-banner { background: #fff; color: #000; }
}
