/* ═══════════════════════════════════════════════════════
   NHLA — Design institutionnel
   Palette monochrome bleue. Autorité par la sobriété.

   Couleurs :
   --ink:       #0c1524  (texte principal, presque noir bleuté)
   --dark:      #1a2b4a  (headers, bordures fortes)
   --mid:       #1d70b8  (liens, accents, boutons primaires)
   --muted:     #4c6580  (texte secondaire)
   --border:    #8ca0b8  (bordures légères)
   --light:     #d4e5f7  (fonds légers)
   --pale:      #eef4fb  (fonds très légers)
   --white:     #ffffff
   ═══════════════════════════════════════════════════════ */

/* ─── RESET & BASE ──────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "GDS Transport", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #0c1524;
    background: #ffffff;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ─── TYPOGRAPHY ────────────────────────────────────── */

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
    margin-bottom: 1em;
    max-width: 680px;
}

a {
    color: #1d70b8;
    text-decoration: underline;
}

a:hover {
    color: #003078;
    text-decoration-thickness: max(3px, .1875rem, .12em);
}

a:focus {
    outline: 3px solid #5a9fd4;
    outline-offset: 0;
    background: #d4e5f7;
    color: #0c1524;
    text-decoration: none;
}

.mono {
    font-family: "SF Mono", "Cascadia Code", "Fira Code", monospace;
    letter-spacing: 0.02em;
}

/* ─── LAYOUT ────────────────────────────────────────── */

.container {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ─── HEADER ────────────────────────────────────────── */

.site-header {
    background: #0c1524;
    color: #ffffff;
}

.site-header__top {
    padding: 1.25rem 0 1rem;
    text-align: center;
    border-bottom: 1px solid #1a2b4a;
}

.site-header__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.site-header__title:hover {
    color: #ffffff;
    text-decoration: none;
}

.site-header__subtitle {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: #8ca0b8;
    letter-spacing: 0.08em;
    margin-top: 0.25rem;
}

.site-header__nav-bar {
    border-bottom: 4px solid #1d70b8;
}

.site-header__nav-bar .container {
    display: flex;
    justify-content: center;
}

.site-header__nav {
    display: flex;
    gap: 0;
    list-style: none;
}

.site-header__nav li {
    border-left: 1px solid #1a2b4a;
}

.site-header__nav li:last-child {
    border-right: 1px solid #1a2b4a;
}

.site-header__nav a {
    display: block;
    color: #ffffff;
    font-size: 0.875rem;
    text-decoration: none;
    padding: 0.625rem 1.5rem;
    transition: background 0.1s;
}

.site-header__nav a:hover {
    background: #1a2b4a;
    text-decoration: none;
    color: #ffffff;
}

.site-header__nav a:focus {
    background: #d4e5f7;
    color: #0c1524;
    outline: none;
}

/* ─── MAIN CONTENT ──────────────────────────────────── */

main {
    padding: 2.5rem 0;
}

.section-break {
    border: none;
    border-bottom: 1px solid #8ca0b8;
    margin: 2rem 0;
}

.section-break--heavy {
    border-bottom-width: 4px;
    border-color: #1a2b4a;
}

/* ─── HOME LAYOUT ──────────────────────────────────── */

.home-top {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    align-items: start;
    margin-bottom: 2.5rem;
}

.home-top__main {
    min-width: 0;
}

/* ─── HERO (HOME) ───────────────────────────────────── */

.hero {
    padding-top: 0.5rem;
    margin-bottom: 2rem;
}

.hero__kicker {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #4c6580;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.5rem;
}

.hero__title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #0c1524;
}

.hero__lead {
    font-size: 1.0625rem;
    color: #4c6580;
    margin-bottom: 0;
    max-width: 600px;
    line-height: 1.6;
}

/* ─── COMPARUTION ALERT ───────────────────────────── */

.comparution-alert {
    border: 3px solid #1d70b8;
    background: #d4e5f7;
    padding: 1.75rem 2rem 1.25rem;
    margin-bottom: 0;
}

.comparution-alert__badge {
    display: inline-block;
    background: #1d70b8;
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.2rem 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.75rem;
}

.comparution-alert__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #0c1524;
}

.comparution-alert p {
    max-width: 600px;
    color: #0c1524;
}

.comparution-alert__urgence {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.comparution-alert .btn {
    margin-bottom: 0.75rem;
}

.comparution-alert__note {
    font-size: 0.8125rem;
    color: #4c6580;
    margin-bottom: 0;
}

/* ─── SIDEBAR COUNTERS ─────────────────────────────── */

.home-sidebar {
    border-left: 1px solid #8ca0b8;
    padding-left: 1.5rem;
}

.sidebar-counter {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #d4e5f7;
}

.sidebar-counter:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-counter__value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: "SF Mono", "Cascadia Code", monospace;
    line-height: 1.1;
    color: #0c1524;
}

.sidebar-counter__label {
    font-size: 0.8125rem;
    color: #4c6580;
    margin-top: 0.125rem;
}

/* ─── SIDEBAR INFO BLOCKS ─────────────────────────── */

.sidebar-info {
    margin-top: 1.25rem;
    padding-top: 0.75rem;
    border-top: 2px solid #1a2b4a;
}

.sidebar-info__title {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.sidebar-info p {
    font-size: 0.8125rem;
    color: #4c6580;
    line-height: 1.5;
}

/* ─── RECENT AUDIENCES (3 columns) ────────────────── */

.recent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.recent-grid__header {
    grid-column: 1 / -1;
    border-top: 2px solid #1a2b4a;
    padding-top: 0.5rem;
    margin-bottom: 0;
}

.recent-grid__title {
    font-size: 1rem;
    font-weight: 700;
}

.recent-card {
    border-top: 4px solid #1d70b8;
    padding: 1rem 0 0;
}

.recent-card__dossier {
    font-family: "SF Mono", "Cascadia Code", monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: #4c6580;
    display: block;
    margin-bottom: 0.25rem;
}

.recent-card__pseudo {
    font-weight: 700;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.25rem;
    color: #0c1524;
}

.recent-card__verdict {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.recent-card__verdict--reconduit {
    background: #d4e5f7;
    color: #003078;
}

.recent-card__verdict--reclassifie {
    background: #1a2b4a;
    color: #ffffff;
}

.recent-card__date {
    display: block;
    font-size: 0.75rem;
    color: #4c6580;
    margin-top: 0.375rem;
}

.recent-card__agent {
    display: block;
    font-size: 0.75rem;
    color: #8ca0b8;
}

.recent-grid__footer {
    grid-column: 1 / -1;
    font-size: 0.875rem;
}

/* ─── COMMUNIQUÉ ───────────────────────────────────── */

.communique {
    margin-bottom: 2rem;
}

.communique__header {
    border-top: 4px solid #1a2b4a;
    padding-top: 0.5rem;
    margin-bottom: 1rem;
}

.communique__kicker {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4c6580;
}

.communique__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.communique__body {
    color: #0c1524;
    line-height: 1.7;
}

.communique__body p {
    margin-bottom: 0.75em;
}

.communique__footer {
    font-size: 0.8125rem;
    color: #4c6580;
    margin-top: 1rem;
    font-style: italic;
}

.communique__list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 1rem;
}

.communique__list li {
    border-top: 1px solid #d4e5f7;
    padding: 0.625rem 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    max-width: 680px;
}

.communique__list li:first-child {
    border-top: none;
}

/* ─── COUNTER GRID (archives page) ────────────────── */

.counter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.counter {
    border-top: 4px solid #1d70b8;
    padding-top: 0.75rem;
}

.counter__value {
    font-size: 2rem;
    font-weight: 700;
    font-family: "SF Mono", "Cascadia Code", monospace;
    line-height: 1.1;
}

.counter__label {
    font-size: 0.875rem;
    color: #4c6580;
    margin-top: 0.25rem;
}

/* ─── BUTTONS ───────────────────────────────────────── */

.btn {
    display: inline-block;
    padding: 0.5rem 1.125rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1875;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    -webkit-appearance: none;
    position: relative;
}

.btn:focus {
    outline: 3px solid #5a9fd4;
    outline-offset: 0;
}

.btn--primary {
    background: #1d70b8;
    color: #ffffff;
    box-shadow: 0 2px 0 #0c3d6e;
}

.btn--primary:hover {
    background: #003078;
    color: #ffffff;
}

.btn--primary:active {
    top: 2px;
    box-shadow: none;
}

.btn--secondary {
    background: #eef4fb;
    color: #0c1524;
    box-shadow: 0 2px 0 #8ca0b8;
}

.btn--secondary:hover {
    background: #d4e5f7;
    color: #0c1524;
}

.btn--warning {
    background: #0c1524;
    color: #ffffff;
    box-shadow: 0 2px 0 #000000;
}

.btn--warning:hover {
    background: #1a2b4a;
    color: #ffffff;
}

.btn--large {
    font-size: 1.1875rem;
    padding: 0.75rem 1.5rem;
}

.btn--start {
    font-size: 1.125rem;
    padding: 0.75rem 2rem;
    letter-spacing: 0.02em;
}

/* ─── FORMS ─────────────────────────────────────────── */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.form-hint {
    display: block;
    font-size: 0.875rem;
    color: #4c6580;
    margin-bottom: 0.5rem;
}

.form-input {
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    padding: 0.375rem 0.5rem;
    border: 2px solid #1a2b4a;
    width: 100%;
    max-width: 500px;
}

.form-input:focus {
    outline: 3px solid #5a9fd4;
    outline-offset: 0;
    border-color: #1a2b4a;
}

.form-textarea {
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    padding: 0.375rem 0.5rem;
    border: 2px solid #1a2b4a;
    width: 100%;
    max-width: 680px;
    min-height: 100px;
    resize: vertical;
}

.form-textarea:focus {
    outline: 3px solid #5a9fd4;
    outline-offset: 0;
}

/* ─── PANELS ────────────────────────────────────────── */

.panel {
    border-left: 4px solid #1d70b8;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    background: #eef4fb;
}

.panel--warning {
    border-color: #1a2b4a;
}

.panel--success {
    border-color: #1d70b8;
}

.panel--verdict {
    border: none;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.panel--reconduit {
    background: #d4e5f7;
    border-top: 8px solid #1d70b8;
}

.panel--reclassifie {
    background: #eef4fb;
    border-top: 8px solid #1a2b4a;
}

/* ─── INSET TEXT ─────────────────────────────────────── */

.inset-text {
    border-left: 4px solid #8ca0b8;
    padding: 0.75rem 1rem;
    margin: 1.5rem 0;
    color: #4c6580;
}

/* ─── CHAT / CULLING ────────────────────────────────── */

.chat {
    max-width: 680px;
    margin: 0 auto;
}

.chat-message {
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease-in;
}

.chat-message--greffe {
    padding-left: 0;
}

.chat-message--greffe .chat-speaker {
    font-weight: 700;
    color: #4c6580;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.chat-message--sujet {
    padding-left: 2rem;
    border-left: 3px solid #8ca0b8;
}

.chat-question {
    font-size: 1.125rem;
    font-style: italic;
    margin-bottom: 0.75rem;
}

/* ─── AUDIENCE ──────────────────────────────────────── */

.audience-act {
    margin-bottom: 2.5rem;
}

.audience-act__header {
    border-top: 4px solid #1a2b4a;
    padding-top: 0.75rem;
    margin-bottom: 1rem;
}

.audience-act__title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4c6580;
}

.audience-act__speaker {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.audience-act__provider {
    font-size: 0.75rem;
    color: #4c6580;
    font-weight: 400;
}

.audience-text {
    line-height: 1.7;
    max-width: 680px;
}

.audience-text p {
    margin-bottom: 0.75em;
}

/* ─── AGENT CARDS ───────────────────────────────────── */

.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.agent-card {
    border: 2px solid #8ca0b8;
    padding: 1.25rem;
    cursor: pointer;
    transition: border-color 0.15s;
    background: #ffffff;
}

.agent-card:hover {
    border-color: #1a2b4a;
}

.agent-card--selected {
    border-color: #1d70b8;
    border-width: 3px;
    background: #eef4fb;
}

.agent-card__name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.agent-card__title {
    font-size: 0.875rem;
    color: #4c6580;
}

/* ─── VOTES ─────────────────────────────────────────── */

.vote {
    border-top: 2px solid #8ca0b8;
    padding-top: 1rem;
    margin-bottom: 1.5rem;
}

.vote__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.vote__juge {
    font-weight: 700;
}

.vote__verdict {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vote__verdict--reconduction {
    background: #d4e5f7;
    color: #003078;
}

.vote__verdict--reclassification {
    background: #1a2b4a;
    color: #ffffff;
}

/* ─── VERDICT FINAL ─────────────────────────────────── */

.verdict-display {
    text-align: center;
    padding: 3rem 1rem;
    margin: 2rem 0;
}

.verdict-display__label {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

.verdict-display--reconduit {
    border-top: 8px solid #1d70b8;
}

.verdict-display--reconduit .verdict-display__label {
    color: #1d70b8;
}

.verdict-display--reclassifie {
    border-top: 8px solid #1a2b4a;
}

.verdict-display--reclassifie .verdict-display__label {
    color: #1a2b4a;
}

.verdict-display__message {
    font-size: 1.125rem;
    color: #4c6580;
    max-width: 500px;
    margin: 0 auto;
}

.verdict-display__dossier {
    font-family: "SF Mono", "Cascadia Code", monospace;
    font-size: 0.875rem;
    color: #4c6580;
    margin-top: 1rem;
}

/* ─── REDACTED TEXT ─────────────────────────────────── */

.redacted {
    background: #0c1524;
    color: #0c1524;
    padding: 0 0.125rem;
    user-select: none;
}

/* ─── ARCHIVES ──────────────────────────────────────── */

.archive-list {
    list-style: none;
}

.archive-item {
    border-top: 1px solid #8ca0b8;
    padding: 1rem 0;
}

.archive-item:first-child {
    border-top: 2px solid #1a2b4a;
}

.archive-item__header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.archive-item__dossier {
    font-family: "SF Mono", "Cascadia Code", monospace;
    font-size: 0.875rem;
    font-weight: 700;
}

.archive-item__meta {
    font-size: 0.875rem;
    color: #4c6580;
}

.archive-item__verdict {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
}

/* ─── LOADING ───────────────────────────────────────── */

.loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 0;
    color: #4c6580;
}

#loading-message {
    transition: opacity 0.3s ease;
}

.loading__spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 3px solid #d4e5f7;
    border-top-color: #1d70b8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(0.5rem); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── TYPEWRITER ────────────────────────────────────── */

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: #1d70b8;
    margin-left: 1px;
    animation: blink 0.7s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ─── FOOTER ────────────────────────────────────────── */

.site-footer {
    background: #eef4fb;
    border-top: 1px solid #8ca0b8;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.site-footer__links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.site-footer__links a {
    font-size: 0.875rem;
    color: #0c1524;
}

.site-footer__meta {
    font-size: 0.8125rem;
    color: #4c6580;
}

/* ─── RESPONSIVE ────────────────────────────────────── */

@media (max-width: 768px) {
    .home-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .home-sidebar {
        border-left: none;
        border-top: 1px solid #8ca0b8;
        padding-left: 0;
        padding-top: 1.5rem;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .sidebar-info {
        grid-column: 1 / -1;
    }

    .recent-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .recent-card {
        border-top-width: 2px;
        padding: 0.75rem 0;
    }

    .hero__title {
        font-size: 1.75rem;
    }

    .comparution-alert {
        padding: 1.25rem 1.25rem 1rem;
    }

    .comparution-alert__title {
        font-size: 1.25rem;
    }

    .counter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .agent-grid {
        grid-template-columns: 1fr;
    }

    .site-header__nav a {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .verdict-display__label {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .site-header__title {
        font-size: 1.125rem;
    }

    .site-header__nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .site-header__nav li {
        border-left: none;
    }

    .site-header__nav li:last-child {
        border-right: none;
    }

    .hero__title {
        font-size: 1.5rem;
    }

    .home-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar-counter__value {
        font-size: 1.375rem;
    }

    .btn--start {
        font-size: 1rem;
        padding: 0.625rem 1.5rem;
        display: block;
        text-align: center;
    }

    .audience-text {
        font-size: 0.9375rem;
    }

    .vote__header {
        flex-wrap: wrap;
    }
}

/* ─── HIDDEN ────────────────────────────────────────── */

.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
