/* Genius ID — feuille unique (CSP : aucun style en ligne). Style shadcn/ui, thème sombre neutre (demande du
   propriétaire, 2026-11-04) : jetons background / card / muted / border / input / ring, boutons primaires clairs et
   variantes secondaire, outline, ghost, destructive ; champs à bordure, panneaux à filet, barre latérale pour la console
   et l'administration. L'accent de la marque (/brand/theme.css, chargée après) ne sert que par touches : liens, icône
   active, niveaux privilégiés, cases cochées. */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("Inter.woff2") format("woff2");
}

:root {
  --background: #0a0a0b;
  --foreground: #fafafa;
  --card: #111112;
  --sidebar: #0f0f10;
  --muted: #232325;
  --muted-foreground: #a1a1aa;
  --subtle: #71717a;
  --secondary: #232325;
  --hover: rgb(255 255 255 / 4%);
  --border: rgb(255 255 255 / 9%);
  --input: rgb(255 255 255 / 14%);
  --ring: #71717a;
  --primary: #f4f4f5;
  --primary-foreground: #18181b;
  --destructive: #f87171;
  --destructive-bg: rgb(239 68 68 / 12%);
  --ok: #4ade80;
  --warn: #fb923c;
  /* Replis : la marque les remplace. */
  --accent: #d6a24a;
  --accent-ink: #171106;
  --glow: #d6a24a;
  --mark: #e2ddd4;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --shadow-xs: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow-lg: 0 10px 38px -10px rgb(0 0 0 / 70%), 0 10px 20px -15px rgb(0 0 0 / 50%);
  --fast: 150ms;
  --font: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --page: 1040px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font: 14px/1.5 var(--font);
  font-feature-settings: "cv11", "ss01";
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
p a, .muted a, dd a, .note a { color: var(--foreground); text-decoration: underline; text-decoration-color: var(--input); text-underline-offset: 4px; }
p a:hover, .muted a:hover, dd a:hover, .note a:hover { text-decoration-color: var(--accent); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -0.025em; }
h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
h3 { font-size: 14px; font-weight: 600; }
code, .mono { font-family: var(--mono); font-size: 0.86em; }
:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring); }
::selection { background: var(--accent-soft); }
.muted { color: var(--muted-foreground); }
.small { font-size: 12.5px; }
.lead { font-size: 14px; line-height: 1.6; color: var(--muted-foreground); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.empty { padding: 20px 0; color: var(--muted-foreground); }
.note { margin-top: 12px; font-size: 12.5px; color: var(--muted-foreground); }

/* ------------------------------------------------------------------ Marque */

.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; font-weight: 600; color: var(--foreground); }
.brand .mark { display: block; flex: none; width: 18px; height: 18px; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------ Console et administration : barre latérale */

body.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.side {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100vh;
  padding: 12px;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
}
.side .brand { height: 40px; padding: 0 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: var(--radius-sm); font-size: 14px; color: var(--muted-foreground); transition: color var(--fast), background-color var(--fast); }
.nav a svg { flex: none; width: 16px; height: 16px; }
.nav a:hover { color: var(--foreground); background: var(--hover); }
.nav a.active { color: var(--foreground); font-weight: 500; background: var(--muted); }
.nav a.active svg { color: var(--accent); }
.who { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: var(--radius); font-size: 13px; }
.who .names { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.who .names > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .names > :first-child { font-weight: 500; color: var(--foreground); }
.who .names > :last-child { font-size: 12px; color: var(--muted-foreground); }
body.app main { width: 100%; max-width: calc(var(--page) + 96px); padding: 32px 48px 96px; }

/* ------------------------------------------------------------------ En-tête simple (accueil, connexion) */

.top { display: flex; align-items: center; height: 56px; padding: 0 max(24px, calc((100vw - var(--page)) / 2)); border-bottom: 1px solid var(--border); }

/* ------------------------------------------------------------------ Page */

main { width: min(var(--page), 100% - 48px); margin: 0 auto; padding: 48px 0 96px; }
.foot { margin-top: auto; padding: 24px; font-size: 12px; color: var(--subtle); text-align: center; }

/* Tête de page : fil d'Ariane, titre, sous-titre, actions à droite. */
.crumbs { margin-bottom: 8px; font-size: 13px; color: var(--muted-foreground); }
.crumbs a:hover { color: var(--foreground); }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.head .ident { display: flex; align-items: center; gap: 16px; min-width: 0; }
.head .sub { margin-top: 4px; font-size: 14px; color: var(--muted-foreground); }
.head .sub .sep { margin: 0 8px; color: var(--subtle); }
main > h1 { margin-bottom: 32px; }
main > h1 + .muted, main > h1 + p { margin: -24px 0 32px; max-width: 720px; }

/* Sections : un titre et sa description, puis le contenu. */
.section { margin-bottom: 40px; }
.section > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; margin-bottom: 12px; }
.section > header h2 .count { margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--muted-foreground); }
.section > header + .muted, .section > .intro { margin: -8px 0 16px; font-size: 14px; color: var(--muted-foreground); max-width: 720px; }
.section h3 { margin: 24px 0 10px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; align-items: start; }
.cols.wide-left { grid-template-columns: 3fr 2fr; }

/* ------------------------------------------------------------------ Avatars (initiales) et pictogrammes */

.avatar { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; font-size: 12px; font-weight: 500; color: var(--foreground); background: var(--muted); }
.avatar.l { width: 56px; height: 56px; font-size: 19px; }
.avatar.s { width: 28px; height: 28px; font-size: 11px; border-radius: var(--radius-sm); }
.glyph { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--radius); color: var(--muted-foreground); border: 1px solid var(--border); }
.glyph svg { width: 16px; height: 16px; }
.glyph.big { width: 48px; height: 48px; border-radius: var(--radius-lg); color: var(--foreground); }
.glyph.big svg { width: 22px; height: 22px; }
.person { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.person .names { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.person .names > :first-child { color: var(--foreground); font-weight: 500; }
.person .names > :last-child:not(:first-child) { font-size: 12.5px; color: var(--muted-foreground); }
a.person:hover .names > :first-child { text-decoration: underline; text-underline-offset: 4px; }

/* ------------------------------------------------------------------ Tables, rangées, propriétés (bordure arrondie) */

table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
th { height: 40px; padding: 0 12px; font-size: 13px; font-weight: 500; text-align: left; color: var(--muted-foreground); border-bottom: 1px solid var(--border); }
td { height: 52px; padding: 8px 12px; vertical-align: middle; border-bottom: 1px solid var(--border); }
tbody tr { transition: background-color var(--fast); }
tbody tr:hover { background: var(--hover); }
tbody tr:last-child td { border-bottom: 0; }
td a:not(.button):not(.person) { font-weight: 500; }
td a:not(.button):not(.person):hover { text-decoration: underline; text-underline-offset: 4px; }
td .muted, td.muted { color: var(--muted-foreground); }
td code { color: var(--muted-foreground); }

/* Liste de rangées (accès, membres, passkeys) : une ligne par élément, actions à droite. */
.rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.rows > li { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.rows > li:last-child { border-bottom: 0; }
.rows > li > .what { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.rows > li > .what > :first-child { font-weight: 500; color: var(--foreground); }
.rows > li > .what > :not(:first-child) { font-size: 12.5px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.rows > li > .what a:hover { text-decoration: underline; text-underline-offset: 4px; }
.rows > li.empty { justify-content: flex-start; color: var(--muted-foreground); }

/* Propriétés : libellé à gauche, valeur à droite. */
dl.props { display: grid; grid-template-columns: minmax(150px, max-content) 1fr; margin: 0; font-size: 14px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
dl.props dt, dl.props dd { padding: 12px 14px; border-bottom: 1px solid var(--border); }
dl.props dt { padding-right: 24px; color: var(--muted-foreground); }
dl.props dd { margin: 0; overflow-wrap: anywhere; }
dl.props > :nth-last-child(-n + 2) { border-bottom: 0; }

/* États : point coloré et mot. Mots-clés d'accès : texte, l'accent pour les niveaux privilégiés. */
.state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-foreground); white-space: nowrap; }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--subtle); }
.state.ok::before { background: var(--ok); }
.state.warn { color: var(--warn); }
.state.warn::before { background: var(--warn); }
.state.danger { color: var(--destructive); }
.state.danger::before { background: var(--destructive); }
.tags { color: var(--muted-foreground); }
.tags .sep { margin: 0 6px; color: var(--subtle); }
.priv { color: var(--accent); }
.chip { color: var(--muted-foreground); }
.chip + .chip::before { content: "·"; margin: 0 6px; color: var(--subtle); }
.chip.accent { color: var(--accent); }
.chip.ok { color: var(--foreground); }
.chip.warn { color: var(--warn); }
.chip.danger { color: var(--destructive); }

/* ------------------------------------------------------------------ Formulaires */

label { display: block; font-size: 14px; font-weight: 500; line-height: 1.2; color: var(--foreground); }
label > input, label > select, label > textarea { margin-top: 8px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--foreground);
  background: rgb(255 255 255 / 2.5%);
  border: 1px solid var(--input);
  border-radius: var(--radius-sm);
  outline: none;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--fast), box-shadow var(--fast);
}
input:focus, select:focus, textarea:focus { border-color: var(--ring); box-shadow: 0 0 0 3px rgb(113 113 122 / 35%); }
input::placeholder { color: var(--subtle); }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted-foreground) 50%), linear-gradient(135deg, var(--muted-foreground) 50%, transparent 50%); background-position: right 17px top 15px, right 12px top 15px; background-size: 5px 5px; background-repeat: no-repeat; }
select option { background: var(--card); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; }

.stack > * + * { margin-top: 16px; }
.stack > button, .stack > .actions { margin-top: 24px; }
/* Formulaire en grille : champs côte à côte (deux par ligne), blocs et actions sur toute la largeur. */
.grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; align-items: start; }
.grid-form > div, .grid-form > fieldset, .grid-form > .full { grid-column: 1 / -1; }
.grid-form > div:last-child { display: flex; justify-content: flex-end; }
.grid-form.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-panel { padding: 24px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
fieldset.level-set { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset.level-set legend { padding: 0 0 8px; font-size: 14px; font-weight: 500; }
.row { display: flex; align-items: center; gap: 8px; }
.row input { flex: 1; }
.inline { display: inline; }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0; font-size: 12px; text-transform: uppercase; color: var(--muted-foreground); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
details > summary { cursor: pointer; font-weight: 500; color: var(--muted-foreground); list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "›"; display: inline-block; width: 14px; transition: transform var(--fast); }
details[open] > summary::before { transform: rotate(90deg); }
details > summary:hover { color: var(--foreground); }
details[open] > summary { margin-bottom: 16px; }
details.more, .more { margin-top: 20px; }
details.more > summary { font-size: 13px; }

/* Cases (groupes d'un compte) : une rangée par case. */
.checklist { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.checklist label.check { min-height: 44px; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.checklist label.check:last-child { border-bottom: 0; }
.checklist label.check:hover { background: var(--hover); }
.checklist.cols-2 { display: grid; grid-template-columns: 1fr 1fr; }
label.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 400; cursor: pointer; }
label.check .grow { flex: 1; }

/* Niveau d'un droit : onglets façon shadcn (radios), « Personnalisé » déplie les six actions de Lore. Sans JS. */
.levels { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.segmented { display: inline-flex; padding: 3px; border-radius: var(--radius); background: var(--muted); }
label.level { position: relative; display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; color: var(--muted-foreground); cursor: pointer; white-space: nowrap; transition: color var(--fast), background-color var(--fast), box-shadow var(--fast); }
label.level input { position: absolute; opacity: 0; pointer-events: none; }
label.level:hover { color: var(--foreground); }
label.level:has(input:checked) { color: var(--foreground); background: var(--background); box-shadow: var(--shadow-xs), inset 0 0 0 1px var(--border); }
label.level:has(input[value="admin"]:checked) { color: var(--accent); }
label.level:has(input:focus-visible) { box-shadow: 0 0 0 2px var(--ring); }
.checks { display: none; flex-basis: 100%; }
.levels:has(input[value="custom"]:checked) .checks { display: grid; grid-template-columns: 16px max-content 1fr; align-items: center; gap: 10px 12px; margin: 4px 0; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); }
.checks label.check { display: contents; }
.checks code { font-size: 12.5px; }
.checks .small { font-size: 12.5px; color: var(--muted-foreground); }

/* Droits d'un groupe : une rangée par dépôt, le niveau et ses actions à droite. */
/* La rangée est une grille ; le formulaire et le sélecteur s'y fondent (display: contents) pour que le contrôle,
   « Enregistrer » et « Retirer » s'alignent à droite et que les six actions passent dessous, sur toute la largeur. */
.grants > li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto auto; column-gap: 12px; row-gap: 6px; }
.grants > li > form.row, .grants > li > form.row .levels { display: contents; }
.grants > li .checks { grid-column: 2 / -1; grid-row: 2; }
.grants > li.empty { display: flex; }
.add-grant { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-top: 16px; }
.add-grant > label { flex: 1 1 260px; }
.add-grant > fieldset { flex: 0 1 auto; }
.add-grant:has(input[value="custom"]:checked) > fieldset { flex-basis: 100%; order: 2; }
.add-grant:has(input[value="custom"]:checked) > button { order: 3; margin-left: auto; }

/* « Enregistrer » d'un droit n'apparaît qu'une fois le niveau changé (ou en personnalisé, où les cases comptent). */
.grants .save { display: none; }
.grants form:has(input[name="level"]:checked:not([data-current])) .save,
.grants form:has(input[name="level"][value="custom"]:checked) .save { display: inline-flex; }
/* Création d'un groupe : le niveau ne vaut que pour « tous les dépôts ». */
.group-create:has(input[name="all_repositories"]:not(:checked)) fieldset.level-set { display: none; }
.rows > li.add form { flex: 1; }
.filter { margin: -12px 0 24px; }
.filter input { max-width: 380px; }
table.audit td.details { max-width: 340px; overflow-wrap: anywhere; color: var(--muted-foreground); }
.totp-setup { display: flex; align-items: flex-start; gap: 40px; }
.totp-setup .qr { margin: 0; flex: none; }
.totp-setup > div:last-child { flex: 1; max-width: 420px; }
.totp-setup .secret { margin: 0 0 20px; font-size: 13px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.totp-setup .secret code { display: block; margin-top: 6px; font-size: 14px; letter-spacing: 0.06em; color: var(--foreground); }

/* ------------------------------------------------------------------ Boutons : défaut, primaire, ghost, destructive.
   Base shadcn avec du relief : léger dégradé vertical, reflet sur l'arête haute, ombre portée fine, enfoncement au clic. */

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--input);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  color: var(--foreground);
  background: linear-gradient(180deg, rgb(255 255 255 / 7%), rgb(255 255 255 / 2.5%));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 7%), 0 1px 2px rgb(0 0 0 / 45%), 0 2px 6px -2px rgb(0 0 0 / 35%);
  cursor: pointer;
  transition: background-color var(--fast), color var(--fast), border-color var(--fast), box-shadow var(--fast), transform 80ms ease-out, opacity var(--fast);
}
button:hover, .button:hover { border-color: rgb(255 255 255 / 20%); background-color: var(--hover); text-decoration: none; }
button:active, .button:active { transform: translateY(1px); box-shadow: inset 0 1px 2px rgb(0 0 0 / 35%); }
button.primary, .button.primary {
  color: var(--primary-foreground);
  background: linear-gradient(180deg, #ffffff, #dcdce0);
  border-color: rgb(0 0 0 / 55%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 90%), inset 0 -1px 0 rgb(0 0 0 / 12%), 0 1px 2px rgb(0 0 0 / 55%), 0 4px 12px -4px rgb(0 0 0 / 60%);
}
button.primary:hover, .button.primary:hover { background: linear-gradient(180deg, #ffffff, #e8e8eb); border-color: rgb(0 0 0 / 55%); }
button.primary:active, .button.primary:active { background: linear-gradient(180deg, #e4e4e7, #f0f0f2); box-shadow: inset 0 1px 2px rgb(0 0 0 / 25%); }
button.ghost, .button.ghost { color: var(--foreground); background: transparent; border-color: transparent; box-shadow: none; }
button.ghost:hover, .button.ghost:hover { background: var(--muted); border-color: transparent; }
button.ghost:active, .button.ghost:active { box-shadow: none; }
button.danger, .button.danger { color: var(--destructive); }
button.danger:hover, .button.danger:hover { background-color: var(--destructive-bg); border-color: rgb(248 113 113 / 35%); }
button.small, .button.small { height: 32px; padding: 0 12px; font-size: 13px; }
button.link { height: auto; padding: 0; border: 0; font-size: 13px; font-weight: 500; color: var(--muted-foreground); background: none; box-shadow: none; }
button.link:hover { color: var(--foreground); background: none; text-decoration: underline; text-underline-offset: 4px; }
button.link:active { transform: none; box-shadow: none; }
button:disabled { opacity: 0.5; pointer-events: none; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.actions.end { justify-content: flex-end; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 24px; padding: 16px; border: 1px solid rgb(248 113 113 / 30%); border-radius: var(--radius); }
.danger-zone p { font-size: 14px; color: var(--muted-foreground); }

/* ------------------------------------------------------------------ Alertes */

.alert { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; padding: 12px 16px; border-radius: var(--radius); font-size: 14px; border: 1px solid var(--border); }
.alert.error { color: var(--destructive); border-color: rgb(248 113 113 / 35%); }
.alert.ok { border-color: rgb(74 222 128 / 30%); }
.alert p { margin: 0; }
.code { margin: 6px 0 2px; padding: 14px; font-family: var(--mono); font-size: 21px; letter-spacing: 0.12em; text-align: center; border: 1px solid var(--border); border-radius: var(--radius); user-select: all; }
.qr { width: 200px; margin: 18px auto; padding: 10px; border-radius: var(--radius); background: #fff; }
.qr svg { display: block; width: 100%; height: auto; }
.error-text { color: var(--destructive); }

/* ------------------------------------------------------------------ Pages étroites (connexion, appareil) : marque, puis la carte */

body.narrow .top { justify-content: center; height: auto; padding: 12vh 24px 28px; border-bottom: 0; }
body.narrow .top .brand { font-size: 15px; }
body.narrow .top .mark { width: 22px; height: 22px; }
body.narrow main { flex: none; width: min(400px, 100% - 32px); padding: 0 0 56px; }
.card { padding: 24px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-xs); }
.card h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 6px; }
.card .lead { margin-bottom: 24px; }
.card .alert { margin-bottom: 20px; }
.card button.primary, .card button.ghost, .card .button.primary, .card .button.ghost { width: 100%; }
.card button.ghost, .card .button.ghost { background: linear-gradient(180deg, rgb(255 255 255 / 7%), rgb(255 255 255 / 2.5%)); border-color: var(--input); box-shadow: inset 0 1px 0 rgb(255 255 255 / 7%), 0 1px 2px rgb(0 0 0 / 45%); }
.card button.ghost:hover, .card .button.ghost:hover { background-color: var(--hover); border-color: rgb(255 255 255 / 20%); }
.card .actions { flex-direction: column; align-items: stretch; margin-top: 24px; }
.card > .muted:last-child { margin-top: 16px; text-align: center; font-size: 13px; }
.card > .muted:last-child a { color: var(--muted-foreground); text-decoration: none; }
.card > .muted:last-child a:hover { color: var(--foreground); text-decoration: underline; }
.card .crest { display: none; }
#passkey-status:empty { display: none; }
#passkey-status { margin-top: 10px; text-align: center; font-size: 13px; color: var(--muted-foreground); }

/* ------------------------------------------------------------------ Accueil */

body.home::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(560px 300px at 40% -80px, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
    radial-gradient(480px 280px at 64% -60px, color-mix(in srgb, var(--glow) 8%, transparent), transparent 70%);
}
body.home .top { border-bottom: 0; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14vh 0 0; }
.hero .crest { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 24px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--card); }
.hero .crest img { width: 28px; height: 28px; }
.hero h1 { font-size: clamp(36px, 4.6vw, 52px); line-height: 1.1; font-weight: 700; letter-spacing: -0.035em; }
.hero .lead { max-width: 480px; margin: 16px 0 32px; font-size: 16px; }
.hero .actions { justify-content: center; }
.hero .button { height: 40px; padding: 0 24px; }

/* Formulaires fournis par oidc-provider (device flow) */
#op\.deviceInputForm input { height: 52px; margin-bottom: 16px; font-family: var(--mono); font-size: 22px; letter-spacing: 0.25em; text-align: center; text-transform: uppercase; }
#op\.deviceConfirmForm, #op\.logoutForm { display: none; }

@media (max-width: 900px) {
  body.app { display: flex; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .nav { order: 3; flex-direction: row; width: 100%; overflow-x: auto; }
  .nav a { flex: none; }
  .who { margin: 0 0 0 auto; padding: 0; }
  .who .names { display: none; }
  body.app main { padding: 24px 16px 64px; }
  main { padding-top: 28px; }
  .cols, .cols.wide-left, .grid-form, .grid-form.three, .checklist.cols-2 { grid-template-columns: 1fr; }
  .head { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
