/* Relwyn Office — nouvelle interface (dev.relwyn.si).
   DA : minimaliste façon Apple (fond #f5f5f7, surfaces blanches, grands titres serrés, contrôles en capsule)
   + codes 2Bgroups (Manrope, dégradé bleu → violet → rose, barre capsule en verre, tuiles d'apps). */

@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --raised: #ffffff;
  --glass: rgba(255, 255, 255, 0.8);
  --glass-strong: rgba(255, 255, 255, 0.97);
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.08);
  --fill-3: rgba(118, 118, 128, 0.05);
  --hover: rgba(0, 0, 0, 0.04);
  --ink: #1d1d1f;
  --ink-2: #3a3a3c;
  --soft: #6e6e73;
  --dim: #86868b;
  --line: rgba(0, 0, 0, 0.07);
  --line-2: rgba(0, 0, 0, 0.12);
  --blue: #2f5bff;
  --blue-2: #5b8cff;
  --blue-soft: rgba(47, 91, 255, 0.1);
  --violet: #7c4dff;
  --violet-soft: rgba(124, 77, 255, 0.1);
  --pink: #ff5c8a;
  --green: #1f9d55;
  --green-dot: #30d158;
  --green-soft: rgba(48, 209, 88, 0.14);
  --amber: #c2410c;
  --amber-dot: #ff9f0a;
  --amber-soft: rgba(255, 159, 10, 0.16);
  --red: #e5281e;
  --red-dot: #ff3b30;
  --red-soft: rgba(255, 59, 48, 0.1);
  --grad: linear-gradient(100deg, #2f5bff 0%, #7c4dff 52%, #ff5c8a 100%);
  --grad-soft: linear-gradient(100deg, rgba(47, 91, 255, 0.1), rgba(124, 77, 255, 0.1) 52%, rgba(255, 92, 138, 0.1));
  --bubble-in: #e9e9eb;
  --bubble-out: #2f5bff;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 22px;
  --r-xl: 28px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 12px rgba(0, 0, 0, 0.03);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.04), 0 18px 40px -22px rgba(0, 0, 0, 0.22);
  --shadow-pop: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 22px 60px -18px rgba(0, 0, 0, 0.32);
  --ring: 0 0 0 4px rgba(47, 91, 255, 0.16);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --spring: cubic-bezier(0.34, 1.36, 0.64, 1);
  --nav-h: 56px;
  --wrap: 1180px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #232325;
  --raised: #2c2c2e;
  --glass: rgba(28, 28, 30, 0.8);
  --glass-strong: rgba(36, 36, 38, 0.97);
  --fill: rgba(118, 118, 128, 0.24);
  --fill-2: rgba(118, 118, 128, 0.18);
  --fill-3: rgba(118, 118, 128, 0.1);
  --hover: rgba(255, 255, 255, 0.06);
  --ink: #f5f5f7;
  --ink-2: #e5e5ea;
  --soft: #a1a1a6;
  --dim: #8e8e93;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --blue: #5b8cff;
  --blue-2: #8fb0ff;
  --blue-soft: rgba(91, 140, 255, 0.18);
  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, 0.18);
  --green: #30d158;
  --green-soft: rgba(48, 209, 88, 0.18);
  --amber: #ffb340;
  --amber-soft: rgba(255, 159, 10, 0.2);
  --red: #ff6961;
  --red-soft: rgba(255, 69, 58, 0.2);
  --bubble-in: #26262a;
  --bubble-out: #3d6bff;
  --shadow-1: 0 0 0 0.5px rgba(255, 255, 255, 0.06);
  --shadow-2: 0 0 0 0.5px rgba(255, 255, 255, 0.08), 0 18px 40px -22px rgba(0, 0, 0, 0.8);
  --shadow-pop: 0 0 0 0.5px rgba(255, 255, 255, 0.12), 0 22px 60px -18px rgba(0, 0, 0, 0.9);
  --ring: 0 0 0 4px rgba(91, 140, 255, 0.28);
  color-scheme: dark;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font-family: var(--font); font-size: 15px; line-height: 1.5; letter-spacing: -0.006em; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: 34px; line-height: 1.08; font-weight: 800; letter-spacing: -0.038em; }
h2 { font-size: 22px; line-height: 1.2; font-weight: 750; }
h3 { font-size: 17px; line-height: 1.3; font-weight: 750; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: none; opacity: 0.86; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
::selection { background: rgba(47, 91, 255, 0.2); }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--fill-2); padding: 1px 6px; border-radius: 6px; }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0; }
[hidden] { display: none !important; }

/* ── Utilitaires ── */
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row.top { align-items: flex-start; }
.row.end { justify-content: flex-end; }
.row.wrap, .wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.spacer { flex: 1; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.wide-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.gap-6 { gap: 6px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.small { font-size: 13.5px; } .tiny { font-size: 12px; line-height: 1.45; }
.muted { color: var(--soft); } .dim { color: var(--dim); } .ink { color: var(--ink); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.block { width: 100%; }
.center { text-align: center; }
.gradient-text, .grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hide-d { display: none !important; }
@media (max-width: 860px) { .hide-m { display: none !important; } .hide-d { display: revert !important; } }
@media (min-width: 861px) { .show-m { display: none !important; } }

/* ── Icônes ── */
.icon-svg { display: inline-flex; flex: none; width: 18px; height: 18px; align-items: center; justify-content: center; }
.icon-svg svg { width: 100%; height: 100%; stroke-width: 1.9; }

/* ── Boutons (capsules) ── */
.btn { --h: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: var(--h); padding: 0 16px; border: 0; border-radius: 999px; background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 650; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background 0.2s, transform 0.2s var(--ease), box-shadow 0.2s, opacity 0.2s; user-select: none; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: rgba(118, 118, 128, 0.18); opacity: 1; }
.btn:active { transform: scale(0.97); }
.btn:disabled, .btn[disabled] { opacity: 0.45; cursor: default; transform: none; }
.btn .icon-svg { width: 17px; height: 17px; }
.btn.sm { --h: 30px; padding: 0 12px; font-size: 13px; gap: 5px; }
.btn.sm .icon-svg { width: 15px; height: 15px; }
.btn.lg { --h: 48px; padding: 0 24px; font-size: 15.5px; }
.btn.icon { width: var(--h); padding: 0; }
.btn.block { width: 100%; }
.btn.primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px -8px rgba(47, 91, 255, 0.6); }
.btn.primary:hover { background: #2450f0; }
:root[data-theme="dark"] .btn.primary:hover { background: #4d7dff; }
.btn.grad { color: #fff; background: var(--grad); background-size: 160% 100%; box-shadow: 0 10px 26px -12px rgba(92, 70, 255, 0.75); transition: background-position 0.6s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s; }
.btn.grad:hover { background-position: 45% 0; }
.btn.dark { background: var(--ink); color: var(--bg); }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--hover); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.danger:hover { background: rgba(255, 59, 48, 0.16); }
.btn.success { background: var(--green-soft); color: var(--green); }
.btn.success:hover { background: rgba(48, 209, 88, 0.22); }
.btn.white { background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 0.5px var(--line-2); }
.btn.link { background: none; padding: 0; height: auto; color: var(--blue); font-weight: 650; }
.btn.link:hover { background: none; opacity: 0.8; }
.btn.on { background: var(--blue-soft); color: var(--blue); }
.link-btn { border: 0; background: none; padding: 0; color: var(--blue); font-weight: 650; font-size: inherit; cursor: pointer; }
.link-btn:hover { opacity: 0.8; }

/* ── Champs ── */
.input, .select, .textarea { width: 100%; min-width: 0; height: 42px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 15px; outline: none; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: var(--ring); }
.input:disabled, .select:disabled { opacity: 0.6; }
.input.sm, .select.sm { height: 32px; padding: 0 10px; font-size: 13.5px; border-radius: 9px; }
.input.lg { height: 50px; font-size: 16px; border-radius: 14px; }
.input.fill { background: var(--fill-2); border-color: transparent; }
.input.fill:focus { background: var(--surface); }
.textarea { height: auto; min-height: 104px; padding: 11px 14px; line-height: 1.5; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.input.otp { height: 56px; text-align: center; font-size: 26px; letter-spacing: 0.4em; font-family: var(--mono); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--dim); line-height: 1.45; }
.field.full { grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; }
.search-field { position: relative; display: flex; align-items: center; }
.search-field .icon-svg { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--dim); pointer-events: none; }
.search-field .input { padding-left: 34px; background: var(--fill-2); border-color: transparent; height: 36px; border-radius: 10px; font-size: 14px; }
.search-field .input:focus { background: var(--surface); }

/* Interrupteur iOS */
.switch { position: relative; flex: none; width: 51px; height: 31px; border: 0; border-radius: 999px; background: rgba(120, 120, 128, 0.2); cursor: pointer; transition: background 0.25s var(--ease); padding: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16); transition: transform 0.3s var(--spring); }
.switch.on { background: var(--green-dot); }
.switch.on::after { transform: translateX(20px); }
.switch:disabled { opacity: 0.5; cursor: default; }

/* Contrôle segmenté iOS (sert aussi pour les onglets) */
.seg, .tabs { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 10px; background: var(--fill); max-width: 100%; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.seg::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; }
.seg button, .tabs .tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-size: 13.5px; font-weight: 650; white-space: nowrap; cursor: pointer; transition: background 0.2s, color 0.2s, box-shadow 0.2s; }
.seg button .icon-svg, .tabs .tab .icon-svg { width: 15px; height: 15px; }
.seg button:hover, .tabs .tab:hover { color: var(--ink); }
.seg button.on, .tabs .tab.on { background: var(--surface); color: var(--ink); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08), 0 0 0 0.5px rgba(0, 0, 0, 0.04); }
:root[data-theme="dark"] .seg button.on, :root[data-theme="dark"] .tabs .tab.on { background: #636366; }
.tabs { margin-bottom: 20px; }
.tabs .tab .badge { height: 18px; padding: 0 6px; font-size: 11px; }
.seg button.off.on { color: var(--soft); }
.seg button.ask.on { color: var(--amber); }
.seg button.auto.on { color: var(--green); }

/* Puces */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--fill-2); color: var(--ink-2); font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.chip:hover { background: var(--fill); color: var(--ink); }
.chip.active, .chip.on { background: var(--ink); color: var(--bg); }
.chip .icon-svg { width: 15px; height: 15px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--fill-2); color: var(--ink-2); font-size: 12px; font-weight: 700; white-space: nowrap; line-height: 1; text-decoration: none; }
.badge .icon-svg { width: 13px; height: 13px; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.grad { background: var(--grad); color: #fff; }
.count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 800; line-height: 1; }
.count.warn { background: var(--red-dot); }

/* Pastilles */
.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.dot.green { background: var(--green-dot); } .dot.amber { background: var(--amber-dot); } .dot.red { background: var(--red-dot); } .dot.violet { background: var(--violet); } .dot.blue { background: var(--blue); }
.dot.live { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.55); } 70% { box-shadow: 0 0 0 7px rgba(48, 209, 88, 0); } 100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); } }

/* ── Cartes, listes groupées ── */
.card { position: relative; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); min-width: 0; }
.card.pad, .card .pad, .pad { padding: 20px; }
.card.hoverable { cursor: pointer; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.card.hoverable:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.card.glow { box-shadow: 0 0 0 1.5px var(--blue), 0 10px 30px -14px rgba(47, 91, 255, 0.5); }
.card.flat { box-shadow: none; background: var(--fill-3); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px 0; }
.card-h h3 { font-size: 16px; }
.card-b { padding: 16px 20px 20px; }
.card-f { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); }
.section-title { display: flex; align-items: center; gap: 8px; margin: 26px 0 10px; font-size: 13px; font-weight: 750; color: var(--soft); text-transform: uppercase; letter-spacing: 0.06em; }
.section-title .icon-svg { width: 15px; height: 15px; }
.sec-h { display: flex; align-items: flex-end; gap: 12px; margin: 40px 0 14px; }
.sec-h h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.sec-h .sub { color: var(--soft); font-size: 14px; }
.sec-h a, .sec-h .link-btn { font-size: 14px; font-weight: 650; }

/* Liste groupée (Réglages iOS) */
.list { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 18px; color: var(--ink); text-decoration: none; position: relative; width: 100%; border: 0; background: none; text-align: left; font-size: 15px; }
.list-row + .list-row::before { content: ""; position: absolute; top: 0; left: 18px; right: 0; border-top: 1px solid var(--line); }
.list-row.ic + .list-row::before, .list-row + .list-row.ic::before { left: 62px; }
button.list-row, a.list-row { cursor: pointer; transition: background 0.15s; }
button.list-row:hover, a.list-row:hover { background: var(--hover); opacity: 1; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-main b { display: block; font-weight: 650; }
.list-row .lr-main span { display: block; color: var(--soft); font-size: 13px; }
.list-row .chev { color: var(--dim); width: 16px; height: 16px; }
.list-head { padding: 0 18px 8px; font-size: 13px; font-weight: 650; color: var(--soft); }

/* Tuile d'app (dégradé, coins iOS) */
.app-ic { --g: var(--grad); position: relative; display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; color: #fff; background: var(--g); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.18), 0 2px 6px -2px rgba(0, 0, 0, 0.25); }
.app-ic .icon-svg { width: 58%; height: 58%; }
.app-ic .icon-svg svg { stroke-width: 2.1; }
.app-ic.lg { width: 52px; height: 52px; border-radius: 14px; }
.app-ic.xl { width: 72px; height: 72px; border-radius: 19px; }
.app-ic.sm { width: 26px; height: 26px; border-radius: 7px; }

/* Marque Relwyn */
.mark { display: inline-block; flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--grad); position: relative; box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.2), 0 4px 10px -4px rgba(92, 70, 255, 0.6); }
.mark::after { content: ""; position: absolute; inset: 18%; background: #fff; -webkit-mask: url(/img/relwyn-mark.png) center / contain no-repeat; mask: url(/img/relwyn-mark.png) center / contain no-repeat; }
.mark.lg { width: 64px; height: 64px; border-radius: 17px; }
.mark.xl { width: 88px; height: 88px; border-radius: 22px; }
.wordmark { font-weight: 800; font-size: 18px; letter-spacing: -0.04em; color: var(--ink); }

/* ── Avatars ── */
.av { --c: #7c4dff; --s: 40px; position: relative; display: grid; place-items: center; flex: none; width: var(--s); height: var(--s); border-radius: 50%; color: #fff; font-size: calc(var(--s) * 0.38); font-weight: 750; letter-spacing: -0.02em; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 72%, #fff) 0%, var(--c) 100%); user-select: none; }
.av.human { background: linear-gradient(180deg, #a1a1aa 0%, #71717a 100%); }
.av.xs { --s: 22px; font-size: 9.5px; }
.av.sm { --s: 30px; }
.av.lg { --s: 56px; }
.av.xl { --s: 96px; }
.av.xxl { --s: 120px; }
.av .st { position: absolute; right: -1px; bottom: -1px; width: 31%; height: 31%; min-width: 9px; min-height: 9px; border-radius: 50%; background: var(--dim); border: 2px solid var(--surface); }
.av .st.working, .av .st.chatting { background: var(--green-dot); }
.av .st.waiting { background: var(--amber-dot); }
.av .st.paused { background: #c7c7cc; }
.av .st.idle { background: #c7c7cc; display: none; }
.av-stack { display: inline-flex; }
.av-stack .av { box-shadow: 0 0 0 2px var(--surface); }
.av-stack .av + .av { margin-left: -7px; }
.prov { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.prov i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font-style: normal; font-size: 10px; font-weight: 800; }

/* ── Bandeaux ── */
.banner { display: flex; align-items: center; gap: 12px; padding: 13px 16px; margin-bottom: 16px; border-radius: var(--r); background: var(--fill-2); color: var(--ink); font-size: 14px; line-height: 1.45; }
.banner > .icon-svg { color: var(--soft); }
.banner.violet, .banner.blue { background: var(--blue-soft); }
.banner.violet > .icon-svg, .banner.blue > .icon-svg { color: var(--blue); }
.banner.amber { background: var(--amber-soft); }
.banner.amber > .icon-svg { color: var(--amber); }
.banner.red { background: var(--red-soft); }
.banner.red > .icon-svg { color: var(--red); }
.banner.green { background: var(--green-soft); }
.banner.green > .icon-svg { color: var(--green); }

/* ── Tableaux ── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover { background: var(--fill-3); }

/* ── Vide, chargement ── */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 56px 20px; color: var(--soft); }
.empty .ill { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 6px; border-radius: 18px; color: #fff; background: var(--grad); box-shadow: 0 14px 30px -14px rgba(92, 70, 255, 0.7); }
.empty .ill .icon-svg { width: 30px; height: 30px; }
.empty h3 { font-size: 20px; color: var(--ink); font-weight: 800; letter-spacing: -0.03em; }
.empty p { font-size: 15px; line-height: 1.5; }
.empty > .btn, .empty > a.btn { margin-top: 8px; }
.skel { border-radius: var(--r); background: linear-gradient(90deg, var(--fill-3) 0%, var(--fill-2) 50%, var(--fill-3) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { display: inline-block; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2.2px solid var(--fill); border-top-color: var(--ink-2); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.typing { display: inline-flex; gap: 4px; align-items: center; height: 18px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.35; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.18s; } .typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 0.9; transform: translateY(-2px); } }
.progress { height: 6px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.progress > div, .progress > i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width 0.6s var(--ease); }

/* ── Menus, popovers ── */
.tip { position: relative; }
.menu { position: absolute; z-index: 300; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--raised); box-shadow: var(--shadow-pop); animation: pop 0.18s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 7px 10px; border: 0; border-radius: 9px; background: none; color: var(--ink); font-size: 14px; font-weight: 550; text-align: left; text-decoration: none; cursor: pointer; }
.menu-item:hover { background: var(--hover); opacity: 1; }
.menu-item .icon-svg { width: 17px; height: 17px; color: var(--soft); }
.menu-item.danger, .menu-item.danger .icon-svg { color: var(--red); }
.menu-item:disabled { opacity: 0.45; cursor: default; }
.menu-sep { height: 1px; margin: 5px 8px; background: var(--line); }

/* ── Fenêtres ── */
.overlay { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade 0.2s ease; overflow-y: auto; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-pop); animation: sheet 0.32s var(--spring); overflow: hidden; }
.modal.wide { width: min(820px, 100%); }
.modal.xl { width: min(1040px, 100%); }
@keyframes sheet { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 20px 20px 4px 24px; }
.modal-h h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.modal-b { padding: 16px 24px 22px; overflow-y: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.close-x { width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--fill-2); color: var(--soft); cursor: pointer; flex: none; }
.close-x:hover { background: var(--fill); color: var(--ink); }
.close-x .icon-svg { width: 15px; height: 15px; }
.close-x .icon-svg svg { stroke-width: 2.6; }
/* Feuille latérale */
.drawer-wrap { position: fixed; inset: 0; z-index: 350; background: rgba(0, 0, 0, 0.18); animation: fade 0.2s ease; }
.drawer { position: fixed; z-index: 351; top: 10px; right: 10px; bottom: 10px; width: min(620px, calc(100vw - 20px)); display: flex; flex-direction: column; border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-pop); animation: slide 0.38s var(--ease); overflow: hidden; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-h { display: flex; align-items: flex-start; gap: 12px; padding: 22px 20px 14px 26px; border-bottom: 1px solid var(--line); }
.drawer-h h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.drawer-b { flex: 1; overflow-y: auto; padding: 20px 26px 32px; }

/* ── Notifications éphémères ── */
.toasts { position: fixed; z-index: 600; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 18px 11px 14px; border-radius: 999px; background: rgba(29, 29, 31, 0.92); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.5); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); animation: toastIn 0.4s var(--spring); pointer-events: auto; max-width: 560px; }
:root[data-theme="dark"] .toast { background: rgba(58, 58, 60, 0.95); }
.toast .icon-svg { width: 18px; height: 18px; color: var(--green-dot); }
.toast.error .icon-svg { color: #ff6961; }
.toast.info .icon-svg { color: #8fb0ff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(0.96); } }

/* ── Markdown ── */
.md { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 10px; }
.md h2, .md h3, .md h4, .md h5 { margin: 16px 0 8px; font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.md h2 { font-size: 18px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin: 3px 0; }
.md blockquote { margin: 0 0 10px; padding: 4px 14px; border-left: 3px solid var(--line-2); color: var(--soft); }
.md pre { margin: 0 0 10px; padding: 12px 14px; border-radius: 12px; background: var(--fill-3); overflow-x: auto; font-size: 13px; }
.md pre code { background: none; padding: 0; }
.md table { width: 100%; margin: 0 0 10px; border-collapse: collapse; font-size: 14px; }
.md th, .md td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.md th { font-weight: 750; color: var(--soft); font-size: 12.5px; }
.md a { text-decoration: underline; text-decoration-color: rgba(47, 91, 255, 0.35); text-underline-offset: 2px; }

/* Boîte de copie */
.copy-box { display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 4px 6px 4px 14px; border-radius: 12px; background: var(--fill-2); font-family: var(--mono); font-size: 13px; }
.copy-box > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══════════════════════ Coquille ═══════════════════════ */
.os { min-height: 100vh; }
.os-nav { position: sticky; top: 0; z-index: 200; padding: 10px 14px 0; pointer-events: none; }
.os-nav-in { position: relative; pointer-events: auto; display: flex; align-items: center; gap: 14px; height: var(--nav-h); max-width: 1320px; margin-inline: auto; padding: 0 8px 0 12px; border-radius: 999px; background: var(--glass); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); box-shadow: 0 0 0 0.5px var(--line-2), 0 14px 36px -24px rgba(0, 0, 0, 0.4); }
.os-brand { display: flex; align-items: center; gap: 9px; flex: none; color: var(--ink); padding: 4px 6px 4px 0; border-radius: 12px; }
.os-brand:hover { opacity: 1; }
.os-brand .mark { width: 30px; height: 30px; }
.os-links { display: flex; align-items: center; gap: 2px; margin-inline: auto; min-width: 0; }
.os-link { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--soft); font-size: 14px; font-weight: 650; white-space: nowrap; text-decoration: none; cursor: pointer; transition: color 0.2s, background 0.2s; }
.os-link:hover { color: var(--ink); background: var(--hover); opacity: 1; }
.os-link.on { color: var(--ink); }
.os-link::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--grad); transform: scale(0); transition: transform 0.35s var(--spring); }
.os-link.on::after { transform: scale(1); }
.os-link .count { position: relative; top: -1px; }
.os-link .chev { width: 13px; height: 13px; transition: transform 0.25s var(--ease); }
.os-link.open .chev { transform: rotate(180deg); }
.os-end { display: flex; align-items: center; gap: 4px; flex: none; }
.os-ib { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; transition: background 0.2s; }
.os-ib:hover { background: var(--hover); }
.os-ib .icon-svg { width: 19px; height: 19px; }
.os-ib .count { position: absolute; top: 2px; right: 0; height: 17px; min-width: 17px; font-size: 10.5px; box-shadow: 0 0 0 2px var(--surface); }
.os-search { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 12px; border: 0; border-radius: 999px; background: var(--fill-2); color: var(--dim); font-size: 13.5px; font-weight: 550; cursor: pointer; transition: background 0.2s; }
.os-search:hover { background: var(--fill); color: var(--soft); }
.os-search .icon-svg { width: 16px; height: 16px; }
.os-search kbd { font-family: var(--font); font-size: 11.5px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--surface); color: var(--soft); box-shadow: 0 0 0 0.5px var(--line-2); }
.os-stop { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--fill-2); color: var(--ink-2); font-size: 13px; font-weight: 700; cursor: pointer; transition: background 0.2s, color 0.2s; }
.os-stop:hover { background: var(--red-soft); color: var(--red); }
.os-stop.on { background: var(--red-dot); color: #fff; }
.os-stop .icon-svg { width: 15px; height: 15px; }
.os-me { border: 0; background: none; padding: 2px; border-radius: 50%; cursor: pointer; }
.os-me .av { --s: 34px; }
.os-main { min-height: calc(100vh - 70px); }
.os-kill { display: flex; align-items: center; gap: 12px; max-width: 1320px; margin: 10px auto 0; padding: 10px 12px 10px 18px; border-radius: 18px; background: var(--red-dot); color: #fff; font-size: 14px; font-weight: 600; width: calc(100% - 28px); }
.os-kill .icon-svg { width: 18px; height: 18px; }
.os-kill .btn { background: rgba(255, 255, 255, 0.22); color: #fff; }
.os-kill .btn:hover { background: rgba(255, 255, 255, 0.32); }

/* Feuille « Plus » : grille d'apps */
.os-apps { position: absolute; top: calc(100% + 10px); right: 0; z-index: 300; width: min(660px, calc(100vw - 24px)); padding: 18px; border-radius: 26px; background: var(--raised); box-shadow: var(--shadow-pop); animation: appsIn 0.32s var(--spring); transform-origin: top right; }
@keyframes appsIn { from { opacity: 0; transform: translateY(-8px) scale(0.97); } }
.os-more { display: inline-flex; }
.os-apps-h { display: flex; align-items: center; gap: 10px; padding: 0 4px 12px; }
.os-apps-h b { font-size: 15px; font-weight: 800; }
.os-apps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.os-app { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; color: var(--ink); text-decoration: none; transition: background 0.15s; position: relative; min-width: 0; }
.os-app:hover { background: var(--hover); opacity: 1; }
.os-app.on { background: var(--blue-soft); }
.os-app .app-ic { width: 40px; height: 40px; border-radius: 11px; }
.os-app b { display: block; font-size: 14px; font-weight: 700; line-height: 1.25; }
.os-app span.d { display: block; font-size: 12px; color: var(--soft); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-app .count { position: absolute; top: 6px; left: 40px; }
.os-ws { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 8px 0; border-top: 1px solid var(--line); }

/* Barre d'onglets iOS (mobile) */
.os-tabbar { display: none; }
@media (max-width: 860px) {
  .os-nav { padding: 8px 10px 0; }
  .os-nav-in { gap: 6px; height: 52px; padding: 0 6px 0 10px; }
  .os-links { display: none; }
  .os-search span, .os-search kbd { display: none; }
  .os-search { width: 38px; padding: 0; justify-content: center; background: none; }
  .os-stop > span:not(.icon-svg) { display: none; }
  .os-stop { width: 34px; padding: 0; justify-content: center; }
  .os-brand { margin-right: auto; }
  .os-main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .os-tabbar { position: fixed; z-index: 220; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--glass); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); border-top: 0.5px solid var(--line-2); }
  .os-tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 0 3px; border: 0; background: none; color: var(--dim); font-size: 10.5px; font-weight: 650; text-decoration: none; cursor: pointer; }
  .os-tab .icon-svg { width: 24px; height: 24px; }
  .os-tab.on { color: var(--blue); }
  .os-tab .count { position: absolute; top: 0; left: calc(50% + 6px); height: 17px; min-width: 17px; font-size: 10.5px; }
  .os-apps { position: fixed; top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); left: 10px; right: 10px; width: auto; transform: none; max-height: calc(100vh - 160px); overflow-y: auto; animation: sheet 0.32s var(--spring); }
  .os-apps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) and (min-width: 861px) { .os-search span, .os-search kbd { display: none; } .os-search { width: 38px; padding: 0; justify-content: center; background: none; } .os-link { padding: 0 9px; } }
@media (max-width: 1020px) and (min-width: 861px) { .os-stop > span:not(.icon-svg) { display: none; } .os-stop { width: 34px; padding: 0; justify-content: center; } }

/* ── Pages ── */
.page { max-width: var(--wrap); margin-inline: auto; padding: 34px 24px 96px; }
.page.wide { max-width: 1400px; }
.page.narrow { max-width: 860px; }
.page-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 26px; }
.page-head > div:first-child { min-width: 0; flex: 1 1 420px; }
.page-head h1 { display: flex; align-items: center; gap: 12px; }
.page-head h1 > .icon-svg { display: none; }
.page-head .sub { margin-top: 6px; color: var(--soft); font-size: 16px; line-height: 1.45; max-width: 640px; }
.page-head .eyebrow, .eyebrow { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--soft); }
@media (max-width: 860px) {
  .page { padding: 22px 16px 40px; }
  h1 { font-size: 28px; }
  .page-head { margin-bottom: 20px; }
  .page-head .sub { font-size: 15px; }
  .g2, .g3, .g4, .form-grid, .split, .wide-side { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 861px) and (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wide-side { grid-template-columns: minmax(0, 1fr); } }

/* Chiffres clés */
.kpi { padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); min-width: 0; }
.kpi .k-label { font-size: 13px; font-weight: 650; color: var(--soft); }
.kpi .k-val { margin-top: 6px; font-size: 30px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .k-sub { margin-top: 4px; font-size: 12.5px; color: var(--dim); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

/* Fil d'événements (déroulé d'une tâche, journal) */
.feed { display: flex; flex-direction: column; }
.ev { display: flex; gap: 12px; padding: 10px 0; position: relative; }
.ev + .ev { border-top: 1px solid var(--line); }
.ev .ico { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--fill-2); color: var(--soft); }
.ev .ico .icon-svg { width: 15px; height: 15px; }
.ev .ico.result, .ev .ico.final { background: var(--green-soft); color: var(--green); }
.ev .ico.error, .ev .ico.denied, .ev .ico.alert { background: var(--red-soft); color: var(--red); }
.ev .ico.approval { background: var(--amber-soft); color: var(--amber); }
.ev .ico.tool { background: var(--blue-soft); color: var(--blue); }
.ev .ico.note { background: var(--violet-soft); color: var(--violet); }
.ev .body { flex: 1; min-width: 0; }
.ev .txt { font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.ev .when { margin-top: 2px; font-size: 12px; color: var(--dim); }

/* ═══════════════════════ Connexion ═══════════════════════ */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; position: relative; overflow: hidden; isolation: isolate; }
.auth::before { content: ""; position: absolute; inset: -20% -10% auto; height: 70%; z-index: -1; background: radial-gradient(50% 60% at 80% 10%, rgba(124, 77, 255, 0.16), transparent 70%), radial-gradient(40% 55% at 20% 0%, rgba(47, 91, 255, 0.14), transparent 70%), radial-gradient(35% 50% at 50% 30%, rgba(255, 92, 138, 0.08), transparent 70%); }
.auth-box { width: min(440px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; }
.auth-box .mark { margin-bottom: 22px; }
.auth-box h1 { font-size: 36px; }
.auth-box .lead { margin-top: 10px; color: var(--soft); font-size: 16.5px; line-height: 1.45; max-width: 360px; }
.auth-card { width: 100%; margin-top: 28px; padding: 26px; border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-2); text-align: left; }
.auth-card form, .auth-card .col { gap: 16px; }
.auth-foot { margin-top: 20px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; font-size: 14px; }
.auth-legal { margin-top: 28px; font-size: 12px; color: var(--dim); }
.auth-wide { width: min(640px, 100%); }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; border-radius: 16px; background: var(--fill-3); text-align: left; color: var(--ink); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.2s, background 0.2s; }
.pick:hover { background: var(--fill-2); }
.pick.on { background: var(--blue-soft); box-shadow: inset 0 0 0 2px var(--blue); }

/* ═══════════════════════ Accueil ═══════════════════════ */
.home { max-width: 1180px; margin-inline: auto; padding: 44px 24px 110px; }
.home-hero { text-align: center; max-width: 780px; margin: 0 auto; }
.home-hero .eyebrow { margin-bottom: 10px; font-size: 14px; }
.home-hero h1 { font-size: clamp(36px, 5.2vw, 56px); line-height: 1.02; letter-spacing: -0.05em; }
.home-hero .lead { margin-top: 12px; color: var(--soft); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.45; font-weight: 500; }
.home-hero .lead b { color: var(--ink); font-weight: 700; }
.composer { position: relative; max-width: 780px; margin: 30px auto 0; border-radius: 26px; background: var(--surface); box-shadow: 0 0 0 0.5px var(--line-2), 0 24px 60px -30px rgba(47, 91, 255, 0.35), 0 2px 8px rgba(0, 0, 0, 0.03); transition: box-shadow 0.25s; }
.composer:focus-within { box-shadow: 0 0 0 1.5px var(--blue), 0 24px 60px -26px rgba(47, 91, 255, 0.45); }
.composer::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: 27px; background: var(--grad); opacity: 0.35; filter: blur(18px); transform: translateY(10px) scale(0.96); }
.cmp-top { display: flex; align-items: center; gap: 10px; padding: 14px 14px 0 18px; }
.cmp-to { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; color: var(--soft); }
.cmp-to b { color: var(--ink); font-weight: 700; }
.cmp-to .av { --s: 24px; font-size: 10px; }
.cmp-to select { border: 0; background: none; color: var(--ink); font-weight: 700; font-size: 13.5px; padding: 2px 18px 2px 2px; appearance: none; -webkit-appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 3px center; border-radius: 6px; }
.cmp-to select:focus-visible { outline: 2px solid var(--blue); }
.composer textarea { display: block; width: 100%; min-height: 84px; max-height: 260px; padding: 12px 20px 6px; border: 0; outline: none; resize: none; background: none; font-size: 17px; line-height: 1.5; color: var(--ink); }
.composer textarea::placeholder { color: var(--dim); }
.cmp-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 6px; }
.cmp-bar { display: flex; align-items: center; gap: 4px; padding: 8px 10px 10px 12px; }
.cmp-ic { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--soft); cursor: pointer; transition: background 0.2s, color 0.2s; }
.cmp-ic:hover { background: var(--hover); color: var(--ink); }
.cmp-ic.rec { background: var(--red-soft); color: var(--red); animation: pulse 1.6s infinite; }
.cmp-ic .icon-svg { width: 19px; height: 19px; }
.cmp-hint { flex: 1; min-width: 0; padding: 0 8px; font-size: 12.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-send { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 18px 0 16px; border: 0; border-radius: 999px; background: var(--grad); background-size: 160% 100%; color: #fff; font-size: 14.5px; font-weight: 750; cursor: pointer; box-shadow: 0 10px 24px -12px rgba(92, 70, 255, 0.8); transition: background-position 0.5s var(--ease), transform 0.2s var(--ease), opacity 0.2s; }
.cmp-send:hover { background-position: 45% 0; }
.cmp-send:active { transform: scale(0.97); }
.cmp-send:disabled { opacity: 0.35; cursor: default; box-shadow: none; }
.cmp-send.q { background: var(--blue); width: 40px; padding: 0; justify-content: center; }
.cmp-send .icon-svg { width: 18px; height: 18px; }
.sugg { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 820px; margin: 18px auto 0; }
.sugg button { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 13.5px; font-weight: 600; box-shadow: 0 0 0 0.5px var(--line-2); cursor: pointer; transition: box-shadow 0.2s, transform 0.2s var(--ease); }
.sugg button:hover { box-shadow: 0 0 0 1px var(--blue); transform: translateY(-1px); }
.sugg .icon-svg { width: 15px; height: 15px; color: var(--violet); }
.flow { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; margin-top: 20px; font-size: 13px; color: var(--soft); font-weight: 600; }
.flow span { display: inline-flex; align-items: center; gap: 7px; }
.flow i { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--fill); color: var(--ink-2); font-style: normal; font-size: 11px; font-weight: 800; }

/* À traiter */
.todo-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; max-width: 780px; margin: 26px auto 0; }
.todo { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-1); color: var(--ink); text-decoration: none; transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.todo:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); opacity: 1; }
.todo .app-ic { width: 38px; height: 38px; border-radius: 11px; }
.todo b { display: block; font-size: 15px; }
.todo span { display: block; font-size: 13px; color: var(--soft); }
.todo > .icon-svg { margin-left: auto; color: var(--dim); width: 16px; height: 16px; }

/* Clé à brancher */
.keycard { display: flex; gap: 16px; max-width: 780px; margin: 26px auto 0; padding: 20px; border-radius: 22px; background: var(--surface); box-shadow: 0 0 0 1px rgba(255, 159, 10, 0.35), var(--shadow-1); text-align: left; }
.keycard .app-ic { width: 44px; height: 44px; border-radius: 12px; }
.keycard b { font-size: 16px; }
.keycard p { margin-top: 4px; color: var(--soft); font-size: 14px; }
.keycard .row { margin-top: 12px; }
.keycard ol { margin: 10px 0 0; padding-left: 20px; font-size: 13.5px; color: var(--ink-2); }

/* Équipe en arbre */
.tree-card { margin-top: 0; padding: 34px 20px 30px; border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-1); overflow-x: auto; position: relative; }
.tree { position: relative; margin: 0 auto; }
.tree-lines { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.tree-edge { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.tree-edge.hot { stroke: url(#tg); stroke-width: 2; stroke-dasharray: 6 6; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -24; } }
.tnode { position: absolute; width: 170px; margin-left: -85px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px 10px; border: 0; border-radius: 22px; background: none; color: var(--ink); text-align: center; cursor: pointer; transition: background 0.2s, transform 0.25s var(--ease); }
.tnode:hover { background: var(--fill-3); }
.tnode:hover .tn-av { transform: translateY(-3px) scale(1.04); }
.tnode.sel { background: var(--blue-soft); }
.tnode.me { cursor: default; }
.tnode.me:hover { background: none; }
.tn-av { position: relative; margin-bottom: 8px; transition: transform 0.35s var(--spring); }
.tn-av .av { --s: 72px; font-size: 26px; box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--c) 80%, transparent); }
.tn-av .av.human { box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.4); }
.tn-av::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid transparent; transition: border-color 0.3s; }
.tnode.working .tn-av::after { border-color: var(--green-dot); animation: ringPulse 2s infinite; }
@keyframes ringPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.tn-dot { position: absolute; right: 2px; bottom: 2px; width: 16px; height: 16px; border-radius: 50%; background: #c7c7cc; border: 3px solid var(--surface); display: none; }
.tn-dot.on, .tn-dot.wait { display: block; }
.tn-dot.on { background: var(--green-dot); }
.tn-dot.wait { background: var(--amber-dot); }
.tn-dot.sleep { background: var(--amber-dot); }
.tnode b { font-size: 16px; font-weight: 750; letter-spacing: -0.02em; }
.tn-t { font-size: 12.5px; color: var(--soft); line-height: 1.3; max-width: 160px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tn-st { margin-top: 5px; display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--green-soft); color: var(--green); }
.tn-st.wait { background: var(--amber-soft); color: var(--amber); }
.tn-st.sleep { background: var(--amber-soft); color: var(--amber); }
.tree-hint { position: absolute; top: 16px; left: 22px; font-size: 13px; color: var(--dim); font-weight: 600; }
.tree-list { display: flex; flex-direction: column; }
.tl-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 8px 10px calc(8px + var(--d, 0) * 22px); border: 0; border-radius: 14px; background: none; text-align: left; color: var(--ink); cursor: pointer; }
.tl-item:hover { background: var(--fill-3); }
.tl-item.sel { background: var(--blue-soft); }
.tl-item b { display: block; font-size: 15px; }
.tl-item span.t { display: block; font-size: 12.5px; color: var(--soft); }

/* Missions (cartes vivantes) */
.missions { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.mission { display: flex; flex-direction: column; gap: 12px; padding: 18px 18px 14px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); min-width: 0; }
.mi-head { display: flex; align-items: flex-start; gap: 12px; }
.mi-head .app-ic { width: 36px; height: 36px; border-radius: 10px; margin-top: 2px; }
.mi-head .t { flex: 1; min-width: 0; }
.mi-head .t span { display: block; font-size: 12px; color: var(--dim); font-weight: 600; }
.mi-head .t b { display: block; font-size: 15.5px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.state { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--fill-2); color: var(--ink-2); font-size: 12px; font-weight: 700; white-space: nowrap; flex: none; }
.state.green { background: var(--green-soft); color: var(--green); }
.state.amber { background: var(--amber-soft); color: var(--amber); }
.state.blue { background: var(--blue-soft); color: var(--blue); }
.state.violet { background: var(--violet-soft); color: var(--violet); }
.state.red { background: var(--red-soft); color: var(--red); }
.state .pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.steps span { position: relative; padding-top: 10px; font-size: 11.5px; font-weight: 650; color: var(--dim); }
.steps span::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 999px; background: var(--fill); }
.steps span.done { color: var(--ink-2); }
.steps span.done::before { background: var(--grad); }
.steps span.on { color: var(--ink); }
.steps span.on::before { background: linear-gradient(90deg, #2f5bff, #7c4dff); background-size: 200% 100%; animation: flowbar 1.6s linear infinite; }
@keyframes flowbar { 0% { background-position: 100% 0; opacity: 0.6; } 50% { opacity: 1; } 100% { background-position: -100% 0; opacity: 0.6; } }
.mi-subs { display: flex; flex-direction: column; border-radius: 14px; background: var(--fill-3); padding: 4px; }
.mi-sub { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; padding: 6px 8px; border: 0; border-radius: 10px; background: none; text-align: left; color: var(--ink); font-size: 13.5px; cursor: pointer; }
.mi-sub:hover { background: var(--hover); }
.mi-sub b { font-weight: 700; flex: none; }
.mi-sub .ellipsis { flex: 1; color: var(--soft); }
.mi-sub .state { height: 21px; font-size: 11px; padding: 0 8px; }
.mi-note { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--soft); }
.mi-warn { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); font-size: 13px; font-weight: 600; }
.mi-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13.5px; }
.mi-foot .link-btn, .mi-foot a { font-size: 13.5px; }

/* Panneau de discussion flottant (accueil + bulle) */
.sheet-chat { position: fixed; z-index: 260; top: calc(var(--nav-h) + 22px); right: 14px; bottom: 14px; width: min(440px, calc(100vw - 28px)); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-pop); overflow: hidden; display: flex; animation: slide 0.38s var(--ease); }
.sheet-chat > * { flex: 1; min-width: 0; }
@media (max-width: 860px) { .sheet-chat { top: 0; right: 0; bottom: 0; left: 0; width: auto; border-radius: 0; z-index: 400; } }
.fab { position: fixed; z-index: 250; right: 22px; bottom: 22px; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 6px; border: 0; border-radius: 999px; background: var(--glass-strong); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); box-shadow: var(--shadow-pop); color: var(--ink); font-size: 14.5px; font-weight: 700; cursor: pointer; transition: transform 0.25s var(--spring); }
.fab:hover { transform: translateY(-2px); }
.fab .av { --s: 40px; }
.fab .fab-x { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--fill); }
@media (max-width: 860px) { .fab { bottom: calc(80px + env(safe-area-inset-bottom)); right: 14px; padding: 0 6px; } .fab span.l { display: none; } }

/* ═══════════════════════ Messages (style iMessage) ═══════════════════════ */
.im-page { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - var(--nav-h) - 30px); max-width: 1320px; margin: 14px auto 0; padding: 0 14px 14px; gap: 14px; }
.im-list { display: flex; flex-direction: column; min-height: 0; border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; }
.im-list-h { padding: 20px 18px 10px; }
.im-list-h h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.035em; }
.im-list-h .search-field { margin-top: 12px; }
.im-filters { display: flex; gap: 6px; padding: 4px 18px 10px; overflow-x: auto; scrollbar-width: none; }
.im-filters .chip { height: 28px; padding: 0 12px; font-size: 13px; }
.im-items { flex: 1; overflow-y: auto; padding: 0 8px 10px; }
.im-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 14px; background: none; text-align: left; color: var(--ink); cursor: pointer; transition: background 0.15s; }
.im-item:hover { background: var(--fill-3); }
.im-item.on { background: var(--blue); color: #fff; }
.im-item.on .im-prev, .im-item.on .im-time { color: rgba(255, 255, 255, 0.8); }
.im-item .av { --s: 46px; }
.im-item-b { flex: 1; min-width: 0; }
.im-item-b .r1 { display: flex; align-items: baseline; gap: 6px; }
.im-item-b b { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-time { font-size: 12px; color: var(--dim); flex: none; }
.im-prev { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--soft); line-height: 1.35; }
.im-prev > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-unread { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); flex: none; }
.im-item.on .im-unread { background: #fff; }
.im-typing { color: var(--blue); font-weight: 650; }
.im-item.on .im-typing { color: #fff; }
.gav { border-radius: 30%; }

.im { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; background: var(--surface); }
.im-page > .im { border-radius: var(--r-xl); box-shadow: var(--shadow-1); overflow: hidden; }
.im-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
.im-head .who { flex: 1; min-width: 0; }
.im-head .who b { display: block; font-size: 15.5px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-head .who span { display: block; font-size: 12.5px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-head .who .live { color: var(--green); font-weight: 650; }
.im-head .os-ib { width: 34px; height: 34px; color: var(--blue); }
.im-head .os-ib.on { background: var(--blue-soft); }
.im-head .os-ib .icon-svg { width: 18px; height: 18px; }
.im-body { flex: 1; overflow-y: auto; padding: 18px 16px 10px; display: flex; flex-direction: column; gap: 3px; }
.im-day { align-self: center; margin: 14px 0 8px; font-size: 12px; font-weight: 650; color: var(--dim); }
.im-sys { align-self: center; max-width: 420px; margin: 8px 0; padding: 8px 14px; border-radius: 14px; background: var(--fill-3); color: var(--soft); font-size: 13px; text-align: center; line-height: 1.45; }
.im-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 82%; margin-top: 2px; }
.im-msg.in { align-self: flex-start; }
.im-msg.out { align-self: flex-end; flex-direction: row-reverse; }
.im-msg + .im-msg.in:not(.cont), .im-msg + .im-msg.out:not(.cont) { margin-top: 8px; }
.im-msg .av { --s: 26px; font-size: 10px; margin-bottom: 2px; }
.im-msg.cont .av { visibility: hidden; }
.im-bubble { position: relative; min-width: 0; padding: 9px 14px; border-radius: 20px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.im-msg.in .im-bubble { background: var(--bubble-in); color: var(--ink); border-bottom-left-radius: 6px; }
.im-msg.out .im-bubble { background: var(--bubble-out); color: #fff; border-bottom-right-radius: 6px; }
.im-msg.cont.in .im-bubble { border-top-left-radius: 6px; }
.im-msg.cont.out .im-bubble { border-top-right-radius: 6px; }
.im-msg.out .im-bubble a { color: #fff; text-decoration: underline; }
.im-bubble .md { font-size: 15px; }
.im-bubble .md pre { background: rgba(0, 0, 0, 0.06); }
.im-author { font-size: 12px; font-weight: 700; margin: 0 0 2px 2px; color: var(--soft); }
.im-meta { display: block; margin-top: 3px; font-size: 11px; opacity: 0.6; text-align: right; }
.im-read { align-self: flex-end; margin: 2px 4px 0 0; font-size: 11.5px; font-weight: 600; color: var(--dim); }
.im-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.im-files a { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); font-size: 12.5px; font-weight: 650; color: inherit; }
.im-msg.in .im-files a { background: var(--surface); color: var(--blue); }
.im-appr { align-self: stretch; margin: 10px 0; }
.im-compose { padding: 10px 12px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.im-mentions { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.im-mentions .chip { height: 28px; font-size: 12.5px; }
.im-bar { display: flex; align-items: flex-end; gap: 8px; }
.im-field { flex: 1; display: flex; align-items: flex-end; gap: 4px; min-height: 40px; padding: 3px 4px 3px 14px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow 0.2s; }
.im-field:focus-within { box-shadow: inset 0 0 0 1px var(--blue), var(--ring); }
.im-field textarea { flex: 1; min-width: 0; max-height: 160px; padding: 8px 0; border: 0; outline: none; resize: none; background: none; font-size: 15px; line-height: 1.4; color: var(--ink); }
.im-field textarea::placeholder { color: var(--dim); }
.im-ic { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--soft); cursor: pointer; transition: background 0.2s, color 0.2s; }
.im-ic:hover { background: var(--hover); color: var(--ink); }
.im-ic.rec { background: var(--red-soft); color: var(--red); animation: pulse 1.6s infinite; }
.im-ic .icon-svg { width: 19px; height: 19px; }
.im-plus { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--fill-2); color: var(--soft); cursor: pointer; }
.im-plus:hover { background: var(--fill); color: var(--ink); }
.im-send { display: grid; place-items: center; flex: none; width: 34px; height: 34px; margin-bottom: 0; border: 0; border-radius: 50%; background: var(--blue); color: #fff; cursor: pointer; transition: transform 0.2s var(--spring), opacity 0.2s; }
.im-send:disabled { opacity: 0.3; cursor: default; }
.im-send:not(:disabled):hover { transform: scale(1.06); }
.im-send .icon-svg { width: 17px; height: 17px; }
.im-send .icon-svg svg { stroke-width: 2.4; }
.im-ro { display: flex; align-items: center; gap: 8px; color: var(--soft); font-size: 13px; }
.im-empty { display: grid; place-items: center; text-align: center; padding: 40px; }
.im-empty h2 { margin-top: 18px; font-size: 26px; font-weight: 800; letter-spacing: -0.035em; }
.im-empty p { margin-top: 8px; color: var(--soft); max-width: 380px; }
@media (max-width: 860px) {
  .im-page { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 64px - 76px - env(safe-area-inset-bottom)); margin-top: 8px; padding: 0 8px 8px; }
  .im-page.has-th .im-list { display: none; }
  .im-page:not(.has-th) > .im { display: none; }
}
/* Menu WhatsApp d'une IA */
.wa-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 300px; }
.wa-pop .t { padding: 8px 10px 4px; font-size: 13px; font-weight: 800; }
.wa-pop .n { padding: 6px 10px 8px; font-size: 12.5px; color: var(--soft); line-height: 1.45; }

/* ═══════════════════════ Missions (tâches) ═══════════════════════ */
.tk-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.tk-toolbar .search-field { width: 240px; }
.tk-toolbar .select { width: auto; height: 36px; border-radius: 10px; font-size: 14px; background-color: var(--fill-2); border-color: transparent; }
.tk-group { margin-bottom: 26px; }
.tk-group-h { display: flex; align-items: center; gap: 8px; padding: 0 6px 8px; font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
.tk-group-h .n { font-size: 13px; font-weight: 700; color: var(--dim); }
.tk-group-h .dot { width: 9px; height: 9px; }
.tk-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 18px; border: 0; background: none; text-align: left; color: var(--ink); position: relative; cursor: pointer; transition: background 0.15s; }
.tk-row:hover { background: var(--hover); }
.tk-row + .tk-row::before { content: ""; position: absolute; top: 0; left: 60px; right: 0; border-top: 1px solid var(--line); }
.tk-row .main { flex: 1; min-width: 0; }
.tk-row .main b { display: block; font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-row .main span { display: block; font-size: 12.5px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-row .main span.err { color: var(--amber); }
.tk-row .meta { display: flex; align-items: center; gap: 8px; flex: none; font-size: 12.5px; color: var(--dim); }
.tk-num { font-size: 12px; font-weight: 700; color: var(--dim); font-variant-numeric: tabular-nums; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.kcol { border-radius: var(--r-lg); background: var(--fill-3); padding: 10px; min-height: 160px; }
:root[data-theme="dark"] .kcol { background: #121214; }
.kcol-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-size: 14px; font-weight: 800; }
.kcol-h .n { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--dim); }
.kcards { display: flex; flex-direction: column; gap: 8px; }
.tcard { padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-1); cursor: pointer; transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.tcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.tcard .tt { margin: 4px 0 10px; font-size: 14.5px; font-weight: 650; line-height: 1.4; }
.tcard .tf { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--soft); }
.tcard .num { font-size: 12px; font-weight: 700; color: var(--dim); text-align: left; }
.td-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.td-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.td-meta > div { padding: 12px 14px; border-radius: 16px; background: var(--fill-3); min-width: 0; }
.td-meta .l { font-size: 12px; font-weight: 650; color: var(--dim); }
.td-meta .select { margin-top: 6px; background-color: var(--surface); }
.td-result { padding: 18px; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1.5px rgba(48, 209, 88, 0.45); }
.td-box { padding: 16px; border-radius: 18px; background: var(--fill-3); }
.td-log { padding: 4px 16px; border-radius: 18px; background: var(--fill-3); max-height: 520px; overflow: auto; }

/* ═══════════════════════ Validations ═══════════════════════ */
.appr { padding: 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 0 0 1px rgba(255, 159, 10, 0.4), var(--shadow-1); }
.appr .what { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--fill-3); font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.appr .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.appr-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.appr-imgs img { width: 110px; height: 110px; object-fit: cover; border-radius: 14px; }
.appr.compact .appr-imgs img { width: 64px; height: 64px; border-radius: 10px; }
.appr-done { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }

/* ═══════════════════════ Appel ═══════════════════════ */
.call { position: fixed; inset: 0; z-index: 700; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 40px 20px calc(40px + env(safe-area-inset-bottom)); color: #fff; background: radial-gradient(70% 50% at 50% 0%, rgba(124, 77, 255, 0.55), transparent 70%), radial-gradient(60% 50% at 50% 100%, rgba(47, 91, 255, 0.45), transparent 70%), #0a0f1e; animation: fade 0.3s ease; }
.call-top { opacity: 0.8; font-size: 13px; }
.call-who { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.call-who h2 { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; margin-top: 18px; }
.call-st { font-size: 16px; opacity: 0.75; }
.call-av { position: relative; display: grid; place-items: center; }
.call-av .av { --s: 140px; font-size: 48px; position: relative; z-index: 2; }
.call-av i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.4); opacity: 0; }
.call-av.speaking i, .call-av.ringing i { animation: ripple 2.2s infinite; }
.call-av i:nth-child(3) { animation-delay: 0.7s !important; } .call-av i:nth-child(4) { animation-delay: 1.4s !important; }
@keyframes ripple { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.9); opacity: 0; } }
.call-live { width: min(560px, 100%); display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.45; text-align: center; min-height: 80px; }
.call-me { opacity: 0.7; }
.call-ai { font-weight: 600; }
.call-btns { display: flex; gap: 28px; }
.call-b { display: grid; place-items: center; width: 70px; height: 70px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: #fff; cursor: pointer; backdrop-filter: blur(10px); transition: background 0.2s, transform 0.2s; }
.call-b:hover { background: rgba(255, 255, 255, 0.26); }
.call-b.on { background: #fff; color: #0a0f1e; }
.call-b.end { background: #ff3b30; }
.call-b.end .icon-svg { transform: rotate(135deg); }
.call-b .icon-svg { width: 28px; height: 28px; }

/* ═══════════════════════ Palette ⌘K ═══════════════════════ */
.palette { width: min(640px, 100%); border-radius: 22px; background: var(--raised); box-shadow: var(--shadow-pop); overflow: hidden; animation: sheet 0.28s var(--spring); }
.palette-in { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.palette-in .icon-svg { width: 20px; height: 20px; color: var(--soft); }
.palette-in input { flex: 1; border: 0; outline: none; background: none; font-size: 18px; color: var(--ink); }
.palette-in input::placeholder { color: var(--dim); }
.palette-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
.palette-list .menu-item { min-height: 42px; border-radius: 11px; font-size: 14.5px; }
.palette-list .menu-item.sel { background: var(--blue); color: #fff; }
.palette-list .menu-item.sel .icon-svg { color: #fff; }

/* Panneau des notifications */
.npanel { position: absolute; right: 0; top: calc(100% + 12px); width: 380px; max-height: 70vh; overflow-y: auto; padding: 0; }
.npanel-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; position: sticky; top: 0; z-index: 1; background: var(--raised); }
.npanel-h b { font-size: 16px; font-weight: 800; }
.nitem { display: flex; gap: 12px; padding: 12px 16px; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); }
.nitem:hover { background: var(--hover); opacity: 1; }
.nitem.read { opacity: 0.55; }
.nitem b { display: block; font-size: 14px; font-weight: 700; }
.nitem .dot { margin-top: 7px; }
@media (max-width: 860px) { .npanel { position: fixed; top: 70px; left: 10px; right: 10px; width: auto; } }

/* ═══════════════════════ Divers (pages existantes) ═══════════════════════ */
.viz-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--soft); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; }
.bars > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.bars .b { width: 100%; max-width: 26px; border-radius: 6px 6px 3px 3px; background: var(--grad); background-size: 100% 300%; min-height: 2px; }
.bars span { font-size: 10.5px; color: var(--dim); white-space: nowrap; }

/* Priorités de la barre du haut sur écrans moyens */
@media (max-width: 1400px) and (min-width: 861px) { .os-link.p3 { display: none; } }
@media (max-width: 1220px) and (min-width: 861px) { .os-link.p2 { display: none; } }
.tk-row .chev { color: var(--dim); width: 16px; height: 16px; }

@media (max-width: 560px) {
  .home { padding: 26px 16px 60px; }
  .cmp-top { padding: 12px 10px 0 14px; }
  .cmp-to > span:first-child { display: none; }
  .composer textarea { font-size: 16px; padding: 10px 16px 4px; min-height: 76px; }
  .cmp-hint { display: none; }
  .cmp-bar { justify-content: flex-start; }
  .cmp-send { margin-left: auto; }
  .keycard { padding: 16px; gap: 12px; }
  .keycard > .app-ic { display: none; }
  .keycard p { font-size: 13.5px; }
  .sugg button { height: auto; min-height: 34px; padding: 7px 12px; white-space: normal; text-align: left; }
  .sec-h { flex-wrap: wrap; margin-top: 32px; }
  .sec-h .spacer { display: none; }
  .tree-card { padding: 12px 8px; }
  .missions { grid-template-columns: minmax(0, 1fr); }
  .im-head .who span { max-width: 160px; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(255, 255, 255, 0.97); }
  :root[data-theme="dark"] { --glass: rgba(28, 28, 30, 0.97); }
}
.mi-live { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 12px; border-radius: 12px; background: var(--green-soft); font-size: 13px; color: var(--ink-2); }
.mi-live b { flex: none; font-weight: 750; }
.mi-live .ellipsis { flex: 1; }
.nitem .small { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
/* Grille d'apps façon écran d'accueil iPhone */
@media (max-width: 860px) {
  .os-apps-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; }
  .os-app { flex-direction: column; gap: 7px; padding: 6px 2px; text-align: center; border-radius: 14px; }
  .os-app .app-ic { width: 58px; height: 58px; border-radius: 15px; }
  .os-app b { font-size: 12px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 76px; }
  .os-app span.d { display: none; }
  .os-app > span { min-width: 0; }
  .os-app .count { top: 0; left: auto; right: 6px; }
  .os-app.on { background: none; }
  .os-app.on .app-ic { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--blue); }
}
