/* ==========================================================================
   it connects — maquette
   Calme, léger, fluide. Anthracite chaud, rose blanc cosy, gros boutons
   façon macOS. --acc = interface · --ok = fait/actif · --amber = bientôt ·
   --red = en retard / destructif.
   ========================================================================== */

:root {
  --bg:        #151417;
  --bg-2:      #1c1b1f;
  --surface:   rgba(255,255,255,.035);
  --surface-2: rgba(255,255,255,.06);
  --surface-3: rgba(255,255,255,.09);
  --line:      rgba(255,255,255,.07);
  --line-2:    rgba(255,255,255,.12);

  --txt:   #f2eeeb;
  --txt-2: #b3aeab;
  --txt-3: #77726f;
  --txt-4: #4d4a4b;

  --acc:      #f1d3d6;
  --acc-2:    #d9b0b6;
  --acc-ink:  #2a2124;
  --acc-soft: rgba(241,211,214,.1);
  --acc-line: rgba(241,211,214,.26);

  --ok:    #a8cdb2;
  --amber: #e2c49b;
  --red:   #e3a3a3;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans:  "DM Sans", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --r:    22px;
  --r-md: 16px;
  --r-sm: 12px;
  --col:  760px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --spring: cubic-bezier(.34,1.4,.64,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--txt);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
::selection { background: var(--acc-soft); color: var(--txt); }
:focus-visible { outline: 1.5px solid var(--acc); outline-offset: 3px; border-radius: 8px; }
svg { flex: none; }
[hidden] { display: none !important; }

.emblem { width: 22px; height: 22px; color: var(--acc); }

/* ── Backdrop ─────────────────────────────────────────────────────────── */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#sphere { position: absolute; inset: 0; width: 100%; height: 100%; }
.code-rain {
  position: absolute; inset: 0; display: flex; justify-content: center;
  opacity: .08; transition: opacity 2.4s var(--ease);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 20%, transparent 78%);
          mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 20%, transparent 78%);
}
.code-rain pre {
  margin: 0; font: 400 12.5px/2.1 var(--mono); color: var(--txt);
  white-space: pre; filter: blur(.35px);
  animation: rain 160s linear infinite;
}
@keyframes rain { from { transform: translateY(0); } to { transform: translateY(-50%); } }
body[data-stage="app"] .code-rain { opacity: .03; }
.grain {
  position: absolute; inset: -50%; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Stages ───────────────────────────────────────────────────────────── */
.stage {
  position: fixed; inset: 0; z-index: 2;
  display: grid; place-items: center; align-content: center; gap: 18px;
  padding: 24px 16px;
  opacity: 0; visibility: hidden;
  transition: opacity .9s var(--ease), visibility 0s linear .9s;
}
body[data-stage="terminal"] .stage--terminal {
  opacity: 1; visibility: visible;
  transition: opacity .9s var(--ease) .15s, visibility 0s;
}
.stage--app { position: relative; display: block; min-height: 100vh; padding: 0 16px 170px; }
body[data-stage="app"] .stage--app { opacity: 1; visibility: visible; transition: opacity 1s var(--ease) .2s, visibility 0s; }
body:not([data-stage="app"]) .stage--app { position: fixed; pointer-events: none; }

/* ── Terminal ─────────────────────────────────────────────────────────── */
.term {
  width: min(760px, 100%);
  background: rgba(22,21,24,.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.1); backdrop-filter: blur(20px) saturate(1.1);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.6);
  overflow: hidden;
  transform: translateY(8px) scale(.99);
  transition: transform 1s var(--ease), opacity .8s var(--ease), filter .8s var(--ease);
}
body[data-stage="terminal"] .term { transform: none; }
.term.is-leaving { transform: scale(.97); opacity: 0; filter: blur(6px); }
.term__bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.term__bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--txt-4); opacity: .55; }
.term__bar span:first-child { background: var(--acc-2); opacity: .6; }
.term__bar em { margin: 0 auto; transform: translateX(-24px); font: 400 11.5px var(--mono); color: var(--txt-3); font-style: normal; }
.term__body {
  padding: 18px 22px 24px;
  font: 400 13px/1.75 var(--mono); color: var(--txt-2);
  min-height: 380px; max-height: min(78vh, 660px);
  overflow-y: auto; scrollbar-width: none;
}
.term__body::-webkit-scrollbar { display: none; }
.tl { white-space: pre-wrap; word-break: break-word; min-height: 1.75em; animation: tl-in .35s var(--ease) both; }
@keyframes tl-in { from { opacity: 0; transform: translateY(2px); } }
.tl .ok { color: var(--ok); } .tl .dim { color: var(--txt-3); } .tl .acc { color: var(--acc); }
.tl .err { color: var(--red); } .tl .t { color: var(--txt-4); } .tl .you { color: var(--txt); }
.tl--hello { margin: 10px 0 4px; font: 400 15px/1.6 var(--mono); color: var(--txt); }
.tl--hello .acc { font-weight: 500; }
.ascii { margin: 18px 0 10px; }
.ascii svg { display: block; width: min(100%, 560px); height: auto; overflow: visible; }
.ascii path { animation: tl-in .5s var(--ease) both; }
.ascii__blk { fill: var(--acc); }
.ascii__ln { fill: none; stroke: var(--acc-2); stroke-width: 1.1; opacity: .7; }
.term__motto { color: var(--txt-3); margin-bottom: 14px; }
.term__prompt { display: flex; gap: 10px; align-items: baseline; margin-top: 6px; }
.term__ps { color: var(--txt); white-space: nowrap; }
.term__ps b { color: var(--acc); font-weight: 400; }
.term__field { position: relative; flex: 1; min-width: 0; }
.term__field input { position: absolute; inset: 0; width: 100%; opacity: 0; border: 0; background: none; caret-color: transparent; font: inherit; }
.term__mirror { color: var(--txt); white-space: pre; }
.caret { display: inline-block; width: .6em; height: 1.1em; margin-left: 1px; vertical-align: -.2em; background: var(--acc); border-radius: 1.5px; animation: blink 1.1s steps(1) infinite; }
.term__prompt.is-busy .caret { animation: none; opacity: .3; }
@keyframes blink { 50% { opacity: 0; } }
.term__hint { margin: 0; font: 400 11.5px var(--mono); color: var(--txt-4); text-align: center; }
.term__hint b { color: var(--txt-3); font-weight: 500; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px;
  border-radius: 999px;
  background: var(--acc); color: var(--acc-ink);
  font-size: 15.5px; font-weight: 600;
  box-shadow: 0 12px 40px -16px rgba(241,211,214,.55);
  transition: background .3s var(--ease), transform .35s var(--spring), box-shadow .3s var(--ease);
}
.btn:hover { background: #f7e1e3; transform: translateY(-2px); box-shadow: 0 18px 46px -16px rgba(241,211,214,.7); }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--ghost { background: var(--surface-2); color: var(--txt); box-shadow: none; }
.btn--ghost:hover { background: var(--surface-3); box-shadow: none; }
.btn--sm { height: 42px; padding: 0 18px; font-size: 14px; }
.btn--block { width: 100%; }

.iconbtn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 12px; color: var(--txt-3);
  transition: color .2s, background .2s, transform .3s var(--spring);
}
.iconbtn:hover { color: var(--txt); background: var(--surface-2); }
.iconbtn:active { transform: scale(.92); }
.iconbtn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.corner-btn {
  position: fixed; top: 16px; right: 16px; z-index: 20;
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line); color: var(--txt-3);
  background: rgba(22,21,24,.5);
  opacity: 0; visibility: hidden; transition: opacity .6s, color .2s;
}
.corner-btn:hover { color: var(--txt); }
.corner-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
body[data-stage="terminal"] .corner-btn { opacity: 1; visibility: visible; }

/* ── Topbar ───────────────────────────────────────────────────────────── */
.topbar {
  position: relative; z-index: 3;
  max-width: var(--col); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0 10px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.wordmark { font: 400 22px/1 var(--serif); letter-spacing: .005em; }
.wordmark i { color: var(--acc); }
.topbar__acts { display: flex; align-items: center; gap: 6px; }
.me {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13.5px; color: var(--txt-2);
}
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-grid; place-items: center;
  font: 600 11.5px var(--sans); color: var(--acc-ink);
  background: var(--acc);
}
.avatar--b { background: #cfd8e8; } .avatar--c { background: #d9e6d3; } .avatar--d { background: #eadcc6; }

/* ── View ─────────────────────────────────────────────────────────────── */
.view { position: relative; z-index: 2; max-width: var(--col); margin: 0 auto; }
.view > * { animation: rise .7s var(--ease) both; }
.view > *:nth-child(2) { animation-delay: .06s; }
.view > *:nth-child(3) { animation-delay: .12s; }
.view > *:nth-child(4) { animation-delay: .18s; }
.view > *:nth-child(5) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.hello { margin: 44px 0 30px; }
.hello h1 { margin: 0; font: 400 clamp(40px, 7vw, 58px)/1.05 var(--serif); letter-spacing: -.005em; }
.hello h1 i { color: var(--acc); }
.hello p { margin: 10px 0 0; color: var(--txt-3); font-size: 15px; }
.h2 { margin: 0; font: 400 30px/1.1 var(--serif); }
.eyebrow { font: 500 12px var(--sans); letter-spacing: .02em; color: var(--txt-3); margin: 0 0 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.grid .span { grid-column: 1 / -1; }
.card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card__head .eyebrow { margin: 0; }
.link { color: var(--txt-3); font-size: 13px; transition: color .2s; }
.link:hover { color: var(--acc); }

/* agent */
.agent { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; padding: 24px; }
.agent__name { font-weight: 600; font-size: 14px; }
.agent__name small { font-weight: 400; color: var(--txt-3); margin-left: 6px; }
.agent__msg { margin: 6px 0 0; font-size: 17px; line-height: 1.55; color: var(--txt); min-height: 3.1em; }
.agent__msg .caret { width: .45em; height: 1em; }
.agent__acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; opacity: 0; transform: translateY(4px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.agent__acts.is-on { opacity: 1; transform: none; }

.orb {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background:
    radial-gradient(circle at 32% 30%, #fff8f6 0%, transparent 42%),
    conic-gradient(from 0deg, #f1d3d6, #e9c7d9, #d9d0ec, #f3dccb, #f1d3d6);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 10px 30px -8px rgba(241,211,214,.45);
  animation: orb 9s linear infinite, breathe 4.5s ease-in-out infinite;
}
.orb--sm { width: 30px; height: 30px; }
@keyframes orb { to { filter: hue-rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.06); } }

/* tasks */
.tasks { list-style: none; margin: 0; padding: 0; }
.task {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 12px 6px; border-radius: 14px;
  transition: background .2s, opacity .5s var(--ease), transform .5s var(--ease);
}
.task + .task { border-top: 1px solid var(--line); }
.task:hover { background: var(--surface); }
.task__txt { min-width: 0; }
.task__title { display: block; font-size: 15.5px; transition: color .3s; }
.task__meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 2px; font-size: 12.5px; color: var(--txt-3); }
.task__meta .late { color: var(--red); }
.task__meta .today { color: var(--acc); }
.task.is-done .task__title { color: var(--txt-3); text-decoration: line-through; text-decoration-color: var(--txt-4); }
.check {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.6px solid var(--txt-4);
  display: grid; place-items: center;
  transition: border-color .25s, background .3s var(--ease), transform .35s var(--spring);
}
.check:hover { border-color: var(--acc); transform: scale(1.08); }
.check svg { width: 14px; height: 14px; fill: none; stroke: var(--acc-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .35s var(--ease) .05s; }
.task.is-done .check { background: var(--acc); border-color: var(--acc); }
.task.is-done .check svg { stroke-dashoffset: 0; }
.task.is-pop .check { animation: pop .45s var(--spring); }
@keyframes pop { 40% { transform: scale(1.25); } }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--txt-2);
  font-size: 11.5px; font-weight: 500;
}
.tag i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag--pronote { color: #b9d4a6; } .tag--gmail { color: #e8b4a6; } .tag--discord { color: #b8bff0; } .tag--team { color: var(--acc); }
.prio { width: 8px; height: 8px; border-radius: 50%; background: var(--txt-4); }
.prio--1 { background: var(--red); } .prio--2 { background: var(--amber); }

/* team activity */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.feed li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; font-size: 14.5px; color: var(--txt-2); }
.feed b { color: var(--txt); font-weight: 500; }
.feed small { display: block; color: var(--txt-4); font-size: 12px; }

/* apps */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.app {
  display: grid; gap: 10px; align-content: start;
  padding: 18px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  text-align: left;
  transition: transform .35s var(--spring), background .25s, border-color .25s;
}
.app:hover { transform: translateY(-3px); background: var(--surface-2); border-color: var(--line-2); }
.app__ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font: 600 15px var(--sans); color: #231d1f; }
.app__ico svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app b { font-weight: 600; font-size: 15px; }
.app small { display: block; color: var(--txt-3); font-size: 12.5px; line-height: 1.4; }
.app .state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--txt-3); }
.app .state i { width: 7px; height: 7px; border-radius: 50%; background: var(--txt-4); }
.app .state.on { color: var(--ok); } .app .state.on i { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.apps--mini { grid-template-columns: repeat(5, 1fr); }
.apps--mini .app { padding: 14px 10px; justify-items: center; text-align: center; gap: 8px; }
.apps--mini .app b { font-size: 13px; }

/* to-do page */
.seg {
  display: inline-flex; padding: 4px; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
}
.seg button { height: 38px; padding: 0 18px; border-radius: 999px; font-size: 14px; color: var(--txt-3); transition: color .2s, background .3s var(--ease); }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--txt); }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin: 44px 0 22px; }
.pagehead h1 { margin: 0; font: 400 46px/1 var(--serif); }
.pagehead p { margin: 8px 0 0; color: var(--txt-3); font-size: 14.5px; }

.adder {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 20px; margin-bottom: 12px;
  border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  transition: border-color .3s, box-shadow .3s;
}
.adder:focus-within { border-color: var(--acc-line); box-shadow: 0 0 0 4px var(--acc-soft); }
.adder svg { width: 20px; height: 20px; fill: none; stroke: var(--txt-3); stroke-width: 1.7; stroke-linecap: round; }
.adder input { flex: 1; min-width: 0; height: 44px; border: 0; background: none; outline: none; font-size: 16px; }
.adder input::placeholder { color: var(--txt-3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px 8px; }
.chip {
  height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--txt-3); font-size: 13px;
  transition: all .25s var(--ease);
}
.chip:hover { color: var(--txt); }
.chip[aria-pressed="true"] { background: var(--acc-soft); border-color: var(--acc-line); color: var(--acc); }
.group { margin-bottom: 18px; }
.group__head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; margin-bottom: 4px; color: var(--txt-3); font-size: 13px; font-weight: 500; }
.group__head .n { color: var(--txt-4); font-weight: 400; }
.group__head svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .3s var(--ease); }
.group.is-closed .group__head svg { transform: rotate(-90deg); }
.group.is-closed .tasks { display: none; }
.empty { padding: 30px 6px; color: var(--txt-3); font-size: 14.5px; }
.del { opacity: 0; transition: opacity .2s; }
.task:hover .del, .task:focus-within .del { opacity: 1; }

/* pages */
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.pcard { padding: 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); text-align: left; transition: transform .35s var(--spring), background .25s; }
.pcard:hover { transform: translateY(-3px); background: var(--surface-2); }
.pcard .emo { font-size: 26px; line-height: 1; }
.pcard b { display: block; margin-top: 14px; font-weight: 600; }
.pcard small { color: var(--txt-3); font-size: 12.5px; }

/* settings */
.form { display: grid; gap: 22px; }
.fld { display: grid; gap: 8px; }
.fld__lab { font-size: 13px; color: var(--txt-3); }
.fld__in {
  height: 52px; padding: 0 18px; border-radius: 14px;
  border: 1px solid var(--line-2); background: var(--surface);
  outline: none; font-size: 16px;
  transition: border-color .3s, box-shadow .3s;
}
.fld__in:focus { border-color: var(--acc-line); box-shadow: 0 0 0 4px var(--acc-soft); }
.tones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tone {
  padding: 14px; border-radius: 14px; text-align: left;
  border: 1px solid var(--line-2); background: var(--surface);
  transition: all .25s var(--ease);
}
.tone b { display: block; font-size: 14.5px; font-weight: 600; }
.tone small { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: var(--txt-3); }
.tone[aria-pressed="true"] { border-color: var(--acc-line); background: var(--acc-soft); }
.tone[aria-pressed="true"] b { color: var(--acc); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.switch { width: 50px; height: 30px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background .3s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--txt); transition: transform .4s var(--spring); }
.switch[aria-checked="true"] { background: var(--acc); }
.switch[aria-checked="true"]::after { transform: translateX(20px); background: #fff; }

/* admin */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fld__lab em { font-style: normal; color: var(--txt-4); }
.hint { margin: 0; font-size: 13px; color: var(--txt-3); line-height: 1.5; }
.hint code, .invite code { font-family: var(--mono); }
.dim { color: var(--txt-3); font-weight: 400; }
.btn--xs { height: 34px; padding: 0 14px; font-size: 13px; }
.btn--danger { background: var(--red); color: #2b1a1a; box-shadow: 0 12px 40px -16px rgba(227,163,163,.5); }
.btn--danger:hover { background: #ecb8b8; }
.btn:disabled { opacity: .55; cursor: progress; transform: none; }
.invite { display: grid; gap: 16px; }
.invite__who { margin: 0; font-size: 15.5px; }
.invite__code {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 18px 18px 18px 24px; border-radius: 18px;
  background: var(--acc-soft); border: 1px solid var(--acc-line);
}
.invite__code code { font-size: clamp(20px, 5vw, 28px); letter-spacing: .06em; color: var(--acc); user-select: all; }
.invite__msg { display: grid; gap: 12px; justify-items: start; padding: 16px 18px; border-radius: 16px; background: var(--surface-2); }
.invite__msg p { margin: 0; font-size: 14px; color: var(--txt-2); line-height: 1.55; user-select: all; }
.accts { list-style: none; margin: 0; padding: 0; }
.acct { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; padding: 14px 4px; }
.acct + .acct { border-top: 1px solid var(--line); }
.acct .avatar { width: 34px; height: 34px; font-size: 13px; }
.acct__txt { min-width: 0; }
.acct__txt b { display: block; font-weight: 600; font-size: 15px; }
.acct__txt small { display: block; color: var(--txt-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct__acts { display: flex; align-items: center; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--surface-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--ok { color: var(--ok); } .pill--amber { color: var(--amber); } .pill--red { color: var(--red); }

/* logos d'apps */
.app__ico { box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 6px 18px -8px rgba(0,0,0,.6); }
.app__ico svg { width: 24px; height: 24px; }
.app__ico--xs { width: 20px; height: 20px; border-radius: 6px; display: inline-grid; }
.app__ico--xs svg { width: 13px; height: 13px; }
.app { position: relative; }
.dot-on { position: absolute; top: 10px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.app .state { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .state.go { color: var(--acc); } .app .state.go i { background: var(--acc); }
.app .state.warn { color: var(--amber); } .app .state.warn i { background: var(--amber); }
.hint--apps { margin-top: 18px; }
.gm-head { display: inline-flex; align-items: center; gap: 8px; }

/* mails */
.mails { list-style: none; margin: 0; padding: 0; }
.mails li { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 10px 4px; }
.mails li + li { border-top: 1px solid var(--line); }
.mails__txt { min-width: 0; }
.mails__txt b, .mails__txt span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mails__txt b { font-weight: 600; font-size: 14.5px; }
.mails__txt span { font-size: 13.5px; color: var(--txt-2); }
.mails__acts { display: flex; gap: 2px; }

/* tâches : colonne droite, assignation */
.task__right { display: flex; align-items: center; gap: 6px; }
.nobody { width: 26px; text-align: center; color: var(--txt-4); }
.chips--who { margin-top: -14px; align-items: center; }
.chips__lab { font-size: 12.5px; color: var(--txt-3); margin-right: 2px; }
.feed b { font-weight: 600; }
.empty b { color: var(--acc); font-weight: 500; }

/* pages : bientôt */
.soon { text-align: center; padding: 48px 24px; }
.soon .emblem { width: 38px; height: 38px; }
.soon h2 { margin: 14px 0 0; font: 400 32px/1.1 var(--serif); }
.soon p { margin: 10px auto 0; max-width: 30em; color: var(--txt-3); }

/* conversation avec l'assistant */
.chat { display: grid; gap: 10px; max-height: min(52vh, 440px); overflow-y: auto; padding-right: 2px; scrollbar-width: thin; }
.bubble { white-space: pre-wrap; word-break: break-word; justify-self: start; max-width: 92%; }
.bubble--me { justify-self: end; border-radius: 16px 16px 6px 16px; background: var(--acc); color: var(--acc-ink); }
.bubble--typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.bubble--typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--txt-3); animation: dots 1.1s infinite ease-in-out; }
.bubble--typing i:nth-child(2) { animation-delay: .15s; } .bubble--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 40% { transform: translateY(-4px); opacity: 1; } 0%, 80%, 100% { opacity: .4; } }
.sheet__form { display: flex; gap: 8px; margin-top: 12px; padding: 5px 5px 5px 16px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.sheet__form:focus-within { border-color: var(--acc-line); }
.sheet__form input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15px; }
.sheet__form .btn { width: 40px; height: 40px; padding: 0; }
.agent__acts .btn svg { transition: none; }

/* ── Dock ─────────────────────────────────────────────────────────────── */
.dock {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 10;
  display: flex; align-items: center; gap: 4px; padding: 7px;
  background: rgba(32,30,34,.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.7);
  transform: translate(-50%, 30px); opacity: 0; visibility: hidden;
  transition: transform .8s var(--ease), opacity .8s var(--ease), visibility 0s linear .8s;
}
body[data-stage="app"] .dock { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .8s var(--ease) .5s, opacity .8s var(--ease) .5s, visibility 0s; }
.dock__sep { width: 1px; height: 28px; margin: 0 5px; background: var(--line-2); }
.dock__it {
  position: relative; width: 52px; height: 52px;
  display: grid; place-items: center; border-radius: 16px;
  color: var(--txt-2);
  transition: transform .35s var(--spring), color .2s, background .2s;
}
.dock__it svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dock__it:hover { transform: translateY(-5px) scale(1.12); color: var(--txt); background: var(--surface-2); }
.dock__it[aria-current="page"] { color: var(--acc); }
.dock__it[aria-current="page"]::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--acc); }
.dock__tip {
  position: absolute; bottom: calc(100% + 12px); left: 50%;
  padding: 5px 11px; border-radius: 9px;
  background: #29272c; border: 1px solid var(--line);
  font: 400 12.5px var(--sans); color: var(--txt); white-space: nowrap;
  opacity: 0; transform: translate(-50%, 4px); pointer-events: none;
  transition: opacity .2s, transform .2s var(--ease);
}
.dock__it:hover .dock__tip, .dock__it:focus-visible .dock__tip { opacity: 1; transform: translate(-50%, 0); }
.dock__badge { position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--acc); color: var(--acc-ink); font: 600 10.5px/17px var(--sans); }

/* ── Agent orb + sheet ────────────────────────────────────────────────── */
.orb-btn {
  position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(26px, env(safe-area-inset-bottom)); z-index: 11;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(32,30,34,.72); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  opacity: 0; visibility: hidden; transform: scale(.8);
  transition: transform .5s var(--spring), opacity .5s, visibility 0s linear .5s;
}
body[data-stage="app"] .orb-btn { opacity: 1; visibility: visible; transform: none; transition: transform .5s var(--spring) .9s, opacity .5s .9s, visibility 0s; }
.orb-btn:hover { transform: scale(1.08); }
.sheet {
  position: fixed; right: 16px; bottom: 96px; z-index: 12;
  width: min(380px, calc(100vw - 32px));
  padding: 18px; border-radius: var(--r);
  background: rgba(30,28,32,.86);
  -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.7);
  transform-origin: bottom right;
  animation: sheet-in .45s var(--spring) both;
}
@keyframes sheet-in { from { opacity: 0; transform: scale(.9) translateY(10px); } }
.sheet__head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.sheet__head .orb { width: 36px; height: 36px; }
.sheet__head b { display: block; font-weight: 600; }
.sheet__head small { color: var(--txt-3); font-size: 12.5px; }
.sheet__body { margin-top: 14px; display: grid; gap: 10px; }
.bubble { padding: 12px 14px; border-radius: 16px 16px 16px 6px; background: var(--surface-2); font-size: 14.5px; line-height: 1.5; animation: rise .5s var(--ease) both; }
.bubble:nth-child(2) { animation-delay: .12s; } .bubble:nth-child(3) { animation-delay: .24s; }
.sugg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* ── Modal (premier login) ────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 30;
  display: flex; padding: 16px; overflow-y: auto;
  background: rgba(10,9,11,.55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: fade .5s var(--ease) both;
}
@keyframes fade { from { opacity: 0; } }
.modal__panel {
  width: min(480px, 100%);
  margin: auto;
  padding: 30px; border-radius: 26px;
  background: #1d1c20; border: 1px solid var(--line-2);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.8);
  animation: sheet-in .55s var(--spring) both;
}
.modal__panel .orb { margin-bottom: 18px; }
.modal__panel h2 { margin: 0; font: 400 34px/1.1 var(--serif); }
.modal__panel p { margin: 10px 0 24px; color: var(--txt-2); }

/* ── Toast ────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; top: 20px; z-index: 40;
  padding: 11px 18px; border-radius: 999px;
  background: #2a282d; border: 1px solid var(--line-2);
  font-size: 14px; color: var(--txt);
  transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  transition: transform .45s var(--spring), opacity .3s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ── Mobile ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .term__body { padding: 14px 14px 18px; font-size: 12px; min-height: 320px; }
  .term__hint { font-size: 10.5px; }
  .grid { grid-template-columns: 1fr; }
  .apps--mini { grid-template-columns: repeat(3, 1fr); }
  .agent { grid-template-columns: 1fr; padding: 20px; gap: 12px; }
  .hello { margin-top: 28px; }
  .pagehead h1 { font-size: 38px; }
  .tones { grid-template-columns: 1fr; }
  .dock { gap: 0; padding: 5px; border-radius: 20px; }
  .dock__it { width: 44px; height: 44px; }
  .dock__sep { margin: 0 2px; }
  .dock__tip { display: none; }
  .orb-btn { bottom: 92px; right: 16px; width: 50px; height: 50px; }
  .sheet { bottom: 154px; }
  .me span:last-child { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .acct { grid-template-columns: auto 1fr auto; }
  .acct__acts { grid-column: 1 / -1; justify-content: flex-end; }
  .me { padding-right: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
