:root{--bg:#f4f7fb;--card:#fff;--text:#102a43;--muted:#66788a;--line:#dfe7ef;--accent:#f47a20;--accent2:#0f4c81}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text)}
a{color:var(--accent2);text-decoration:none}
.topbar{height:72px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 32px}
.brand{display:flex;align-items:baseline;gap:12px}.brand strong{font-size:24px}.brand span{color:var(--muted)}
nav{display:flex;gap:22px}nav a{font-weight:600}
.container{max-width:1180px;margin:34px auto;padding:0 20px;min-height:calc(100vh - 150px)}
.footer{text-align:center;color:var(--muted);padding:25px}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:24px;box-shadow:0 8px 25px rgba(15,76,129,.05)}
.narrow{max-width:620px;margin:50px auto}.login-wrap{display:flex;justify-content:center;padding-top:50px}.login-card{width:100%;max-width:460px;padding:34px}
h1{font-size:34px;margin:8px 0 10px}h2{margin-top:0}.eyebrow{font-size:12px;letter-spacing:.14em;font-weight:800;color:var(--accent)}
.muted{color:var(--muted)}.small{font-size:12px}
form{display:grid;gap:16px;margin-top:20px}label{display:grid;gap:7px;font-weight:600}
input,select,textarea{width:100%;padding:12px 13px;border:1px solid #cbd6e2;border-radius:9px;background:#fff;font:inherit}
input:focus,select:focus,textarea:focus{outline:2px solid rgba(15,76,129,.15);border-color:var(--accent2)}
button,.button{display:inline-block;border:0;border-radius:9px;background:var(--accent2);color:#fff;padding:12px 18px;font-weight:700;cursor:pointer}
button:hover,.button:hover{filter:brightness(.95)}
.flash{padding:13px 15px;border-radius:9px;margin:15px 0}.flash.error{background:#fff1f1;color:#9d1c1c}.flash.success{background:#ecf8ef;color:#176b2c}.flash.info{background:#eef6ff;color:#175a94}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.two-cols{display:grid;grid-template-columns:380px 1fr;gap:20px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:20px 0}.stats .card{display:flex;flex-direction:column}.stats strong{font-size:32px}.stats span{color:var(--muted)}
.app-card .status{display:inline-block;font-size:11px;font-weight:800;background:#eef4f9;padding:6px 9px;border-radius:999px;margin-bottom:12px}.app-card .client{font-weight:700;color:var(--accent);margin-bottom:10px}.link-card{display:block;color:inherit}.link-card:hover{border-color:#b6c8d8}
table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:12px 8px;border-bottom:1px solid var(--line);vertical-align:top}th{font-size:12px;text-transform:uppercase;color:var(--muted)}
code{background:#f0f3f6;padding:2px 5px;border-radius:4px}
@media(max-width:800px){.grid,.stats,.two-cols{grid-template-columns:1fr}.topbar{height:auto;padding:18px;align-items:flex-start;gap:15px;flex-direction:column}nav{flex-wrap:wrap}.container{margin-top:20px}}

/* Upgrade gestion des mots de passe */
.button-link{border:0;background:transparent;color:var(--accent2);padding:5px 0;font:inherit;font-weight:700;cursor:pointer}
.button-link:hover{text-decoration:underline;filter:none}
.password-dialog{width:min(520px,calc(100% - 28px));border:0;border-radius:16px;padding:0;box-shadow:0 20px 70px rgba(16,42,67,.25)}
.password-dialog::backdrop{background:rgba(16,42,67,.45)}
.password-form{padding:26px;margin:0}
.dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.dialog-head h2{margin:5px 0 0}
.dialog-close{background:transparent;color:var(--muted);padding:0;font-size:30px;line-height:1}
.dialog-close:hover{filter:none;color:var(--text)}
.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}
.button.secondary{background:#e9eff5;color:var(--text)}
@media(max-width:600px){.dialog-actions{flex-direction:column-reverse}.dialog-actions .button,.dialog-actions button{width:100%}}

.app-access{border:1px solid var(--line);border-radius:9px;padding:12px;display:grid;gap:8px}.app-access legend{font-weight:700;padding:0 6px}.check{display:flex;align-items:center;gap:9px;font-weight:600}.check input{width:auto;margin:0}#access-apps{display:grid;gap:10px;margin:12px 0}

/* Sprint 1.5 - espace utilisateur */
.profile-shell{max-width:1050px;margin:0 auto}.profile-heading{display:flex;align-items:center;gap:16px;margin-bottom:22px}.profile-heading h1{margin:0 0 4px}.profile-heading p{margin:0}.profile-avatar{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:#e9eef5;font-size:24px;font-weight:800;color:var(--accent2)}.profile-tabs{display:flex;gap:28px;background:#fff;border:1px solid var(--line);border-radius:14px 14px 0 0;padding:0 22px}.profile-tabs a{padding:17px 4px;color:var(--text);font-weight:600}.profile-tabs a.active{color:#075fc6;border-bottom:3px solid #075fc6}.profile-panel{display:grid;grid-template-columns:64px 1fr minmax(180px,300px);align-items:center;gap:18px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:22px 26px;margin:16px 0;box-shadow:0 5px 18px rgba(15,76,129,.035)}.profile-tabs+.profile-panel{border-radius:0 0 14px 14px;margin-top:0}.security-icon{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;font-size:25px;background:#eef2f7}.security-icon.success{background:#e3f7ea}.security-icon.info{background:#e6efff}.security-icon.warning{background:#fff2cf}.security-copy h2{font-size:20px;margin:0 0 8px}.security-copy p{margin:4px 0;color:#445a70}.security-action{text-align:right}.button.outline{background:#fff;color:#075fc6;border:1px solid #8ab8ee}.status-pill{display:inline-block;margin-top:8px;padding:7px 11px;border-radius:8px;background:#eef2f7;font-size:13px;font-weight:700}.status-pill.ok{background:#e8f8ed;color:#13813d}.status-pill.warn{background:#fff3d7;color:#8a5b00}.profile-section-title{margin:28px 0 8px}.security-note{background:#eef6ff;border:1px solid #d6e8fb;border-radius:12px;padding:18px 22px;line-height:1.5}.topbar nav a[href="/my-password.php"]{display:none}.topbar nav:has(a[href="/my-password.php"])::before{content:""}.topbar nav a[href="/logout.php"]{order:9}
@media(max-width:800px){.profile-tabs{overflow-x:auto;gap:18px}.profile-panel{grid-template-columns:54px 1fr}.security-action{grid-column:1/-1;text-align:left}.security-action .button{width:100%;text-align:center}.profile-heading{align-items:flex-start}}
/* Sprint 4.1.0 - Secrets Microsoft des applications */
.status-pill.crit{background:#fdeaea;color:#a61b1b}
.ms-secret-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.ms-dl{display:grid;grid-template-columns:190px 1fr;gap:8px 14px;margin:16px 0}.ms-dl dt{font-weight:700;color:var(--muted);font-size:13px}.ms-dl dd{margin:0}
.ms-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;padding:0;margin:10px 0 20px;list-style:none;counter-reset:mss}
.ms-steps li{counter-increment:mss;position:relative;padding-left:44px}.ms-steps li::before{content:counter(mss);position:absolute;left:0;top:0;width:32px;height:32px;border-radius:50%;border:2px solid var(--accent2);color:var(--accent2);display:grid;place-items:center;font-weight:800}
.ms-steps strong{display:block;margin-bottom:4px}.ms-steps span{color:var(--muted);font-size:13px}
.ms-renew-form{display:grid;grid-template-columns:1fr 220px auto;gap:14px;align-items:end}.ms-renew-form label{margin:0}
.inline-form{display:inline}
@media(max-width:900px){.ms-secret-grid,.ms-renew-form,.ms-steps{grid-template-columns:1fr}.ms-dl{grid-template-columns:1fr}}
