/**
 * Projet         : MageTicket
 * Fichier        : public/assets/css/identity.css
 * Rôle           : Interfaces d’installation, connexion et administration d’identité sur PC, tablette et mobile.
 * Auteur         : Régis KREMER
 * Version        : 0.33.45
 * Version projet : 0.33.0
 * Lot            : MAGETICKET IDENTITY ACCESS SELECTS SESSIONS PAGINATION FIX1
 * Base requise   : 0.33.44
 * Créé le        : 2026-07-21
 * Modifié le     : 2026-07-26
 * Dépendances    : app.css et responsive.css
 * Contraintes    : bord à bord mobile/tablette, focus visible, contraste AA, aucun débordement horizontal
 * Modifications  : selects de gestion des accès harmonisés et pagination responsive des sessions.
 */

/* La passerelle publique (connexion, installation, récupération) est décrite une
   seule fois dans public-pages.css. identity.css ne conserve que les écrans
   d'administration de l'identité. */

.identity-form-header { max-width: 820px; margin-bottom: 24px; }
.identity-form-header > span,
.identity-section-header > div > span { color: var(--brand); font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.identity-form-header h1,
.identity-section-header h1 { margin: 7px 0 8px; font-size: clamp(26px, 3.2vw, 42px); line-height: 1.08; letter-spacing: -.035em; }
.identity-form-header p,
.identity-section-header p { max-width: 720px; margin: 0; color: var(--muted); line-height: 1.55; }
.identity-alert { margin: 0 0 18px; padding: 13px 15px; display: grid; gap: 5px; border: 1px solid var(--line-strong); background: var(--surface); font-size: var(--fs-base); }
.identity-alert strong { font-size: var(--fs-base); }
.identity-alert ul { margin: 0; padding-left: 20px; }
.identity-alert.error { border-left: 4px solid var(--red); background: color-mix(in srgb, var(--red) 8%, var(--surface)); }
.identity-alert.success { border-left: 4px solid var(--green); background: color-mix(in srgb, var(--green) 8%, var(--surface)); }
.identity-alert.warning { border-left: 4px solid var(--orange); background: color-mix(in srgb, var(--orange) 9%, var(--surface)); }
.identity-alert code { width: fit-content; max-width: 100%; padding: 8px 10px; overflow-wrap: anywhere; background: var(--bg-deep); color: var(--text); }
.identity-progress { margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; list-style: none; background: var(--line); border: 1px solid var(--line); }
.identity-progress li { min-width: 0; padding: 11px 12px; background: var(--surface); color: var(--muted); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.identity-progress li.is-current { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--text); box-shadow: inset 0 -3px 0 var(--brand); }
.identity-progress li.is-complete { color: var(--green); }
.identity-progress li.is-complete::before { content: ""; display: inline-block; width: 5px; height: 9px; margin: 0 8px 1px 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.identity-step-form,
.identity-admin-wizard form { min-width: 0; }
.identity-step-form fieldset,
.identity-admin-wizard fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.identity-step-form legend,
.identity-admin-wizard legend { width: 100%; margin: 0 0 8px; padding: 0; font-size: clamp(21px, 2.5vw, 30px); font-weight: 800; letter-spacing: -.025em; }
.identity-fields { display: grid; gap: 16px; }
.identity-fields.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.identity-fields.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.identity-fields .span-all { grid-column: 1 / -1; }
.identity-fields label,
.identity-login-form label,
.identity-inline-form label,
.identity-stack-form label { min-width: 0; display: grid; gap: 7px; color: var(--text); font-size: var(--fs-sm); font-weight: 700; }
.identity-fields input,
.identity-fields select,
.identity-fields textarea,
.identity-login-form input,
.identity-inline-form input,
.identity-inline-form select,
.identity-stack-form input,
.identity-stack-form select {
    width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px;
    border: 1px solid var(--line-strong); border-radius: 3px;
    background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-base);
}
.identity-fields input:focus,
.identity-fields select:focus,
.identity-login-form input:focus,
.identity-inline-form input:focus,
.identity-inline-form select:focus,
.identity-stack-form input:focus,
.identity-stack-form select:focus { outline: 3px solid color-mix(in srgb, var(--brand) 38%, transparent); outline-offset: 1px; border-color: var(--brand); }
.identity-login-form { display: grid; gap: 17px; max-width: 520px; }
.identity-login-form label small { color: var(--muted); font-weight: 500; }
.mfa-field { padding: 12px; border-left: 3px solid var(--line-strong); background: var(--surface-soft); }
.mfa-field.is-required { border-left-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.identity-check { display: flex !important; grid-template-columns: none !important; align-items: flex-start; gap: 10px !important; font-weight: 500 !important; line-height: 1.45; }
.identity-check input { width: 20px !important; min-height: 20px !important; flex: 0 0 20px; margin-top: 1px; accent-color: var(--brand); }
.password-policy { margin: 15px 0 0; padding: 10px 12px; border-left: 3px solid var(--brand); color: var(--muted); background: var(--surface-soft); font-size: var(--fs-sm); line-height: 1.5; }
.identity-callout { margin-top: 18px; padding: 14px 16px; display: grid; gap: 4px; border-left: 3px solid var(--brand); background: var(--surface-soft); }
.identity-callout strong { font-size: var(--fs-base); }
.identity-callout span { color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.identity-review { min-height: 130px; margin: 12px 0 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); }
.identity-review > div { padding: 13px 15px; display: grid; gap: 4px; border-bottom: 1px solid var(--line); }
.identity-review > div:nth-child(odd) { border-right: 1px solid var(--line); }
.identity-review span { color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; }
.identity-review strong { font-size: var(--fs-base); overflow-wrap: anywhere; }
.identity-step-actions { margin-top: 28px; padding-top: 18px; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.identity-step-status { color: var(--muted); font-size: var(--fs-sm); text-align: center; }
.text-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.identity-security-note { max-width: 520px; margin-top: 24px; padding-top: 18px; display: grid; grid-template-columns: 32px 1fr; gap: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); }
.identity-security-note p { margin: 0; line-height: 1.55; }
.identity-state-page { min-height: 100dvh; padding: 32px; display: grid; place-content: center; justify-items: center; text-align: center; background: var(--bg); color: var(--text); }
.identity-state-page img { width: 72px; }
.identity-state-page > span { margin-top: 24px; color: var(--brand); font-size:var(--fs-2xl); font-weight: 900; }
.identity-state-page h1 { margin: 0; }
.identity-state-page p { color: var(--muted); }


/* Administration des identités et des accès */
.identity-admin-shell{
    width:100%;min-width:0;min-height:100%;display:flex;flex-direction:column;gap:var(--space-2);padding:0;background:transparent;color:var(--text)
}
.identity-admin-shell [hidden]{display:none!important}
.identity-admin-nav{
    min-width:0;display:flex;align-items:stretch;gap:var(--space-2);padding:0 var(--space-3);border:0;border-bottom:1px solid var(--line);background:var(--surface)
}
.identity-tablist{min-width:0;display:flex;align-items:stretch;overflow-x:auto;scrollbar-width:thin}
.identity-tablist button,.identity-nav-link{
    min-height:48px;padding:0 var(--space-3);display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);border:0;border-bottom:3px solid transparent;background:transparent;color:var(--muted);font:inherit;font-size:var(--fs-sm);font-weight:var(--fw-label);text-decoration:none;white-space:nowrap;cursor:pointer
}
.identity-tablist button:hover,.identity-nav-link:hover{background:var(--surface-soft);color:var(--text)}
.identity-tablist button.is-active,.identity-tablist button[aria-selected="true"]{border-bottom-color:var(--brand);background:color-mix(in srgb,var(--brand) 7%,var(--surface));color:var(--text)}
.identity-tablist button:focus-visible,.identity-nav-link:focus-visible{outline:3px solid color-mix(in srgb,var(--brand) 42%,transparent);outline-offset:-3px}
.identity-nav-link{margin-left:auto;border-left:1px solid var(--line)}
.identity-admin-content{width:100%;min-width:0;min-height:0;display:block;padding:var(--space-3) var(--space-4) max(var(--space-4),var(--safe-bottom));overflow:visible}
.identity-admin-content>[role="tabpanel"]{width:100%;min-width:0;display:grid;gap:var(--space-3)}
.identity-admin-content>[role="tabpanel"]:focus{outline:none}
.identity-section-header{min-width:0;display:flex;align-items:flex-end;justify-content:space-between;gap:var(--space-4);padding:0}
.identity-section-header>div{min-width:0}
.identity-section-header>div>span,.panel-eyebrow{margin:0;color:var(--brand);font-size:var(--fs-xs);font-weight:800;letter-spacing:.09em;text-transform:uppercase}
.identity-section-header h2{margin:var(--space-1) 0 0;font-size:clamp(1.55rem,2.1vw,2.35rem);line-height:1.08;letter-spacing:-.035em}
.identity-section-header p{max-width:820px;margin:var(--space-1) 0 0;color:var(--muted);line-height:1.5}
.identity-alert{margin:0;padding:var(--space-3);display:grid;gap:var(--space-1);border:1px solid var(--line-strong);border-left-width:4px;background:var(--surface)}
.identity-alert.error{border-left-color:var(--danger);background:var(--danger-soft)}
.identity-alert.success{border-left-color:var(--success);background:var(--success-soft)}
.identity-alert.warning{border-left-color:var(--warning);background:var(--warning-soft)}
.identity-alert ul{margin:0;padding-left:1.25rem}
.identity-alert code{width:fit-content;max-width:100%;padding:var(--space-2);background:var(--surface);overflow-wrap:anywhere}
.identity-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:1px;border:1px solid var(--line);background:var(--line)}
.identity-kpis>button,.identity-kpis>a{
    min-width:0;min-height:110px;padding:var(--space-3);display:grid;align-content:center;justify-items:start;gap:var(--space-1);border:0;background:var(--surface);color:var(--text);text-align:left;text-decoration:none;font:inherit;cursor:pointer
}
.identity-kpis>button:hover,.identity-kpis>a:hover{background:color-mix(in srgb,var(--brand) 7%,var(--surface))}
.identity-kpis>button:focus-visible,.identity-kpis>a:focus-visible{position:relative;z-index:1;outline:3px solid var(--brand);outline-offset:-3px}
.identity-kpis span{color:var(--muted);font-size:var(--fs-xs);font-weight:var(--fw-label);text-transform:uppercase;letter-spacing:.06em}
.identity-kpis strong{font-size:clamp(1.6rem,2.4vw,2.35rem);line-height:1}
.identity-kpis small{color:var(--muted);line-height:1.35}
.identity-overview-grid{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(360px,.92fr);gap:var(--space-3);align-items:stretch}
.identity-admin-panel,.identity-organisation-card,.identity-profile-builder{min-width:0;border:1px solid var(--line);border-radius:2px;background:var(--surface);box-shadow:var(--shadow-1)}
.identity-admin-panel>header,.identity-organisation-card>header,.identity-profile-builder>header{min-height:58px;padding:var(--space-3);display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-3);border-bottom:1px solid var(--line);background:var(--surface-soft)}
.identity-admin-panel h3,.identity-organisation-card h3,.identity-profile-builder h3{margin:var(--space-1) 0 0;font-size:var(--fs-lg)}
.identity-admin-panel header p:not(.panel-eyebrow),.identity-profile-builder header p:not(.panel-eyebrow){margin:var(--space-1) 0 0;color:var(--muted);font-size:var(--fs-sm);line-height:1.45}
.text-action{min-height:36px;padding:0 var(--space-2);border:1px solid var(--line);background:var(--surface);color:var(--brand);font:inherit;font-size:var(--fs-sm);font-weight:700;cursor:pointer}
.identity-policy-list{margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));list-style:none}
.identity-policy-list li{min-width:0;padding:var(--space-3);display:grid;grid-template-columns:30px minmax(0,1fr);gap:var(--space-2);border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
.identity-policy-list li:nth-child(2n){border-right:0}.identity-policy-list li:nth-last-child(-n+2){border-bottom:0}
.identity-policy-list i{font-size:1.25rem;color:var(--brand)}
.identity-policy-list strong,.identity-policy-list span{display:block}.identity-policy-list span{margin-top:var(--space-1);color:var(--muted);font-size:var(--fs-sm);line-height:1.45}
.identity-compact-list{display:grid}
.identity-compact-list>button{width:100%;min-height:62px;padding:var(--space-2) var(--space-3);display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:var(--space-2);border:0;border-bottom:1px solid var(--line);background:var(--surface);color:var(--text);text-align:left;font:inherit;cursor:pointer}
.identity-compact-list>button:last-child{border-bottom:0}.identity-compact-list>button:hover{background:var(--surface-soft)}
.identity-compact-list>button>span:nth-child(2){min-width:0;display:grid}.identity-compact-list strong,.identity-compact-list small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.identity-compact-list small{color:var(--muted)}
.identity-empty-state{min-height:160px;padding:var(--space-4);display:grid;place-content:center;justify-items:center;gap:var(--space-2);color:var(--muted);text-align:center;background:var(--surface)}
.identity-empty-state i{font-size:2rem;color:var(--brand)}.identity-empty-state strong{color:var(--text);font-size:var(--fs-md)}
.identity-toolbar{display:grid;grid-template-columns:minmax(260px,1.5fr) minmax(170px,.65fr) minmax(190px,.75fr) auto auto;align-items:end;gap:var(--space-2);padding:var(--space-3);border:1px solid var(--line);background:var(--surface)}
.identity-toolbar label,.identity-inline-form label,.identity-stack-form label,.identity-fields label,.identity-profile-name label{min-width:0;display:grid;gap:var(--space-1);color:var(--text);font-size:var(--fs-sm);font-weight:700}
.identity-toolbar input,.identity-toolbar select,.identity-inline-form input,.identity-inline-form select,.identity-stack-form input,.identity-stack-form select,.identity-fields input,.identity-fields select,.identity-fields textarea,.identity-profile-name input{
    width:100%;min-width:0;min-height:44px;padding:9px 11px;border:1px solid var(--line-strong);border-radius:2px;background:var(--surface);color:var(--text);font:inherit
}
.identity-toolbar input:focus,.identity-toolbar select:focus,.identity-inline-form input:focus,.identity-inline-form select:focus,.identity-stack-form input:focus,.identity-stack-form select:focus,.identity-fields input:focus,.identity-fields select:focus,.identity-fields textarea:focus,.identity-profile-name input:focus{outline:3px solid color-mix(in srgb,var(--brand) 38%,transparent);outline-offset:1px;border-color:var(--brand)}
.identity-search-field>div{position:relative}.identity-search-field i{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:var(--muted)}.identity-search-field input{padding-left:35px}
.identity-toolbar output{min-height:44px;display:flex;align-items:center;color:var(--muted);font-size:var(--fs-sm);white-space:nowrap}
.identity-table-wrap{position:relative;max-width:100%;overflow-x:auto;border:1px solid var(--line);background:var(--surface)}
.identity-table{width:100%;min-width:1080px;border-collapse:collapse;font-size:var(--fs-sm)}
.identity-table th{padding:11px 12px;border-bottom:1px solid var(--line-strong);background:var(--surface-soft);color:var(--muted);text-align:left;font-size:var(--fs-xs);font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.identity-table td{padding:12px;border-bottom:1px solid var(--line);vertical-align:middle}.identity-table tbody tr:last-child td{border-bottom:0}.identity-table tbody tr:hover{background:color-mix(in srgb,var(--brand) 4%,var(--surface))}
.identity-table td>strong,.identity-table td>small,.identity-table td>time{display:block}.identity-table td>small{margin-top:3px;color:var(--muted)}
.identity-person{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:var(--space-2)}.identity-person>div{min-width:0;display:grid}.identity-person strong,.identity-person small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.identity-person small{color:var(--muted)}
.identity-source-label{width:fit-content;margin-top:4px;color:var(--brand);font-size:var(--fs-xs);font-weight:700}
.security-inline{width:fit-content;margin-top:5px;display:inline-flex;align-items:center;gap:5px;color:var(--muted);font-size:var(--fs-xs)}.security-inline.is-secure{color:var(--success)}.security-inline.needs-attention{color:var(--warning)}
.identity-action-menu{position:relative}.identity-action-menu>summary{width:38px;height:38px;display:grid;place-items:center;border:1px solid var(--line);background:var(--surface);cursor:pointer;list-style:none}.identity-action-menu>summary::-webkit-details-marker{display:none}.identity-action-menu[open]>summary{border-color:var(--brand);color:var(--brand)}
.identity-action-menu>div{position:absolute;z-index:20;right:0;top:calc(100% + 4px);width:250px;padding:var(--space-1);display:grid;border:1px solid var(--line-strong);background:var(--surface);box-shadow:var(--shadow-2)}
.identity-action-menu form{margin:0}.identity-action-menu button{width:100%;min-height:40px;padding:0 var(--space-2);display:flex;align-items:center;gap:var(--space-2);border:0;background:transparent;color:var(--text);font:inherit;text-align:left;cursor:pointer}.identity-action-menu button:hover{background:var(--surface-soft)}
.role-change-panel{margin-top:var(--space-1)}.identity-inline-form{padding:var(--space-3);display:grid;grid-template-columns:minmax(230px,1fr) minmax(230px,1fr) auto;align-items:end;gap:var(--space-3)}
.identity-structure-explainer{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;border:1px solid var(--line);background:var(--line)}
.identity-structure-explainer>div{min-width:0;padding:var(--space-3);display:grid;grid-template-columns:28px minmax(0,1fr);column-gap:var(--space-2);background:var(--surface)}.identity-structure-explainer i{grid-row:1/3;color:var(--brand);font-size:1.25rem}.identity-structure-explainer strong,.identity-structure-explainer span{display:block}.identity-structure-explainer span{margin-top:var(--space-1);color:var(--muted);font-size:var(--fs-sm);line-height:1.4}
.identity-organisation-list{display:grid;gap:var(--space-3)}.identity-organisation-card>header>div{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-2)}.identity-organisation-card>header .panel-eyebrow{width:100%}.identity-organisation-card>header>strong{color:var(--muted);font-size:var(--fs-sm)}
.identity-structure-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.identity-structure-columns>section{min-width:0;border-right:1px solid var(--line)}.identity-structure-columns>section:last-child{border-right:0}.identity-structure-columns section>header{padding:var(--space-2) var(--space-3);display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);background:var(--surface-soft)}.identity-structure-columns h4{margin:0;font-size:var(--fs-base)}.identity-structure-columns section>header span{color:var(--muted)}
.identity-structure-columns ul{margin:0;padding:0;list-style:none}.identity-structure-columns li{min-height:54px;padding:var(--space-2) var(--space-3);display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);border-bottom:1px solid var(--line)}.identity-structure-columns li:last-child{border-bottom:0}.identity-structure-columns li>div{min-width:0;display:grid}.identity-structure-columns li small{color:var(--muted)}.identity-structure-columns li.is-empty{color:var(--muted);font-style:italic}
.identity-create-structures>header{background:var(--surface)}.identity-create-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--line)}.identity-create-grid details{min-width:0;background:var(--surface)}.identity-create-grid summary{min-height:82px;padding:var(--space-3);display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;gap:var(--space-2);cursor:pointer;list-style:none}.identity-create-grid summary::-webkit-details-marker{display:none}.identity-create-grid summary:hover{background:var(--surface-soft)}.identity-create-grid summary i{font-size:1.35rem;color:var(--brand)}.identity-create-grid summary span{min-width:0;display:grid}.identity-create-grid summary small{color:var(--muted);font-weight:400}.identity-create-grid details[open] summary{border-bottom:1px solid var(--line);background:var(--brand-soft)}
.identity-stack-form{padding:var(--space-3);display:grid;gap:var(--space-3)}
.identity-role-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-3)}.identity-role-list article{min-width:0;padding:var(--space-3);display:flex;flex-direction:column;gap:var(--space-2);border:1px solid var(--line);background:var(--surface);box-shadow:var(--shadow-1)}.identity-role-list article>header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-2)}.identity-role-list article>header>div{min-width:0;display:grid}.identity-role-list article>header small,.identity-role-list article>header>span{color:var(--muted);font-size:var(--fs-xs)}.identity-role-list article>p{margin:0;color:var(--muted);line-height:1.45}.identity-role-list article>ul{margin:auto 0 0;padding:0;display:flex;flex-wrap:wrap;gap:5px;list-style:none}.identity-role-list article>ul li{padding:4px 7px;border:1px solid var(--line);background:var(--surface-soft);font-size:var(--fs-xs)}.role-restriction{display:flex;align-items:flex-start;gap:var(--space-1);color:var(--warning);font-size:var(--fs-xs)}
.identity-profile-builder>form{display:grid}.identity-profile-name{padding:var(--space-3);display:grid;grid-template-columns:minmax(280px,.7fr) minmax(320px,1.3fr);gap:var(--space-3);align-items:end;border-bottom:1px solid var(--line)}.identity-profile-name .identity-callout{margin:0}.identity-permission-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--line)}.identity-permission-groups fieldset{min-width:0;margin:0;padding:0;border:0;background:var(--surface)}.identity-permission-groups legend{width:100%;padding:var(--space-3);display:grid;gap:var(--space-1);border-bottom:1px solid var(--line);background:var(--surface-soft)}.identity-permission-groups legend span{font-weight:800}.identity-permission-groups legend small{color:var(--muted);font-size:var(--fs-xs);font-weight:400;line-height:1.4}
.identity-capability-list{display:grid}.identity-capability{min-height:66px;padding:var(--space-2) var(--space-3);display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:start;gap:var(--space-2);border-bottom:1px solid var(--line);cursor:pointer}.identity-capability:last-child{border-bottom:0}.identity-capability:hover{background:var(--surface-soft)}.identity-capability input{width:18px;height:18px;margin-top:2px;accent-color:var(--brand)}.identity-capability>span{min-width:0;display:grid}.identity-capability small{margin-top:2px;color:var(--muted);font-size:var(--fs-xs);line-height:1.35}.identity-capability em{padding:3px 5px;background:var(--warning-soft);color:var(--warning);font-size:var(--fs-xs);font-style:normal;font-weight:800}.identity-capability:has(input:checked){background:color-mix(in srgb,var(--brand) 8%,var(--surface));box-shadow:inset 3px 0 0 var(--brand)}
.identity-restrictions{margin:var(--space-3);border:1px solid var(--line)}.identity-restrictions summary{min-height:44px;padding:0 var(--space-3);display:flex;align-items:center;font-weight:700;cursor:pointer}.identity-restrictions>div{padding:var(--space-3);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-2);border-top:1px solid var(--line)}.identity-restrictions p{grid-column:1/-1;margin:0;color:var(--muted)}.identity-restrictions label{display:flex;align-items:flex-start;gap:var(--space-2)}.identity-restrictions input{width:18px;height:18px;accent-color:var(--danger)}
.identity-builder-errors,.identity-wizard-errors{min-height:0;color:var(--danger);font-weight:700}.identity-builder-errors:not(:empty){margin:0 var(--space-3);padding:var(--space-2);border-left:3px solid var(--danger);background:var(--danger-soft)}.identity-profile-builder form>footer{padding:var(--space-3);display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);border-top:1px solid var(--line);background:var(--surface-soft)}.identity-profile-builder footer span{color:var(--muted)}
.identity-session-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;border:1px solid var(--line);background:var(--line)}.identity-session-summary article{min-height:86px;padding:var(--space-3);display:flex;align-items:center;gap:var(--space-3);background:var(--surface)}.identity-session-summary i{font-size:1.6rem;color:var(--brand)}.identity-session-summary div{display:grid}.identity-session-summary strong{font-size:var(--fs-xl)}.identity-session-summary span{color:var(--muted)}
.identity-session-tabs{display:flex;align-items:center;border-bottom:1px solid var(--line)}.identity-session-tabs button{min-height:42px;padding:0 var(--space-3);border:0;border-bottom:3px solid transparent;background:transparent;color:var(--muted);font:inherit;font-weight:700;cursor:pointer}.identity-session-tabs button.is-active{border-bottom-color:var(--brand);color:var(--text)}
.current-session,.identity-current-note{color:var(--brand)!important;font-weight:700}.subtle-danger{border-color:color-mix(in srgb,var(--danger) 42%,var(--line))!important;color:var(--danger)!important;background:var(--surface)!important}
/* Assistant utilisateur */
.identity-admin-wizard[hidden]{display:none!important}.identity-admin-wizard{position:fixed;z-index:350;inset:0;min-width:0;min-height:100svh;padding:var(--safe-top) var(--safe-right) max(var(--safe-bottom),var(--keyboard-inset)) var(--safe-left);background:color-mix(in srgb,var(--bg-deep) 92%,transparent);color:var(--text);overflow:hidden}
.identity-admin-wizard>form{width:min(1120px,100%);height:100%;margin:0 auto;display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;border-inline:1px solid var(--line);background:var(--bg);box-shadow:var(--shadow-3)}
.identity-admin-wizard>form>header{min-height:78px;padding:var(--space-2) var(--space-3);display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:var(--space-3);border-bottom:1px solid var(--line);background:var(--surface)}.identity-admin-wizard>form>header div{min-width:0}.identity-admin-wizard>form>header h2{margin:0;font-size:var(--fs-xl)}.identity-admin-wizard>form>header p{margin:3px 0 0;color:var(--muted);font-size:var(--fs-sm)}
.identity-admin-wizard .identity-progress{margin:0;grid-template-columns:repeat(5,minmax(0,1fr));border:0;border-bottom:1px solid var(--line)}.identity-admin-wizard .identity-progress li{min-height:50px;padding:var(--space-2);display:flex;align-items:center;justify-content:center;gap:var(--space-1);background:var(--surface-soft);color:var(--muted);white-space:normal;text-align:center}.identity-admin-wizard .identity-progress li .identity-progress__number{width:24px;height:24px;display:grid;place-items:center;border:1px solid currentColor;border-radius:50%}.identity-admin-wizard .identity-progress li.is-current{background:var(--brand-soft);color:var(--text);box-shadow:inset 0 -3px 0 var(--brand)}.identity-admin-wizard .identity-progress li.is-complete{color:var(--success)}.identity-admin-wizard .identity-progress li.is-complete::before{display:none}
.identity-wizard-errors:not(:empty){padding:var(--space-2) var(--space-3);border-bottom:1px solid color-mix(in srgb,var(--danger) 40%,var(--line));background:var(--danger-soft)}
.identity-admin-wizard fieldset{min-height:0;margin:0;padding:clamp(24px,4vw,54px);border:0;overflow:auto}.identity-admin-wizard legend{margin:0 0 var(--space-1);font-size:clamp(1.5rem,2.6vw,2.2rem);font-weight:850;letter-spacing:-.03em}.identity-step-intro{max-width:760px;margin:0 0 var(--space-4);color:var(--muted);line-height:1.5}.identity-fields{display:grid;gap:var(--space-3)}.identity-fields.two-columns{grid-template-columns:repeat(2,minmax(0,1fr))}.identity-fields .span-all{grid-column:1/-1}.identity-fields label small{color:var(--muted);font-weight:400;line-height:1.4}.identity-callout{padding:var(--space-3);display:grid;gap:var(--space-1);border-left:3px solid var(--brand);background:var(--surface-soft)}.identity-callout span{color:var(--muted);line-height:1.45}
.identity-security-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;border:1px solid var(--line);background:var(--line)}.identity-security-options article{min-height:120px;padding:var(--space-4);display:grid;grid-template-columns:34px minmax(0,1fr);align-content:start;gap:var(--space-2);background:var(--surface)}.identity-security-options i{font-size:1.45rem;color:var(--brand)}.identity-security-options div{display:grid;gap:var(--space-1)}.identity-security-options span{color:var(--muted);line-height:1.45}
.identity-review{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;border:1px solid var(--line);background:var(--line)}.identity-review>div{min-height:76px;padding:var(--space-3);display:grid;align-content:center;gap:var(--space-1);background:var(--surface)}.identity-review span{color:var(--muted);font-size:var(--fs-xs);font-weight:800;letter-spacing:.06em;text-transform:uppercase}.identity-review strong{overflow-wrap:anywhere}
.identity-step-actions{margin:0;padding:var(--space-2) var(--space-3) max(var(--space-2),var(--safe-bottom));display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:var(--space-2);border-top:1px solid var(--line);background:var(--surface-soft)}.identity-step-status{text-align:center;color:var(--muted)}
@media(max-width:1380px){.identity-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.identity-role-list,.identity-permission-groups{grid-template-columns:repeat(2,minmax(0,1fr))}.identity-create-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1080px){.identity-overview-grid{grid-template-columns:1fr}.identity-toolbar{grid-template-columns:minmax(240px,1fr) repeat(2,minmax(170px,.7fr))}.identity-toolbar .button,.identity-toolbar output{grid-row:2}.identity-structure-explainer{grid-template-columns:repeat(2,minmax(0,1fr))}.identity-structure-columns{grid-template-columns:1fr}.identity-structure-columns>section{border-right:0;border-bottom:1px solid var(--line)}.identity-structure-columns>section:last-child{border-bottom:0}.identity-profile-name{grid-template-columns:1fr}.identity-session-summary{grid-template-columns:1fr 1fr 1fr}}
@media(max-width:820px){.identity-admin-content{padding:var(--space-3) max(var(--space-3),var(--safe-right)) max(var(--space-4),var(--safe-bottom)) max(var(--space-3),var(--safe-left))}.identity-admin-nav{padding-inline:max(var(--space-2),var(--safe-left));overflow-x:auto}.identity-nav-link{margin-left:0}.identity-section-header{align-items:flex-start}.identity-toolbar{grid-template-columns:1fr 1fr}.identity-search-field{grid-column:1/-1}.identity-inline-form{grid-template-columns:1fr}.identity-role-list,.identity-permission-groups{grid-template-columns:1fr}.identity-admin-wizard>form{border-inline:0}.identity-admin-wizard .identity-progress li{font-size:0}.identity-admin-wizard .identity-progress li .identity-progress__number{font-size:var(--fs-sm)}.identity-admin-wizard fieldset{padding:var(--space-4) max(var(--space-3),var(--safe-right)) 100px max(var(--space-3),var(--safe-left))}}
@media(max-width:680px){.identity-admin-shell{gap:0}.identity-admin-content{padding:var(--space-2) max(var(--space-2),var(--safe-right)) max(calc(var(--shell-mobile-nav-height) + var(--space-3)),var(--safe-bottom)) max(var(--space-2),var(--safe-left))}.identity-admin-nav{margin:0 calc(-1 * max(var(--space-2),var(--safe-left)));padding-inline:max(var(--space-2),var(--safe-left))}.identity-tablist button,.identity-nav-link{min-height:46px;padding-inline:var(--space-2)}.identity-section-header{display:grid;gap:var(--space-2)}.identity-section-header>.button{width:100%}.identity-kpis{grid-template-columns:1fr 1fr}.identity-kpis>button,.identity-kpis>a{min-height:94px;padding:var(--space-2)}.identity-policy-list{grid-template-columns:1fr}.identity-policy-list li,.identity-policy-list li:nth-child(2n),.identity-policy-list li:nth-last-child(-n+2){border-right:0;border-bottom:1px solid var(--line)}.identity-policy-list li:last-child{border-bottom:0}.identity-toolbar{grid-template-columns:1fr}.identity-search-field{grid-column:auto}.identity-toolbar .button,.identity-toolbar output{grid-row:auto}.identity-table-wrap{overflow:visible;border:0;background:transparent}.identity-table{min-width:0;display:block}.identity-table thead{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.identity-table tbody{display:grid;gap:var(--space-2)}.identity-table tr{display:block;padding:var(--space-3);border:1px solid var(--line);background:var(--surface)}.identity-table td{padding:6px 0;display:grid!important;grid-template-columns:115px minmax(0,1fr);gap:var(--space-2);border:0}.identity-table td::before{content:attr(data-label);color:var(--muted);font-size:var(--fs-xs);font-weight:800;text-transform:uppercase;letter-spacing:.05em}.identity-table td:first-child{grid-template-columns:1fr}.identity-table td:first-child::before{display:none}.identity-action-menu>div{position:fixed;z-index:400;left:max(var(--space-2),var(--safe-left));right:max(var(--space-2),var(--safe-right));bottom:max(calc(var(--shell-mobile-nav-height) + var(--space-2)),var(--safe-bottom));top:auto;width:auto}.identity-structure-explainer{grid-template-columns:1fr}.identity-create-grid{grid-template-columns:1fr}.identity-restrictions>div{grid-template-columns:1fr}.identity-session-summary{grid-template-columns:1fr}.identity-security-options,.identity-review,.identity-fields.two-columns{grid-template-columns:1fr}.identity-admin-wizard>form>header p{display:none}.identity-step-actions{grid-template-columns:auto 1fr auto}.identity-step-actions [data-step-submit]{grid-column:1/-1;width:100%}}
@media(max-height:620px) and (orientation:landscape){.identity-admin-wizard .identity-progress{display:none}.identity-admin-wizard>form{grid-template-rows:auto auto minmax(0,1fr) auto}.identity-admin-wizard fieldset{padding-block:var(--space-3)}}
@media(prefers-reduced-motion:reduce){.identity-admin-shell *,.identity-admin-wizard *{scroll-behavior:auto!important;transition:none!important}}
@media(forced-colors:active){.identity-tablist button.is-active,.identity-capability:has(input:checked){outline:2px solid Highlight}.identity-kpis>button,.identity-kpis>a,.identity-admin-panel,.identity-organisation-card,.identity-role-list article{border:1px solid CanvasText}}


/* --------------------------------------------------------------------------
   FIX2 — cohérence visuelle MageTicket du centre Identités et accès
   -------------------------------------------------------------------------- */
.identity-admin-shell{
    gap:0;
    background:var(--bg);
}
.identity-admin-nav{
    min-height:54px;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:var(--space-2);
    padding:7px var(--space-4);
    border-top:1px solid var(--line);
    border-bottom:1px solid var(--line);
    background:var(--surface-soft);
}
.identity-tablist{
    min-width:0;
    display:flex;
    align-items:stretch;
    gap:1px;
    overflow-x:auto;
    border:1px solid var(--line);
    border-radius:var(--r-sm);
    background:var(--line);
    scrollbar-width:thin;
}
.identity-tablist button{
    min-height:38px;
    flex:0 0 auto;
    padding:7px var(--space-3);
    border:0;
    border-bottom:2px solid transparent;
    border-radius:0;
    background:var(--surface);
    color:var(--muted);
    font-size:var(--fs-sm);
    font-weight:700;
}
.identity-tablist button:hover{
    background:var(--surface-raised);
    color:var(--text);
}
.identity-tablist button:is(.is-active,[aria-selected="true"]){
    border-bottom-color:var(--brand);
    background:var(--surface-raised);
    color:var(--text);
    box-shadow:inset 0 -1px 0 color-mix(in srgb,var(--brand) 35%,transparent);
}
.identity-tablist button:focus-visible{
    position:relative;
    z-index:2;
    outline:3px solid var(--focus);
    outline-offset:-3px;
}
.identity-nav-link{
    min-height:40px;
    margin:0;
    padding:0 var(--space-3);
    border:1px solid var(--line-strong);
    border-radius:var(--r-ctrl);
    background:var(--surface);
    color:var(--text);
    font-size:var(--fs-sm);
    font-weight:700;
    white-space:nowrap;
}
.identity-nav-link:hover{
    border-color:var(--brand-strong);
    background:var(--surface-raised);
    color:var(--brand-strong);
}
.identity-nav-link:focus-visible{
    outline:3px solid var(--focus);
    outline-offset:2px;
}
.identity-admin-content{
    padding:var(--space-4) var(--space-4) max(var(--space-5),var(--safe-bottom));
}
.identity-admin-content>[role="tabpanel"]{
    gap:var(--space-4);
}
.identity-section-header{
    align-items:center;
    padding:0;
}
.identity-section-header h2{
    font-size:clamp(1.45rem,1.9vw,2rem);
}
.identity-section-header>.button{
    flex:0 0 auto;
}
.identity-kpis{
    gap:var(--space-2);
    border:0;
    background:transparent;
}
.identity-kpis>button,.identity-kpis>a{
    min-height:96px;
    padding:var(--space-3);
    border:1px solid var(--line);
    border-radius:var(--r-sm);
    background:var(--surface);
    box-shadow:var(--shadow-1);
}
.identity-kpis>button:hover,.identity-kpis>a:hover{
    border-color:color-mix(in srgb,var(--brand) 38%,var(--line));
    background:var(--surface-raised);
    box-shadow:var(--shadow-2);
}
.identity-kpis span{
    color:var(--brand-strong);
}
.identity-kpis strong{
    color:var(--text);
    font-variant-numeric:tabular-nums;
}
.identity-admin-panel,.identity-organisation-card,.identity-profile-builder,.identity-role-list article{
    border-color:var(--line-strong);
    border-radius:var(--r-sm);
    background:var(--surface);
    box-shadow:var(--shadow-1);
}
.identity-admin-panel>header,.identity-organisation-card>header,.identity-profile-builder>header{
    background:var(--surface-soft);
}
.identity-policy-list li,
.identity-compact-list>button{
    line-height:1.45;
}
.identity-compact-list>button{
    min-height:70px;
}
.identity-toolbar{
    grid-template-columns:minmax(280px,1.35fr) minmax(180px,.7fr) minmax(210px,.8fr) auto auto;
    gap:var(--space-3);
    padding:var(--space-3);
    border-color:var(--line-strong);
    border-radius:var(--r-sm);
    background:var(--surface);
    box-shadow:var(--shadow-1);
}
.identity-toolbar label,.identity-inline-form label,.identity-stack-form label,.identity-fields label,.identity-profile-name label{
    gap:6px;
    line-height:1.35;
}
.identity-toolbar input,
.identity-toolbar select,
.identity-inline-form input,
.identity-inline-form select,
.identity-stack-form input,
.identity-stack-form select,
.identity-fields input,
.identity-fields select,
.identity-fields textarea,
.identity-profile-name input,
.identity-select-control{
    width:100%;
    min-width:0;
    min-height:42px;
    padding:9px 11px;
    border:1px solid var(--line-strong);
    border-radius:var(--r-ctrl);
    background-color:var(--surface-raised);
    color:var(--text);
    font:inherit;
    line-height:1.35;
    box-shadow:inset 0 1px 0 color-mix(in srgb,var(--surface) 72%,transparent);
    transition:border-color var(--dur-1) var(--ease),background var(--dur-1) var(--ease),box-shadow var(--dur-1) var(--ease);
}
.identity-admin-shell select:not([multiple]),
.identity-admin-wizard select:not([multiple]){
    appearance:none;
    padding-right:36px;
    background-image:
        linear-gradient(45deg,transparent 50%,var(--muted) 50%),
        linear-gradient(135deg,var(--muted) 50%,transparent 50%);
    background-position:
        calc(100% - 16px) 50%,
        calc(100% - 11px) 50%;
    background-size:5px 5px,5px 5px;
    background-repeat:no-repeat;
}
.identity-admin-shell :is(input,select,textarea):hover,
.identity-admin-wizard :is(input,select,textarea):hover{
    border-color:color-mix(in srgb,var(--brand) 48%,var(--line-strong));
    background-color:var(--surface);
}
.identity-admin-shell :is(input,select,textarea):focus,
.identity-admin-wizard :is(input,select,textarea):focus{
    border-color:var(--brand);
    outline:3px solid var(--focus);
    outline-offset:1px;
    background-color:var(--surface);
    box-shadow:none;
}
.identity-admin-shell :is(input,select,textarea):disabled,
.identity-admin-wizard :is(input,select,textarea):disabled{
    opacity:.62;
    cursor:not-allowed;
    background-color:var(--surface-soft);
}
.identity-admin-shell :is(input[type="checkbox"],input[type="radio"]),
.identity-admin-wizard :is(input[type="checkbox"],input[type="radio"]){
    accent-color:var(--brand);
}
.identity-search-field>div{
    border-radius:var(--r-ctrl);
}
.identity-search-field i{
    z-index:1;
}
.identity-table-wrap{
    border-color:var(--line-strong);
    border-radius:var(--r-sm);
    box-shadow:var(--shadow-1);
}
.identity-table{
    line-height:1.4;
}
.identity-table th{
    background:var(--surface-raised);
}
.identity-table td{
    padding:13px 14px;
}
.identity-table td>strong,
.identity-table td>small,
.identity-table td>time{
    line-height:1.4;
}
.identity-table td>strong+small,
.identity-table td>time+small{
    margin-top:5px;
}
.identity-table td[data-label="Sécurité"]>.status-pill,
.identity-table td[data-label="Sécurité"]>.security-inline{
    margin:2px 6px 2px 0;
}
.identity-table td[data-label="État"]>.status-pill{
    margin-right:6px;
}
.identity-person>div{
    gap:2px;
}
.identity-source-label{
    margin-top:4px;
}
.identity-session-summary{
    gap:var(--space-3);
}
.identity-session-summary article{
    min-height:88px;
    padding:var(--space-3);
    border:1px solid var(--line-strong);
    border-radius:var(--r-sm);
    background:var(--surface);
    box-shadow:var(--shadow-1);
}
.identity-session-tabs{
    width:max-content;
    max-width:100%;
    gap:1px;
    padding:0;
    border:1px solid var(--line);
    border-radius:var(--r-sm);
    background:var(--line);
    overflow-x:auto;
}
.identity-session-tabs button{
    min-height:38px;
    padding:7px var(--space-3);
    border:0;
    border-bottom:2px solid transparent;
    border-radius:0;
    background:var(--surface);
    color:var(--muted);
    font:inherit;
    font-size:var(--fs-sm);
    font-weight:700;
}
.identity-session-tabs button:is(.is-active,[aria-pressed="true"]){
    border-bottom-color:var(--brand);
    background:var(--surface-raised);
    color:var(--text);
}

.identity-role-assignment-form>label{
    min-width:0;
}
.identity-session-pagination{
    min-height:58px;
    padding:var(--space-2) var(--space-3);
    display:grid;
    grid-template-columns:minmax(170px,auto) 1fr auto;
    align-items:center;
    gap:var(--space-3);
    border-top:1px solid var(--line);
    background:var(--surface-soft);
}
.identity-session-page-size{
    min-width:0;
    display:flex;
    align-items:center;
    gap:var(--space-2);
    color:var(--muted);
    font-size:var(--fs-sm);
    font-weight:700;
}
.identity-session-page-size .identity-select-control{
    width:76px;
    min-height:36px;
    padding-block:6px;
}
.identity-session-range{
    margin:0;
    color:var(--muted);
    font-size:var(--fs-sm);
    text-align:center;
}
.identity-session-page-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:var(--space-2);
    white-space:nowrap;
}
.identity-session-page-actions>span{
    color:var(--muted);
    font-size:var(--fs-sm);
}
.identity-session-page-actions strong{
    color:var(--text);
}
.identity-session-page-actions .button{
    min-height:36px;
    padding:6px 10px;
}
.identity-session-page-actions .button:disabled{
    opacity:.5;
    cursor:not-allowed;
}

.identity-structure-explainer,
.identity-structure-columns,
.identity-create-structures,
.identity-role-list,
.identity-profile-builder{
    line-height:1.45;
}
.identity-structure-explainer article,
.identity-role-list article{
    background:var(--surface);
}
.identity-create-structures details{
    border-color:var(--line-strong);
    background:var(--surface);
}
.identity-create-structures summary{
    min-height:48px;
    padding:var(--space-3);
}
.identity-role-list{
    gap:var(--space-3);
}
.identity-role-list article{
    padding:var(--space-3);
}
.identity-role-list article>header{
    padding-bottom:var(--space-2);
    border-bottom:1px solid var(--line);
}
.identity-admin-wizard>form{
    border-color:var(--line-strong);
    border-radius:var(--r-sm);
}
.identity-admin-wizard>form>header,
.identity-step-actions{
    background:var(--surface-raised);
}
.identity-admin-wizard .identity-progress{
    gap:1px;
    background:var(--line);
}
.identity-admin-wizard .identity-progress li{
    background:var(--surface-soft);
}
.identity-admin-wizard .identity-progress li.is-current{
    background:var(--surface-raised);
    color:var(--text);
}
@media(max-width:960px){
    .identity-admin-nav{grid-template-columns:1fr;padding-inline:var(--space-3)}
    .identity-nav-link{justify-self:start}
    .identity-toolbar{grid-template-columns:1fr 1fr}
    .identity-search-field{grid-column:1/-1}
}
@media(max-width:680px){
    .identity-admin-nav{margin:0;padding:7px max(var(--space-2),var(--safe-right)) 7px max(var(--space-2),var(--safe-left))}
    .identity-tablist{border-inline:0;border-radius:0}
    .identity-nav-link{width:100%;justify-content:center}
    .identity-admin-content{padding:var(--space-3) max(var(--space-2),var(--safe-right)) max(calc(var(--shell-mobile-nav-height) + var(--space-4)),var(--safe-bottom)) max(var(--space-2),var(--safe-left))}
    .identity-toolbar{grid-template-columns:1fr;gap:var(--space-2)}
    .identity-toolbar .button{width:100%}
    .identity-kpis{gap:var(--space-2)}
    .identity-kpis>button,.identity-kpis>a{min-height:88px}
}

/* --------------------------------------------------------------------------
   FIX3 — assistant de création utilisateur, fluidité et accessibilité
   -------------------------------------------------------------------------- */
.identity-admin-wizard{
    display:grid;
    place-items:center;
    padding:max(20px,var(--safe-top)) max(20px,var(--safe-right)) max(20px,var(--safe-bottom)) max(20px,var(--safe-left));
    background:color-mix(in srgb,var(--bg-deep) 76%,transparent);
    backdrop-filter:blur(4px);
    overscroll-behavior:contain;
}
.identity-admin-wizard[hidden]{display:none!important}
.identity-user-wizard{
    width:min(1040px,calc(100vw - 40px));
    height:min(760px,calc(100dvh - 40px));
    max-height:calc(100dvh - 40px);
    min-height:min(620px,calc(100dvh - 40px));
    margin:0;
    display:grid;
    grid-template-rows:auto auto auto minmax(0,1fr) auto;
    border:1px solid var(--line-strong);
    border-radius:var(--r-lg);
    background:var(--surface-raised);
    box-shadow:var(--shadow-3);
    overflow:hidden;
}
.identity-user-wizard>.identity-wizard-header{
    min-height:82px;
    padding:14px 16px 14px 18px;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:var(--space-3);
    border-bottom:1px solid var(--line);
    background:var(--surface-raised);
}
.identity-wizard-heading{
    min-width:0;
    display:grid;
    grid-template-columns:42px minmax(0,1fr);
    align-items:center;
    gap:var(--space-3);
}
.identity-wizard-heading__icon,
.identity-wizard-step-heading__icon{
    display:grid;
    place-items:center;
    flex:0 0 auto;
    border:1px solid color-mix(in srgb,var(--brand) 42%,var(--line));
    border-radius:var(--r-sm);
    background:var(--brand-soft);
    color:var(--brand);
}
.identity-wizard-heading__icon{width:42px;height:42px;font-size:1.25rem}
.identity-wizard-heading>div{min-width:0}
.identity-wizard-heading small{
    display:block;
    margin:0 0 2px;
    color:var(--brand);
    font-size:var(--fs-xs);
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.identity-wizard-heading h2{
    margin:0;
    color:var(--text);
    font-size:clamp(1.25rem,2vw,1.65rem);
    line-height:1.12;
    letter-spacing:-.025em;
}
.identity-wizard-heading p{
    max-width:760px;
    margin:3px 0 0;
    color:var(--muted);
    font-size:var(--fs-sm);
    line-height:1.4;
}
.identity-wizard-close{
    width:40px;
    height:40px;
    border-color:var(--line-strong);
    background:var(--surface);
    color:var(--muted);
}
.identity-wizard-close:hover{border-color:var(--brand);background:var(--brand-soft);color:var(--brand)}
.identity-wizard-close:focus-visible{outline:3px solid var(--focus);outline-offset:2px}

.identity-user-wizard>.identity-progress{
    min-height:58px;
    margin:0;
    padding:0 14px;
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:0;
    border:0;
    border-bottom:1px solid var(--line);
    background:var(--surface);
    list-style:none;
    overflow-x:auto;
    scrollbar-width:thin;
    scroll-snap-type:x proximity;
}
.identity-user-wizard>.identity-progress li{
    position:relative;
    min-width:0;
    min-height:57px;
    padding:0 10px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border-bottom:3px solid transparent;
    background:transparent;
    color:var(--muted);
    font-size:var(--fs-sm);
    font-weight:700;
    text-align:left;
    white-space:nowrap;
    scroll-snap-align:center;
}
.identity-progress__number{
    width:26px;
    height:26px;
    display:grid;
    place-items:center;
    flex:0 0 26px;
    border:1px solid var(--line-strong);
    border-radius:50%;
    background:var(--surface-raised);
    color:var(--muted);
    font-size:var(--fs-xs);
    font-variant-numeric:tabular-nums;
}
.identity-user-wizard>.identity-progress .identity-progress__label{
    width:auto;
    height:auto;
    min-width:0;
    max-width:100%;
    display:block;
    flex:0 1 auto;
    border:0;
    border-radius:0;
    background:transparent;
    color:inherit;
    font-size:inherit;
    line-height:1.2;
    text-align:left;
    white-space:normal;
    overflow-wrap:normal;
}
.identity-user-wizard>.identity-progress li.is-current{
    border-bottom-color:var(--brand);
    background:linear-gradient(180deg,transparent,color-mix(in srgb,var(--brand) 8%,transparent));
    color:var(--text);
    box-shadow:none;
}
.identity-user-wizard>.identity-progress li.is-current .identity-progress__number{
    border-color:var(--brand);
    background:var(--brand);
    color:var(--brand-contrast);
}
.identity-user-wizard>.identity-progress li.is-complete{color:var(--success)}
.identity-user-wizard>.identity-progress li.is-complete .identity-progress__number{
    border-color:var(--success-strong);
    background:var(--success-soft);
    color:transparent;
    font-size:0;
}
.identity-user-wizard>.identity-progress li.is-complete .identity-progress__number::before{
    content:"";
    width:6px;
    height:11px;
    border-right:2px solid var(--success);
    border-bottom:2px solid var(--success);
    transform:rotate(45deg) translate(-1px,-1px);
}

.identity-user-wizard>.identity-wizard-errors{
    margin:0;
    padding:11px 18px;
    border:0;
    border-bottom:1px solid var(--danger-strong);
    background:var(--danger-soft);
    color:var(--danger);
    font-size:var(--fs-sm);
    font-weight:700;
    line-height:1.4;
}
.identity-user-wizard>.identity-wizard-errors:focus{outline:3px solid var(--focus);outline-offset:-3px}

.identity-user-wizard>[data-identity-step]{
    min-width:0;
    min-height:0;
    margin:0;
    padding:28px 34px 34px;
    display:block;
    border:0;
    background:var(--bg);
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
}
.identity-user-wizard>[data-identity-step][hidden]{display:none!important}
.identity-wizard-step-heading{
    max-width:920px;
    margin:0 auto 24px;
    display:grid;
    grid-template-columns:38px minmax(0,1fr);
    align-items:start;
    gap:12px;
}
.identity-wizard-step-heading__icon{width:38px;height:38px;font-size:1.05rem}
.identity-wizard-step-heading__icon i{display:block;line-height:1}
.identity-wizard-step-heading>div{min-width:0}
.identity-wizard-step-heading h3{
    margin:0;
    color:var(--text);
    font-size:clamp(1.35rem,2.2vw,1.85rem);
    line-height:1.15;
    letter-spacing:-.025em;
}
.identity-wizard-step-heading h3:focus{outline:none}
.identity-user-wizard .identity-step-intro{
    max-width:760px;
    margin:5px 0 0;
    color:var(--muted);
    font-size:var(--fs-sm);
    line-height:1.5;
}
.identity-user-wizard .identity-fields{
    width:100%;
    max-width:920px;
    margin:0 auto;
    gap:18px 20px;
}
.identity-user-wizard .identity-fields.two-columns{grid-template-columns:repeat(2,minmax(0,1fr))}
.identity-user-wizard .identity-fields label,
.identity-user-wizard .identity-field{
    min-width:0;
    display:grid;
    align-content:start;
    gap:7px;
}
.identity-user-wizard .identity-field>label{display:block;color:var(--text);font-size:var(--fs-sm);font-weight:750}
.identity-user-wizard .identity-fields label>span,
.identity-user-wizard .identity-field>label>span{font-weight:750}
.identity-user-wizard .identity-fields small,
.identity-user-wizard .identity-field>small{
    min-height:18px;
    color:var(--muted);
    font-size:var(--fs-xs);
    font-weight:500;
    line-height:1.45;
}
.identity-user-wizard :is(input,select,textarea){
    min-height:44px;
    padding:9px 12px;
    border:1px solid var(--line-strong);
    border-radius:var(--r-ctrl);
    background-color:var(--surface);
    color:var(--text);
    box-shadow:inset 0 1px 0 color-mix(in srgb,var(--surface-raised) 80%,transparent);
    font:inherit;
    font-size:var(--fs-sm);
    transition:border-color var(--dur-1) var(--ease),box-shadow var(--dur-1) var(--ease),background-color var(--dur-1) var(--ease);
}
.identity-user-wizard select{
    appearance:none;
    padding-right:38px;
    background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);
    background-position:calc(100% - 17px) 50%,calc(100% - 12px) 50%;
    background-size:5px 5px,5px 5px;
    background-repeat:no-repeat;
}
.identity-user-wizard :is(input,select,textarea):hover{border-color:color-mix(in srgb,var(--brand) 38%,var(--line-strong));background-color:var(--surface-raised)}
.identity-user-wizard :is(input,select,textarea):focus{
    border-color:var(--brand);
    outline:3px solid color-mix(in srgb,var(--focus) 72%,transparent);
    outline-offset:1px;
    box-shadow:none;
}
.identity-user-wizard :is(input,select,textarea)[aria-invalid="true"]{
    border-color:var(--danger);
    outline-color:color-mix(in srgb,var(--danger) 36%,transparent);
    background:color-mix(in srgb,var(--danger-soft) 55%,var(--surface));
}
.identity-password-control{position:relative;min-width:0}
.identity-password-control input{width:100%;padding-right:48px}
.identity-password-toggle{
    position:absolute;
    top:4px;
    right:4px;
    width:36px;
    height:36px;
    display:grid;
    place-items:center;
    border:0;
    border-left:1px solid var(--line);
    border-radius:0 var(--r-ctrl) var(--r-ctrl) 0;
    background:transparent;
    color:var(--muted);
    cursor:pointer;
}
.identity-password-toggle:hover{background:var(--surface-soft);color:var(--brand)}
.identity-password-toggle:focus-visible{outline:3px solid var(--focus);outline-offset:1px}
.identity-password-requirements{
    margin:2px 0 0;
    padding:10px 12px;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px 14px;
    border:1px solid var(--line);
    border-radius:var(--r-sm);
    background:var(--surface-soft);
    list-style:none;
}
.identity-password-requirements li{
    min-width:0;
    display:grid;
    grid-template-columns:18px minmax(0,1fr);
    align-items:start;
    gap:6px;
    color:var(--muted);
    font-size:var(--fs-xs);
    line-height:1.4;
}
.identity-password-requirements i{
    margin-top:1px;
    color:var(--muted);
    opacity:.55;
}
.identity-password-requirements li.is-valid{color:var(--success)}
.identity-password-requirements li.is-valid i{color:var(--success);opacity:1}
.identity-password-requirements li.is-invalid{color:var(--danger)}
.identity-password-requirements li.is-invalid i{color:var(--danger);opacity:1}
.identity-password-strength{
    display:flex;
    align-items:center;
    gap:10px;
    color:var(--muted);
    font-size:var(--fs-xs);
}
.identity-password-strength>span{min-width:112px;display:grid;grid-template-columns:repeat(4,1fr);gap:4px}
.identity-password-strength i{height:4px;border-radius:2px;background:var(--line-strong)}
.identity-password-strength[data-strength="0"] strong{color:var(--muted)}
.identity-password-strength[data-strength="1"] i:nth-child(-n+1){background:var(--danger)}
.identity-password-strength[data-strength="2"] i:nth-child(-n+2){background:var(--warning)}
.identity-password-strength[data-strength="3"] i:nth-child(-n+3){background:var(--info)}
.identity-password-strength[data-strength="4"] i:nth-child(-n+4){background:var(--success)}
.identity-password-strength[data-strength="1"] strong{color:var(--danger)}
.identity-password-strength[data-strength="2"] strong{color:var(--warning)}
.identity-password-strength[data-strength="3"] strong{color:var(--info)}
.identity-password-strength[data-strength="4"] strong{color:var(--success)}
[data-password-match].is-valid{color:var(--success)!important}
[data-password-match].is-invalid{color:var(--danger)!important}

.identity-user-wizard .identity-role-preview{
    min-height:74px;
    padding:14px 16px;
    display:grid;
    grid-template-columns:32px minmax(0,1fr);
    align-items:start;
    gap:12px;
    border:1px solid color-mix(in srgb,var(--brand) 35%,var(--line));
    border-left:3px solid var(--brand);
    border-radius:var(--r-sm);
    background:color-mix(in srgb,var(--brand-soft) 55%,var(--surface));
    transition:background-color var(--dur-1) var(--ease);
}
.identity-user-wizard .identity-role-preview.is-updated{background:var(--brand-soft)}
.identity-role-preview>i{font-size:1.35rem;color:var(--brand)}
.identity-role-preview>div{display:grid;gap:4px}
.identity-role-preview span{color:var(--muted);font-size:var(--fs-sm);line-height:1.45}
.identity-user-wizard .identity-callout{
    min-height:100%;
    margin:0;
    padding:14px 16px;
    border:1px solid var(--line-strong);
    border-left:3px solid var(--info);
    border-radius:var(--r-sm);
    background:var(--surface-soft);
}
.identity-user-wizard .identity-security-options{
    width:100%;
    max-width:920px;
    margin:0 auto;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    border:0;
    background:transparent;
}
.identity-user-wizard .identity-security-options article{
    min-height:150px;
    padding:18px;
    display:grid;
    grid-template-columns:34px minmax(0,1fr);
    align-content:start;
    gap:12px;
    border:1px solid var(--line-strong);
    border-radius:var(--r-sm);
    background:var(--surface);
    box-shadow:var(--shadow-1);
}
.identity-user-wizard .identity-security-options article>i{font-size:1.45rem;color:var(--brand)}
.identity-user-wizard .identity-security-options article>div{display:grid;align-content:start;gap:6px}
.identity-user-wizard .identity-security-options article span{color:var(--muted);font-size:var(--fs-sm);line-height:1.45}
.identity-user-wizard .identity-security-options article em{
    width:max-content;
    margin-top:5px;
    padding:3px 7px;
    border:1px solid var(--line-strong);
    border-radius:var(--r-sm);
    background:var(--surface-soft);
    color:var(--muted);
    font-size:var(--fs-xs);
    font-style:normal;
    font-weight:700;
}
.identity-user-wizard .identity-review{
    width:100%;
    max-width:920px;
    min-height:0;
    margin:0 auto 18px;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    border:0;
    background:transparent;
}
.identity-review-group{
    min-width:0;
    border:1px solid var(--line-strong);
    border-radius:var(--r-sm);
    background:var(--surface);
    box-shadow:var(--shadow-1);
    overflow:hidden;
}
.identity-review-group>header{
    min-height:44px;
    padding:8px 12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    border-bottom:1px solid var(--line);
    background:var(--surface-raised);
}
.identity-review-group h3{margin:0;font-size:var(--fs-base)}
.identity-review-group dl{margin:0;padding:4px 12px 10px}
.identity-review-group dl>div{
    padding:8px 0;
    display:grid;
    grid-template-columns:minmax(125px,.7fr) minmax(0,1.3fr);
    gap:12px;
    border-bottom:1px solid var(--line);
}
.identity-review-group dl>div:last-child{border-bottom:0}
.identity-review-group dt{color:var(--muted);font-size:var(--fs-xs);font-weight:700}
.identity-review-group dd{margin:0;color:var(--text);font-size:var(--fs-sm);font-weight:650;overflow-wrap:anywhere}
.identity-user-wizard>[data-step-title="Vérification"]>.identity-alert{max-width:920px;margin:0 auto}

.identity-user-wizard>.identity-step-actions{
    min-height:68px;
    margin:0;
    padding:10px 16px max(10px,var(--safe-bottom));
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:16px;
    border-top:1px solid var(--line);
    background:var(--surface-raised);
}
.identity-user-wizard .identity-step-status{
    min-width:0;
    color:var(--muted);
    font-size:var(--fs-sm);
    font-weight:650;
    text-align:left;
}
.identity-step-actions__buttons{display:flex;align-items:center;justify-content:flex-end;gap:8px}
.identity-step-actions__buttons .button{min-width:104px;min-height:42px;gap:7px}
.identity-step-actions__buttons .button.primary{min-width:126px}
.identity-step-actions__buttons .button[hidden]{display:none!important}

.identity-user-wizard>[data-identity-step].is-entering-forward{animation:identity-wizard-forward 180ms var(--ease) both}
.identity-user-wizard>[data-identity-step].is-entering-backward{animation:identity-wizard-backward 180ms var(--ease) both}
@keyframes identity-wizard-forward{from{opacity:.35;transform:translateX(10px)}to{opacity:1;transform:none}}
@keyframes identity-wizard-backward{from{opacity:.35;transform:translateX(-10px)}to{opacity:1;transform:none}}

@media(max-width:900px){
    .identity-admin-wizard{padding:12px}
    .identity-user-wizard{width:calc(100vw - 24px);height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);min-height:0}
    .identity-user-wizard>.identity-progress{padding-inline:8px;display:flex}
    .identity-user-wizard>.identity-progress li{min-width:132px;flex:1 0 132px}
    .identity-user-wizard>[data-identity-step]{padding:24px}
}
@media(max-width:700px){
    .identity-admin-wizard{padding:0;place-items:stretch;background:var(--bg)}
    .identity-user-wizard{
        width:100vw;
        height:100dvh;
        max-height:100dvh;
        min-height:100dvh;
        border:0;
        border-radius:0;
        grid-template-rows:auto auto auto minmax(0,1fr) auto;
    }
    .identity-user-wizard>.identity-wizard-header{min-height:72px;padding:max(10px,var(--safe-top)) max(12px,var(--safe-right)) 10px max(12px,var(--safe-left))}
    .identity-wizard-heading{grid-template-columns:36px minmax(0,1fr);gap:10px}
    .identity-wizard-heading__icon{width:36px;height:36px;font-size:1rem}
    .identity-wizard-heading small{display:none}
    .identity-wizard-heading p{display:none}
    .identity-wizard-heading h2{font-size:var(--fs-lg)}
    .identity-wizard-close{width:40px;height:40px}
    .identity-user-wizard>.identity-progress{min-height:50px;padding:0;overscroll-behavior-inline:contain}
    .identity-user-wizard>.identity-progress li{min-width:112px;min-height:49px;padding:0 9px;font-size:var(--fs-xs)}
    .identity-progress__number{width:23px;height:23px;flex-basis:23px}
    .identity-user-wizard>[data-identity-step]{padding:20px max(16px,var(--safe-right)) 28px max(16px,var(--safe-left));scrollbar-gutter:auto}
    .identity-wizard-step-heading{margin-bottom:20px;grid-template-columns:34px minmax(0,1fr);gap:10px}
    .identity-wizard-step-heading__icon{width:34px;height:34px}
    .identity-wizard-step-heading h3{font-size:1.35rem}
    .identity-user-wizard .identity-fields.two-columns,
    .identity-user-wizard .identity-security-options,
    .identity-user-wizard .identity-review{grid-template-columns:1fr}
    .identity-user-wizard .identity-fields{gap:16px}
    .identity-user-wizard .identity-security-options article{min-height:0;padding:15px}
    .identity-review-group dl>div{grid-template-columns:1fr;gap:3px}
    .identity-user-wizard>.identity-step-actions{
        min-height:0;
        padding:9px max(12px,var(--safe-right)) max(9px,var(--safe-bottom)) max(12px,var(--safe-left));
        grid-template-columns:1fr;
        gap:8px;
    }
    .identity-user-wizard .identity-step-status{text-align:left;font-size:var(--fs-xs)}
    .identity-step-actions__buttons{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
    .identity-step-actions__buttons .button{width:100%;min-width:0}
    .identity-step-actions__buttons [data-step-submit]{grid-column:1/-1}
}
@media(max-width:420px){
    .identity-progress__label{max-width:72px;overflow:hidden;text-overflow:ellipsis}
    .identity-password-requirements{grid-template-columns:1fr}
    .identity-password-strength{align-items:flex-start;flex-direction:column;gap:5px}
    .identity-password-strength>span{width:100%;min-width:0}
    .identity-step-actions__buttons{grid-template-columns:1fr}
    .identity-step-actions__buttons [data-step-submit]{grid-column:auto}
}
@media(max-height:650px) and (orientation:landscape){
    .identity-admin-wizard{padding:8px}
    .identity-user-wizard{height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);min-height:0}
    .identity-user-wizard>.identity-wizard-header{min-height:66px;padding-block:9px}
    .identity-user-wizard>.identity-progress{min-height:46px}
    .identity-user-wizard>.identity-progress li{min-height:45px}
    .identity-user-wizard>[data-identity-step]{padding-block:18px}
    .identity-user-wizard>.identity-step-actions{min-height:58px}
}
@media(prefers-reduced-motion:reduce){
    .identity-user-wizard>[data-identity-step].is-entering-forward,
    .identity-user-wizard>[data-identity-step].is-entering-backward{animation:none}
    .identity-user-wizard :is(input,select,textarea),
    .identity-role-preview{transition:none!important}
}
@media(forced-colors:active){
    .identity-admin-wizard{background:Canvas}
    .identity-user-wizard,
    .identity-wizard-heading__icon,
    .identity-wizard-step-heading__icon,
    .identity-role-preview,
    .identity-security-options article,
    .identity-review-group{border:1px solid CanvasText}
    .identity-user-wizard>.identity-progress li.is-current{outline:2px solid Highlight;outline-offset:-2px}
    .identity-user-wizard :is(input,select,textarea):focus,
    .identity-password-toggle:focus-visible,
    .identity-wizard-close:focus-visible{outline:2px solid Highlight}
}

/* ========================================================================== 
   Catalogue humain des profils et séparation des responsabilités — lot 0.33.8
   ========================================================================== */
.identity-role-category{display:grid;gap:var(--space-3);margin-bottom:var(--space-4)}
.identity-role-category>header{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--space-3);padding-bottom:var(--space-2);border-bottom:1px solid var(--line)}
.identity-role-category>header h3{margin:3px 0 4px;font-size:var(--fs-xl);line-height:1.15}
.identity-role-category>header p{max-width:880px;margin:0;color:var(--muted)}
.identity-role-list--responsibilities{grid-template-columns:repeat(3,minmax(0,1fr))}
.identity-role-list>article{position:relative;display:flex;flex-direction:column;gap:var(--space-2)}
.identity-role-list>article>header{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-2)}
.identity-role-list>article>header>div{min-width:0;display:grid;gap:2px}
.identity-role-list>article>header small{color:var(--muted);font-size:var(--fs-xs)}
.identity-help-button{
    width:32px;height:32px;flex:0 0 32px;display:inline-grid;place-items:center;padding:0;
    border:1px solid var(--line-strong);border-radius:var(--r-sm);background:var(--surface);
    color:var(--brand);font-family:inherit;font-size:var(--fs-sm);font-weight:800;line-height:1;cursor:pointer
}
.identity-help-button:hover{border-color:var(--brand);background:var(--brand-soft)}
.identity-help-button:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.identity-ticket-capability{display:grid;grid-template-columns:28px minmax(0,1fr);gap:9px;align-items:start;padding:10px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface-soft)}
.identity-ticket-capability>i{width:28px;height:28px;display:grid;place-items:center;border:1px solid var(--line-strong);border-radius:var(--r-sm);color:var(--brand);background:var(--surface)}
.identity-ticket-capability>span{display:grid;gap:2px;color:var(--muted);font-size:var(--fs-xs);line-height:1.4}
.identity-ticket-capability strong{color:var(--text);font-size:var(--fs-sm)}
.identity-ticket-capability.is-secondary>i{color:var(--muted)}

.identity-role-assignment-form{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(260px,1fr);gap:var(--space-3);padding:var(--space-3)}
.identity-role-assignment-form>.identity-responsibility-fieldset,
.identity-role-assignment-form>.identity-effective-summary,
.identity-role-assignment-form>.identity-combination-error{grid-column:1/-1}
.identity-role-assignment-form>.button{grid-column:2;justify-self:end;min-width:170px}
.identity-responsibility-fieldset,.identity-primary-role-picker,.identity-responsibility-picker{
    min-width:0;margin:0;padding:var(--space-3);border:1px solid var(--line-strong);border-radius:var(--r-sm);background:var(--surface)
}
.identity-responsibility-fieldset>legend,.identity-primary-role-picker>legend,.identity-responsibility-picker>legend{padding:0 6px;color:var(--text);font-weight:800}
.identity-responsibility-fieldset>p,.identity-primary-role-picker>p,.identity-responsibility-picker>p{margin:0 0 var(--space-2);color:var(--muted);font-size:var(--fs-sm)}
.identity-responsibility-compact{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.identity-responsibility-compact>div{min-width:0;display:flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface-soft)}
.identity-responsibility-compact label{min-width:0;flex:1;display:flex;align-items:center;gap:8px;padding:9px 10px;cursor:pointer}
.identity-responsibility-compact input{width:18px;height:18px;flex:0 0 auto;accent-color:var(--brand)}
.identity-responsibility-compact .identity-help-button{width:28px;height:28px;flex-basis:28px;margin-right:5px}

.identity-role-composer{display:grid;gap:var(--space-3);width:100%;max-width:1100px;margin:0 auto}
.identity-primary-role-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.identity-primary-role-option,.identity-responsibility-option{min-width:0;position:relative;display:flex;align-items:stretch;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface-soft);overflow:hidden}
.identity-primary-role-option:has(input:checked),.identity-responsibility-option:has(input:checked){border-color:var(--brand);box-shadow:inset 3px 0 0 var(--brand);background:var(--brand-soft)}
.identity-primary-role-option:has(input:focus-visible),.identity-responsibility-option:has(input:focus-visible){outline:3px solid var(--focus);outline-offset:2px}
.identity-primary-role-option>label,.identity-responsibility-option>label{min-width:0;flex:1;display:flex;align-items:flex-start;gap:10px;padding:12px;cursor:pointer}
.identity-primary-role-option input,.identity-responsibility-option input{width:18px;height:18px;flex:0 0 18px;margin-top:2px;accent-color:var(--brand)}
.identity-primary-role-option__body,.identity-responsibility-option label>span{min-width:0;display:grid;gap:4px}
.identity-primary-role-option__body strong,.identity-responsibility-option strong{color:var(--text)}
.identity-primary-role-option__body small,.identity-responsibility-option small{color:var(--muted);line-height:1.4}
.identity-primary-role-option__body em{display:flex;align-items:flex-start;gap:6px;margin-top:3px;color:var(--muted);font-size:var(--fs-xs);font-style:normal;line-height:1.35}
.identity-primary-role-option>.identity-help-button,.identity-responsibility-option>.identity-help-button{align-self:flex-start;margin:8px 8px 0 0}
.identity-responsibility-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.identity-responsibility-option:has(input:disabled){opacity:.58;background:var(--surface-soft)}
.identity-responsibility-option:has(input:disabled)>label{cursor:not-allowed}
.identity-access-bottom-grid{display:grid;grid-template-columns:minmax(240px,.72fr) minmax(0,1.28fr);gap:var(--space-3);align-items:start}
.identity-effective-summary{min-width:0;display:grid;gap:10px;padding:var(--space-3);border:1px solid var(--line-strong);border-radius:var(--r-sm);background:var(--surface-raised)}
.identity-effective-summary>strong{font-size:var(--fs-base)}
.identity-effective-summary__ticket{margin:0;padding:8px 10px;border-left:3px solid var(--brand);background:var(--brand-soft);color:var(--text);font-weight:700}
.identity-effective-summary>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.identity-effective-summary section{padding:10px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface)}
.identity-effective-summary section h4{margin:0 0 7px;font-size:var(--fs-sm)}
.identity-effective-summary section ul{margin:0;padding-left:18px;color:var(--muted);font-size:var(--fs-xs);line-height:1.55}
.identity-effective-summary .is-allowed{border-top:3px solid var(--success)}
.identity-effective-summary .is-denied{border-top:3px solid var(--danger)}
.identity-combination-error{padding:10px 12px;border:1px solid var(--danger);border-radius:var(--r-sm);background:var(--danger-soft);color:var(--danger-strong);font-weight:700}
.identity-combination-error:focus{outline:3px solid var(--focus);outline-offset:2px}

.identity-role-help-overlay{
    position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:24px;
    background:color-mix(in srgb,var(--bg) 80%,transparent);overscroll-behavior:contain
}
.identity-role-help-overlay[hidden]{display:none!important}
.identity-role-help-dialog{
    width:min(780px,calc(100vw - 48px));max-height:min(820px,calc(100dvh - 48px));min-height:0;
    display:grid;grid-template-rows:auto minmax(0,1fr) auto;border:1px solid var(--line-strong);
    border-radius:var(--r-md);background:var(--surface);box-shadow:var(--shadow-3);overflow:hidden
}
.identity-role-help-dialog>header{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-3);padding:var(--space-3);border-bottom:1px solid var(--line);background:var(--surface-raised)}
.identity-role-help-dialog h2{margin:3px 0 0;font-size:var(--fs-xl)}
.identity-role-help-content{min-height:0;overflow:auto;padding:var(--space-3);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-3)}
.identity-role-help-content>section{min-width:0;padding:var(--space-3);border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface-soft)}
.identity-role-help-content h3{margin:0 0 7px;font-size:var(--fs-base)}
.identity-role-help-content p{margin:0;color:var(--muted);line-height:1.5}
.identity-role-help-content ul{margin:0;padding-left:20px;color:var(--muted);line-height:1.55}
.identity-role-help-highlight{display:grid!important;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:start}
.identity-role-help-highlight>i{width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--line-strong);border-radius:var(--r-sm);background:var(--surface);color:var(--brand)}
.identity-role-help-dialog>footer{display:flex;justify-content:flex-end;padding:10px var(--space-3);border-top:1px solid var(--line);background:var(--surface-raised)}
body.is-role-help-open{overflow:hidden}

@media(max-width:1100px){
    .identity-role-list--responsibilities,.identity-responsibility-grid,.identity-responsibility-compact{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
    .identity-role-category>header{align-items:flex-start;flex-direction:column}
    .identity-role-list--responsibilities,.identity-primary-role-grid,.identity-responsibility-grid,.identity-responsibility-compact,.identity-access-bottom-grid,.identity-role-assignment-form{grid-template-columns:1fr}
    .identity-role-assignment-form>.button{grid-column:1;justify-self:stretch;width:100%}
    .identity-effective-summary>div,.identity-role-help-content{grid-template-columns:1fr}
    .identity-role-help-overlay{padding:0;place-items:stretch}
    .identity-role-help-dialog{width:100vw;max-width:none;height:100dvh;max-height:100dvh;border:0;border-radius:0}
    .identity-role-help-dialog>header{padding:max(12px,var(--safe-top)) max(14px,var(--safe-right)) 12px max(14px,var(--safe-left))}
    .identity-role-help-content{padding:16px max(14px,var(--safe-right)) 24px max(14px,var(--safe-left))}
    .identity-role-help-dialog>footer{padding:10px max(14px,var(--safe-right)) max(10px,var(--safe-bottom)) max(14px,var(--safe-left))}
    .identity-role-help-dialog>footer .button{width:100%}
}
@media(forced-colors:active){
    .identity-help-button,.identity-ticket-capability,.identity-primary-role-option,.identity-responsibility-option,.identity-effective-summary,.identity-role-help-dialog,.identity-role-help-content>section{border:1px solid CanvasText}
    .identity-primary-role-option:has(input:checked),.identity-responsibility-option:has(input:checked){outline:2px solid Highlight;box-shadow:none}
}

/* Récupération administrateur de compte */
.identity-recovery-issued{
    display:grid;grid-template-columns:44px minmax(0,1fr);gap:var(--space-3);align-items:start;
    margin:0 0 var(--space-3);padding:var(--space-3);border:1px solid var(--warning);
    border-left:4px solid var(--warning);border-radius:var(--r-sm);background:var(--warning-soft)
}
.identity-recovery-issued__icon{width:44px;height:44px;display:grid;place-items:center;border:1px solid var(--warning);background:var(--surface);color:var(--warning-strong);font-size:var(--icon-md)}
.identity-recovery-issued__content{min-width:0;display:grid;gap:var(--space-2)}
.identity-recovery-issued h2{margin:0;font-size:var(--fs-lg)}
.identity-recovery-issued p:not(.panel-eyebrow){margin:0;color:var(--muted);line-height:1.5}
.identity-recovery-issued dl,.identity-recovery-result dl{display:flex;flex-wrap:wrap;gap:var(--space-3);margin:0}
.identity-recovery-issued dl>div,.identity-recovery-result dl>div{display:grid;gap:2px}
.identity-recovery-issued dt,.identity-recovery-result dt{color:var(--muted);font-size:var(--fs-xs);font-weight:var(--fw-label);text-transform:uppercase;letter-spacing:.06em}
.identity-recovery-issued dd,.identity-recovery-result dd{margin:0;font-weight:var(--fw-label)}
.identity-recovery-token-row{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--space-2);align-items:stretch}
.identity-recovery-token-row code{min-width:0;display:flex;align-items:center;padding:10px 12px;border:1px solid var(--line-strong);background:var(--bg-deep);color:var(--text);font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:var(--fs-sm);overflow-wrap:anywhere;user-select:all}
.identity-action-menu__note{min-height:40px;padding:8px var(--space-2);display:flex;align-items:center;gap:var(--space-2);color:var(--muted);font-size:var(--fs-xs);line-height:1.35}

.identity-recovery-overlay{
    position:fixed;inset:0;z-index:1250;display:grid;place-items:center;padding:24px;
    background:color-mix(in srgb,var(--bg) 80%,transparent);overscroll-behavior:contain
}
.identity-recovery-overlay[hidden]{display:none!important}
.identity-recovery-dialog{
    width:min(720px,calc(100vw - 48px));max-height:min(820px,calc(100dvh - 48px));min-height:0;
    display:grid;grid-template-rows:auto minmax(0,1fr);border:1px solid var(--line-strong);
    border-radius:var(--r-md);background:var(--surface);box-shadow:var(--shadow-3);overflow:hidden
}
.identity-recovery-dialog>header{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-3);padding:var(--space-3);border-bottom:1px solid var(--line);background:var(--surface-raised)}
.identity-recovery-dialog h2{margin:3px 0 0;font-size:var(--fs-xl)}
.identity-recovery-dialog>form{min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto}
.identity-recovery-dialog__body{min-height:0;overflow:auto;display:grid;gap:var(--space-3);padding:var(--space-3)}
.identity-recovery-dialog__body>p{margin:0;color:var(--muted);line-height:1.55}
.identity-recovery-dialog label{display:grid;gap:var(--space-2);font-weight:var(--fw-label)}
.identity-recovery-dialog label select{width:100%;min-height:var(--touch-target);padding:9px 38px 9px 11px;border:1px solid var(--line-strong);border-radius:var(--r-sm);background:var(--surface);color:var(--text);font:inherit}
.identity-recovery-dialog label select:focus{border-color:var(--brand);outline:3px solid var(--focus);outline-offset:1px}
.identity-recovery-dialog label small{color:var(--muted);font-size:var(--fs-xs);font-weight:var(--fw-body)}
.identity-recovery-dialog>form>footer{display:flex;justify-content:flex-end;gap:var(--space-2);padding:10px var(--space-3);border-top:1px solid var(--line);background:var(--surface-raised)}
.identity-recovery-user{display:grid;grid-template-columns:42px minmax(0,1fr);gap:var(--space-3);align-items:center;padding:var(--space-3);border:1px solid var(--line);background:var(--surface-soft)}
.identity-recovery-user>div{min-width:0;display:grid;gap:2px}.identity-recovery-user span:not(.avatar){color:var(--muted);font-size:var(--fs-sm);overflow-wrap:anywhere}
.identity-recovery-warning{display:grid;grid-template-columns:36px minmax(0,1fr);gap:var(--space-3);align-items:start;padding:var(--space-3);border:1px solid var(--warning);border-left:3px solid var(--warning);background:var(--warning-soft)}
.identity-recovery-warning>i{width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--warning);background:var(--surface);color:var(--warning-strong)}
.identity-recovery-warning>div{display:grid;gap:3px}.identity-recovery-warning span{color:var(--muted);font-size:var(--fs-xs);line-height:1.5}
.identity-recovery-dialog__error{padding:10px 12px;border:1px solid var(--danger);background:var(--danger-soft);color:var(--danger-strong);font-weight:var(--fw-label)}
.identity-recovery-dialog__error:focus{outline:3px solid var(--focus);outline-offset:2px}
.identity-recovery-result{display:grid;gap:var(--space-2);padding:var(--space-3);border:1px solid var(--success);border-left:4px solid var(--success);background:var(--success-soft)}
.identity-recovery-result h3{margin:0;font-size:var(--fs-lg)}
.identity-recovery-result>p:not(.panel-eyebrow){margin:0;color:var(--muted);font-size:var(--fs-xs);line-height:1.45}
body.is-recovery-dialog-open{overflow:hidden}

@media(max-width:680px){
    .identity-recovery-issued{grid-template-columns:1fr}.identity-recovery-issued__icon{display:none}.identity-recovery-token-row{grid-template-columns:1fr}.identity-recovery-token-row .button{width:100%}
    .identity-recovery-overlay{padding:0;place-items:stretch}.identity-recovery-dialog{width:100vw;max-width:none;height:100dvh;max-height:100dvh;border:0;border-radius:0}
    .identity-recovery-dialog>header{padding:max(12px,var(--safe-top)) max(14px,var(--safe-right)) 12px max(14px,var(--safe-left))}
    .identity-recovery-dialog__body{padding:16px max(14px,var(--safe-right)) 24px max(14px,var(--safe-left))}
    .identity-recovery-dialog>form>footer{padding:10px max(14px,var(--safe-right)) max(10px,var(--safe-bottom)) max(14px,var(--safe-left));display:grid;grid-template-columns:1fr}
    .identity-recovery-dialog>form>footer .button{width:100%}
}
@media(forced-colors:active){.identity-recovery-issued,.identity-recovery-overlay .identity-recovery-dialog,.identity-recovery-user,.identity-recovery-warning,.identity-recovery-result,.identity-recovery-token-row code{border:1px solid CanvasText}}

@media(max-width:760px){
    .identity-session-pagination{grid-template-columns:1fr;align-items:stretch}
    .identity-session-page-size{justify-content:space-between}
    .identity-session-range{text-align:left}
    .identity-session-page-actions{justify-content:space-between;white-space:normal}
    .identity-session-page-actions .button{font-size:0}
    .identity-session-page-actions .button i{margin:0;font-size:1rem}
}
@media(forced-colors:active){
    .identity-select-control,.identity-session-pagination{border:1px solid CanvasText}
}
