/* Personnel RH — calque de l'interface de fs.serpas.fr (facture-ocr, style wp-admin) :
   mêmes couleurs, mêmes mesures, mêmes composants, en une feuille courte. */
* { box-sizing: border-box; }
html { background: #f0f0f1; }
body {
  margin: 0; background: #f0f0f1; color: #3c434a; min-width: 600px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 13px; line-height: 1.4em; -webkit-font-smoothing: antialiased;
}
a { color: #2271b1; text-decoration: none; }
a:hover { color: #135e96; }
h1, h2, h3 { font-weight: 400; color: #1d2327; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Barre du haut ---------- */
#wpadminbar { position: fixed; top: 0; left: 0; right: 0; z-index: 99999; height: 32px; background: #1d2327; color: #f0f0f1; font-size: 13px; line-height: 32px; }
#wpadminbar .ab-items { display: flex; align-items: center; height: 32px; padding: 0 8px; }
#wpadminbar .ab-item { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; color: #f0f0f1; white-space: nowrap; background: none; border: 0; font: inherit; cursor: pointer; }
#wpadminbar a.ab-item:hover, #wpadminbar button.ab-item:hover { background: #2c3338; color: #72aee6; }
#wpadminbar .ab-right { margin-left: auto; display: flex; align-items: center; }
#wpadminbar svg { fill: #a7aaad; width: 16px; height: 16px; }
#wpadminbar .ab-item:hover svg { fill: #72aee6; }
#wpadminbar .avatar { width: 16px; height: 16px; border-radius: 50%; background: #8c8f94; display: inline-block; }
#wpadminbar form { margin: 0; }

/* Sélecteur de dossier (sans script : <details>) */
.selecteur { position: relative; margin-left: 8px; line-height: normal; }
.selecteur > summary { list-style: none; }
.selecteur > summary::-webkit-details-marker { display: none; }
.selecteur-bouton { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; cursor: pointer; background: #2c3338; border: 1px solid #50575e;
  border-radius: 3px; color: #f0f0f1; white-space: nowrap; max-width: 62vw; overflow: hidden; }
.selecteur-bouton:hover, .selecteur[open] .selecteur-bouton { border-color: #72aee6; }
.selecteur-bouton strong { color: #fff; overflow: hidden; text-overflow: ellipsis; }
.sel-etiquette { color: #72aee6; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.sel-discret { color: #a7aaad; }
.sel-alerte { color: #f86368; }
.sel-sep { width: 1px; height: 14px; background: #50575e; }
.sel-chevron { width: 10px !important; height: 10px !important; fill: none !important; color: #c3c4c7; flex: 0 0 10px; }
.selecteur-panneau { position: absolute; top: 30px; left: 0; width: 460px; max-height: 70vh; overflow-y: auto; background: #fff; color: #1d2327;
  border: 1px solid #c3c4c7; box-shadow: 0 3px 12px rgba(0,0,0,.25); padding: 10px 0 0; z-index: 100000; }
.selecteur-panneau input[type=search] { margin: 0 10px 8px; width: calc(100% - 20px); }
.sel-titre { padding: 0 12px 4px; color: #646970; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.sel-liste { list-style: none; margin: 0; padding: 0; }
.sel-liste li { padding: 8px 12px; border-top: 1px solid #f0f0f1; line-height: 1.5; }
.sel-liste li.courant { background: #f0f6fc; border-left: 3px solid #2271b1; padding-left: 9px; }
.sel-liste a { color: #1d2327; }
.sel-liste li > a:hover strong { color: #2271b1; }
.sel-liste .sel-discret { color: #646970; }
.sel-pied { display: flex; gap: 14px; align-items: center; padding: 8px 12px; border-top: 1px solid #c3c4c7; line-height: 1.5; }
.sel-pied .sel-discret { margin-left: auto; color: #646970; font-size: 12px; }

/* ---------- Menu latéral ---------- */
#adminmenuback, #adminmenu { position: fixed; top: 32px; bottom: 0; left: 0; width: 160px; background: #1d2327; }
#adminmenuback { z-index: 1; }
#adminmenu { margin: 0; padding: 0 0 60px; list-style: none; overflow-y: auto; z-index: 2; }
#adminmenu a { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px; color: #f0f0f1; font-size: 14px; line-height: 20px; }
#adminmenu > li > a:hover { background: #2c3338; color: #72aee6; }
#adminmenu > li > a:hover svg { fill: #72aee6; }
#adminmenu li.actif > a { background: #2271b1; color: #fff; font-weight: 600; box-shadow: inset 4px 0 0 0 #fff; }
#adminmenu li.actif > a svg { fill: #fff; }
#adminmenu svg { width: 20px; height: 20px; fill: #a7aaad; flex: 0 0 20px; }
#adminmenu .separateur { height: 5px; margin: 0 0 6px; border-top: 1px solid #3c434a; }
#adminmenu .section { padding: 10px 12px 4px; color: #a7aaad; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#adminmenu .section-dossier { color: #72aee6; }
#adminmenu .badge { margin-left: auto; background: #d63638; color: #fff; font-size: 11px; line-height: 17px; border-radius: 10px; padding: 0 7px; font-weight: 400; }
#adminmenu .sous a { padding: 6px 10px 6px 40px; font-size: 13px; color: #c3c4c7; }

/* ---------- Contenu ---------- */
#wpcontent { margin-left: 160px; padding: 32px 20px 0 20px; }
#wpbody-content { padding-bottom: 65px; }
.wrap { margin: 10px 0 0 2px; }
.wrap h1.wp-heading-inline { display: inline-block; font-size: 23px; font-weight: 400; padding: 9px 0 4px; margin: 0 8px 0 0; line-height: 1.3; }
.page-title-action { display: inline-block; vertical-align: 3px; font-size: 13px; line-height: 2.15384615; padding: 0 10px; border: 1px solid #2271b1;
  border-radius: 3px; background: #f6f7f7; color: #2271b1; cursor: pointer; }
.page-title-action:hover { background: #f0f0f1; border-color: #0a4b78; color: #0a4b78; }
hr.wp-header-end { visibility: hidden; margin: 6px 0 0; border: 0; }
.fil { margin: 4px 0 0; color: #646970; }
p.description, .description { color: #646970; }
#wpfooter { clear: both; margin-left: 160px; padding: 20px 20px 10px; color: #646970; border-top: 1px solid #dcdcde; }
#wpfooter p { margin: 0; }

/* ---------- Avis ---------- */
.notice { position: relative; background: #fff; border: 1px solid #c3c4c7; border-left-width: 4px; box-shadow: 0 1px 1px rgba(0,0,0,.04); margin: 5px 0 15px; padding: 1px 12px; }
.notice p { margin: .5em 0; padding: 2px; }
.notice .button { vertical-align: baseline; margin-left: 4px; }
.notice-success { border-left-color: #00a32b; }
.notice-error { border-left-color: #d63638; }
.notice-warning { border-left-color: #dba617; }
.notice-info { border-left-color: #72aee6; }

/* ---------- Encarts ---------- */
.postbox { background: #fff; border: 1px solid #c3c4c7; box-shadow: 0 1px 1px rgba(0,0,0,.04); margin-bottom: 16px; min-width: 0; }
.postbox-header { display: flex; align-items: center; border-bottom: 1px solid #c3c4c7; }
.postbox-header h2 { flex: 1; font-size: 14px; font-weight: 600; padding: 8px 12px; margin: 0; line-height: 1.4; }
.postbox-header .lien { padding: 0 12px; font-size: 13px; }
.inside { padding: 0 12px 12px; margin: 11px 0; }
.inside > p:first-child { margin-top: 0; }
.inside > .wp-list-table { margin-top: 0; }

/* Chiffres clés (comme le tableau de bord de fs) */
.kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 10px 0 12px; }
.kpi.kpi-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi .postbox { margin: 0; }
.kpi a.postbox { display: block; color: inherit; }
.kpi a.postbox:hover { border-color: #2271b1; }
.kpi .inside { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 10px 14px; }
.kpi .inside span { color: #646970; }
.kpi .inside strong { font-size: 24px; font-weight: 400; color: #1d2327; line-height: 1.3; }
.kpi .inside strong.rouge { color: #b32d2e; }
.kpi .inside strong.orange { color: #996800; }
.deux { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.trois { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 1100px) { .kpi.kpi-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .deux, .trois { grid-template-columns: 1fr; } }

/* ---------- Tableaux ---------- */
.wp-list-table { border-spacing: 0; width: 100%; clear: both; margin: 0; background: #fff; border: 1px solid #c3c4c7; box-shadow: 0 1px 1px rgba(0,0,0,.04); }
.wp-list-table.fixed { table-layout: fixed; }
.wp-list-table th, .wp-list-table td { padding: 8px 10px; text-align: left; vertical-align: top; line-height: 1.5; }
.wp-list-table thead th, .wp-list-table tfoot th { font-weight: 600; color: #2c3338; border-bottom: 1px solid #c3c4c7; }
.wp-list-table tfoot th { border-bottom: 0; border-top: 1px solid #c3c4c7; }
.wp-list-table.striped > tbody > tr:nth-child(odd) { background: #f6f7f7; }
.wp-list-table tbody tr:hover { background: #f0f6fc; }
.wp-list-table .column-nom { font-weight: 600; }
.wp-list-table .column-nom a { color: #2271b1; }
.wp-list-table .no-items td { color: #646970; font-style: italic; }
.wp-list-table td.num, .wp-list-table th.num, .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wp-list-table .attenue td { color: #8c8f94; }
.wp-list-table.compacte th, .wp-list-table.compacte td { padding: 5px 10px; }
.row-actions { color: #646970; font-size: 13px; font-weight: 400; padding: 2px 0 0; visibility: hidden; }
tr:hover .row-actions { visibility: visible; }
.row-actions span + span:before { content: " | "; color: #c3c4c7; }
@media (hover: none) { .row-actions { visibility: visible; } }

/* Tableau triable et cherchable sur place (public/js/app.js) */
.tableau-barre { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 30px; margin: 6px 0 6px; }
.tableau-barre .displaying-num { flex: 1 1 0; min-width: 0; font-style: italic; color: #646970; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tableau-barre input[type=search] { flex: 0 0 220px; width: 220px; min-height: 28px; }
.tableau-defilant { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid #c3c4c7; background: #fff; margin-bottom: 12px; }
.tableau-defilant .wp-list-table { border: 0; box-shadow: none; }
.tableau-defilant thead th { position: sticky; top: 0; z-index: 2; background: #fff; box-shadow: inset 0 -1px 0 #c3c4c7; height: 40px; white-space: nowrap; border-bottom: 0; }
.tableau-defilant tfoot th { position: sticky; bottom: 0; z-index: 1; background: #fff; box-shadow: inset 0 1px 0 #c3c4c7; border-top: 0; }
table.soigne td { height: 35px; padding-top: 8px; padding-bottom: 6px; vertical-align: top; }
table.soigne tbody tr.alt td { background: #f6f7f7; }
table.soigne tbody tr:not(.no-items):hover td { background: #f0f6fc; }
.colonne-triable { padding: 0 !important; }
.colonne-triable a { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 10px; height: 40px; color: #2c3338; overflow: hidden; }
.colonne-triable.n a { justify-content: flex-end; }
.colonne-triable a > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.colonne-triable .fleche { flex: 0 0 14px; width: 14px; text-align: center; }
.colonne-triable a:hover, .colonne-triable.trie a { color: #2271b1; }
.colonne-triable .fleche:after { content: "⇅"; color: #a7aaad; font-size: 11px; }
.colonne-triable.trie-asc .fleche:after { content: "▲"; color: #2271b1; font-size: 9px; }
.colonne-triable.trie-desc .fleche:after { content: "▼"; color: #2271b1; font-size: 9px; }

/* Filtres « Présents (17) | Sortis (38) » */
.subsubsub { list-style: none; margin: 8px 0 0; padding: 0; color: #646970; display: flex; flex-wrap: wrap; }
.subsubsub li + li:before { content: "|"; padding: 0 4px; color: #a7aaad; }
.subsubsub a.current { color: #000; font-weight: 600; }
.subsubsub .count { color: #50575e; font-weight: 400; }

/* Pastilles */
.pill { display: inline-block; padding: 1px 8px; border-radius: 9px; font-size: 12px; line-height: 1.6; white-space: nowrap; background: #f6f7f7; color: #50575e; border: 1px solid #dcdcde; }
.pill-actif { background: #edfaef; color: #00543a; border-color: #b8e6bf; }
.pill-inactif { background: #f6f7f7; color: #646970; border-color: #dcdcde; }
.pill-ok { background: #f0f6fc; color: #135e96; border-color: #72aee6; }
.pill-attention { background: #fcf9e8; color: #674e00; border-color: #f0e3a1; }
.pill-anomalie { background: #fcf0f1; color: #8a2424; border-color: #f0b8b8; }
a.pill:hover { border-color: #2271b1; }
.rouge, a.rouge { color: #b32d2e; }
.code { font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 12px; color: #50575e; }

/* Mois de paie (comme les exercices du sélecteur de fs) */
.puces { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.puces a { padding: 1px 8px; border: 1px solid #c3c4c7; border-radius: 3px; background: #fff; font-size: 12px; color: #2271b1; line-height: 1.8; }
.puces a.actif { background: #2271b1; border-color: #2271b1; color: #fff; }

/* Fiches (définitions) */
.champs { display: grid; grid-template-columns: 160px 1fr; gap: 7px 12px; margin: 0; }
.champs dt { color: #646970; }
.champs dd { margin: 0; color: #1d2327; }

/* ---------- Formulaires et boutons ---------- */
.form-table { border-collapse: collapse; margin-top: .5em; width: 100%; clear: both; }
.form-table th { vertical-align: top; text-align: left; padding: 20px 10px 20px 0; width: 220px; font-weight: 600; line-height: 1.3; color: #1d2327; }
.form-table td { padding: 15px 10px; line-height: 1.3; vertical-align: middle; }
.form-table td p.description { font-size: 13px; font-style: italic; margin: 6px 0 0; }
.form-table tr.titre-section td { padding: 18px 0 0; }
.form-table tr.titre-section h2 { font-size: 15px; font-weight: 600; margin: 0; padding-bottom: 6px; border-bottom: 1px solid #dcdcde; }
input[type=text], input[type=password], input[type=search], input[type=email], select, textarea {
  border: 1px solid #8c8f94; border-radius: 4px; background: #fff; color: #2c3338; font: inherit; font-size: 14px; line-height: 2; min-height: 30px; padding: 0 8px; }
input[type=file] { font: inherit; }
input:focus, select:focus, textarea:focus { border-color: #2271b1; box-shadow: 0 0 0 1px #2271b1; outline: 2px solid transparent; }
.regular-text { width: 25em; max-width: 100%; }
.button, .button-primary { display: inline-block; font: inherit; font-size: 13px; line-height: 2.15384615; min-height: 30px; margin: 0; padding: 0 10px; cursor: pointer;
  border-radius: 3px; white-space: nowrap; border: 1px solid #2271b1; background: #f6f7f7; color: #2271b1; vertical-align: top; }
.button:hover { background: #f0f0f1; border-color: #0a4b78; color: #0a4b78; }
.button-primary { background: #2271b1; color: #fff; }
.button-primary:hover { background: #135e96; border-color: #135e96; color: #fff; }
.button-small { font-size: 12px; line-height: 2.18; min-height: 26px; padding: 0 8px; }
.button-link, .button-link-delete { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; color: #2271b1; }
.button-link-delete { color: #b32d2e; }
.button-link-delete:hover { text-decoration: underline; }
.submit { padding: 1.5em 0; margin: 5px 0; }
.mot-de-passe { font-family: ui-monospace, Consolas, monospace; font-size: 15px; background: #f6f7f7; padding: 2px 8px; border: 1px dashed #8c8f94; }

/* ---------- Connexion (comme wp-login) ---------- */
body.login { display: flex; justify-content: center; background: #f0f0f1; }
#login { width: 320px; padding: 8% 0 0; }
#login h1 { text-align: center; font-size: 20px; font-weight: 600; margin: 0 0 24px; color: #1d2327; }
#login h1 small { display: block; font-size: 13px; font-weight: 400; color: #646970; margin-top: 6px; }
#loginform { background: #fff; border: 1px solid #c3c4c7; box-shadow: 0 1px 3px rgba(0,0,0,.04); padding: 26px 24px; }
#loginform label { display: block; margin-bottom: 3px; font-size: 14px; }
#loginform input[type=text], #loginform input[type=password] { width: 100%; font-size: 24px; line-height: 1.33; padding: 3px 5px; margin: 0 0 16px; min-height: 40px; }
#loginform .submit { padding: 0; margin: 0; text-align: right; }
#loginform .button-primary { min-height: 32px; line-height: 2.30769231; padding: 0 12px; }
#login .notice { margin-bottom: 16px; }

@media (max-width: 960px) {
  #adminmenuback, #adminmenu { width: 36px; }
  #adminmenu .libelle, #adminmenu .section, #adminmenu .badge { display: none; }
  #wpcontent, #wpfooter { margin-left: 36px; }
  .selecteur-bouton .sel-discret, .selecteur-bouton .sel-sep, .selecteur-bouton .sel-paie { display: none; }
}

/* Largeurs des colonnes (tableaux en disposition fixe) */
.wp-list-table .col-nom { width: 24%; }
.wp-list-table .col-dossier { width: 24%; }
.wp-list-table .col-mat { width: 96px; }
/* Tableaux soignés : actions de ligne à droite du nom, sur la même ligne (lignes de 35 px comme dans fs) */
table.soigne td { vertical-align: middle; padding-top: 4px; padding-bottom: 4px; }
table.soigne .row-actions { display: inline; padding: 0 0 0 8px; font-size: 12px; }
table.soigne td.periode { white-space: nowrap; }
.wp-list-table .col-emploi { width: 20%; }
.wp-list-table .col-nom { width: 22%; }
