/* ===== Sakaleya — design system : violet Sakaleya sur fond sombre façon Nextlids (thème clair disponible) ===== */
/* Thème sombre par défaut (façon Nextlids), thème clair via html[data-theme="light"]. Couleur porteuse : le violet Sakaleya. */
:root {
  --violet: #8B6CF0; --violet-deep: #B9A6FF; --violet-soft: #6F58CF; --violet-tint: rgba(139,108,240,.16); --violet-tint-2: rgba(139,108,240,.08);
  --yellow: #FFE89A; --yellow-soft: rgba(255,226,130,.12); --yellow-deep: #E0B93A; --yellow-ink: #FFD978;
  --bg: #0A0A0D; --surface: #131218; --surface-2: #1A1920; --surface-3: #24222C; --glass: rgba(255,255,255,.035);
  --ink: #EEECF6; --muted: #9895A6; --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.14);
  --ok: #4FD38A; --ok-bg: rgba(79,211,138,.13); --warn: #F0B357; --warn-bg: rgba(240,179,87,.14); --bad: #FF6B85; --bad-bg: rgba(255,107,133,.14); --info-bg: rgba(127,180,255,.14); --info: #8DBBFF;
  --card: rgba(19,18,24,.78); --panel: rgba(14,13,18,.72); --toast: #2A2833; --deep: #1E1A33;
  --shadow: 0 1px 2px rgba(0,0,0,.45), 0 12px 32px -16px rgba(0,0,0,.7);
  --shadow-lg: 0 28px 64px -26px rgba(0,0,0,.9), 0 8px 24px -12px rgba(0,0,0,.6);
  --r: 18px; --r-sm: 12px; --r-xs: 8px;
  --font-h: "Instrument Sans", "Geist", system-ui, sans-serif; --font-b: "Geist", system-ui, -apple-system, sans-serif; --font-m: "Geist Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.22,1,.36,1); --spring: cubic-bezier(.34,1.4,.64,1);
  color-scheme: dark;
}
html[data-theme="light"] {
  --violet-deep: #5F43C9; --violet-soft: #C9B6F5; --violet-tint: #EEE8FB; --violet-tint-2: #F6F2FD;
  --yellow-soft: #FFF4C2; --yellow-ink: #7A5C00;
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #FFFFFF; --surface-3: #F3F1FA; --glass: rgba(255,255,255,.7);
  --ink: #1C1830; --muted: #6B6680; --line: rgba(95,67,201,.10); --line-2: rgba(95,67,201,.18);
  --ok: #2EAD6B; --ok-bg: #E4F7EC; --warn: #D98A1B; --warn-bg: #FFF2D9; --bad: #D64561; --bad-bg: #FDE7EC; --info-bg: #E6F0FF; --info: #2F6FE4;
  --card: rgba(255,255,255,.9); --panel: rgba(255,255,255,.72); --toast: #1C1830; --deep: #2A1F5C;
  --shadow: 0 1px 2px rgba(28,24,48,.04), 0 10px 28px -14px rgba(95,67,201,.16);
  --shadow-lg: 0 30px 72px -30px rgba(95,67,201,.28), 0 10px 26px -14px rgba(28,24,48,.10);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font-b); color: var(--ink); background: var(--bg); font-feature-settings: "tnum"; -webkit-font-smoothing: antialiased; font-size: 14.5px; line-height: 1.5; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--font-h); letter-spacing: -0.035em; margin: 0; font-weight: 700; line-height: 1.15; }
h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.045em; line-height: 1.05; } h2 { font-size: 20px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
p { margin: 0; } a { color: var(--violet-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--violet); color: #fff; }

/* fond : grille fine + halo violet qui monte du bas, comme Nextlids */
.fx-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; background:
  linear-gradient(rgba(255,255,255,.032) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255,255,255,.032) 1px, transparent 1px),
  radial-gradient(75% 60% at 100% 100%, rgba(139,108,240,.30) 0%, rgba(139,108,240,.10) 42%, transparent 72%),
  radial-gradient(55% 45% at 0% 100%, rgba(139,108,240,.12) 0%, transparent 70%),
  linear-gradient(180deg, #0A0A0D 0%, #0A0A0D 45%, #0F0C18 75%, #160F26 100%);
  background-size: 36px 36px, 36px 36px, auto, auto, auto; }
html[data-theme="light"] .fx-bg { background:
  linear-gradient(rgba(60,40,120,.045) 1px, transparent 1px),
  linear-gradient(90deg, rgba(60,40,120,.045) 1px, transparent 1px),
  radial-gradient(75% 65% at 100% 100%, rgba(139,108,240,.42) 0%, rgba(201,182,245,.30) 38%, transparent 72%),
  radial-gradient(60% 45% at 0% 100%, rgba(201,182,245,.40) 0%, transparent 70%),
  linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 42%, #FAF7FF 60%, #EEE6FD 80%, #E2D6FB 100%);
  background-size: 36px 36px, 36px 36px, auto, auto, auto; }

/* ===== layout : barre latérale sur le fond, contenu dans un grand panneau ===== */
.shell { display: grid; grid-template-columns: 262px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 18px 12px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 14px; }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 6px 18px rgba(101,44,209,.35), 0 0 0 1px rgba(255,255,255,.06); }
.brand b { font-family: var(--font-h); font-size: 19px; font-weight: 800; letter-spacing: -0.04em; }
.brand small { display: block; color: var(--muted); font-size: 11.5px; margin-top: -1px; }
.side-search { display: flex; align-items: center; gap: 8px; margin: 0 2px 10px; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); color: var(--muted); font-size: 13.5px; cursor: pointer; transition: border-color .2s, background .2s; }
.side-search:hover { border-color: var(--line-2); background: var(--surface-2); }
.side-search svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.side-search kbd { margin-left: auto; font-family: var(--font-m); font-size: 10.5px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); }
.nav-group { font-family: var(--font-m); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); opacity: .75; padding: 12px 12px 4px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; color: var(--ink); opacity: .86; text-decoration: none; font-weight: 500; font-size: 14.5px; position: relative; transition: background .2s var(--ease), color .2s, opacity .2s; }
.nav a svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--spring); }
.nav a:hover { background: var(--glass); opacity: 1; }
.nav a:hover svg { transform: scale(1.08); }
.nav a.active { background: var(--violet-tint); color: var(--violet-deep); opacity: 1; font-weight: 600; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--violet); }
.nav a .badge { margin-left: auto; }
.sidebar .spacer { flex: 1; min-height: 12px; }
.userbox { display: flex; align-items: center; gap: 10px; padding: 10px; margin-top: 6px; border-top: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-family: var(--font-h); background: linear-gradient(135deg, #A48BFF, #6E52DB); color: #fff; font-size: 12.5px; flex: none; }
.userbox .name { font-weight: 600; font-size: 13.5px; line-height: 1.2; } .userbox .sub { color: var(--muted); font-family: var(--font-m); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.userbox button { margin-left: auto; }
.sync-pill { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 8px 12px; border-radius: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 4px rgba(79,211,138,.15); }
.dot.busy { background: var(--violet); animation: pulse 1s ease-in-out infinite; }
.dot.off { background: var(--bad); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(139,108,240,.4);} 50% { box-shadow: 0 0 0 7px rgba(139,108,240,0);} }

.frame { margin: 10px 10px 10px 0; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); min-width: 0; display: flex; flex-direction: column; min-height: calc(100vh - 20px); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 0 18px 0 22px; height: 58px; border-bottom: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-radius: 22px 22px 0 0; }
.crumbs { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--muted); min-width: 0; }
.crumbs a { color: var(--muted); text-decoration: none; display: inline-flex; } .crumbs a:hover { color: var(--ink); }
.crumbs svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.crumbs .sep { opacity: .5; } .crumbs b { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { margin-left: auto; width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--line); background: var(--glass); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background .2s, transform .2s var(--spring); }
.icon-btn:hover { background: var(--surface-3); transform: rotate(-12deg); }
.icon-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.main { padding: 30px 32px 56px; min-width: 0; }
.page { animation: pageIn .42s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 8px; font-size: 15px; }
.eyebrow { font-family: var(--font-m); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--violet-deep); margin-bottom: 6px; }

/* ===== composants ===== */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; backdrop-filter: blur(10px); transition: border-color .3s var(--ease); }
.card.tight { padding: 14px 16px; }
.card.hover { transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stagger > * { animation: pageIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
.grid { display: grid; gap: 16px; }
.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)); }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 10px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .xs { font-size: 11.5px; } .strong { font-weight: 600; } .right { text-align: right; } .center { text-align: center; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; } .mt-s { margin-top: 8px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer; font-weight: 500; font-size: 13.5px; transition: transform .2s var(--spring), box-shadow .25s, background .2s, border-color .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.18); border-color: var(--violet-soft); }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(180deg, #9B80F6, #7457E4); color: #fff; border-color: transparent; box-shadow: 0 8px 22px -6px rgba(139,108,240,.55), inset 0 1px 0 rgba(255,255,255,.18); }
.btn.primary:hover { box-shadow: 0 12px 26px rgba(95,67,201,.36); }
.btn.yellow { background: linear-gradient(135deg, #FFEBA3, #FFD86B); border-color: transparent; color: #4a3b00; box-shadow: 0 8px 20px rgba(224,185,58,.25); }
.btn.ghost { background: transparent; border-color: transparent; } .btn.ghost:hover { background: var(--glass); box-shadow: none; }
.btn.danger { color: var(--bad); } .btn.danger:hover { background: var(--bad-bg); border-color: transparent; }
.btn.sm { padding: 6px 10px; font-size: 12.5px; border-radius: 10px; } .btn.icon { padding: 8px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.loading::after { content: ""; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--violet-tint); color: var(--violet-deep); line-height: 1.6; white-space: nowrap; }
.badge.yellow { background: var(--yellow-soft); color: var(--yellow-ink); } .badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.bad { background: var(--bad-bg); color: var(--bad); } .badge.grey { background: var(--surface-3); color: var(--muted); } .badge.info { background: var(--info-bg); color: var(--info); }
.badge.count { background: var(--yellow); color: #4a3b00; padding: 0 7px; font-size: 11px; }

input, select, textarea { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); outline: none; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139,108,240,.15); }
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
label.field > span { padding-left: 2px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--violet); }
.switch { position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--surface-3); transition: background .25s; cursor: pointer; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .3s var(--spring); }
.switch.on { background: var(--violet); } .switch.on::after { transform: translateX(18px); }

.tabs { display: flex; gap: 4px; padding: 6px; background: var(--glass); border: 1px solid var(--line); border-radius: 16px; width: max-content; max-width: 100%; overflow: auto; }
.tabs button { white-space: nowrap; border: 0; background: transparent; padding: 8px 15px; border-radius: 11px; cursor: pointer; font-weight: 500; color: var(--muted); transition: all .25s var(--ease); display: flex; gap: 6px; align-items: center; }
.tabs button.active { background: var(--violet-tint); color: var(--violet-deep); font-weight: 600; }
.tabs button:hover:not(.active) { color: var(--ink); }

.kpi { padding: 18px 20px; position: relative; overflow: hidden; }
.kpi .label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi .value { font-family: var(--font-h); font-size: 32px; font-weight: 800; letter-spacing: -0.04em; margin-top: 6px; line-height: 1; }
.kpi .hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
/* liseré de couleur en haut de chaque KPI, comme Nextlids */
.kpi { border-radius: 22px; padding: 20px 20px 18px; }
.kpi::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, #8B6CF0, #B9A6FF); }
.grid > .kpi:nth-child(5n+2)::before { background: linear-gradient(90deg, #2FB47A, #6FE3A8); } .grid > .kpi:nth-child(5n+3)::before { background: linear-gradient(90deg, #E8962E, #FFC46B); }
.grid > .kpi:nth-child(5n+4)::before { background: linear-gradient(90deg, #A86BF0, #D7A8FF); } .grid > .kpi:nth-child(5n+5)::before { background: linear-gradient(90deg, #3E8DF0, #8DC4FF); }
.kpi::after { content: ""; position: absolute; left: -20%; right: -20%; top: -60px; height: 120px; background: radial-gradient(50% 50% at 50% 50%, rgba(139,108,240,.16), transparent 70%); pointer-events: none; transition: opacity .4s var(--ease); opacity: .7; }
.kpi:hover::after { opacity: 1; }
.kpi .label { font-family: var(--font-m); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.kpi > * { position: relative; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-family: var(--font-m); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .2s; } tbody tr.click { cursor: pointer; } tbody tr.click:hover { background: var(--violet-tint-2); }

.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .ico { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--violet-tint); color: var(--violet-deep); }
.empty .ico svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 10px; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* toasts & modales */
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--toast); color: #fff; border: 1px solid var(--line-2); padding: 11px 16px; border-radius: 14px; box-shadow: 0 14px 34px rgba(28,24,48,.3); font-size: 13.5px; animation: toastIn .4s var(--spring); display: flex; gap: 10px; align-items: center; max-width: 380px; }
.toast.ok { background: #1f8a53; } .toast.bad { background: var(--bad); } .toast.out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } } @keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }
.modal-bg { position: fixed; inset: 0; background: rgba(5,4,10,.55); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 90; animation: fade .25s; padding: 20px; }
.modal { background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; width: min(720px, 100%); max-height: 92vh; overflow: auto; padding: 26px; box-shadow: var(--shadow-lg); animation: modalIn .4s var(--spring); }
.modal.wide { width: min(980px, 100%); }
.modal h2 { margin-bottom: 4px; }
@keyframes fade { from { opacity: 0; } } @keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 14px; } .form-grid .full { grid-column: 1 / -1; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ===== Gmail ===== */
.mail { display: grid; grid-template-columns: 380px 1fr; gap: 16px; min-height: calc(100vh - 170px); }
.mail-list { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.mail-list .search { padding: 12px; border-bottom: 1px solid var(--line); }
.mail-items { overflow: auto; flex: 1; }
.mail-item { padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .2s; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; position: relative; }
.mail-item:hover { background: var(--violet-tint-2); } .mail-item.active { background: var(--violet-tint); }
.mail-item.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--violet); }
.mail-item .from { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item .when { font-size: 11.5px; color: var(--muted); }
.mail-item .subj { grid-column: 1 / -1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item .snip { grid-column: 1 / -1; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item .tags { grid-column: 1 / -1; display: flex; gap: 5px; margin-top: 4px; flex-wrap: wrap; }
.mail-view { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.mail-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.mail-body { padding: 20px 24px; white-space: pre-wrap; line-height: 1.6; font-size: 14px; overflow: auto; max-height: 46vh; }
.mail-body.html { white-space: normal; } .mail-body.html img { max-width: 100%; }
.reply-box { border-top: 1px solid var(--line); padding: 18px 24px 22px; background: linear-gradient(180deg, var(--yellow-soft), transparent); }
.reply-box textarea { min-height: 200px; background: var(--surface-2); }
.ai-note { background: var(--violet-tint); border-radius: 14px; padding: 12px 14px; font-size: 13px; display: flex; gap: 10px; }
.ai-note svg { width: 18px; height: 18px; flex: none; stroke: var(--violet-deep); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.cat-collab { background: var(--yellow-soft); color: var(--yellow-ink); } .cat-fiscal { background: var(--info-bg); color: var(--info); } .cat-personal { background: var(--ok-bg); color: var(--ok); } .cat-important { background: var(--warn-bg); color: var(--warn); } .cat-spam { background: var(--bad-bg); color: var(--bad); } .cat-newsletter, .cat-promo, .cat-notification, .cat-other { background: var(--surface-3); color: var(--muted); }
.thread-msg { padding: 12px 24px; border-bottom: 1px dashed var(--line); font-size: 13px; }
.thread-msg .who { font-weight: 600; font-size: 12.5px; } .thread-msg .body { color: var(--muted); white-space: pre-wrap; max-height: 120px; overflow: hidden; margin-top: 4px; }
.thread-msg.sent { background: var(--yellow-soft); }

/* ===== Suivi (kanban) ===== */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.kcol { background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 10px; min-height: 300px; display: flex; flex-direction: column; gap: 8px; transition: background .2s; }
.kcol.over { background: var(--violet-tint); }
.kcol h4 { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 8px; font-size: 13px; }
.kcard { background: var(--surface-2); border-radius: 14px; padding: 12px; border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(95,67,201,.06); cursor: grab; transition: transform .25s var(--ease), box-shadow .25s; }
.kcard:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(95,67,201,.14); }
.kcard.dragging { opacity: .5; transform: rotate(2deg) scale(1.02); }
.kcard .brand { font-weight: 600; font-family: var(--font-h); letter-spacing: -0.02em; }
.kcard .meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kcard .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; }
.due.late { color: var(--bad); font-weight: 600; } .due.soon { color: var(--warn); font-weight: 600; }

/* ===== contrats ===== */
.risk { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; font-family: var(--font-h); font-weight: 700; font-size: 17px; }
.risk.low { background: var(--ok-bg); color: var(--ok); } .risk.mid { background: var(--warn-bg); color: var(--warn); } .risk.high { background: var(--bad-bg); color: var(--bad); }
.flou { border-left: 4px solid var(--warn); background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(95,67,201,.06); }
.flou.eleve { border-color: var(--bad); } .flou.faible { border-color: var(--ok); }
.flou .q { background: var(--violet-tint); padding: 8px 10px; border-radius: 10px; margin-top: 8px; font-size: 13px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 13.5px; } .kv dt { color: var(--muted); font-weight: 500; } .kv dd { margin: 0; }
.drop { border: 2px dashed var(--line-2); border-radius: 18px; padding: 30px; text-align: center; color: var(--muted); transition: all .25s; cursor: pointer; background: var(--glass); }
.drop.over, .drop:hover { border-color: var(--violet); background: var(--violet-tint); color: var(--violet-deep); }

/* ===== factures ===== */
.inv-lines td { padding: 6px 4px; border: 0; } .inv-lines input { padding: 8px 10px; }
.total-box { background: var(--yellow-soft); border-radius: 14px; padding: 12px 16px; display: flex; justify-content: space-between; font-family: var(--font-h); font-weight: 700; font-size: 18px; }
.template { padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; transition: all .25s var(--ease); }
.template:hover { border-color: var(--violet); transform: translateY(-2px); box-shadow: var(--shadow); }
.template b { font-family: var(--font-h); } .template .p { color: var(--violet-deep); font-weight: 700; margin-top: 4px; }

/* ===== fichiers ===== */
.folders { display: flex; gap: 8px; flex-wrap: wrap; }
.folder { padding: 8px 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); cursor: pointer; font-weight: 500; transition: all .25s; display: flex; gap: 8px; align-items: center; }
.folder.active, .folder:hover { background: var(--yellow-soft); border-color: transparent; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.file { background: var(--surface-2); border-radius: 16px; border: 1px solid var(--line); padding: 14px; transition: all .25s var(--ease); cursor: pointer; position: relative; }
.file:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.file .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--violet-tint); color: var(--violet-deep); font-weight: 700; font-size: 11px; font-family: var(--font-h); margin-bottom: 10px; }
.file .nm { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .prev { font-size: 12px; color: var(--muted); margin-top: 4px; max-height: 54px; overflow: hidden; }

/* ===== login ===== */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: min(420px, 100%); padding: 34px; animation: modalIn .6s var(--spring); }
.login .brand { justify-content: center; padding-bottom: 10px; }
.users-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.users-pick button { border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 16px; padding: 14px; cursor: pointer; transition: all .25s var(--ease); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.users-pick button.active { border-color: var(--violet); background: var(--violet-tint); box-shadow: 0 0 0 4px rgba(139,108,240,.12); }

/* activity */
.act { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: flex-start; }
.act:last-child { border: 0; }
.act .t { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--violet-soft); }
.act.reply .t, .act.collab .t { background: var(--yellow-deep); } .act.error .t { background: var(--bad); } .act.invoice .t { background: var(--ok); }
.act .when { margin-left: auto; color: var(--muted); font-size: 11.5px; white-space: nowrap; }

/* chart */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 140px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar i { display: block; width: 100%; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--violet-soft), var(--violet)); transform-origin: bottom; animation: grow .8s var(--ease) both; min-height: 3px; }
.bar.cur i { background: linear-gradient(180deg, #FFEBA3, #FFD86B); }
.bar span { font-size: 11px; color: var(--muted); }
@keyframes grow { from { transform: scaleY(0); } }
.funnel { display: flex; flex-direction: column; gap: 6px; }
.funnel .f { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.funnel .f i { height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--violet-soft), var(--violet)); display: block; animation: growX .8s var(--ease) both; transform-origin: left; }
@keyframes growX { from { transform: scaleX(0); } }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: 1fr 1fr; } .mail { grid-template-columns: 320px 1fr; } }
@media (max-width: 900px) { .mail { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .shell { grid-template-columns: 1fr; } .sidebar { position: relative; height: auto; } .main { padding: 18px 16px 40px; } .g2, .g3, .g4 { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; } }

/* =================== Gmail v2 =================== */
body[data-page="gmail"] .main { padding-bottom: 20px; }
.gm .page-head { margin-bottom: 16px; }
.sync-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 7px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); max-width: 340px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gm-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.gstat { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); cursor: pointer; text-align: left; transition: transform .3s var(--spring), box-shadow .3s, border-color .3s; position: relative; overflow: hidden; animation: pageIn .5s var(--ease) both; }
.gstat:nth-child(2) { animation-delay: 50ms; } .gstat:nth-child(3) { animation-delay: 100ms; } .gstat:nth-child(4) { animation-delay: 150ms; }
.gstat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.gstat.on { border-color: var(--violet-soft); box-shadow: 0 0 0 3px rgba(139,108,240,.12); }
.gstat .gn { font-family: var(--font-h); font-weight: 700; font-size: 28px; letter-spacing: -0.04em; line-height: 1; }
.gstat .gl { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.gstat.yellow { background: linear-gradient(135deg, var(--yellow-soft), var(--surface) 70%); } .gstat.violet { background: linear-gradient(135deg, var(--violet-tint), var(--surface) 70%); }
.gstat.yellow .gn { color: var(--yellow-ink); } .gstat.violet .gn { color: var(--violet-deep); }

.seg { position: relative; display: flex; gap: 2px; padding: 4px; background: var(--glass); border: 1px solid var(--line); border-radius: 14px; width: max-content; max-width: 100%; overflow-x: auto; }
.seg button { position: relative; z-index: 1; border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 500; color: var(--muted); white-space: nowrap; display: flex; gap: 7px; align-items: center; transition: color .25s; }
.seg button.active { color: var(--violet-deep); font-weight: 600; }
.seg button .n { font-size: 11px; font-weight: 700; padding: 0 7px; border-radius: 999px; background: var(--surface-3); color: var(--muted); line-height: 18px; }
.seg button .n:empty { display: none; }
.seg button[data-v="todo"] .n { background: var(--yellow); color: #4a3b00; }
.seg button[data-v="verify"] .n { background: var(--warn-bg); color: var(--warn); }
.seg-ink { position: absolute; left: 4px; top: 4px; bottom: 4px; border-radius: 10px; background: var(--violet-tint); box-shadow: none; transition: transform .45s var(--spring), width .45s var(--spring); z-index: 0; }

.gm .mail { grid-template-columns: 400px 1fr; height: calc(100vh - 290px); min-height: 520px; }
.gm .mail-list .search { padding: 12px 12px 10px; }
.mcard { position: relative; display: flex; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .2s, transform .25s var(--ease); animation: pageIn .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 28ms); }
.mcard:hover { background: var(--violet-tint-2); }
.mcard.active { background: var(--violet-tint); }
.mcard.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--violet); }
.mcard.leaving { animation: leave .38s var(--ease) forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(40px); max-height: 0; padding-top: 0; padding-bottom: 0; } }
.mcard { max-height: 260px; }
.av { flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-h); font-weight: 700; letter-spacing: -0.02em; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.mc-main { min-width: 0; flex: 1; }
.mc-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.mc-top b { font-family: var(--font-h); font-weight: 600; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-top .when { font-size: 11.5px; color: var(--muted); flex: none; }
.mc-subj { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.mc-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.mc-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; align-items: center; }
.mc-actions { display: flex; gap: 6px; margin-top: 9px; }
.unseen { position: absolute; right: 12px; bottom: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 0 rgba(139,108,240,.5); animation: pulse 1.8s infinite; }

.gm .mail-view { display: flex; flex-direction: column; min-height: 0; }
.gm .mail-view.swap > * { animation: swapIn .38s var(--ease) both; }
@keyframes swapIn { from { opacity: 0; transform: translateY(8px); } }
.mv-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.mv-title { min-width: 0; flex: 1; } .mv-title h2 { font-size: 21px; }
.mx { margin: 12px 22px 0; }
.why { padding: 0 2px; }
.verify-bar, .warn-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 22px 0; padding: 10px 14px; border-radius: 14px; background: var(--warn-bg); font-size: 13px; }
.warn-bar { margin: 0 0 10px; color: #8a5300; }
.conv { flex: 1; overflow-y: auto; padding: 16px 22px 18px; display: flex; flex-direction: column; gap: 12px; min-height: 120px; scroll-behavior: smooth; }
.bub { max-width: 86%; border-radius: 18px; padding: 12px 15px; border: 1px solid var(--line); background: var(--surface-2); box-shadow: 0 2px 10px rgba(95,67,201,.05); animation: pageIn .35s var(--ease) both; }
.bub.out { align-self: flex-end; background: linear-gradient(135deg, var(--violet-tint), var(--violet-tint)); border-color: transparent; border-bottom-right-radius: 6px; }
.bub.in { align-self: flex-start; border-bottom-left-radius: 6px; }
.bub-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.bub-body { white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; max-height: 150px; overflow: hidden; position: relative; word-break: break-word; }
.bub:not(.open) .bub-body::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(transparent, var(--surface)); }
.bub.open .bub-body { max-height: none; }
.composer { border-top: 1px solid var(--line); padding: 12px 22px 16px; background: linear-gradient(180deg, var(--yellow-soft), var(--surface) 70%); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.chip { flex: none; border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 500; cursor: pointer; transition: all .25s var(--spring); white-space: nowrap; }
.chip:hover { transform: translateY(-1px); border-color: var(--violet-soft); box-shadow: 0 4px 12px rgba(95,67,201,.12); }
.chip.on { background: var(--violet); color: #fff; border-color: transparent; }
.chip.loading { opacity: .7; pointer-events: none; }
.chip.loading::after { content: " ⋯"; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.cmp-to { gap: 8px; margin-bottom: 8px; } .cmp-to input { padding: 7px 10px; font-size: 13px; } .cmp-to input#to { flex: 1; } .cmp-to input#subj { flex: 1.4; }
.composer textarea { min-height: 150px; font-size: 13.5px; background: var(--surface-2); transition: box-shadow .3s, opacity .3s; }
.composer textarea.writing { opacity: .5; background: linear-gradient(90deg, var(--surface) 25%, var(--violet-tint-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.1s infinite; }
.cmp-foot { margin-top: 10px; gap: 10px; }
.btn.send { padding: 11px 18px; font-size: 14px; border-radius: 14px; }
.btn.send kbd { font-family: inherit; font-size: 11px; opacity: .7; background: rgba(255,255,255,.18); padding: 1px 6px; border-radius: 6px; }
.btn.send.sending svg { animation: fly .7s var(--ease) infinite; }
.btn.send.sent { background: linear-gradient(135deg, #3cc47c, #23a062); box-shadow: 0 8px 20px rgba(46,173,107,.35); }
@keyframes fly { 0% { transform: translate(0,0); } 50% { transform: translate(6px,-6px); opacity: .3; } 100% { transform: translate(0,0); } }
@media (max-width: 1100px) { .gm .mail { grid-template-columns: 330px 1fr; } .gm-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .gm .mail { grid-template-columns: 1fr; height: auto; } .gm .mail-list { max-height: 55vh; } }
/* conversation : toute la colonne défile, la réponse suit la conversation */
.gm .mail-view { overflow-y: auto; scroll-behavior: smooth; }
.gm .conv { flex: none; overflow: visible; }
.gm .composer { box-shadow: 0 -10px 30px rgba(95,67,201,.05); }
.gm .composer textarea { min-height: 120px; }
.gm .mv-head { position: sticky; top: 0; z-index: 3; background: var(--panel); backdrop-filter: blur(10px); }
.backlog { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 16px; margin-bottom: 14px; background: linear-gradient(135deg, var(--violet-tint), var(--yellow-soft)); animation: pageIn .4s var(--ease) both; }
.backlog.run { display: block; }
.backlog.done { background: var(--ok-bg); color: #1f7a4d; font-weight: 500; font-size: 13.5px; }
.backlog .bar { height: 8px; border-radius: 6px; background: var(--glass); margin-top: 10px; overflow: hidden; }
.backlog .bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--violet-soft), var(--violet)); transition: width .6s var(--ease); }

/* ===== Gmail : lecture et réponse plus grandes ===== */
.gm .page-head { margin-bottom: 10px; } .gm .page-head .sub { display: none; } .gm .page-head h1 { font-size: 26px; }
.gm-stats { gap: 10px; margin-bottom: 10px; }
.gstat { padding: 10px 14px; border-radius: 14px; } .gstat .gn { font-size: 22px; }
.gm .seg { margin-bottom: 10px; }
.gm .mail { grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - 215px); min-height: 560px; transition: grid-template-columns .45s var(--ease); }
.gm.focus .mail { grid-template-columns: 0 minmax(0, 1fr); gap: 0; }
.gm.focus .mail-list { opacity: 0; pointer-events: none; border: 0; padding: 0; }
.gm .mail-list { transition: opacity .3s; }
.mv-head { padding: 16px 26px 14px; } .mv-title h2 { font-size: 23px; }
.gm .conv { padding: 20px 26px 22px; gap: 16px; }
.bub { max-width: 94%; padding: 16px 20px; border-radius: 20px; }
.bub-body { font-size: 15px; line-height: 1.7; max-height: 320px; }
.bub-meta { font-size: 12.5px; margin-bottom: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gm .composer { padding: 16px 26px 20px; }
.gm .composer textarea { min-height: 260px; font-size: 15px; line-height: 1.65; padding: 14px 16px; }
.chip { padding: 8px 14px; font-size: 13.5px; }
.btn.send { padding: 13px 22px; font-size: 15px; }
.tr-btn { order: 9; margin-left: auto; border: 0; background: var(--violet-tint); color: var(--violet-deep); font-weight: 600; font-size: 12px; padding: 3px 10px; border-radius: 999px; cursor: pointer; transition: background .2s; }
.tr-btn:hover { background: var(--violet-soft); }
.bub.translated { box-shadow: inset 3px 0 0 var(--violet-soft), 0 2px 10px rgba(95,67,201,.05); }
.bub.translating .bub-body { opacity: .45; }
.btn.on-tr { background: var(--violet-tint); color: var(--violet-deep); border-color: transparent; }
.tr-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(238,232,251,.7); }
.tr-preview { margin-top: 8px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--violet-soft); white-space: pre-wrap; font-size: 14.5px; line-height: 1.65; color: #3a3550; animation: pageIn .3s var(--ease); }
.tr-preview::before { content: "🇫🇷 Traduction (lecture seule)"; display: block; font-size: 11.5px; font-weight: 600; color: var(--violet-deep); margin-bottom: 6px; }
@media (max-width: 1100px) { .gm .mail { grid-template-columns: 300px minmax(0, 1fr); } }

/* =================== Suivi v2 =================== */
.todo-board { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.todo-col { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px; animation: pageIn .45s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.todo-col h4 { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 2px 4px 8px; }
.todo-col h4 .n { font-size: 11px; font-weight: 700; padding: 0 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); line-height: 18px; }
.todo-col.late { background: linear-gradient(180deg, var(--bad-bg), var(--surface) 60%); } .todo-col.late h4 { color: var(--bad); } .todo-col.late h4 .n { background: var(--bad); color: #fff; }
.todo-col.today { background: linear-gradient(180deg, var(--yellow-soft), var(--surface) 60%); } .todo-col.today h4 .n { background: var(--yellow); color: #4a3b00; }
.todo-items { max-height: 230px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.rem { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; }
.rem:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(95,67,201,.1); }
.rem.leaving { animation: leave .38s var(--ease) forwards; }
.rem-ico { width: 24px; height: 24px; flex: none; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--violet-tint); color: var(--violet-deep); }
.rem.deadline .rem-ico { background: var(--bad-bg); color: var(--bad); } .rem.paiement .rem-ico, .rem.facture .rem-ico { background: var(--ok-bg); color: var(--ok); } .rem.fiscal .rem-ico { background: var(--info-bg); color: var(--info); } .rem.action .rem-ico { background: var(--yellow-soft); color: var(--yellow-ink); }
.rem-main { flex: 1; min-width: 0; } .rem-label { font-size: 13px; font-weight: 600; line-height: 1.35; }
.rem input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--violet); margin-top: 3px; flex: none; }
.todo-empty { display: flex; gap: 14px; align-items: center; } .todo-empty .big { font-size: 30px; }

.tl-card { padding: 14px 0 0; overflow: hidden; }
.tl-legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 0 18px 12px; align-items: center; }
.tl-legend .lg { display: inline-block; width: 18px; height: 8px; border-radius: 4px; margin-right: 6px; vertical-align: middle; }
.tl-today-l::before { content: ""; display: inline-block; width: 2px; height: 12px; background: var(--yellow-deep); margin-right: 6px; vertical-align: middle; }
.tl { display: flex; border-top: 1px solid var(--line); }
.tl-card.full { min-height: calc(100vh - 230px); }
.tl-names { width: 320px; flex: none; border-right: 1px solid var(--line); background: var(--glass); z-index: 2; }
.tl-corner { height: 58px; border-bottom: 1px solid var(--line); }
.tl-name { height: 84px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .2s; }
.tl-name .pubok { color: var(--ok); font-weight: 600; }
.nets { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.net { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 2px 8px 2px 3px; border-radius: 999px; background: var(--surface-3); color: var(--ink); white-space: nowrap; }
.net b { font-size: 9.5px; letter-spacing: .02em; padding: 1px 5px; border-radius: 999px; color: #fff; background: var(--violet); }
.net.ig b { background: linear-gradient(135deg, #F58529, #DD2A7B 55%, #8134AF); } .net.tt b { background: #111; } .net.yt b { background: #E0302C; }
.net.same, .net.src { padding: 2px 8px; font-weight: 500; color: var(--muted); background: transparent; border: 1px dashed var(--line); }
.tl-name:hover { background: var(--violet-tint-2); }
.tl-name > div > b { display: block; font-family: var(--font-h); font-size: 14px; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 250px; }
.tl-name > div { min-width: 0; line-height: 1.25; }
.countdown.ok { background: var(--ok-bg); color: var(--ok); }
.tl-name .xs { display: block; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-scroll { flex: 1; overflow-x: auto; position: relative; scroll-behavior: smooth; }
.tl-grid { position: relative; }
.tl-head { position: relative; height: 58px; border-bottom: 1px solid var(--line); }
.tl-day { position: absolute; top: 0; bottom: 0; width: 44px; text-align: center; font-size: 11px; color: var(--muted); padding-top: 22px; border-left: 1px solid rgba(95,67,201,.05); }
.tl-day b { display: block; font-size: 12px; color: var(--ink); font-weight: 600; } .tl-day i { font-style: normal; font-size: 9.5px; }
.tl-day.we { background: rgba(95,67,201,.035); }
.tl-day.today { background: var(--yellow-soft); } .tl-day.today b { color: var(--yellow-ink); }
.tl-month { position: absolute; top: 4px; left: 4px; font-size: 11px; font-weight: 700; color: var(--violet-deep); text-transform: capitalize; white-space: nowrap; }
.tl-now { position: absolute; top: 58px; bottom: 0; width: 2px; background: var(--yellow-deep); z-index: 1; box-shadow: 0 0 0 3px rgba(224,185,58,.18); }
.tl-row { position: relative; height: 84px; border-bottom: 1px solid var(--line); animation: pageIn .45s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
.tl-bar { position: absolute; top: 34px; height: 28px; border-radius: 10px; display: flex; align-items: center; padding: 0 10px; font-size: 12px; font-weight: 600; color: #fff; cursor: pointer; overflow: hidden; white-space: nowrap; transform-origin: left; animation: growX .7s var(--ease) both; transition: transform .2s var(--ease), box-shadow .2s; box-shadow: 0 4px 12px rgba(95,67,201,.18); }
.tl-bar:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(95,67,201,.28); }
.tl-bar span { overflow: hidden; text-overflow: ellipsis; }
.tl-bar.en_cours, .lg.en_cours { background: linear-gradient(90deg, #A88BF5, #7B5CE8); }
.tl-bar.contrat, .lg.contrat { background: linear-gradient(90deg, #D9CCF8, #B9A3F2); color: #3d2a8a; }
.tl-bar.livre, .lg.livre { background: linear-gradient(90deg, #7fd9a6, #3cc47c); }
.tl-bar.facture, .lg.facture { background: linear-gradient(90deg, #FFE89A, #F5CC4A); color: #5c4700; }
.tl-bar.demande, .tl-bar.discussion, .tl-bar.negociation { background: linear-gradient(90deg, rgba(139,108,240,.22), rgba(139,108,240,.34)); color: var(--ink); }
.tl-bar.open { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.25) 0 6px, transparent 6px 12px), linear-gradient(90deg, rgba(139,108,240,.20), rgba(139,108,240,.30)); color: var(--ink); }
.tl-bar.late { box-shadow: 0 0 0 2px var(--bad), 0 4px 12px rgba(214,69,97,.25); }
.tl-mark { position: absolute; top: 11px; transform: translateX(-50%); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--violet-deep); box-shadow: 0 2px 8px rgba(28,24,48,.18); z-index: 2; animation: pop .4s var(--spring) both; animation-delay: .5s; }
.tl-mark.item { color: var(--violet-deep); } .tl-mark.late { color: var(--bad); background: var(--bad-bg); } .tl-mark.done { color: var(--ok); } .tl-mark.act { color: var(--yellow-ink); background: var(--yellow-soft); } .tl-mark.pay { color: var(--ok); background: var(--ok-bg); }
@keyframes pop { from { transform: translateX(-50%) scale(0); } }

.fiche-modal { width: min(1180px, 100%) !important; padding: 0 !important; }
.fiche { padding: 26px; }
.fiche-head { display: flex; align-items: center; gap: 16px; }
.fiche-head h2 { font-size: 26px; }
.countdown { text-align: center; padding: 8px 16px; border-radius: 16px; background: var(--violet-tint); color: var(--violet-deep); }
.countdown b { display: block; font-family: var(--font-h); font-size: 24px; letter-spacing: -0.04em; line-height: 1.1; } .countdown span { font-size: 11px; }
.countdown.soon { background: var(--yellow-soft); color: var(--yellow-ink); } .countdown.late { background: var(--bad-bg); color: var(--bad); }
.stepper { display: flex; gap: 4px; margin: 18px 0; overflow-x: auto; padding-bottom: 4px; }
.stepper button { flex: 1; min-width: 96px; border: 0; background: var(--surface-3); color: var(--muted); padding: 9px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; justify-content: center; transition: all .25s var(--ease); white-space: nowrap; }
.stepper button .dot { width: 8px; height: 8px; border-radius: 50%; background: #cfc9e2; }
.stepper button:hover { background: var(--violet-tint); color: var(--violet-deep); }
.stepper button.done { background: var(--violet-tint); color: var(--violet-deep); } .stepper button.done .dot { background: var(--violet); }
.stepper button.cur { background: linear-gradient(135deg, #8B6CF0, #6E52DB); color: #fff; box-shadow: 0 6px 16px rgba(95,67,201,.3); } .stepper button.cur .dot { background: var(--yellow); }
.stepper button.refuse { flex: 0 0 auto; } .stepper button.refuse.cur { background: var(--bad); }
.fiche-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fiche-recap textarea { min-height: 120px; }
.fiche-recap .filled { background: var(--yellow-soft); border-color: var(--yellow-deep); transition: background 1s; }
.item-row { display: grid; grid-template-columns: 22px 1fr 150px 34px; gap: 8px; align-items: center; margin-bottom: 6px; animation: pageIn .3s var(--ease); }
.item-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--violet); }
.item-row input.il, .item-row input.id { padding: 8px 10px; }
.item-row:has(input[type=checkbox]:checked) .il { text-decoration: line-through; color: var(--muted); }
.next-step { background: linear-gradient(135deg, var(--yellow-soft), var(--surface) 75%); border-color: transparent; }
.next-step #na { margin-top: 8px; font-weight: 600; }
.fiche-side .card { padding: 16px; }
.hist { max-height: 260px; overflow-y: auto; }
@media (max-width: 1100px) { .todo-board { grid-template-columns: repeat(2, 1fr); } .fiche-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .todo-board { grid-template-columns: 1fr; } .tl-names { width: 190px; } .tl-name .xs, .tl-name > div > b { max-width: 130px; } }
/* traduction affichée sous l'original */
.bub-tr { margin-top: 12px; padding: 12px 16px; border-radius: 14px; background: var(--violet-tint-2); border-left: 3px solid var(--violet-soft); white-space: pre-wrap; font-size: 15px; line-height: 1.7; color: #2c2742; animation: pageIn .35s var(--ease) both; word-break: break-word; }
.bub-tr::before { content: "🇫🇷 Traduction"; display: block; font-size: 11.5px; font-weight: 700; color: var(--violet-deep); margin-bottom: 6px; letter-spacing: .02em; }
.bub.out .bub-tr { background: var(--glass); }
.bub:not(.open) .bub-tr { max-height: 220px; overflow: hidden; }
.bub.translated { box-shadow: 0 2px 10px rgba(95,67,201,.05); }
/* media kit en pleine page */
.kit-full { position: fixed; inset: 0; z-index: 200; background: var(--surface-2); display: flex; flex-direction: column; animation: fade .25s; }
.kit-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: linear-gradient(135deg, var(--violet-tint), var(--yellow-soft)); border-bottom: 1px solid var(--line); }
.kit-title { display: flex; flex-direction: column; } .kit-title .xs { color: var(--muted); }
.kit-full iframe { flex: 1; width: 100%; border: 0; background: var(--surface-2); }

/* discussions en cours */
.dfilters { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 6px; position: sticky; top: 0; z-index: 2; background: var(--card, var(--surface)); }
.dfilters .chip { font-size: 12px; padding: 5px 9px; }
.dfilters .chip b { margin-left: 4px; opacity: .65; font-weight: 600; }
.mcard .mc-actions .btn.on { background: var(--violet-soft, var(--violet-tint)); border-color: transparent; }
.outcome-bar { background: linear-gradient(135deg, var(--violet-tint), var(--yellow-soft)); }
.mcard .mc-actions { flex-wrap: wrap; }
.mcard .mc-actions .btn.sm { padding: 5px 9px; font-size: 12px; }
.dgroup { padding: 14px 16px 6px; font-size: 13px; border-top: 1px solid var(--line); background: linear-gradient(90deg, var(--violet-tint), transparent); }
.dgroup:first-child { border-top: 0; }
.gm #tabs { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.gm #tabs::-webkit-scrollbar { display: none; }
.gm #tabs button { flex-shrink: 0; }
.mcard .mc-actions { gap: 5px; }
.mcard .mc-actions .btn.sm { padding: 4px 8px; font-size: 11.5px; }
.archive-btn { background: var(--yellow-soft); border-color: #F2DE8A; color: var(--yellow-ink); font-weight: 600; }
.archive-btn:hover { background: color-mix(in oklab, var(--yellow) 30%, transparent); }
.draft-note { font-size: 12.5px; line-height: 1.45; color: var(--muted); background: var(--glass); border: 1px dashed var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; }
.att-kit { display: inline-flex; align-items: center; gap: 6px; border: 1.5px dashed var(--line); background: var(--surface-2); border-radius: 12px; padding: 7px 10px; font: inherit; font-size: 13px; cursor: pointer; color: var(--muted); transition: all .2s; }
.att-kit small { opacity: .7; font-size: 11px; }
.att-kit .att-x { margin-left: 2px; font-size: 12px; }
.att-kit.on { border-style: solid; border-color: #B9A6F0; background: var(--violet-tint); color: var(--violet-deep, #4B32B5); font-weight: 600; }
.bub-att { margin-top: 8px; font-size: 12px; color: var(--violet-deep, #4B32B5); }
.att-kit, .att-kit * { white-space: nowrap; }
.att-kit.up { opacity: .7; cursor: progress; }
.composer.drag { outline: 2px dashed var(--violet); outline-offset: 4px; border-radius: 16px; }
#up-list:empty { display: none; }
.cmp-foot { flex-wrap: wrap; gap: 10px; }
.cmp-foot > .row:first-child { flex-wrap: wrap; flex: 1 1 360px; }
.cmp-foot > .row:first-child > .xs.muted { flex-basis: 100%; order: 3; }
.cmp-foot > .row:last-child { margin-left: auto; }
.mcard .mc-actions .btn.archive-btn { padding: 7px 14px; font-size: 13px; font-weight: 700; background: #FFE680; border: 1.5px solid #E8C440; color: #5A4400; box-shadow: 0 2px 6px rgba(232,196,64,.35); }
.mcard .mc-actions .btn.archive-btn:hover { background: #FFDB4D; transform: translateY(-1px); }
.mv-head { flex-wrap: wrap; row-gap: 10px; }
.mv-title { flex: 1 1 280px; min-width: 0; }
.mv-head > .row:last-child { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
/* bouton « Enregistrer » qui attire l'œil tant que des modifs ne sont pas enregistrées */
.btn.pulse { animation: pulse-save 1.4s ease-in-out infinite; }
@keyframes pulse-save { 0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, .45); } 50% { box-shadow: 0 0 0 7px rgba(139, 92, 246, 0); } }
/* contrats : audit en puces + champs remplis */
.ct-inbox h4 { margin: 2px 0 6px; }
.ct-verdict { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--ok-bg); }
.ct-verdict.a_preciser { background: var(--yellow-soft); } .ct-verdict.a_corriger { background: var(--bad-bg); }
.ct-verdict .big { font-size: 28px; line-height: 1; }
.ct-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .ct-grid { grid-template-columns: 1fr; } }
.ct-group { margin-top: 12px; }
.ct-gtitle { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.ct-gtitle.bad { color: var(--bad); } .ct-gtitle.warn { color: var(--warn); } .ct-gtitle.ok { color: var(--ok); }
.ct-bullets { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ct-bullets li { position: relative; padding: 8px 10px 8px 26px; border-radius: 12px; background: var(--surface-2); box-shadow: 0 1px 6px rgba(95,67,201,.06); font-size: 13.5px; }
.ct-bullets li::before { content: ""; position: absolute; left: 11px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.ct-bullets li.bad::before { background: var(--bad); } .ct-bullets li.warn::before { background: var(--warn); } .ct-bullets li.info::before { background: var(--violet); }
.ct-bullets .ask { margin-top: 5px; font-size: 12.5px; background: var(--violet-tint); padding: 5px 8px; border-radius: 8px; }
.ct-fields { display: grid; gap: 7px; }
.ct-field { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.ct-field em { font-style: normal; opacity: .75; }
.ct-field input { font-size: 13px; padding: 7px 9px; }
.ct-tradtext { max-height: 420px; overflow: auto; margin-top: 8px; padding: 4px 12px; background: var(--surface-2); border-radius: 12px; font-size: 13px; line-height: 1.55; }
.ct-tradtext p { margin: 8px 0; }
/* pièces jointes reçues */
.pj-list { display: grid; gap: 8px; margin-top: 12px; }
.pj { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 14px; background: var(--surface-2); border: 1px solid rgba(95,67,201,.12); box-shadow: 0 1px 6px rgba(95,67,201,.05); flex-wrap: wrap; }
.pj-ico { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font: 700 10.5px/1 var(--font-h); letter-spacing: .3px; background: var(--violet-tint); color: var(--violet); }
.pj-ico.pdf { background: var(--bad-bg); color: #C0392B; } .pj-ico.img { background: var(--yellow-soft); color: var(--yellow-ink); } .pj-ico.doc { background: var(--info-bg); color: #2F5BD3; } .pj-ico.xls { background: var(--ok-bg); color: #1E8A4C; }
.pj-txt { min-width: 0; flex: 1 1 160px; display: grid; }
.pj-txt b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-txt small { color: var(--muted); font-size: 11.5px; }
.pj-act { display: flex; gap: 6px; flex-wrap: wrap; }
.pj-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(29,26,43,.55); display: grid; place-items: center; padding: 24px; }
.pj-modal { width: min(1100px, 100%); height: min(92vh, 1100px); background: var(--surface-2); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.pj-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid rgba(95,67,201,.12); flex-wrap: wrap; }
.pj-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.pj-body { flex: 1; position: relative; background: var(--surface-3); display: grid; place-items: center; }
.pj-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pj-body img { max-width: 100%; max-height: 100%; object-fit: contain; position: relative; }
.pj-wait { position: absolute; color: var(--muted); font-size: 13px; }
/* signature */
.sig-fonts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sig-font { display: grid; gap: 2px; padding: 12px 10px 8px; border-radius: 14px; border: 1.5px solid rgba(95,67,201,.15); background: var(--surface-2); color: #1b1f5a; font-size: 30px; line-height: 1.2; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sig-font small { font: 500 11px var(--font-b, Inter), sans-serif; color: var(--muted); }
.sig-font.on { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-tint); }
.sig-pad { width: 100%; height: 160px; border-radius: 14px; border: 1.5px dashed rgba(95,67,201,.35); background: var(--surface-2); touch-action: none; cursor: crosshair; }
.sig-preview { max-height: 46px; max-width: 180px; display: block; }
/* cadeaux reçus */
.gift-total { display: grid; justify-items: end; } .gift-total b { font: 700 24px var(--font-h); color: var(--violet); }
.gift-row { display: grid; grid-template-columns: 1.1fr 1.6fr 110px 150px auto; gap: 8px; align-items: center; }
.gift-list .gift-row { padding: 8px 4px; border-top: 1px solid rgba(95,67,201,.08); font-size: 13.5px; }
.gift-list .gift-row select { padding: 5px 8px; font-size: 12.5px; }
@media (max-width: 900px) { .gift-row { grid-template-columns: 1fr 1fr; } .gift-add .btn { grid-column: 1 / -1; } }
/* suppression d'un fichier depuis sa carte */
.file { position: relative; }
.file-del { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 9px; border: 0; background: var(--surface-2); color: var(--bad); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; box-shadow: 0 2px 8px rgba(95,67,201,.12); }
.file-del svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.file:hover .file-del, .file-del:focus-visible { opacity: 1; }
@media (hover: none) { .file-del { opacity: 1; } }
/* cadeaux : bandeau en gros sur le dashboard + tuiles */
.gift-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 22px 26px; text-decoration: none; color: inherit; background: linear-gradient(120deg, var(--yellow-soft) 0%, var(--yellow-soft) 45%, var(--violet-tint) 100%); border-color: transparent; }
.gift-hero .label { font-weight: 600; font-size: 14px; color: var(--yellow-ink); }
.gh-value { font-family: var(--font-h); font-size: 56px; font-weight: 800; letter-spacing: -0.045em; line-height: 1; margin: 8px 0 6px; color: var(--ink); }
.gift-hero .hint { font-size: 13px; color: var(--muted); }
.gh-items { display: flex; gap: 10px; flex-wrap: wrap; }
.gh-item { display: grid; gap: 2px; min-width: 150px; padding: 12px 14px; border-radius: 16px; background: var(--glass); box-shadow: 0 2px 10px rgba(95,67,201,.08); }
.gh-item b { font: 800 26px/1 var(--font-h); letter-spacing: -0.03em; color: var(--violet); }
.gh-item span { font-size: 12.5px; font-weight: 600; } .gh-item em { font-style: normal; font-size: 11.5px; color: var(--muted); }
@media (max-width: 820px) { .gh-value { font-size: 44px; } .gh-item { min-width: 0; flex: 1 1 140px; } }
.gift-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.gift-tile { padding: 14px 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid rgba(95,67,201,.12); box-shadow: 0 2px 10px rgba(95,67,201,.06); display: grid; gap: 4px; }
.gift-tile.recu, .gift-tile.garde { background: linear-gradient(160deg, var(--surface), var(--yellow-soft)); } .gift-tile.revendu { background: linear-gradient(160deg, var(--surface), var(--ok-bg)); }
.gt-brand { font-weight: 700; font-size: 14px; }
.gt-value { font: 800 34px/1.05 var(--font-h); letter-spacing: -0.04em; color: var(--ink); }
.gt-prod { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.gift-tile select { padding: 6px 8px; font-size: 12.5px; }
/* plan de production (fiche collab) */
.prod { margin: 14px 0; padding: 18px 20px; background: linear-gradient(160deg, var(--surface-2) 0%, var(--violet-tint-2) 100%); }
.pchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--violet-tint); font-size: 13px; position: relative; }
.pchip em { font-style: normal; color: var(--muted); font-size: 12px; }
.pchip i { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); }
.pchip i.soon { color: var(--warn); } .pchip i.late { color: var(--bad); }
.pchip.ads { background: var(--yellow-soft); } .pchip.gift { background: var(--yellow-soft); } .pchip.money { background: var(--ok-bg); } .pchip.soft { background: transparent; border: 1px dashed rgba(95,67,201,.3); color: var(--muted); font-size: 12px; }
.pchip.edit { cursor: pointer; } .pchip.edit input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pnow { margin-top: 14px; padding: 11px 14px; border-radius: 14px; background: var(--deep); color: #fff; font-size: 14px; }
.pprog { width: 120px; height: 7px; border-radius: 99px; background: var(--violet-tint); overflow: hidden; display: inline-block; } .pprog i { display: block; height: 100%; background: var(--violet); border-radius: 99px; }
.pphases { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 18px; margin-top: 14px; }
.pphase-t { font: 600 12px var(--font-h); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 0 6px; }
.psteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pstep { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 4px 10px; padding: 9px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid rgba(95,67,201,.1); }
.pstep.done { opacity: .6; } .pstep.done .plabel { text-decoration: line-through; }
.pstep.maybe, .pstep.skip { border-style: dashed; background: transparent; } .pstep.skip { opacity: .45; }
.pstep.info { background: var(--yellow-soft); }
.pcheck { display: flex; align-items: center; gap: 6px; cursor: pointer; flex: none; } .pcheck input { width: 18px; height: 18px; accent-color: var(--violet); }
.pico { width: 24px; text-align: center; flex: none; }
.pmain { flex: 1; min-width: 0; } .plabel { font-size: 13.5px; font-weight: 600; } .phint { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.pside { grid-column: 2; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pdue { border: 0; background: var(--violet-tint); border-radius: 9px; padding: 5px 8px; font-size: 12px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.pdue i { font-style: normal; font-weight: 700; } .pdue.soon { background: var(--yellow-soft); } .pdue.late { background: var(--bad-bg); color: var(--bad); } .pdue.ok { background: var(--ok-bg); } .pdue.none { background: transparent; border: 1px dashed rgba(95,67,201,.3); color: var(--muted); }
.pdue-input { width: 150px; padding: 4px 6px; font-size: 12px; }
.addv { margin: 2px 0 0 36px; justify-self: start; }
.pmore { margin-top: 12px; } .pmore summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.pmore ul { margin: 8px 0; padding-left: 18px; font-size: 13px; display: grid; gap: 4px; } .pmore li.bad { color: var(--bad); }
.parch { display: grid; gap: 6px; margin-top: 8px; max-height: 360px; overflow: auto; }
.parch-it { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--violet); text-decoration: none; color: inherit; font-size: 13px; } .parch-it.out { border-left-color: var(--yellow); background: var(--yellow-soft); }
/* Fichiers : deux grandes cartes par ligne avec l'aperçu du fichier */
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 820px) { .fgrid { grid-template-columns: 1fr; } }
.fcard { background: var(--surface-2); border-radius: 20px; overflow: hidden; border: 1px solid rgba(95,67,201,.1); box-shadow: 0 4px 18px rgba(95,67,201,.07); cursor: pointer; transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.fcard:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(95,67,201,.13); }
.fthumb { position: relative; height: 300px; background: var(--surface-3); overflow: hidden; display: grid; place-items: center; }
.fthumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.fthumb.img img { object-position: center; }
.fthumb .fbig { display: none; font: 800 46px var(--font-h); letter-spacing: -0.03em; color: rgba(95,67,201,.35); }
.fthumb.noimg img { display: none; } .fthumb.noimg .fbig { display: block; }
.fthumb.pdf.noimg { background: linear-gradient(160deg, var(--bad-bg), var(--surface)); } .fthumb.doc.noimg { background: linear-gradient(160deg, var(--info-bg), var(--surface)); } .fthumb.xls.noimg { background: linear-gradient(160deg, var(--ok-bg), var(--surface)); }
.fnote { padding: 22px 24px; font-size: 14px; line-height: 1.55; color: #3b3552; white-space: pre-wrap; align-self: start; width: 100%; height: 100%; background: linear-gradient(160deg, var(--yellow-soft), var(--surface)); overflow: hidden; }
.ftype { position: absolute; top: 12px; left: 12px; padding: 5px 10px; border-radius: 9px; font: 700 12px var(--font-h); letter-spacing: .04em; background: var(--surface-2); box-shadow: 0 2px 8px rgba(0,0,0,.08); color: var(--violet); }
.ftype.pdf { color: #C0392B; } .ftype.img { color: var(--yellow-ink); } .ftype.doc { color: #2F5BD3; } .ftype.xls { color: #1E8A4C; } .ftype.note { color: var(--yellow-ink); }
.fdel { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--surface-2); color: var(--bad); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.1); opacity: 0; transition: opacity .15s; }
.fdel svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.fcard:hover .fdel, .fdel:focus-visible { opacity: 1; } @media (hover: none) { .fdel { opacity: 1; } }
.finfo { padding: 14px 18px 16px; display: grid; gap: 5px; border-top: 1px solid rgba(95,67,201,.08); }
.ftitle { font: 700 18px/1.25 var(--font-h); letter-spacing: -0.01em; color: #1d1a2b; }
.fmeta { font-size: 13px; color: var(--muted); }
.fbadges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.fbadge { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--yellow-soft); color: var(--yellow-ink); } .fbadge.ok { background: var(--ok-bg); color: var(--ok); } .fbadge.violet { background: var(--violet-tint); color: var(--violet); } .fbadge.grey { background: var(--surface-3); color: var(--muted); }
.fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- bienvenue (3 écrans) ---------- */
.steps { display: flex; gap: 8px; flex-wrap: wrap; }
.steps .step { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--violet) 14%, transparent); color: color-mix(in srgb, var(--ink) 80%, transparent); font-size: 13px; }
.steps .step b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); font-size: 12px; color: var(--violet); }
.steps .step.on { background: var(--violet); color: #fff; }
.steps .step.done { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.steps .step.done b { color: var(--ok); }
.onboarding .actions { display: flex; align-items: center; gap: 8px; }
.onboarding .actions .spacer { flex: 1; }

/* ===== palette ⌘K ===== */
.cmdk { padding: 0 !important; overflow: hidden; width: min(600px, 100%) !important; }
.cmdk input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 18px 20px; font-size: 16px; background: transparent; box-shadow: none !important; }
.cmdk-list { max-height: 50vh; overflow: auto; padding: 8px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; cursor: pointer; }
.cmdk-item svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.cmdk-item small { margin-left: auto; color: var(--muted); font-family: var(--font-m); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.cmdk-item.on { background: var(--violet-tint); color: var(--violet-deep); } .cmdk-item.on svg { color: var(--violet-deep); }
.cmdk-group { font-family: var(--font-m); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 4px; }

@media (max-width: 820px) { .frame { margin: 0; border-radius: 0; border-width: 1px 0 0; } .topbar { border-radius: 0; } .sidebar { position: relative; height: auto; } }

/* ===== Google, en un clic ===== */
.gconns { display: grid; gap: 8px; }
.gconn { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); transition: border-color .25s; }
.gconn.on { border-color: color-mix(in oklab, var(--ok) 35%, var(--line)); }
.gconn-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--violet-tint); color: var(--violet-deep); flex: none; }
.gconn-ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gconn.on .gconn-ico { background: var(--ok-bg); color: var(--ok); }
.gconn-ico:has(.logo), .gconn.on .gconn-ico:has(.logo) { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.gconn-ico .logo { width: 24px; height: 24px; stroke: none; }
.gconn-main { flex: 1; min-width: 0; display: flex; flex-direction: column; } .gconn-main span { color: var(--muted); font-size: 12.5px; }
.gconn .btn { text-decoration: none; }
.gconn .ai-key { width: min(320px, 38vw); padding: 8px 11px; font-family: var(--font-m); font-size: 12.5px; }
.badge.violet { background: var(--violet-tint); color: var(--violet-deep); }
.gsetup summary { cursor: pointer; font-size: 13px; color: var(--muted); } .gsetup ol { padding-left: 18px; line-height: 1.8; } .gsetup code { font-family: var(--font-m); font-size: 12px; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); color: var(--ink); }

/* ===== Super-admin ===== */
.g6 { grid-template-columns: repeat(6, minmax(0,1fr)); }
@media (max-width: 1200px) { .g6 { grid-template-columns: repeat(3, 1fr); } } @media (max-width: 700px) { .g6 { grid-template-columns: repeat(2, 1fr); } }
.sa-kpi { text-align: left; cursor: pointer; font: inherit; color: inherit; } .sa-kpi .value { font-size: 26px; }
.sa-table td { vertical-align: top; } .sa-table .badge.yellow { margin-left: 6px; }
.conns { display: flex; gap: 4px; flex-wrap: wrap; }
.conn { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bad-bg); color: var(--bad); white-space: nowrap; }
.conn.ok { background: var(--ok-bg); color: var(--ok); }
.sav { display: grid; grid-template-columns: 340px 1fr; gap: 14px; min-height: 520px; }
@media (max-width: 900px) { .sav { grid-template-columns: 1fr; } }
.sav-list { padding: 6px; display: flex; flex-direction: column; gap: 4px; max-height: 70vh; overflow: auto; }
.sav-item { text-align: left; border: 1px solid transparent; background: transparent; color: inherit; border-radius: 12px; padding: 10px 12px; cursor: pointer; font: inherit; }
.sav-item:hover { background: var(--glass); } .sav-item.on { background: var(--violet-tint); border-color: var(--line); }
.sav-last { margin-top: 4px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sav-msgs { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; padding-right: 4px; }
.sav-msg { max-width: 80%; padding: 10px 12px; border-radius: 14px; background: var(--surface-3); white-space: pre-wrap; font-size: 13.5px; }
.sav-msg .who { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.sav-msg.admin { align-self: flex-end; background: var(--violet-tint); } .sav-msg.bot { background: var(--glass); border: 1px dashed var(--line-2); }
.bc-pick { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; max-height: 160px; overflow: auto; }
.er-ai { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--violet-tint-2); font-size: 12.5px; }
.er-pre { white-space: pre-wrap; font-family: var(--font-m); font-size: 11px; max-height: 200px; overflow: auto; background: var(--surface-3); padding: 8px; border-radius: 8px; }

/* ===== Bulle d'aide (SAV) ===== */
.help-fab { position: fixed; right: 22px; bottom: 22px; z-index: 80; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, #9B80F6, #7457E4); box-shadow: 0 12px 28px -8px rgba(139,108,240,.7); transition: transform .25s var(--spring); }
.help-fab:hover { transform: translateY(-2px) scale(1.04); } .help-fab.on { transform: rotate(-8deg); }
.help-fab svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.help-dot { position: absolute; top: 6px; right: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--bg); }
.help-panel { position: fixed; right: 22px; bottom: 86px; z-index: 81; width: min(380px, calc(100vw - 32px)); height: min(540px, calc(100vh - 120px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--shadow-lg); animation: modalIn .35s var(--spring); overflow: hidden; }
.help-head { display: flex; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.help-msgs { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.help-msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; white-space: pre-wrap; background: var(--surface-3); }
.help-msg.client { align-self: flex-end; background: var(--violet); color: #fff; border-bottom-right-radius: 4px; }
.help-msg.admin { background: var(--yellow-soft); } .help-msg .who { font-size: 11px; font-weight: 700; color: var(--yellow-ink); margin-bottom: 2px; }
.help-msg.typing { opacity: .6; animation: pulse 1.2s infinite; }
.help-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: flex-end; } .help-form textarea { min-height: 42px; max-height: 120px; resize: none; }
.help-human { border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 0 0 10px; cursor: pointer; text-decoration: underline; }

/* ===== Suivi : lier une marque ===== */
.lk { display: grid; grid-template-columns: 300px 1fr; gap: 16px; min-height: 420px; }
@media (max-width: 800px) { .lk { grid-template-columns: 1fr; } }
.lk-list { display: flex; flex-direction: column; gap: 8px; }
.lk-items { display: flex; flex-direction: column; gap: 4px; max-height: 56vh; overflow: auto; }
.lk-item { display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 10px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.lk-item:hover { background: var(--glass); } .lk-item.on { background: var(--violet-tint); border-color: var(--line); }
.lk-item > div { min-width: 0; display: flex; flex-direction: column; } .lk-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-view { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: var(--glass); }
.lk-brief { white-space: pre-wrap; font-size: 13px; padding: 10px 12px; border-radius: 12px; background: var(--violet-tint-2); max-height: 160px; overflow: auto; }
.lk-view small { display: block; margin-top: 2px; font-weight: 400; }

/* ===== Factures : démarrer une facture ===== */
.bill-start { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .bill-start { grid-template-columns: 1fr; } }
.bill-start > .card { margin: 0; }
.quick-bill select { width: 100%; }

/* ===== Bas du menu : son nom ouvre le menu du profil ===== */
.userbox { width: calc(100% - 4px); border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; border-radius: 12px; position: relative; }
.userbox:hover { background: var(--glass); }
.userbox .avatar { width: 30px; height: 30px; font-size: 12px; flex: none; }
.userbox .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userbox .news-dot { position: absolute; top: 12px; left: 32px; width: 8px; height: 8px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 2px var(--bg); }

/* ===== Menu du profil ===== */
.pmenu { position: fixed; z-index: 95; width: 300px; max-width: calc(100vw - 16px); padding: 6px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); box-shadow: var(--shadow), 0 24px 60px -20px rgba(0,0,0,.55); animation: fade .18s; }
.pmenu-me { display: flex; align-items: center; gap: 10px; padding: 10px; }
.pmenu-me .avatar { width: 38px; height: 38px; flex: none; }
.pmenu-who { min-width: 0; display: flex; flex-direction: column; } .pmenu-who b { font-size: 14px; } .pmenu-who span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmenu-me .icon-btn { width: 32px; height: 32px; flex: none; }
.pmenu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.pmenu-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.pmenu-item:hover, .pmenu-space:hover { background: var(--glass); }
.pmenu-item svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .8; flex: none; }
.pmenu-item .badge { margin-left: auto; }
.pmenu-space { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.pmenu-space img { width: 32px; height: 32px; border-radius: 9px; flex: none; }
.pmenu-space div { display: flex; flex-direction: column; min-width: 0; } .pmenu-space span { color: var(--muted); font-size: 12px; }

.sub-now h2 { font-size: 24px; margin: 4px 0; } .upper { text-transform: uppercase; letter-spacing: .1em; }
.sub-usage { display: flex; gap: 22px; } .sub-usage div { display: flex; flex-direction: column; } .sub-usage b { font-family: var(--font-h); font-size: 20px; } .sub-usage span { color: var(--muted); font-size: 12px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan { margin: 0; position: relative; display: flex; flex-direction: column; gap: 8px; }
.plan.featured { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet), var(--shadow); }
.plan.mine { background: var(--violet-tint-2); }
.plan-tag { position: absolute; top: 14px; right: 14px; }
.plan-price b { font-family: var(--font-h); font-size: 32px; } .plan-price span { color: var(--muted); margin-left: 4px; }
.plan-list { list-style: none; padding: 0; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; flex: 1; }
.plan-list li::before { content: "✓"; color: var(--violet-deep); font-weight: 700; margin-right: 8px; }
.btn.full { width: 100%; justify-content: center; }
.news { display: flex; flex-direction: column; gap: 12px; } .news-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; } .news-item p { margin-top: 4px; color: var(--muted); }
.legal h4 { margin: 14px 0 4px; font-size: 14px; } .legal p { color: var(--muted); line-height: 1.55; }
@media (max-width: 860px) {
  .plans, .form-grid.three { grid-template-columns: 1fr; } .form-grid .span2 { grid-column: auto; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Motion façon Nextlids (25/11/2026) — même mouvement, mêmes tailles de menu,
   en gardant le violet Sakaleya. Mouvements courts (150 à 500 ms), une courbe douce.
   ═══════════════════════════════════════════════════════════════════════ */
:root { --ease-soft: cubic-bezier(.22,1,.36,1); --ease-pop: cubic-bezier(.34,1.56,.64,1); --raised: rgba(255,255,255,.06); }
html[data-theme="light"] { --raised: rgba(28,24,48,.04); }

/* Fond : la lueur violette monte du bas et respire */
.fx-bg::after { content: ""; position: absolute; left: 50%; bottom: -34vh; width: 76vw; height: 62vh; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(139,108,240,.24), transparent); filter: blur(46px); animation: lueur-respire 9s ease-in-out infinite; }
@keyframes lueur-respire { 0%, 100% { opacity: .5; scale: 1; } 50% { opacity: 1; scale: 1.1; } }

/* Menu : 244 px, lignes de 32 px, texte 13 px, icônes 16 px (trait 2 px) */
.shell { grid-template-columns: 244px 1fr; }
.sidebar { padding: 16px 10px 10px; gap: 2px; }
.brand { gap: 10px; padding: 2px 6px 12px; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.brand b { font-size: 17px; }
.side-search { margin: 0 0 8px; padding: 6px 10px; border-radius: 10px; border-color: transparent; background: var(--surface-2); font-size: 13px; }
.side-search:hover { background: var(--surface-3); border-color: transparent; }
.nav-group { font-family: var(--font-b); font-size: 9px; font-weight: 700; letter-spacing: .14em; opacity: .8; padding: 12px 10px 4px; }
.nav { gap: 2px; }
.nav a { gap: 8px; min-height: 32px; padding: 6px 10px; border-radius: 10px; font-size: 13px; font-weight: 500; opacity: .85;
  transition: background-color .22s var(--ease-soft), color .22s var(--ease-soft), scale .15s var(--ease-soft), opacity .22s; }
.nav a svg { width: 16px; height: 16px; stroke-width: 2; flex: none; transition: none; }
.nav a:hover { background: var(--surface-2); }
.nav a:hover svg { transform: none; animation: icone-saute .38s var(--ease-pop); }
.nav a:active { scale: .97; }
.nav a.active { background: var(--violet-tint-2); color: var(--violet-deep); font-weight: 600; }
.nav a.active::before { left: -6px; top: 50%; bottom: auto; height: 16px; width: 3px; translate: 0 -50%; border-radius: 999px; background: var(--violet);
  box-shadow: 0 0 12px var(--violet); animation: navmark .3s var(--spring) both; }
@keyframes navmark { from { height: 0; opacity: 0; } to { height: 16px; opacity: 1; } }
@keyframes icone-saute { 0% { scale: 1; rotate: 0deg; } 34% { scale: 1.2; rotate: -8deg; } 100% { scale: 1; rotate: 0deg; } }
.userbox { padding: 10px; } .userbox .avatar { width: 32px; height: 32px; font-size: 12px; } .userbox .name { font-size: 13px; font-weight: 600; }
.userbox:active { scale: .98; }
.sync-pill { font-size: 12px; }

/* Panneau : il arrive en glissant, angles comme Nextlids */
.frame { margin: 8px 8px 8px 0; border-radius: 14px; animation: panneau-arrive .5s var(--ease-soft) backwards; }
@keyframes panneau-arrive { from { opacity: 0; transform: translateY(8px) scale(.992); } }
.topbar { height: 56px; }

/* Page et cartes : la page monte, puis ses cartes arrivent l'une après l'autre */
.page { animation: pagein .45s var(--ease-soft) both; }
@keyframes pagein { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: carte-pose .45s var(--ease-soft) backwards; animation-delay: calc(min(var(--i, 0), 6) * 45ms); }
@keyframes carte-pose { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.card { transition: border-color .2s ease, box-shadow .25s ease, background-color .2s ease; }

/* Fenêtres : le voile fond, la fenêtre grossit à peine */
.modal-bg { animation: voile-arrive .2s ease backwards; }
.modal { animation: fenetre-arrive .3s var(--ease-soft) backwards; }
@keyframes voile-arrive { from { opacity: 0; } }
@keyframes fenetre-arrive { from { opacity: 0; transform: translateY(8px) scale(.965); } }
.pmenu { animation: fenetre-arrive .22s var(--ease-soft) backwards; transform-origin: bottom left; }

/* Boutons : reflet, halo au survol, pression au clic */
.btn { transition: scale .15s var(--ease-soft), box-shadow .25s ease, filter .2s ease, background-color .2s ease, border-color .2s ease; }
.btn:active:not(:disabled), .icon-btn:active { scale: .97; }
.btn.primary:hover:not(:disabled) { transform: none; filter: brightness(1.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 0 0 1px rgba(139,108,240,.55), 0 10px 28px -8px rgba(139,108,240,.8); }
.btn.primary:active:not(:disabled) { scale: .96; }
tbody tr { transition: background-color .15s var(--ease-soft); }
tbody tr:hover { background: var(--raised); }

/* ===== Paramètres : fenêtre façon Nextlids ===== */
.sp { position: fixed; inset: 0; z-index: 85; }
.sp-veil { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sp-first .sp-veil { animation: voile-arrive .2s ease backwards; }
.sp-win { position: absolute; inset: 20px; display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); outline: none; }
.sp-first .sp-win { animation: fenetre-arrive .3s var(--ease-soft) backwards; }
.sp-nav { width: 272px; flex: none; display: flex; flex-direction: column; gap: 2px; padding: 12px; overflow-y: auto; border-right: 1px solid var(--line); background: var(--surface); }
.sp-label { font-size: 12px; font-weight: 500; color: var(--muted); padding: 8px 10px 6px; } .sp-label.mt { margin-top: 18px; padding-top: 0; }
.sp-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; color: var(--ink); opacity: .85; text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background-color .22s var(--ease-soft), color .22s var(--ease-soft), scale .15s var(--ease-soft); }
.sp-nav a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-nav a svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; color: var(--muted); }
.sp-nav a:hover { background: var(--raised); opacity: 1; } .sp-nav a:hover svg { animation: icone-saute .38s var(--ease-pop); }
.sp-nav a:active { scale: .97; }
.sp-nav a.active { background: var(--violet-tint); color: var(--violet-deep); opacity: 1; } .sp-nav a.active svg { color: var(--violet-deep); }
.avatar.xs { width: 24px; height: 24px; font-size: 10px; flex: none; } .avatar.xl { width: 72px; height: 72px; font-size: 24px; flex: none; }
.sp-logo { width: 24px; height: 24px; border-radius: 7px; flex: none; }
.sp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sp-head { display: flex; align-items: center; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--line); flex: none; }
.sp-head p { flex: 1; min-width: 0; font-family: var(--font-h); font-weight: 700; font-size: 16px; }
.sp-x { margin: 0; } .sp-select { display: none; width: auto; max-width: 46vw; }
.sp-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.sp-body { max-width: 768px; margin: 0 auto; padding: 32px 32px 48px; display: flex; flex-direction: column; animation: onglet-in .35s var(--ease-soft) both; }
.sp-body.wide { max-width: 1024px; }
@keyframes onglet-in { from { opacity: 0; transform: translateY(6px); } }
.sp-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 20px; }
.sp-sec { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 26px 0 14px; }
.sp-body > .sp-sec:first-child, .sp-title + .sp-sec { margin-top: 0; }
.sp-sec h3 { font-size: 16px; font-weight: 700; } .sp-sec p { margin-top: 4px; color: var(--muted); font-size: 14px; max-width: 640px; }
.sp-card { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 20px; animation: carte-pose .45s var(--ease-soft) backwards; }
.sp-card + .sp-card { margin-top: 14px; }
.sp-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,22rem); gap: 24px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.sp-row:first-child { padding-top: 0; } .sp-row:last-child { border-bottom: 0; padding-bottom: 0; }
.sp-me + .sp-row { padding-top: 16px; }
.sp-row label { display: block; font-size: 14px; font-weight: 600; } .sp-row p { margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.sp-row input, .sp-row select, .sp-row textarea { width: 100%; border-radius: 12px; }
.sp-row input:disabled { opacity: .6; cursor: not-allowed; }
.sp-rule { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sp-rule:first-child { padding-top: 0; } .sp-rule:last-child { border-bottom: 0; padding-bottom: 0; }
.sp-rule b { font-size: 14px; } .sp-rule p { margin-top: 2px; font-size: 13px; color: var(--muted); line-height: 1.4; } .sp-rule > div:last-child { flex: none; padding-top: 2px; }
.sp-me { display: flex; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); } .sp-me p { color: var(--muted); font-size: 13px; }
.sp-etat { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sp-etat i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sp-etat.ok { background: rgba(52,199,123,.14); color: #34C77B; } .sp-etat.attention { background: rgba(245,180,60,.16); color: #E5A632; }
.sp-etat.erreur { background: rgba(240,90,110,.15); color: var(--bad); } .sp-etat.neutre { background: var(--surface-3); color: var(--muted); }
.sp-save { display: flex; justify-content: flex-end; margin-top: 18px; }
.sp-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); } .sp-plan { font-size: 22px; margin: 4px 0; display: flex; align-items: center; gap: 10px; }
.sp-more summary { cursor: pointer; font-size: 14px; font-weight: 600; } .sp-more[open] summary { margin-bottom: 8px; }
.sp-body .plans { margin-top: 0; }
.sp-body a[data-go] { color: var(--violet-deep); font-weight: 600; font-size: 13px; }
@media (max-width: 1023px) {
  .sp-nav { display: none; } .sp-select { display: block; }
  .sp-win { inset: 12px; }
}
@media (max-width: 640px) {
  .sp-win { inset: 0; border-radius: 0; border: 0; }
  .sp-body { padding: 22px 16px 40px; } .sp-row { grid-template-columns: 1fr; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-bg::after, .frame, .page, .stagger > *, .modal-bg, .modal, .pmenu, .sp-first .sp-veil, .sp-first .sp-win, .sp-body, .sp-card,
  .nav a:hover svg, .sp-nav a:hover svg, .nav a.active::before { animation: none !important; }
}

/* Super-admin : une seule entrée, sous un filet, comme Nextlids (visible uniquement par les créateurs de Sakaleya) */
.nav-sep { height: 1px; background: var(--line); margin: 10px 4px 6px; }
.nav-admin a svg { padding: 2px; border-radius: 50%; background: var(--surface-2); width: 20px; height: 20px; }

/* Photo de profil : même rond partout ; cadrage dans un rond avant l'enregistrement */
img.avatar { object-fit: cover; padding: 0; background: var(--surface-3); }
.av-slot { display: inline-flex; flex: none; }
.crop { display: grid; place-items: center; }
.crop canvas { border-radius: 50%; cursor: grab; touch-action: none; box-shadow: 0 0 0 4px var(--violet-tint), 0 20px 50px -20px rgba(0,0,0,.6); background: var(--surface-3); }
.crop canvas:active { cursor: grabbing; }
.sp-me .btn svg { width: 15px; height: 15px; }

/* Boîtes mail : une tuile par fournisseur */
.mb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.mb-tile { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, scale .15s var(--ease-soft), transform .25s var(--ease-soft); animation: carte-pose .45s var(--ease-soft) backwards; }
.mb-tile:hover { border-color: var(--violet); transform: translateY(-2px); } .mb-tile:active { scale: .98; }
.mb-tile.on { border-color: var(--violet); background: var(--violet-tint-2); }
.mb-tile .sp-etat { margin-left: auto; }
.mb-txt { display: flex; flex-direction: column; min-width: 0; } .mb-txt b { font-size: 14px; } .mb-txt small { color: var(--muted); font-size: 12px; }
.mb-ico { width: 34px; height: 34px; display: grid; place-items: center; flex: none; } .mb-ico .logo, .mb-ico svg.logo { width: 30px; height: 30px; }
.mb-ico.lg { width: 44px; height: 44px; } .mb-ico.lg .logo, .mb-ico.lg .mb-badge { width: 40px; height: 40px; }
.mb-badge { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 800; font-family: var(--font-h); font-size: 14px; }
.mb-badge svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.btn.danger { color: var(--bad); }

/* Super-admin façon Nextlids : sur-titre au bouclier, onglets en pilule avec icône, finance */
.sa-eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--violet-deep); }
.sa-eyebrow svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.sa-tabs { border-radius: 999px; padding: 5px; flex-wrap: wrap; }
.sa-tabs button { border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; padding: 7px 13px; }
.sa-tabs button svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sa-tabs button.active { background: linear-gradient(180deg, #9B80F6, #7457E4); color: #fff; box-shadow: 0 6px 16px -8px rgba(139,108,240,.8); }
.kpi.fin { border-radius: 18px; } .kpi.fin.accent { border-color: var(--violet); } .kpi.fin.accent .value { color: var(--violet-deep); }
.kpi.fin .hint { margin-top: 4px; }
.seg-mini { display: inline-flex; gap: 6px; } .seg-mini button { border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; cursor: pointer; }
.seg-mini button.on { border-color: var(--violet); color: var(--violet-deep); background: var(--violet-tint-2); }
.fin-chart { width: 100%; height: 220px; display: block; }

/* Police façon TrendTrack (25/11/2026) : titres en Instrument Sans demi-gras, serrés ; texte en Geist ; petites étiquettes en Geist Mono */
body { letter-spacing: -0.006em; }
h1, h2, .page-head h1, .sp-title, .set-head h1 { font-family: var(--font-h); font-weight: 600; letter-spacing: -0.042em; }
h3, h4, .sp-sec h3 { font-family: var(--font-h); font-weight: 600; letter-spacing: -0.02em; }
.brand b, .kpi .value, .gh-value, .plan-price b, .sp-plan { font-weight: 600; letter-spacing: -0.04em; }
.mb-badge { font-weight: 700; }

/* ===== Dashboard (menu 1) : épuré, compact, chiffres qui montent ===== */
.tdb .page-head { align-items: center; }
.tdb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tdb-grid > .tdb-card:nth-child(2) { grid-column: span 2; }
.tdb-card { display: flex; flex-direction: column; gap: 6px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; padding: 18px; border-radius: 16px;
  transition: border-color .2s ease, transform .25s var(--ease-soft), box-shadow .25s ease; }
.tdb-card:hover { border-color: color-mix(in oklab, var(--violet) 55%, var(--line)); transform: translateY(-2px); box-shadow: 0 14px 32px -20px rgba(0,0,0,.8); }
.tdb-card:active { scale: .985; }
.tdb-ca { grid-column: span 2; background: radial-gradient(120% 140% at 100% 0%, var(--violet-tint), transparent 60%), var(--card); }
.tdb-label { display: flex; align-items: center; gap: 8px; font-family: var(--font-m); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tdb-value { font-family: var(--font-h); font-weight: 600; font-size: 30px; letter-spacing: -0.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tdb-ca .tdb-value { font-size: 40px; color: var(--violet-deep); }
.tdb-hint { font-size: 12.5px; color: var(--muted); } .tdb-hint em { font-style: normal; color: var(--ink); }
.tdb-split { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); } .tdb-split i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
.dot-paid { background: var(--violet); } .dot-gift { background: #F5B43C; }
.tdb-bar { height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 4px; }
.tdb-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--violet); transform-origin: left; animation: tdb-grow .9s var(--ease-soft) .25s both; }
.tdb-card:nth-child(2) .tdb-bar { background: #F5B43C33; }
@keyframes tdb-grow { from { transform: scaleX(0); } }
.tdb-net { width: 18px; height: 18px; border-radius: 6px; display: inline-grid; place-items: center; flex: none; }
.tdb-net svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .tdb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tdb-grid { grid-template-columns: 1fr; } .tdb-ca, .tdb-grid > .tdb-card:nth-child(2) { grid-column: auto; } }
@media (prefers-reduced-motion: reduce) { .tdb-bar i { animation: none; } }
.net.sc b { background: #FFFC00; color: #111; }

/* ===== Échelle plus petite et plus épurée, même police (25/11/2026) ===== */
body { font-size: 13.5px; }
h1, .page-head h1 { font-size: 26px; } h2 { font-size: 18px; } h3 { font-size: 15px; } h4 { font-size: 13.5px; }
.page-head { margin-bottom: 18px; } .page-head .sub { font-size: 13.5px; margin-top: 6px; }
.main { padding: 26px 28px 48px; }
.card { padding: 18px; }
.kpi .value { font-size: 26px; }
.btn { font-size: 13px; padding: 8px 13px; }
.sp-title { font-size: 22px; } .sp-sec h3 { font-size: 15px; } .sp-sec p, .sp-row label { font-size: 13.5px; } .sp-row p { font-size: 12.5px; }
.seg-mini { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); }
.seg-mini button { border: 0; background: transparent; color: var(--muted); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; cursor: pointer; transition: background-color .2s var(--ease-soft), color .2s; }
.seg-mini button:hover { color: var(--ink); }
.seg-mini button.on { background: var(--violet-tint); color: var(--violet-deep); font-weight: 600; }

/* Dashboard : chiffres en blanc, encadrés plus petits ; dossiers Factures et Contrats */
.tdb-grid { gap: 10px; }
.tdb-card { padding: 14px 16px; gap: 4px; border-radius: 14px; }
.tdb-value, .tdb-ca .tdb-value { color: var(--ink); font-size: 24px; }
.tdb-ca .tdb-value { font-size: 30px; }
.tdb-label { font-size: 10px; } .tdb-hint, .tdb-split { font-size: 12px; }
.tdb-dossiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.tdb-dossier { padding: 14px 16px; border-radius: 14px; }
.tdb-dossier-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; } .tdb-dossier-head b { font-size: 14px; }
.tdb-folder { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--violet-tint); color: var(--violet-deep); }
.tdb-folder.contrats { background: rgba(245,180,60,.14); color: #E5A632; }
.tdb-folder svg, .tdb-file-ico svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tdb-count { font-family: var(--font-m); font-size: 11px; color: var(--muted); padding: 1px 7px; border-radius: 99px; border: 1px solid var(--line); }
.tdb-all { margin-left: auto; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; } .tdb-all:hover { color: var(--ink); }
.tdb-files { display: flex; flex-direction: column; }
.tdb-file { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; border-radius: 8px;
  transition: background-color .15s var(--ease-soft), transform .2s var(--ease-soft); }
.tdb-file:hover { background: var(--raised); transform: translateX(2px); }
.tdb-file-ico { color: var(--muted); display: grid; place-items: center; flex: none; }
.tdb-file-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; } .tdb-file-txt b { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tdb-file-txt small { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) { .tdb-dossiers { grid-template-columns: 1fr; } }
.tdb-ca .tdb-bar { background: #F5B43C55; }   /* violet = encaissé, jaune = gifts */
.tdb-ca .tdb-split em { font-style: normal; color: var(--ink); }

/* bandeau « lecture seule » (essai fini, paiement en échec) */
.ro-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 24px 8px; padding: 10px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--bad, #ef4444) 10%, transparent); border: 1px solid color-mix(in srgb, var(--bad, #ef4444) 30%, transparent); font-size: 13px; }
.ro-bar[hidden] { display: none; }
.ro-bar .btn { margin-left: auto; }
@media (max-width: 720px) { .ro-bar { margin: 0 12px 8px; } }

/* ===== Super-admin refait d'après Nextlids (25/11) : barre d'onglets, tuiles, pastilles de filtre, tableaux ===== */
.sa-head { margin-bottom: 18px; }
.sa-head .sa-eyebrow { font-family: var(--mono, "Geist Mono", ui-monospace, monospace); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--violet-deep); margin: 0; }
.sa-head h1 { margin: 4px 0 2px; }
.sa-head .sub { color: var(--muted); font-size: 13.5px; margin: 0; }
.sa-nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); margin-bottom: 22px; }
.sa-nav button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 11px; cursor: pointer; transition: background .2s, color .2s; }
.sa-nav button:hover { background: var(--surface-3); color: var(--ink); }
.sa-nav button.on { background: linear-gradient(180deg, #9B80F6, #7457E4); color: #fff; box-shadow: 0 6px 16px -8px rgba(139,108,240,.8); }
.sa-nav svg, .sa-ib svg, .sa-search svg, .sa-bar .btn svg, .sa-sec h3 svg, .sa-new .btn svg, .sa-plan-ico svg, .sa-people svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sa-count { display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; }
.sa-nav button.on .sa-count { background: #fff; color: #7457E4; }
.sa-body { display: grid; gap: 18px; }
.sa-tiles { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 12px; }
.sa-tile { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 14px 16px; animation: sa-in .45s var(--ease, ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.sa-tile p { margin: 0; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sa-tile b { display: block; margin-top: 4px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.sa-tile small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
@keyframes sa-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sa-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sa-bar-r { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sa-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sa-chip { border: 1px solid var(--line-2); background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 99px; cursor: pointer; transition: all .2s; }
.sa-chip:hover { color: var(--ink); }
.sa-chip.on { border-color: var(--violet); background: var(--violet-tint); color: var(--violet-deep); }
.sa-select { width: auto; border-radius: 99px; padding: 4px 10px; font-size: 12px; }
.sa-search { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 11px; padding: 0 10px; background: var(--card); color: var(--muted); }
.sa-search input { border: 0; background: none; outline: none; width: 170px; padding: 7px 0; font-size: 13px; color: var(--ink); box-shadow: none; }
.sa-ib { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 11px; }
.sa-tablewrap { border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow-x: auto; }
.sa-th { font-size: 13px; padding: 12px 16px 0; margin: 0; }
.sa-table2 { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13.5px; }
.sa-table2 th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.sa-table2 td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.sa-table2 tr:last-child td { border-bottom: 0; }
.sa-table2 th:first-child, .sa-table2 td:first-child { padding-left: 16px; }
.sa-table2 .right { text-align: right; } .sa-table2 p { margin: 0; }
.sa-name { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.sa-people { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: inherit; font: inherit; padding: 3px 6px; border-radius: 8px; cursor: pointer; font-variant-numeric: tabular-nums; }
.sa-people:hover { background: var(--surface-3); }
.sa-people svg { transition: transform .2s; color: var(--muted); } .sa-people svg.up { transform: rotate(180deg); }
.sa-sub td { background: var(--glass); }
.sa-gens { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px; }
.sa-gens li { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 8px 12px; }
.sa-gens li > div { flex: 1; min-width: 0; display: grid; } .sa-gens b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.sa-etat { font-size: 10.5px; font-weight: 600; color: var(--ok); white-space: nowrap; } .sa-etat.invite { color: var(--warn); }
.sa-new { display: grid; gap: 16px; }
.sa-new-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.sa-new-head h2 { margin: 0 0 4px; font-size: 22px; } .sa-new-head p { max-width: 640px; margin: 0; }
.sa-plan-note { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border: 1px solid color-mix(in srgb, var(--violet) 30%, transparent); background: var(--violet-tint-2); border-radius: 16px; padding: 12px 16px; }
.sa-plan-note > div { flex: 1; min-width: 240px; } .sa-plan-note p { margin: 2px 0 0; } .sa-plan-note b { font-size: 13.5px; }
.sa-plan-ico { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--violet-tint); color: var(--violet-deep); }
.sa-sync { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: var(--card); }
.sa-sync p { margin: 0; } .sa-sync .dot { flex: none; }
.sa-flash { margin: 0; border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); color: var(--ok); border-radius: 12px; padding: 8px 12px; font-size: 12.5px; }
.ok-t { color: var(--ok); font-weight: 600; } .bad-t { color: var(--bad); }
.mono { font-family: var(--mono, "Geist Mono", ui-monospace, monospace); }
.up { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.btn.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.sa-errs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sa-errs > li.card { padding: 0; }
.sa-err { display: flex; flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
.sa-err-main { flex: 1; min-width: 260px; display: grid; gap: 6px; } .sa-err-main p { margin: 0; }
.sa-err-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11.5px; }
.sa-err-ai { border-radius: 12px; background: var(--violet-tint-2); padding: 8px 12px; font-size: 13px; display: grid; gap: 2px; } .sa-err-ai .up { color: var(--violet-deep); font-size: 10px; display: flex; gap: 4px; align-items: center; }
.sa-err-ai svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.sa-err-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.sa-err-det { border-top: 1px solid var(--line); padding: 8px 16px; }
.sa-empty { border: 1px dashed var(--line-2); border-radius: 16px; padding: 24px; text-align: center; color: var(--muted); font-size: 13.5px; }
.sa-sec h3 { display: flex; align-items: center; gap: 6px; font-size: 14px; margin: 0 0 8px; }
.sa-lines { list-style: none; margin: 0; padding: 0; } .sa-lines li { display: flex; gap: 12px; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); } .sa-lines li:first-child { border-top: 0; } .sa-lines p { margin: 2px 0 0; word-break: break-word; }
@media (max-width: 900px) { .sa-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sa-bar-r { margin-left: 0; } .sa-search input { width: 120px; } }
@media (prefers-reduced-motion: reduce) { .sa-tile { animation: none; } }
.sa-body h3 > svg, .sa-body .btn > svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -2px; }
.sa-create h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; }

/* ===== Page de connexion / inscription (façon Trendtrack) ===== */
.ap { min-height: 100vh; padding: 26px 24px 28px; display: flex; flex-direction: column; align-items: center; background: #08080B; }
.ap-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 27px/1 var(--font-h); letter-spacing: -.045em; margin-bottom: 26px; }
.ap-logo img { width: 34px; height: 34px; border-radius: 9px; }
.ap-logo b { color: var(--violet-deep); font-weight: 800; }
.ap-frame { width: min(1240px, 100%); flex: 1; min-height: 720px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 14px; border-radius: 34px;
  background: #1B1A21; box-shadow: 0 0 0 1px rgba(255,255,255,.05), 0 40px 90px -40px rgba(0,0,0,.9); animation: apIn .7s var(--ease) both; }
@keyframes apIn { from { opacity: 0; transform: translateY(18px) scale(.985); } }
.ap-side { display: grid; place-items: center; padding: 40px 28px; }
.ap-box { width: min(400px, 100%); animation: apIn .5s var(--ease) both; }
.ap-title { font: 700 22px/1.2 var(--font-h); letter-spacing: -.03em; margin: 0 0 6px; }
.ap-sub { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.ap-sub b { color: var(--ink); }
.ap-google { width: 100%; margin-top: 30px; display: flex; align-items: center; justify-content: center; gap: 11px; padding: 14px; border-radius: 12px; border: 0; cursor: pointer;
  background: #26252D; color: var(--ink); font-weight: 600; font-size: 15px; box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 8px 20px -10px rgba(0,0,0,.8); transition: background .2s, transform .2s; }
.ap-google:hover { background: #2E2D36; transform: translateY(-1px); }
.ap-google .g-logo { width: 20px; height: 20px; }
.ap-ou { text-align: center; color: var(--muted); font-size: 13.5px; margin: 28px 0 10px; }
.ap-form { display: flex; flex-direction: column; gap: 4px; }
.ap-field { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.ap-field > span:first-child { font-size: 13.5px; color: var(--muted); }
.ap-field input { width: 100%; height: 50px; border-radius: 12px; border: 0; padding: 0 15px; background: #141318; color: var(--ink); font-size: 15px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), inset 0 2px 6px rgba(0,0,0,.45); outline: none; transition: box-shadow .2s; }
.ap-field input:focus { box-shadow: inset 0 0 0 1.5px var(--violet), 0 0 0 4px rgba(139,108,240,.15); }
.ap-pw { position: relative; display: block; }
.ap-pw input { padding-right: 46px; }
.ap-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.ap-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.ap-eye.on { color: var(--violet-deep); }
.ap-forgot { align-self: flex-end; margin-top: 14px; font-size: 13.5px; color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: rgba(255,255,255,.35); }
.ap-hint { font-size: 13.5px; color: var(--muted); margin: 14px 0 0; }
.ap-submit { margin-top: 26px; height: 52px; border: 0; border-radius: 12px; cursor: pointer; font: 600 15.5px var(--font-b); color: #fff;
  background: linear-gradient(135deg, #9A7DFF, #6B4EE6); box-shadow: 0 14px 34px -14px rgba(122,92,255,.9), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .2s, filter .2s; }
.ap-submit:hover { transform: translateY(-1px); filter: brightness(1.07); }
.ap-submit:disabled { opacity: .65; cursor: progress; }
.ap-submit.busy { background-size: 200% 100%; background-image: linear-gradient(110deg, #6B4EE6 30%, #A78BFF 50%, #6B4EE6 70%); animation: apBusy 1.1s linear infinite; }
@keyframes apBusy { to { background-position: -200% 0; } }
.ap-msg { min-height: 20px; margin: 14px 0 0; font-size: 13.5px; color: var(--bad); text-align: center; }
.ap-msg:empty { min-height: 0; margin: 0; }
.ap-msg.ok { color: var(--ok); }
.ap-legal { margin: 22px 0 0; text-align: center; font-size: 13px; color: var(--muted); line-height: 1.6; }
.ap-legal a, .ap-foot a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255,255,255,.35); }
.ap-foot { margin: 24px 0 0; text-align: center; font-size: 14px; }
.ap-otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 26px; }
.ap-otp input { height: 60px; border: 0; border-radius: 12px; text-align: center; font: 700 24px var(--font-m); color: var(--ink); background: #141318;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), inset 0 2px 6px rgba(0,0,0,.45); outline: none; transition: box-shadow .2s, transform .2s; }
.ap-otp input:focus { box-shadow: inset 0 0 0 1.5px var(--violet), 0 0 0 4px rgba(139,108,240,.15); transform: translateY(-2px); }
.ap-resend { margin: 16px 0 0; text-align: center; font-size: 13.5px; color: var(--muted); }
.ap-resend button { border: 0; background: none; padding: 0; color: var(--violet-deep); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ap-resend button:disabled { color: var(--muted); cursor: default; text-decoration: none; }

/* panneau de droite : points + halo violet qui respire */
.ap-show { position: relative; overflow: hidden; border-radius: 24px; padding: 56px 48px 40px; background-color: #121117;
  background-image: radial-gradient(rgba(185,166,255,.20) 1px, transparent 1.2px); background-size: 7px 7px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
.ap-show::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 80% at 50% 0%, transparent 40%, #121117 85%); }
.ap-glow { position: absolute; width: 640px; height: 640px; left: 50%; top: 42%; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(139,108,240,.42), rgba(139,108,240,.10) 45%, transparent 70%); filter: blur(10px); animation: apGlow 9s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes apGlow { 0%, 100% { transform: translate(-6%, -4%) scale(.92); opacity: .75; } 50% { transform: translate(8%, 6%) scale(1.08); opacity: 1; } }
.ap-show > *:not(.ap-glow) { position: relative; z-index: 1; }
.ap-show > .ap-toast { position: absolute; z-index: 2; }
.ap-h { font: 800 46px/1.04 var(--font-h); letter-spacing: -.05em; margin: 0; }
.ap-h span { display: block; animation: apUp .8s var(--ease) both; }
.ap-h span + span { animation-delay: .12s; background: linear-gradient(90deg, #EEECF6, #B9A6FF 60%, #EEECF6); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: apUp .8s var(--ease) .12s both, apShine 6s linear 1s infinite; }
@keyframes apUp { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } }
@keyframes apShine { to { background-position: -200% 0; } }
.ap-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.ap-show:not(.ap-show-essai) { padding-bottom: 100px; }
.ap-tile { padding: 16px 20px; border-radius: 18px; background: rgba(30,29,37,.82); backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), 0 18px 40px -24px rgba(0,0,0,.9);
  animation: apUp .7s var(--ease) both; animation-delay: calc(.25s + var(--i) * .09s); transition: transform .35s var(--ease), box-shadow .35s; }
.ap-tile:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(185,166,255,.35), 0 24px 50px -24px rgba(122,92,255,.7); }
.ap-ico { height: 28px; display: flex; align-items: center; color: var(--violet-deep); margin-bottom: 10px; }
.ap-ico > svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ap-tile:nth-child(odd) .ap-ico { animation: apBob 5s ease-in-out infinite; } .ap-tile:nth-child(even) .ap-ico { animation: apBob 5s ease-in-out -2.5s infinite; }
@keyframes apBob { 50% { transform: translateY(-3px) rotate(-4deg); } }
.ap-mk { display: inline-block; width: 26px; height: 26px; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; background: currentColor; }
.ap-mk.gm { background: linear-gradient(135deg, #EA4335, #FBBC05 50%, #34A853 75%, #4285F4); }
.ap-mk.ig { background: linear-gradient(135deg, #F58529, #DD2A7B 55%, #8134AF); }
.ap-mk.tt { background: #fff; filter: drop-shadow(1.3px 0 0 #FE2C55) drop-shadow(-1.3px 0 0 #25F4EE); }
.ap-duo { display: inline-flex; gap: 8px; }
.ap-tile b { display: block; font: 700 21px var(--font-m); letter-spacing: .02em; }
.ap-tile small { display: block; color: var(--muted); font-size: 14px; margin-top: 3px; line-height: 1.35; }
.ap-toast { position: absolute; right: 30px; bottom: 26px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: rgba(36,34,44,.92);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 20px 40px -18px rgba(0,0,0,.9); animation: apToast 7s var(--ease) 1.6s infinite both; }
.ap-toast b { display: block; font-size: 13px; } .ap-toast small { color: var(--muted); font-size: 12px; }
.ap-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(79,211,138,.6); animation: apPing 1.8s ease-out infinite; }
@keyframes apPing { to { box-shadow: 0 0 0 10px rgba(79,211,138,0); } }
@keyframes apToast { 0% { opacity: 0; transform: translateY(16px) scale(.96); } 8%, 72% { opacity: 1; transform: none; } 82%, 100% { opacity: 0; transform: translateY(-8px) scale(.98); } }

/* panneau « essai » : fondateurs + collabs d'exemple qui défilent */
.ap-trust { display: flex; align-items: center; gap: 12px; margin: 18px 0 0; color: var(--muted); font-size: 14.5px; animation: apUp .8s var(--ease) .25s both; }
.ap-faces { display: inline-flex; flex: none; }
.ap-faces img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #121117; }
.ap-faces img + img { margin-left: -10px; }
.ap-feed { position: relative; height: 420px; margin-top: 34px; overflow: hidden; -webkit-mask: linear-gradient(transparent, #000 14%, #000 82%, transparent); mask: linear-gradient(transparent, #000 14%, #000 82%, transparent); }
.ap-feed-in { display: flex; flex-direction: column; gap: 14px; animation: apFeed 30s linear infinite; }
.ap-feed:hover .ap-feed-in { animation-play-state: paused; }
@keyframes apFeed { to { transform: translateY(calc(-50% - 7px)); } }
.ap-scene { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 18px; background: rgba(30,29,37,.85);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.ap-av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--font-h); color: #1B1730; background: var(--c); }
.ap-scene b { display: block; font-size: 15px; } .ap-scene small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; line-height: 1.4; }
.ap-scene em { font-style: normal; font-size: 12px; font-weight: 600; white-space: nowrap; padding: 5px 10px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.ap-note { margin: 12px 0 0; font-size: 11.5px; color: rgba(152,149,166,.7); }

@media (max-width: 980px) {
  .ap-frame { grid-template-columns: 1fr; min-height: 0; }
  .ap-show { display: none; }
  .ap-side { padding: 36px 18px; }
}
@media (max-width: 520px) { .ap { padding: 18px 12px; } .ap-frame { border-radius: 26px; padding: 8px; } .ap-otp { gap: 7px; } .ap-otp input { height: 52px; font-size: 21px; } }
@media (prefers-reduced-motion: reduce) {
  .ap-frame, .ap-box, .ap-h span, .ap-tile, .ap-trust, .ap-glow, .ap-ico, .ap-toast, .ap-dot, .ap-feed-in, .ap-submit.busy { animation: none !important; }
}
