/* Documents RH : liste des fichiers produits (Word, aperçu PDF, PDF définitif). */

/* Liste de fichiers produits (Word, apercu PDF, PDF definitif). */

.file-links {
    display: flex;
    align-items: center;
    gap: var(--rh-space-2);
    flex-wrap: wrap;
}

.file-link {
    display: inline-flex;
    align-items: center;
    gap: var(--rh-space-1);
    padding: 2px var(--rh-space-2);
    border: 1px solid var(--rh-line);
    border-radius: var(--rh-radius-sm);
    background: var(--rh-surface-muted);
    color: var(--rh-ink-soft);
    font-size: 0.78rem;
    font-weight: 620;
    text-decoration: none;
}

.file-link:hover {
    border-color: var(--rh-primary-line);
    background: var(--rh-primary-soft);
    color: var(--rh-primary);
}

.hr-document-nav {
    position: sticky;
    top: var(--rh-space-2);
    z-index: 8;
    display: flex;
    width: fit-content;
    max-width: 100%;
    gap: 2px;
    margin: 0 auto var(--rh-space-4);
    padding: 3px;
    overflow-x: auto;
    border: 1px solid var(--rh-line);
    border-radius: var(--rh-radius-pill);
    background: color-mix(in srgb, var(--rh-surface) 94%, transparent);
    box-shadow: var(--rh-shadow-sm);
}

.hr-document-nav a {
    padding: .42rem .78rem;
    border-radius: var(--rh-radius-pill);
    color: var(--rh-ink-soft);
    font-size: .76rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.hr-document-nav a:hover,
.hr-document-nav a:focus-visible { background: var(--rh-primary-soft); color: var(--rh-primary); }

.hr-compact-table tbody td {
    height: 48px;
    padding: .42rem .65rem;
    line-height: 1.2;
}

.hr-compact-table .cell-stack { gap: 1px; }
.hr-document-actions { flex-wrap: nowrap; justify-content: flex-end; }
.hr-document-actions form { margin: 0; }
.hr-actions-menu { position: relative; }
.hr-actions-menu > summary { list-style: none; white-space: nowrap; }
.hr-actions-menu > summary::-webkit-details-marker { display: none; }
.hr-actions-popover {
    position: absolute;
    z-index: 20;
    top: calc(100% + 5px);
    right: 0;
    display: grid;
    gap: var(--rh-space-2);
    width: 220px;
    padding: var(--rh-space-2);
    border: 1px solid var(--rh-line);
    border-radius: var(--rh-radius-md);
    background: var(--rh-surface);
    box-shadow: var(--rh-shadow-md);
}
.hr-actions-popover .button { width: 100%; justify-content: flex-start; }

/* Modèles Word versionnés — visuel validé sur maquette (retour MOA du
   03/11/2026) : filtres en tête, colonnes épurées, empreinte technique
   retirée, hiérarchie nom > attributs, une seule version « en cours »
   par famille par défaut. */
.template-filters {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: var(--rh-space-2);
    padding: var(--rh-space-2) var(--rh-space-4);
    border-bottom: 1px solid var(--rh-line);
    background: color-mix(in srgb, var(--rh-surface-muted) 30%, var(--rh-surface));
}

.template-filter-field { display: grid; gap: 2px; }

.template-filter-field label {
    color: var(--rh-muted);
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.template-filter-field select {
    min-height: 30px;
    padding: 2px 8px;
    border: 1px solid var(--rh-line);
    border-radius: 7px;
    background: var(--rh-surface);
    color: var(--rh-ink);
    font: inherit;
    font-size: .78rem;
}

.template-filters > .button { min-height: 30px; }

.template-counter {
    margin: 0 0 0 auto;
    color: var(--rh-muted);
    font-size: .72rem;
}

.template-counter b { color: var(--rh-ink-soft); }

.hr-template-table { table-layout: fixed; }

.hr-template-table tbody td {
    padding: .5rem .7rem;
    vertical-align: middle;
    text-align: left;
}

.hr-template-table tbody tr+tr td { border-top: 1px solid var(--rh-line); }

.hr-template-table thead th {
    height: 36px;
    font-size: .62rem;
    font-weight: 700;
    color: var(--rh-ink-soft);
    border-bottom: 1px solid var(--rh-line-strong);
    background: color-mix(in srgb, var(--rh-primary-soft) 40%, var(--rh-surface));
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* Alternance discrète puis survol : les pseudo-classes l'emportent sur la
   thrace textuelle de la famille (badge badge-plain). */
.hr-template-table tbody tr:nth-child(even) td {
    background: color-mix(in srgb, var(--rh-surface-muted) 40%, var(--rh-surface));
}

.hr-template-table tbody tr:hover td {
    background: color-mix(in srgb, var(--rh-primary-soft) 26%, var(--rh-surface));
}

.hr-template-table .template-col-version { width: 84px; }
.hr-template-table .template-col-kind { width: 96px; }
.hr-template-table .template-col-state { width: 110px; }
.hr-template-table .template-col-date { width: 138px; }
.hr-template-table .template-col-actions { width: 250px; }

.template-model-name { display: block; color: var(--rh-ink); font-weight: 750; }
.template-model-file {
    display: block;
    margin-top: 1px;
    color: var(--rh-muted);
    font-size: .66rem;
}

.template-version {
    display: inline-block;
    min-width: 34px;
    padding: 1px 8px;
    border-radius: var(--rh-radius-pill);
    background: var(--rh-primary-soft);
    color: var(--rh-primary);
    font-size: .7rem;
    font-weight: 750;
    text-align: center;
}

.template-state {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid var(--rh-line);
    border-radius: var(--rh-radius-pill);
    background: var(--rh-surface-muted);
    color: var(--rh-muted);
    font-size: .66rem;
    font-weight: 700;
    white-space: nowrap;
}

.template-state.is-validated {
    border-color: var(--rh-success-line);
    background: var(--rh-success-soft);
    color: var(--rh-success);
}

.template-state.is-draft {
    border-color: var(--rh-warning-line);
    background: var(--rh-warning-soft);
    color: var(--rh-warning);
}

.template-date { color: var(--rh-muted); font-size: .7rem; }
.template-date b { color: var(--rh-ink-soft); font-weight: 650; }
