/* Kosmy Board — même identité que le site Kosmy */
:root {
  --bg: #0d0c0a;
  --panel: #15130f;
  --tile: #16140f;
  --paper: #f1ede4;
  --text-2: #c9c3b6;
  --mute: #8f897c;
  --line: rgba(241, 237, 228, .12);
  --line-strong: rgba(241, 237, 228, .22);
  --signal: #c5f04a;
  --danger: #ff8a7a;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --top-h: 69px;
  --gutter: max(clamp(16px, 6vw, 96px), calc((100vw - 1440px) / 2));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--paper);
  font: 400 16px/1.6 "Inter Tight", system-ui, sans-serif;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
/* grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
a { color: inherit; text-decoration: none; }
img { display: block; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { text-transform: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--signal); color: var(--bg); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }

.serif { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; letter-spacing: -.01em; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: .04em; text-transform: uppercase; }
em { font-style: italic; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }

.fade { animation: fadeUp .8s var(--ease) both; animation-delay: var(--d, 0s); }

/* ---------- Barre du haut ---------- */
.top {
  position: sticky; top: 0; z-index: 20; height: var(--top-h); flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter); border-bottom: 1px solid var(--line);
  background: rgba(13, 12, 10, .92);
}
.top-start { display: flex; align-items: center; gap: 32px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand .serif { font-size: 28px; line-height: 1; }
.brand em { color: var(--mute); transition: color .4s; }
.brand:hover em { color: var(--signal); }
.brand .mark { display: block; flex: none; width: 34px; height: 34px; border-radius: 9px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--line); }
.brand .mark img { width: 100%; height: 100%; transform: scale(1.3); transition: transform .8s var(--ease); }
.brand:hover .mark img { transform: scale(1.3) rotate(-12deg); }
.back-kosmy { font-size: 12px; color: var(--mute); transition: color .2s; white-space: nowrap; }
.back-kosmy:hover { color: var(--paper); }
.top-end { display: flex; align-items: center; gap: 24px; }
.status { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--mute); white-space: nowrap; }
.dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--signal); animation: blink 1.6s steps(2) infinite; }
.lang { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang-btn {
  font-size: 11px; letter-spacing: .06em; color: var(--mute); background: none; border: 0;
  padding: 5px 10px; border-radius: 999px; transition: color .25s, background .25s;
}
.lang-btn:hover { color: var(--paper); }
.lang-btn[aria-pressed="true"] { background: var(--signal); color: var(--bg); }
.account-link {
  display: inline-flex; align-items: center; gap: 10px; font-size: 11px; color: var(--text-2); transition: color .2s;
  max-width: 180px; white-space: nowrap;
}
.account-link span:last-child { overflow: hidden; text-overflow: ellipsis; }
.account-link:hover, .account-link[aria-current="page"] { color: var(--paper); }
.avatar {
  display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line-strong); font-family: "Instrument Serif", Georgia, serif; font-size: 17px; text-transform: none; letter-spacing: 0;
  transition: background .3s, color .3s, border-color .3s;
}
.account-link:hover .avatar, .account-link[aria-current="page"] .avatar { background: var(--signal); border-color: var(--signal); color: var(--bg); }

/* ---------- Pages ---------- */
main { flex: 1 0 auto; outline: none; }
.boot { padding: 80px var(--gutter); font-size: 12px; color: var(--mute); }
.page { padding: clamp(40px, 7vh, 80px) var(--gutter) 64px; }
.page-head { display: grid; grid-template-columns: 7fr 5fr; gap: 32px; align-items: end; margin-bottom: 48px; }
.kicker { font-size: 12px; color: var(--mute); margin-bottom: 24px; }
.page-title { font-size: clamp(56px, 8vw, 120px); line-height: .92; }
.page-title .word { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
.page-title .word > span { display: inline-block; animation: rise .9s var(--ease) both; animation-delay: var(--d, 0s); }
.page-title em { color: var(--signal); }
.lead { font-size: 17px; line-height: 1.6; color: var(--text-2); max-width: 52ch; }
.head-side { display: grid; gap: 28px; justify-items: start; }

/* ---------- Boutons et liens ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 15px 24px; border-radius: 999px; border: 0;
  background: var(--paper); color: var(--bg); font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: transform .3s var(--ease), background .3s, color .3s, opacity .2s;
}
.btn:hover:not(:disabled) { transform: translateY(-3px) rotate(-1.5deg); background: var(--signal); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.signal { background: var(--signal); }
.btn.signal:hover:not(:disabled) { background: var(--paper); }
.btn.ghost { background: none; color: var(--paper); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.ghost:hover:not(:disabled) { background: var(--paper); color: var(--bg); }
.btn.danger { background: var(--danger); color: var(--bg); }
.btn.danger:hover:not(:disabled) { background: var(--paper); }
.btn .plus { font-size: 20px; line-height: 0; font-weight: 400; }
.link {
  font-weight: 500; font-size: 15px; padding-bottom: 4px; white-space: nowrap; background-color: transparent; border: 0; padding-inline: 0;
  background-image: linear-gradient(currentColor, currentColor); background-position: left bottom; background-size: 100% 1px; background-repeat: no-repeat;
  transition: background-size .4s;
}
.link:hover { background-size: 0 1px; background-position: right bottom; }
.text-btn { background: none; border: 0; padding: 6px 0; font-size: 11px; color: inherit; opacity: .75; transition: opacity .2s, color .2s; }
.text-btn:hover { opacity: 1; }
.text-btn.danger:hover { color: var(--danger); }

/* ---------- Champs ---------- */
.field { display: grid; gap: 6px; margin-top: 24px; }
.field label, .field .label { font-size: 11px; color: var(--mute); transition: color .2s; }
.field:focus-within label { color: var(--signal); }
.input {
  width: 100%; min-width: 0; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  background: none; font-size: 18px; color: var(--paper); transition: border-color .25s;
}
.input::placeholder { color: rgba(241, 237, 228, .32); }
.input:focus { outline: none; border-bottom-color: var(--signal); }
.hint { font-size: 13px; color: var(--mute); }
select.input { appearance: none; cursor: pointer; background: none; }
select.input option { background: var(--panel); color: var(--paper); }
.error { margin-top: 16px; font-size: 14px; color: var(--danger); }
.warn { margin-top: 14px; font-size: 13px; line-height: 1.5; color: var(--danger); }
.note { margin-top: 14px; font-size: 13px; line-height: 1.5; color: var(--mute); }

/* ---------- Connexion ---------- */
.auth { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 96px); align-items: start; padding-top: clamp(48px, 10vh, 120px); }
.auth-form { padding: clamp(24px, 3vw, 40px); border: 1px solid var(--line); border-radius: 28px; background: var(--panel); }
.auth-form .btn { margin-top: 32px; width: 100%; }
.auth-form .field:first-of-type { margin-top: 0; }
.auth-alt { margin-top: 20px; font-size: 14px; color: var(--mute); }

/* ---------- Barre d'outils ---------- */
.toolbar { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr) auto; gap: 16px 40px; align-items: end; margin-bottom: 24px; }
.toolbar .field { margin-top: 0; }
.search { position: relative; }
.search .input { padding-right: 28px; }
.search .kbd { position: absolute; right: 0; bottom: 12px; font-size: 10px; color: var(--mute); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 11px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: none; color: var(--text-2);
  transition: color .25s, background .25s, border-color .25s;
}
.chip:hover { color: var(--paper); border-color: var(--paper); }
.chip[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: var(--bg); }
.chip:disabled { opacity: .35; cursor: default; }
.chip:disabled:hover { color: var(--text-2); border-color: var(--line-strong); }
.chip small { font-size: inherit; opacity: .6; margin-left: 6px; }
.count { font-size: 11px; color: var(--mute); white-space: nowrap; display: flex; align-items: center; gap: 14px; }

/* ---------- Tuile de logo ---------- */
.logo {
  --c: #fff; display: inline-grid; place-items: center; overflow: hidden; flex: none;
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--tile); box-shadow: 0 0 0 1px rgba(241, 237, 228, .14);
  transition: transform .6s var(--ease), box-shadow .4s;
}
.logo img { width: 100%; height: 100%; object-fit: cover; }
.logo.tiled img { width: 72%; height: 72%; object-fit: contain; }
.logo.generic .serif { font-size: 32px; line-height: 1; color: var(--signal); transform: translateY(-1px); }
.logo.sm { width: 44px; height: 44px; border-radius: 12px; }
.logo.sm.generic .serif { font-size: 26px; }

/* ---------- Liste des espaces ---------- */
.rows { border-bottom: 1px solid var(--line); }
.row {
  position: relative; isolation: isolate; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 150px 64px minmax(0, 1fr) minmax(0, 200px) auto; align-items: center; gap: 8px 24px;
  padding: 20px 12px; transition: color .35s;
}
.row::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--c);
  transform: scaleY(0); transform-origin: bottom; transition: transform .55s cubic-bezier(.7, 0, .2, 1);
}
.row:hover, .row:focus-within { color: var(--ink); }
.row:hover::before, .row:focus-within::before { transform: scaleY(1); }
.row.enter { animation: slideIn .7s var(--ease) both; animation-delay: var(--d, 0s); }
.row .meta-l { font-size: 11px; line-height: 1.5; color: var(--mute); display: grid; gap: 6px; }
.row:hover .meta-l, .row:focus-within .meta-l, .row:hover .host, .row:focus-within .host, .row:hover .meta-r, .row:focus-within .meta-r { color: inherit; opacity: .75; }
.row:hover .logo, .row:focus-within .logo { transform: rotate(-10deg) scale(1.1); }
.row .open-area { display: contents; }
.row .title { min-width: 0; }
.row .name {
  display: block; font-size: clamp(34px, 3.4vw, 48px); line-height: 1.02; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: letter-spacing .5s var(--ease);
}
.row:hover .name { font-style: italic; letter-spacing: .01em; }
.row .host { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--mute); margin-top: 4px; min-width: 0; }
.row .host span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; }
.tag-warn { flex: none; color: var(--danger); border: 1px solid currentColor; border-radius: 999px; padding: 0 8px; font-size: 10px; }
.tag-warn.local { color: var(--mute); }
.row:hover .tag-warn, .row:focus-within .tag-warn { color: inherit; }
.row .meta-r { font-size: 11px; color: var(--mute); line-height: 1.5; }
.row .meta-r span { display: block; }
.row .actions { display: flex; align-items: center; gap: 16px; justify-self: end; }
.open-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; font-size: 11px;
  border: 1px solid currentColor; white-space: nowrap; transition: background .3s, color .3s;
}
.open-btn .arrow { display: inline-block; transition: transform .45s var(--ease); }
.row:hover .open-btn .arrow { transform: translate(3px, -3px); }
.open-btn:hover { background: var(--ink, var(--paper)); color: var(--c, var(--bg)); border-color: var(--ink, var(--paper)); }
/* Toute la ligne s'ouvre au clic, sauf les boutons d'action */
.row .cover { position: absolute; inset: 0; z-index: 0; border-radius: 0; }
.row .cover:focus-visible { outline-offset: -3px; }
.row > :not(.cover) { position: relative; z-index: 1; }
.row .meta-l, .row .logo, .row .title, .row .meta-r { pointer-events: none; }

.state { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.state i { width: 8px; height: 8px; border-radius: 50%; background: var(--mute); flex: none; }
.state[data-state="up"] i { background: var(--signal); }
.state[data-state="down"] i { background: var(--danger); }
.state[data-state="checking"] i { animation: blink 1s steps(2) infinite; }
.row:hover .state i, .row:focus-within .state i { box-shadow: 0 0 0 1.5px var(--ink); }

.list-foot { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; font-size: 13px; line-height: 1.6; color: var(--mute); }
.list-foot p { max-width: 60ch; }
.no-match { padding: 40px 12px; border-top: 1px solid var(--line); color: var(--mute); font-size: 15px; }

/* Aucun espace */
.empty { border: 1px solid var(--line); border-radius: 28px; padding: clamp(24px, 3vw, 40px); background: var(--panel); }
.empty .mono { font-size: 12px; color: var(--paper); }
.empty p { margin-top: 8px; color: var(--text-2); font-size: 15px; }
.quick { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 28px; }
.quick a { display: grid; justify-items: center; gap: 8px; width: 72px; font-size: 10px; color: var(--text-2); transition: color .2s; }
.quick a:hover { color: var(--paper); }
.quick a:hover .logo { transform: rotate(-10deg) scale(1.12); box-shadow: 0 0 0 2px var(--c); }
.quick a span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Ajout / modification ---------- */
.edit { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.back { display: inline-block; font-size: 12px; color: var(--text-2); margin-bottom: 32px; transition: color .2s; }
.back:hover { color: var(--signal); }
.edit .page-title { font-size: clamp(48px, 6.4vw, 96px); }
.edit-aside { position: sticky; top: calc(var(--top-h) + 32px); display: grid; gap: 16px; }
.edit-aside .lead { font-size: 15px; }
.picker { border-bottom: 1px solid var(--line); }
.pick {
  position: relative; isolation: isolate; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  width: 100%; padding: 14px 8px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; transition: color .35s;
}
.pick::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--c);
  transform: scaleY(0); transform-origin: bottom; transition: transform .5s cubic-bezier(.7, 0, .2, 1);
}
.pick:hover, .pick:focus-visible { color: var(--ink); outline: none; }
.pick:hover::before, .pick:focus-visible::before { transform: scaleY(1); }
.pick:hover .logo { transform: rotate(-10deg) scale(1.1); }
.pick .serif { font-size: 28px; line-height: 1.05; display: block; }
.pick .line { display: block; font-size: 13px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick:hover .line, .pick:focus-visible .line { color: inherit; opacity: .75; }
.pick .arrow { font-size: 22px; transition: transform .45s var(--ease); }
.pick:hover .arrow { transform: translateX(6px); }
.chosen { display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.chosen .label { flex: 1; font-weight: 500; }
.preview { margin-top: 28px; padding-left: 14px; border-left: 2px solid var(--signal); }
.preview .mono { font-size: 10px; color: var(--mute); }
.preview .url { margin-top: 4px; font-size: 15px; word-break: break-all; color: var(--paper); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 32px; }
.danger-zone { margin-top: 48px; border-top: 1px solid var(--line); }
.danger-zone button { display: grid; gap: 2px; width: 100%; padding: 16px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.danger-zone strong { font-weight: 500; color: var(--danger); }
.danger-zone .mono { font-size: 10px; color: var(--mute); }

/* ---------- Connexion unique ---------- */
.tag-sso { flex: none; color: var(--signal); border: 1px solid currentColor; border-radius: 999px; padding: 0 8px; font-size: 10px; font-family: "JetBrains Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.row:hover .tag-sso, .row:focus-within .tag-sso { color: inherit; }
.chosen .tag-sso { padding: 2px 10px; }
.chosen .host-line { display: block; font-size: 10px; color: var(--mute); margin-top: 2px; text-transform: none; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chosen .label { min-width: 0; }
.sso-link {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: 20px; transition: border-color .3s, background .3s;
}
.sso-link strong { display: block; font-weight: 500; }
.sso-link .mono { display: block; font-size: 10px; color: var(--mute); margin-top: 2px; }
.sso-link .arrow { font-size: 22px; transition: transform .45s var(--ease); }
.sso-link:hover { border-color: var(--signal); }
.sso-link:hover .arrow { transform: translateX(6px); color: var(--signal); }
.section-title { font-size: clamp(30px, 3vw, 40px); line-height: 1.05; margin: 36px 0 8px; }
.settings { border-bottom: 1px solid var(--line); }
.setting { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 4px 20px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.setting .label { font-size: 10px; color: var(--mute); }
.setting code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; color: var(--paper); word-break: break-all; }
.setting code.muted { color: var(--mute); letter-spacing: .1em; }
.setting .hint { grid-column: 2 / -1; font-size: 12px; }
.setting.secret code { color: var(--signal); }
.setting.secret .hint { color: var(--signal); }
.sso input[type="url"].input { font-size: 15px; font-family: "JetBrains Mono", ui-monospace, monospace; }
textarea.input { resize: vertical; min-height: 48px; font-size: 15px; font-family: "JetBrains Mono", ui-monospace, monospace; line-height: 1.6; }
.auth-form .continue { color: var(--signal); margin-bottom: 24px; }

/* Double authentification */
.qr { width: 196px; margin: 20px 0; padding: 10px; border-radius: 18px; background: var(--paper); }
.qr svg { display: block; width: 100%; height: auto; }
.recovery .label { font-size: 11px; color: var(--signal); }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin: 20px 0 0; padding: 18px 20px; list-style: none; border: 1px dashed var(--line-strong); border-radius: 16px; font-size: 15px; color: var(--paper); }

/* Pages du serveur (connexion unique) */
.oidc-page { max-width: 900px; }
.oidc-page .page-title { margin-bottom: 28px; }
.oidc-page form { margin: 0; }
.oidc-page .form-actions { margin-top: 32px; }
.oidc-page .lead { max-width: 60ch; }

/* ---------- Compte ---------- */
.sections { border-bottom: 1px solid var(--line); }
.section { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px 48px; padding: 36px 0; border-top: 1px solid var(--line); }
.section h2 { font-size: clamp(32px, 3vw, 44px); line-height: 1; }
.section .num { display: block; font-size: 11px; color: var(--mute); margin-bottom: 10px; }
.section .lead { font-size: 15px; }
.section-body > .field:first-child { margin-top: 0; }
.section-body .btn { margin-top: 24px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; }
.inline-actions .btn { margin-top: 0; }
.people { margin-top: 24px; border-bottom: 1px solid var(--line); }
.person { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.person .avatar { width: 44px; height: 44px; font-size: 22px; }
.person .who { min-width: 0; }
.person .who strong { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .who .mono { display: block; font-size: 10px; color: var(--mute); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person.pending .avatar { border-style: dashed; color: var(--mute); }
.invite-link { margin-top: 20px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--signal); display: grid; gap: 10px; }
.invite-link .mono { font-size: 10px; color: var(--signal); }
.invite-link code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; word-break: break-all; color: var(--paper); }
.invite-form { display: flex; flex-wrap: wrap; align-items: end; gap: 16px 24px; margin-top: 24px; }
.invite-form .field { margin-top: 0; min-width: 160px; }
.invite-form .btn { margin-top: 0; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- Boîte de confirmation ---------- */
.confirm {
  width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 28px;
  background: var(--panel); color: var(--paper);
}
.confirm::backdrop { background: rgba(13, 12, 10, .78); }
.confirm[open] { animation: fadeUp .45s var(--ease) both; }
.confirm form { padding: clamp(24px, 4vw, 36px); }
.confirm-kicker { font-size: 10px; color: var(--mute); margin-bottom: 14px; }
.confirm-title { font-size: clamp(34px, 5vw, 44px); line-height: 1; }
.confirm-text { margin-top: 16px; font-size: 15px; color: var(--text-2); }
.confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 32px; }

/* ---------- Message ---------- */
.toast {
  position: fixed; left: var(--gutter); bottom: 24px; z-index: 40; max-width: min(520px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: 14px; background: var(--paper); color: var(--bg); font-size: 11px; line-height: 1.5;
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.toast::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bg); margin-right: 10px; vertical-align: 1px; }
.toast[data-kind="error"] { background: var(--danger); }
.toast.show { opacity: 1; transform: none; }

/* ---------- Pied de page ---------- */
.foot { flex: none; margin-top: 64px; padding: 40px var(--gutter) 0; border-top: 1px solid var(--line); overflow: hidden; }
.foot-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 11px; color: var(--mute); }
.foot-line .link { font-size: 11px; color: var(--paper); }
.giant {
  margin-top: 16px; padding-bottom: 20px; text-align: center; line-height: 1.05; font-size: min(22vw, 300px); white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px rgba(241, 237, 228, .18); user-select: none; transition: -webkit-text-stroke-color .6s;
}
.giant:hover { -webkit-text-stroke-color: var(--signal); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .row { grid-template-columns: 120px 56px minmax(0, 1fr) auto; }
  .row .meta-l { grid-row: 1 / 3; }
  .row .logo { grid-row: 1 / 3; }
  .row .meta-r { grid-column: 3; grid-row: 2; display: flex; flex-wrap: wrap; gap: 0 14px; }
  .row .actions { grid-column: 4; grid-row: 1 / 3; }
}
@media (max-width: 960px) {
  .page-head, .auth, .edit { grid-template-columns: minmax(0, 1fr); }
  .edit-aside { position: static; }
  .toolbar { grid-template-columns: 1fr; }
  .section { grid-template-columns: 1fr; }
  .list-foot { grid-template-columns: 1fr; }
  .status { display: none; }
  .row { grid-template-columns: 56px minmax(0, 1fr); gap: 12px 18px; }
  .row .meta-l { grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .row .meta-l .n { display: none; }
  .row .title { grid-column: 2; grid-row: 1; }
  .row .logo { grid-column: 1; grid-row: 1; }
  .row .meta-r { grid-column: 2; grid-row: 3; }
  .row .actions { grid-column: 2; grid-row: 4; justify-self: stretch; justify-content: flex-start; gap: 20px; }
}
@media (max-width: 720px) {
  :root { --top-h: 60px; }
  .row { grid-template-columns: 48px minmax(0, 1fr); gap: 12px 16px; }
  .row .actions { grid-column: 1 / -1; }
  .top-start { gap: 16px; }
  .top-end { gap: 12px; }
  .brand .serif { font-size: 24px; }
  .account-link span:last-child { display: none; }
  .page-head { margin-bottom: 32px; }
  .row { padding: 18px 4px; }
  .row .logo { width: 48px; height: 48px; border-radius: 13px; }
  .chip:disabled { display: none; }
  .row .name { font-size: 34px; }
  .chosen { padding: 10px 12px 10px 10px; }
  .setting { grid-template-columns: minmax(0, 1fr) auto; }
  .setting .label { grid-column: 1 / -1; }
  .setting .hint { grid-column: 1 / -1; }
  .codes { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .brand .wm { display: none; }
  .brand em { color: var(--paper); }
  .back-kosmy { font-size: 11px; }
  .btn { padding: 14px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
