/* ===== Écrans Pilotage & Administration : statistiques, journal, utilisateurs, alertes ===== */

/* --- Petits utilitaires --- */
.gris { color: var(--texte-3); }
.gris2 { color: var(--texte-2); }
.gris3 { color: #A1A1AA; }
.rouge { color: #B42318; }
.petit { font-size: 12px; }
.petit13 { font-size: 13px; }
.normal { font-weight: 400; }
.c { text-align: center !important; }
.centre-v { align-items: center; }
.st-n::before { background: #A1A1AA; }
.st-n { color: var(--texte-3); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lien-btn { font: inherit; font-size: 13px; padding: 0; border: none; background: none; color: var(--vert); cursor: pointer; }
.lien-btn:hover { color: var(--vert-encre); text-decoration: underline; }
.lien-btn.rouge { color: #B42318; }
.lien-btn:disabled { color: #C4C4C8; cursor: not-allowed; text-decoration: none; }
.lien-gris { font-size: 13px; color: var(--texte-3); text-decoration: none; }
.lien-gris:hover { color: var(--texte); }
.coche { width: 17px; height: 17px; accent-color: var(--vert); cursor: pointer; }
.coche:disabled { cursor: default; }
.seg-n { opacity: .55; margin-left: 2px; }
.pied-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid #F0F0F0; font-size: 13px; color: #A1A1AA; }
.pied-panel span { flex: 1 1 320px; }
.ph-actions { display: flex; align-items: center; gap: 14px; font-weight: 400; }
.ph-actions form { margin: 0; }

/* --- Centre d'alertes (d17) --- */
.centre-alertes { max-width: 760px; }
.alerte { margin: 0; }
.alerte button {
    font: inherit; color: inherit; width: 100%; display: flex; gap: 12px; text-align: left; align-items: flex-start;
    padding: 12px 16px; border: none; border-bottom: 1px solid var(--fond-doux); background: #fff; cursor: pointer;
}
.alerte.non-lue button { background: #FAFCFB; }
.alerte button:hover { background: #F4F4F5; }
.alerte:last-child button { border-bottom: none; }
.alerte-pt { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 6px; background: #D97706; }
.alerte-danger { background: #D92D20; }
.alerte-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.alerte-txt strong { font-size: 14px; font-weight: 600; }
.alerte-txt small { font-size: 13px; color: var(--texte-3); }
.alerte-nl { width: 7px; height: 7px; border-radius: 50%; background: var(--vert); margin-top: 7px; flex: none; }

/* --- Alertes et astreinte (d16) --- */
.tbl-regles td { vertical-align: middle; }
.tbl-regles tr.inactive td { opacity: .5; }
.regle-lib { white-space: normal !important; min-width: 220px; font-weight: 500; }
.regle-roles { white-space: normal !important; min-width: 260px; }
.seuil { display: inline-flex; align-items: center; gap: 8px; }
.seuil .inp { width: 64px; text-align: right; }
.seuil small { font-size: 12px; color: var(--texte-3); white-space: normal; max-width: 110px; }
.puce { display: inline-flex; margin: 2px; cursor: pointer; }
.puce input { position: absolute; opacity: 0; pointer-events: none; }
.puce span {
    font-size: 12px; font-weight: 500; height: 28px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center;
    background: #fff; color: #A1A1AA; border: 1px solid #EDEDED;
}
.puce input:checked + span { background: var(--vert-pale); color: var(--vert-encre); border-color: #C6E0D6; }
.puce input:focus-visible + span { outline: 2px solid var(--vert); outline-offset: 2px; }
.panel-astreinte { max-width: 760px; }
.inp-sel { width: 170px; }
.petit.st::before { width: 6px; height: 6px; }

/* --- Journal (d12) --- */
.filtres { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sel-auteur { width: 190px; }
.recherche-journal { flex: 1 1 260px; max-width: 380px; }
.filtres .compte { font-size: 13px; color: #A1A1AA; margin-left: auto; }
.tbl-journal td { vertical-align: top; }
.col-date { width: 130px; }
.j-user { display: flex; flex-direction: column; }
.j-user small { font-size: 12px; color: #A1A1AA; }
.j-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: #3F3F46; }
.j-pt { width: 7px; height: 7px; border-radius: 50%; }
.j-action { white-space: normal !important; min-width: 280px; }
.j-titre { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.j-titre.danger { color: #B42318; }
.j-sev { width: 7px; height: 7px; border-radius: 50%; flex: none; background: #D97706; }
.j-sev-danger { background: #D92D20; }
.j-detail { display: block; margin-top: 3px; font-size: 13px; color: var(--texte-2); }
.j-diffs { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; font-size: 12px; }
.j-diffs div { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.j-champ { color: var(--texte-3); min-width: 130px; }
.j-avant { color: #B42318; text-decoration: line-through; }
.j-apres { color: var(--vert-encre); font-weight: 500; }
.j-refs { font-size: 12px; color: var(--texte-3); white-space: normal !important; }
.j-refs a { color: var(--texte-2); }

/* --- Utilisateurs et droits (d13, d14) --- */
.compteurs-u { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.compteurs-u strong { color: var(--texte); font-weight: 600; }
.onglets-pilule { display: flex; flex-wrap: wrap; gap: 8px; }
.onglets-pilule a {
    font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px;
    border-radius: 999px; background: #fff; border: 1px solid var(--bord); color: #3F3F46; text-decoration: none;
}
.onglets-pilule a:hover { border-color: #D4D4D8; color: var(--texte); }
.onglets-pilule a.on { background: var(--vert); border-color: var(--vert); color: #fff; }
.pilule-n { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--fond-doux); color: var(--texte-2); }
.onglets-pilule a.on .pilule-n { background: rgba(255, 255, 255, .2); color: #fff; }
.u-grille { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.u-liste { flex: 999 1 600px; }
.u-fiche { flex: 1 1 320px; min-width: 0; position: sticky; top: 16px; }
.ligne-lien td { padding-top: 8px; padding-bottom: 8px; }
.ligne-lien:hover td { background: #FAFAFA; }
.ligne-lien.sel td { background: #F4F7F6; }
.ligne-lien.sel td:first-child { box-shadow: inset 2px 0 0 var(--vert); }
.ligne-lien.eteint td { opacity: .6; }
.u-cell { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.avatar.petit { width: 28px; height: 28px; font-size: 11px; background: #F1F1F0; }
.u-nom { display: flex; flex-direction: column; }
.u-nom small { font-size: 12px; color: #A1A1AA; }
.u-tete { padding: 16px 16px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.u-tete > div { display: flex; flex-direction: column; gap: 2px; }
.u-titre { font-size: 16px; font-weight: 600; }
.u-form { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.u-form .deux { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.u-form .ligne { display: flex; gap: 6px; }
.u-form select { font: inherit; font-size: 14px; height: 36px; border: 1px solid var(--bord); border-radius: 8px; padding: 0 8px; background: #fff; color: var(--texte); }
.u-actions { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.u-actions .sep { height: 1px; background: #F0F0F0; }
.u-liens { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; align-items: center; }
.u-liens form { margin: 0; }
.u-liens a { text-decoration: none; }
.tbl-droits th { white-space: normal; min-width: 100px; }
.col-droit { min-width: 260px; }
.tbl-droits td.groupe { background: #FAFAFA; font-size: 12px; font-weight: 600; color: var(--texte-2); }
.panel-secu { max-width: 640px; padding-top: 8px; }
.secu-ligne { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--fond-doux); font-size: 14px; cursor: pointer; }
.secu-ligne.derniere { border-bottom: none; }
.secu-lib { flex: 1; }
.secu-ligne .num { width: 80px; text-align: right; }
.secu-unite { font-size: 13px; color: var(--texte-3); width: 170px; }

/* --- Statistiques (d11) --- */
.kpi-delta { font-size: 12px; color: var(--texte-2); }
.st-bloc { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.st-bloc h2 { margin: 0; font-size: 16px; font-weight: 600; }
.st-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px; }
.st-legende { display: flex; align-items: center; gap: 16px; font-size: 13px; color: #3F3F46; }
.st-legende > span { display: flex; align-items: center; gap: 6px; }
.pastille-c { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bleu { background: #257de0; }
.vert2 { background: #00b894; }
.st-detail { margin: -6px 0 0; font-size: 13px; color: var(--texte-3); min-height: 18px; }
.st-graph { position: relative; padding-left: 28px; }
.st-grad { position: absolute; left: 0; right: 0; border-top: 1px solid #F0F0F0; font-size: 11px; color: #A1A1AA; }
.st-grad:first-child { border-top-color: #D4D4D8; }
.st-grad span { position: absolute; left: 0; top: -8px; }
.st-cols { position: relative; display: flex; gap: 4px; align-items: flex-end; }
.st-col {
    flex: 1; min-width: 0; height: 204px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px;
    border-radius: 6px; outline: none;
}
.st-col:hover, .st-col:focus-visible { background: var(--fond-doux); }
.st-barres { display: flex; align-items: flex-end; gap: 2px; }
.st-b { width: 14px; border-radius: 4px 4px 0 0; }
.st-col.partiel .st-b { opacity: .45; }
.st-col.futur .st-mois { color: #D4D4D8; }
.st-mois { font-size: 11px; color: var(--texte-3); height: 18px; }
.st-tableau { margin-top: 4px; }
.st-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.hb { display: grid; grid-template-columns: 170px 1fr 80px; align-items: center; gap: 10px; font-size: 13px; }
.hb-l { color: #3F3F46; }
.hb-piste { display: flex; }
.hb-b { height: 16px; border-radius: 0 4px 4px 0; background: #257de0; }
.hb-v { text-align: right; white-space: nowrap; }
.hb-v strong { font-weight: 600; }
.st-tuiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.st-tuiles > div { display: flex; flex-direction: column; gap: 2px; }
.st-tv { font-size: 22px; font-weight: 600; }

/* --- Rapport annuel imprimable --- */
.rapport { max-width: 1000px; margin: 0 auto; padding: 24px; }
.rapport-barre { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 16px; }
.rapport-tete { margin-bottom: 20px; }
.rapport-tete h1 { margin: 16px 0 4px; font-size: 24px; }
@media print {
    .noprint { display: none !important; }
    .rapport { padding: 0; max-width: none; }
    .panel { break-inside: avoid; border-color: #DDD; }
    .bleu, .vert2, .hb-b, .side-marque .logo { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    body { font-size: 12px; }
}

@media (max-width: 700px) {
    .hb { grid-template-columns: 110px 1fr 70px; }
    .u-fiche { position: static; }
    .st-b { width: 7px; }
}
