/* Pages de compte BIMCheck Audit (connexion, invitation, mon compte, administration).
   Mêmes jetons que l'application (../workbench/ui/styles/tokens.css) : DM Sans, surfaces,
   accent réservé à l'action principale, focus visible, cibles tactiles de 44 px. */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.compte { max-width: 1040px; margin: 0 auto; padding: 0 16px 48px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-1); text-decoration: none; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.brand b { font-weight: 500; color: var(--text-2); }
.bar-tools { display: flex; align-items: center; gap: 8px; }
.langs { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-1); overflow: hidden; }
.lang-btn, .icon-btn {
  min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--text-2);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.lang-btn[aria-pressed="true"] { background: var(--bg-3); color: var(--text-1); }
.icon-btn { border: 1px solid var(--line-2); border-radius: var(--r-1); font-size: 17px; }
.card {
  max-width: 440px; margin: 24px auto 0; padding: 28px 24px;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-4);
}
.card:has(table) { max-width: 1000px; }
h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.2; letter-spacing: -.02em; }
h2 { margin: 28px 0 8px; font-size: 17px; }
.lead { margin: 0 0 20px; color: var(--text-2); }
.aside { margin: 16px 0 0; color: var(--text-2); font-size: 14px; }
.muted { color: var(--text-3); }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
.field { display: grid; gap: 6px; margin: 0 0 16px; }
label { font-weight: 600; font-size: 14px; }
input[type="email"], input[type="text"], input[type="password"], select {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line-2); border-radius: var(--r-1);
  background: var(--bg-0); color: var(--text-1); font: inherit;
}
input::placeholder { color: var(--text-3); }
.hint { margin: 0; color: var(--text-3); font-size: 13px; }
.check { display: flex; align-items: center; gap: 10px; margin: -4px 0 16px; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.check label { font-weight: 500; }
button { font: inherit; }
.primary, .secondary, .small {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r-1);
  font-weight: 700; text-decoration: none; cursor: pointer;
}
.primary { width: 100%; border: 0; background: var(--accent-strong); color: var(--on-accent); }
.primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.primary:disabled { opacity: .65; cursor: progress; }
.secondary, .small { border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text-1); }
.secondary:hover, .small:hover { background: var(--bg-3); color: var(--text-1); }
.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.actions form, .row-form { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.status { margin: 0 0 16px; min-height: 0; font-size: 14px; }
.status:empty { display: none; }
.status.error { padding: 10px 12px; border-radius: var(--r-1); background: var(--sev-blocking-bg); color: var(--text-1); border-left: 3px solid var(--sev-blocking); }
.status.ok { padding: 10px 12px; border-radius: var(--r-1); background: var(--sev-info-bg); color: var(--text-1); border-left: 3px solid var(--ok); }
.local-note { max-width: 440px; margin: 20px auto 0; color: var(--text-3); font-size: 13px; text-align: center; }
.inline-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.inline-form .field { margin: 0; }
.inline-form .primary { width: auto; }
.link-box { margin: 16px 0 0; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--bg-2); }
.link-row { display: flex; gap: 8px; margin-top: 6px; }
.link-row input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.link-row .primary { width: auto; flex: none; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-2); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--text-2); font-weight: 600; background: var(--bg-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.mail { overflow-wrap: anywhere; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--sev-info-bg); color: var(--text-1); }
.pill.active, .pill.used { box-shadow: inset 0 0 0 1px var(--ok); }
.pill.disabled, .pill.revoked, .pill.expired { box-shadow: inset 0 0 0 1px var(--sev-blocking); }
.pill.pending { box-shadow: inset 0 0 0 1px var(--sev-review); }
@media (max-width: 640px) {
  .card { margin-top: 8px; padding: 22px 16px; border-radius: var(--r-3); }
  .inline-form { grid-template-columns: 1fr; }
  .inline-form .primary { width: 100%; }
  .link-row { flex-direction: column; }
  .link-row .primary { width: 100%; }
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* Clés d'API (D-S1-08) : une carte par fournisseur, en grille sur grand écran, empilée sur mobile. */
.card:has(.keys) { max-width: 1000px; }
.keys { margin-top: 8px; }
.keys > .hint { margin-bottom: 8px; }
.key-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; margin: 16px 0 8px; }
.key-card { display: grid; align-content: start; gap: 8px; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--bg-2); min-width: 0; }
.key-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.key-head h3 { margin: 0; font-size: 15px; }
.key-note { overflow-wrap: anywhere; }
.key-form { display: grid; gap: 6px; margin: 0; }
.key-form input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.key-form input:disabled, .settings-form input:disabled { opacity: .6; cursor: not-allowed; }
.key-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.key-actions .small { min-height: 44px; }
.small.accent { border: 0; background: var(--accent-strong); color: var(--on-accent); }
.small.accent:hover { background: var(--accent-hover); color: var(--on-accent); }
.small:disabled { opacity: .55; cursor: not-allowed; }
.key-form .status { margin: 4px 0 0; }
.key-sub { margin: 20px 0 8px; font-size: 15px; }
.settings-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
@media (max-width: 640px) {
  .key-actions .small { flex: 1 1 auto; }
  .settings-form { grid-template-columns: 1fr; }
}
