/* Annuaire du GU : mêmes jetons que les autres outils, accent marine du hub. */
:root { --app: #001a70; --app-soft: #e6eaf6; --app-fort: #001a70; }
.wrap { max-width: 860px; }
.hd, .wrap { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.retour-hub { display: inline-block; color: #c8cfd9; font-size: 14px; text-decoration: none; margin-top: 6px; }
.outils { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.outils .in { flex: 1 1 220px; }
.outils .seg { flex: 1 1 320px; }
.compte { font-size: 13px; color: var(--gray-700); margin: 0 2px 8px; }
.liste { background: #fff; border: 1px solid var(--gray-300); border-radius: var(--r-3); overflow: hidden; }
.pers { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-top: 1px solid var(--gray-200);
        background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 60px; }
.pers:first-child { border-top: 0; }
.pers:hover { background: var(--gray-100); }
.pers .t { flex: 1; min-width: 0; }
.pers .t b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.pers .t span { display: block; font-size: 13px; color: var(--gray-700); overflow-wrap: anywhere; }
.pers.inactif .t b { color: var(--gray-600); text-decoration: line-through; }
.role { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; flex: none; }
.role.admin { background: #001a70; color: #fff; }
.role.interne { background: #e6eaf6; color: #001a70; }
.role.externe { background: #fff1df; color: #8a4500; }
.vide { padding: 16px; color: var(--gray-600); }
.seg button[aria-pressed="true"] { background: var(--app); color: #fff; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 > * { min-width: 0; }
.check { display: flex; gap: 10px; align-items: center; margin-top: 14px; font-size: 15px; }
.check input { width: 22px; height: 22px; }
/* Fenêtres (fiche d'une personne…) : hauteur bornée à l'écran, titre fixe, corps qui défile.
   Sur iPhone, faire défiler le <dialog> lui-même est capricieux : c'est le corps (.dlg-b) qui défile. */
dialog { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
         overflow: hidden; }
dialog[open] { display: flex; flex-direction: column; }
dialog .dlg-h { flex: none; padding-bottom: 8px; }
dialog .dlg-b { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.bas { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.pers .t .habs { font-size: 12px; color: var(--app-fort); margin-top: 2px; }
.sous-t { font-size: 15px; margin: 22px 0 4px; }
.check { display: flex; gap: 10px; align-items: center; margin-top: 10px; font-size: 15px; }
#p-niveau { margin-bottom: 4px; }

/* Accès aux applis : exceptions dans la fiche, règles par appli dans l'onglet. */
.acc-liste { display: grid; gap: 6px; margin-top: 8px; }
.acc-l { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 8px; align-items: center; font-size: 14px; }
.acc-s { padding: 6px 8px; min-height: 38px; font-size: 14px; }
@media (max-width: 420px) { .acc-l { grid-template-columns: 1fr; gap: 2px; } }
.acc-app { margin-bottom: 12px; }
.acc-bloc { margin-top: 10px; }
.acc-bloc .seg { margin-top: 4px; }
.acc-choix { display: flex; flex-wrap: wrap; gap: 0 18px; }
.acc-choix .check { margin-top: 8px; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; width: auto; }
a.btn { text-decoration: none; text-align: center; }
/* Demandes d'accès des visiteurs */
.pastille { display: inline-block; min-width: 20px; padding: 2px 6px; border-radius: 999px; background: #ff861d; color: #001a70; font-size: 12px; font-weight: 700; line-height: 16px; }
.dem { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.dem-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.dem-t b { font-size: 16px; }
.dem-t > span:not(.hint) { font-size: 14px; color: var(--gray-700); overflow-wrap: anywhere; }
.dem-b { display: flex; gap: 8px; flex: none; }
.dem-b .btn { min-width: 110px; }
.dem-h { margin: 22px 2px 8px; font-size: 15px; }
