/* Thème aligné sur le JARVIS Feel You (Hostinger) : bleu nuit, cyan, cartes à coins lumineux, titres Georgia. */
:root {
  --bg: #03080d;
  --card: rgba(6, 22, 31, 0.9);
  --ink: #e9fdff;
  --muted: #77a5ad;
  --line: rgba(40, 229, 240, 0.22);
  --accent: #28e5f0;
  --green: #46f4b1;
  --amber: #ffc861;
  --red: #ff6b7a;
  --radius: 10px;
  --shadow: 0 0 0 1px rgba(40, 229, 240, 0.08), 0 18px 50px rgba(0, 0, 0, 0.38);
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; scrollbar-color: rgba(40,229,240,.45) transparent; }
html, body { height: 100%; margin: 0; }
body {
  font: 14px/1.5 "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 67% 18%, rgba(0,193,220,.12), transparent 30rem),
    linear-gradient(rgba(39,223,237,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39,223,237,.025) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 28px 28px, 28px 28px, auto;
}
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--serif); color: #f0feff; margin: 0; font-weight: 600; }
h1 { font-size: 1.9rem; text-shadow: 0 0 26px rgba(40,229,240,.18); }
h2 { font-size: 1.15rem; }
h3 { font-size: .95rem; }
button, input, textarea, select { font: inherit; color: inherit; }
button {
  background: rgba(40,229,240,.06); border: 1px solid rgba(40,229,240,.45); border-radius: var(--radius);
  padding: .45rem .9rem; cursor: pointer;
}
button:hover { border-color: var(--accent); box-shadow: 0 0 18px rgba(40,229,240,.16); }
button.primary { color: #001116; background: linear-gradient(135deg, #74f8ff, #15c7dc); border-color: transparent;
  box-shadow: 0 0 18px rgba(40,229,240,.28); font-weight: 600; }
button.secondary { background: transparent; border-color: var(--line); }
button.link { background: none; border: none; color: var(--muted); padding: .2rem .3rem; box-shadow: none; }
button.link:hover { color: var(--ink); }
button.danger { color: #ff9ca8; border-color: rgba(255,88,110,.42); background: rgba(117,14,35,.18); }
button:disabled { opacity: .5; cursor: wait; }
input, textarea, select {
  background: rgba(3,14,21,.88); border: 1px solid rgba(40,229,240,.25); border-radius: var(--radius);
  padding: .5rem .7rem; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 1px solid var(--accent); box-shadow: 0 0 0 3px rgba(40,229,240,.09); }
input::placeholder, textarea::placeholder { color: #547780; }
.muted { color: var(--muted); }
.error { color: var(--red); min-height: 1.2em; }
.mono { font-family: Consolas, monospace; font-size: 12px; }
.row { display: flex; gap: .5rem; align-items: center; }
.row.wrap, .wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: grid; gap: .5rem; }
.check { display: flex; gap: .4rem; align-items: center; color: var(--muted); }
.check input { width: auto; }
.small { font-size: 12px; margin: 0; }
.small-btn { padding: .2rem .55rem; }
.eyebrow { color: var(--accent); letter-spacing: .24em; font-size: 11px; font-weight: 700; margin: 0 0 .3rem; }
.badge { color: #031015; background: var(--accent); border-radius: 999px; padding: 0 .45rem; font-size: 11px;
  font-weight: 700; box-shadow: 0 0 12px rgba(40,229,240,.55); }

/* Réacteur (logo) */
.reactor, .mark {
  display: inline-block; border-radius: 50%; position: relative; flex: none;
  background: radial-gradient(circle, #dfffff 0 7%, #28e5f0 8% 15%, #063b4d 16% 28%, #28e5f0 29% 32%, #06141d 33% 48%, #1bbbd1 49% 54%, #061018 55%);
  border: 1px solid rgba(125,248,255,.82);
  box-shadow: 0 0 8px #28e5f0, 0 0 28px rgba(40,229,240,.55), inset 0 0 18px rgba(40,229,240,.48);
}
.reactor { width: 84px; height: 84px; margin: 0 auto 1rem; }
.mark { width: 38px; height: 38px; }
.mark::before, .reactor::before { content: ""; position: absolute; inset: -7px; border-radius: 50%;
  border: 1px dashed rgba(40,229,240,.68); animation: spin 16s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Connexion */
.login { min-height: 100%; display: grid; place-items: center; padding: 1rem; }
.login-card { width: min(360px, 100%); text-align: center; display: grid; gap: .8rem; padding: 2rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.login-card h1 { letter-spacing: .3em; color: var(--accent); font-size: 1.5rem; }

/* Structure en trois zones */
.shell { display: grid; grid-template-columns: 280px minmax(0, 1fr) 360px; height: 100vh; }
.shell.no-settings { grid-template-columns: 280px minmax(0, 1fr); }
.shell.no-settings .panel { display: none; }

.sidebar { display: flex; flex-direction: column; gap: .7rem; padding: 1rem .8rem; min-height: 0;
  background: linear-gradient(180deg, rgba(3,13,20,.98), rgba(2,8,13,.98)); border-right: 1px solid rgba(40,229,240,.26); }
.brand { display: flex; gap: .7rem; align-items: center; padding: .2rem .4rem 1rem; border-bottom: 1px solid rgba(40,229,240,.14); }
.brand b { display: block; letter-spacing: .12em; font-size: 1.05rem; text-shadow: 0 0 18px rgba(40,229,240,.35); }
.brand span:not(.mark) { color: var(--accent); letter-spacing: .24em; font-size: 10px; font-weight: 700; }
.nav { display: grid; gap: .3rem; }
.nav button { display: flex; align-items: center; gap: .6rem; text-align: left; color: #8fb7bd; background: transparent;
  border: 1px solid transparent; padding: .6rem .8rem; box-shadow: none; }
.nav button i { font-style: normal; width: 1.1rem; text-align: center; }
.nav button .badge { margin-left: auto; }
.nav button:hover { color: #c9fbff; background: rgba(40,229,240,.06); border-color: rgba(40,229,240,.16); }
.nav button.active { color: #f2feff; background: linear-gradient(90deg, rgba(11,71,84,.96), rgba(5,30,40,.94));
  border-color: rgba(64,235,244,.62); box-shadow: inset 3px 0 0 #28e5ef, 0 0 22px rgba(40,229,240,.12); font-weight: 600; }
.side-title { color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: .6rem .4rem 0; }
.side-title button { font-size: 1.1rem; color: var(--accent); }
.conversations { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: .15rem; }
.conversations button { text-align: left; background: none; border: 1px solid transparent; font-size: 13px; color: #9fc3c8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: .35rem .6rem; box-shadow: none; }
.conversations button.active { border-color: var(--line); background: rgba(40,229,240,.08); color: var(--ink); }
.status { font-size: 11px; color: var(--muted); display: grid; gap: .15rem; padding: .6rem;
  background: rgba(40,229,240,.045); border: 1px solid rgba(40,229,240,.16); border-radius: var(--radius); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: .35rem; background: var(--muted); }
.dot.ok { background: var(--green); } .dot.ko { background: var(--red); }
.user-box { padding: .5rem .6rem; border-top: 1px solid rgba(40,229,240,.14); }
.user-box small { display: block; color: var(--muted); font-size: 11px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.topbar { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .7rem 1.4rem;
  background: rgba(3,12,18,.76); border-bottom: 1px solid rgba(40,229,240,.18); }
.search-wrap { position: relative; flex: 1; max-width: 560px; margin: 0 auto; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20; max-height: 60vh; overflow-y: auto;
  background: linear-gradient(145deg, #071b25, #030b11); border: 1px solid rgba(40,229,240,.45); border-radius: var(--radius);
  box-shadow: 0 0 46px rgba(0,198,222,.15), 0 28px 90px #000; padding: .5rem; display: grid; gap: .2rem; }
.search-results h4 { margin: .5rem .4rem .2rem; color: var(--accent); font-size: 11px; letter-spacing: .14em; }
.search-results button { text-align: left; background: none; border: 1px solid transparent; box-shadow: none; padding: .4rem .5rem; }
.search-results button:hover { border-color: var(--line); background: rgba(40,229,240,.06); }
.search-results small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.view { flex: 1; min-height: 0; overflow-y: auto; }
.page { padding: 1.6rem 2.2rem 2.4rem; display: grid; gap: 1.2rem; align-content: start; position: relative; }
.page::before { content: "JARVIS // OPERATIONAL INTERFACE"; position: absolute; top: 14px; right: 28px;
  color: rgba(40,229,240,.28); font: 600 10px/1 monospace; letter-spacing: .18em; pointer-events: none; }
.hero { position: relative; padding-top: .6rem; }
.hero .muted { margin: .3rem 0 0; }

/* Cartes à coins lumineux */
.quick, .stat, .panel-card, .card, .column, .modal {
  background: linear-gradient(145deg, rgba(8,27,37,.92), rgba(3,13,20,.9)); border: 1px solid rgba(40,229,240,.22);
  border-radius: var(--radius); box-shadow: var(--shadow); position: relative;
}
.quick::before, .stat::before, .panel-card::before, .column::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(135deg, rgba(40,229,240,.7) 0 2px, transparent 2px) top left/22px 22px no-repeat,
              linear-gradient(315deg, rgba(40,229,240,.5) 0 2px, transparent 2px) bottom right/18px 18px no-repeat;
}
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }
.quick { display: flex; align-items: center; gap: .8rem; text-align: left; padding: 1rem 1.1rem; color: var(--ink); }
.quick:hover { border-color: rgba(40,229,240,.55); }
.quick b { display: block; font-size: 14px; }
.quick small { color: var(--muted); font-size: 12px; }
.quick > span:nth-child(2) { flex: 1; }
.quick-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; color: var(--accent);
  border: 1px solid var(--line); background: rgba(40,229,240,.08); font-size: 1.1rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.stat { padding: 1rem 1.1rem; text-align: left; color: var(--ink); cursor: pointer; }
.stat:hover { border-color: rgba(40,229,240,.55); }
.stat .label { color: #cfeff2; font-size: 11px; letter-spacing: .14em; font-weight: 700; }
.stat .value { font-family: var(--serif); font-size: 1.9rem; margin: .3rem 0 .1rem; }
.stat small { color: var(--muted); }
.two-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .8rem; }
.panel-card { padding: 1rem 1.2rem; display: grid; gap: .6rem; align-content: start; }
.panel-card h2 { padding-bottom: .5rem; border-bottom: 1px solid rgba(40,229,240,.16); }
.line-item { display: flex; gap: .7rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid rgba(40,229,240,.08);
  background: none; border-top: none; border-left: none; border-right: none; border-radius: 0; text-align: left; box-shadow: none; width: 100%; }
.line-item:last-child { border-bottom: none; }
.line-item .time { color: var(--accent); font-weight: 700; min-width: 3.2rem; }
.line-item small { display: block; color: var(--muted); }
.line-item > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; }

/* Conversation */
.chat { display: flex; flex-direction: column; overflow: hidden; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1.4rem;
  border-bottom: 1px solid var(--line); gap: 1rem; }
.chat-head h2 { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mode { display: flex; gap: .4rem; align-items: center; color: var(--muted); font-size: 13px; white-space: nowrap; }
.mode input { width: auto; }
.messages { flex: 1; overflow-y: auto; padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: .9rem; }
.msg { max-width: 78%; padding: .7rem 1rem; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: rgba(40,229,240,.12); border: 1px solid var(--line); }
.msg.assistant { align-self: flex-start; background: var(--card); border: 1px solid rgba(40,229,240,.3); }
.msg.note { align-self: center; font-size: 13px; color: var(--muted); border: 1px dashed var(--line); }
.msg .route { display: block; margin-top: .4rem; font-size: 11px; color: var(--muted); }
.msg .play { padding: 0 .4rem; margin-right: .4rem; font-size: 10px; border-color: var(--line); background: none; }
.msg.thinking { color: var(--muted); font-style: italic; }
.msg .rich { white-space: normal; }
.msg .rich p { margin: 0 0 .5rem; } .msg .rich p:last-child { margin-bottom: 0; }
.msg .rich ul { margin: 0 0 .5rem; padding-left: 1.2rem; }
.msg .rich code { font-family: Consolas, monospace; background: rgba(40,229,240,.1); padding: 0 .25rem; border-radius: 4px; }
.msg .rich strong { color: var(--accent); font-weight: 600; }
.composer { display: flex; gap: .6rem; padding: .9rem 1.4rem; border-top: 1px solid var(--line); }
.composer textarea { resize: none; }
#mic { font-size: 1.2rem; min-width: 3.2rem; }
#mic.recording { border-color: var(--red); background: rgba(255,107,122,.2); color: var(--red); animation: pulse-mic 1s ease-in-out infinite; }
@keyframes pulse-mic { 50% { box-shadow: 0 0 16px rgba(255,107,122,.7); } }

.brief-banner { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap;
  margin: .8rem 1.4rem 0; padding: .6rem .9rem; border: 1px solid var(--amber); border-radius: var(--radius); background: rgba(255,200,97,.08); }
.brief-banner button { padding: .25rem .7rem; font-size: 13px; }

/* Tableau Emails */
.board { display: grid; grid-template-columns: repeat(4, minmax(210px, 1fr)); gap: .8rem; align-items: start; }
.column { padding: .7rem; display: grid; gap: .55rem; align-content: start; min-height: 180px; }
.column h3 { display: flex; justify-content: space-between; align-items: center; padding: .1rem .2rem .45rem;
  border-bottom: 1px solid rgba(40,229,240,.16); }
.count { color: var(--accent); font-family: "Segoe UI", Arial, sans-serif; font-size: 12px; }
.column-body { display: grid; gap: .5rem; }
.mail-card { display: grid; gap: .2rem; text-align: left; padding: .6rem .7rem; background: rgba(3,14,21,.85);
  border: 1px solid rgba(40,229,240,.16); border-radius: 8px; box-shadow: none; }
.mail-card:hover { border-color: rgba(40,229,240,.55); }
.mail-card.unread b { color: #f4feff; }
.mail-card b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-card .subj { font-size: 13px; color: #cfeff2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-card small { color: var(--muted); font-size: 11px; }
.mail-card .tag-line { display: flex; gap: .3rem; flex-wrap: wrap; }
.proposal { border-top: 1px dashed rgba(40,229,240,.25); margin-top: .3rem; padding-top: .35rem; display: grid; gap: .3rem; }
.proposal .what { color: var(--amber); font-size: 12px; font-weight: 600; }
.proposal .actions button { padding: .15rem .55rem; font-size: 12px; }
.mail-card .quick { gap: .3rem; flex-wrap: wrap; margin-top: .25rem; }
.mail-card .quick button { padding: .12rem .45rem; font-size: 11px; }
.empty-col { color: #547780; font-size: 12px; text-align: center; padding: 1rem .3rem; }

.modal-back { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 1rem;
  background: rgba(0,5,9,.82); backdrop-filter: blur(10px); }
.modal { width: min(760px, 100%); max-height: 88vh; overflow-y: auto; padding: 1.4rem 1.6rem; display: grid; gap: .7rem;
  border-color: rgba(40,229,240,.55); }
.close { position: absolute; top: .8rem; right: .8rem; width: 2rem; height: 2rem; padding: 0; border-radius: 50%; }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; color: #cfeff2; max-height: 34vh; overflow-y: auto;
  padding: .7rem .8rem; border: 1px solid rgba(40,229,240,.12); border-radius: 8px; background: rgba(3,14,21,.6); }
.suggestion, .summary { padding: .6rem .8rem; border-radius: 8px; font-size: 13px; }
.suggestion { border: 1px solid rgba(255,200,97,.45); background: rgba(255,200,97,.07); }
.summary { border: 1px solid rgba(40,229,240,.3); background: rgba(40,229,240,.06); }

/* Panneau de paramètres */
.panel { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: rgba(2,8,13,.72); }
.tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1 1 auto; border: none; border-radius: 0; background: none; font-size: 12px; padding: .7rem .4rem; box-shadow: none; }
.tabs button.active { box-shadow: inset 0 -2px 0 var(--accent); color: var(--accent); }
.tab { padding: .9rem; overflow-y: auto; display: grid; gap: .7rem; align-content: start; flex: 1; }
.list { display: grid; gap: .5rem; }
.card { padding: .7rem .8rem; display: grid; gap: .4rem; }
.card.pending { border-color: var(--amber); }
.card > b { white-space: pre-wrap; }
.card .meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: .5rem; }
.card .actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.card .actions button { padding: .25rem .6rem; font-size: 13px; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 0 .45rem; color: #a8f8fc; background: rgba(40,229,240,.09); font-size: 11px; }
.tag.confirme { border-color: var(--green); color: var(--green); }
.tag.deduit, .tag.warn { border-color: var(--amber); color: var(--amber); }
.level-3, .level-4 { color: var(--red); }
.add-memory summary { cursor: pointer; color: var(--accent); }
.snippet { font-size: 13px; opacity: .9; white-space: pre-wrap; max-height: 9em; overflow: hidden; }
.path { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.plus { width: 2.2rem; height: 2.2rem; padding: 0; border-radius: 50%; font-size: 1.2rem; line-height: 1; }
button.link.small { justify-self: start; text-decoration: underline; }

/* Écrans plus étroits : le panneau de paramètres passe en surimpression */
@media (max-width: 1250px) {
  .shell, .shell.no-settings { grid-template-columns: 260px minmax(0, 1fr); }
  .shell .panel { position: fixed; right: 0; top: 0; bottom: 0; width: min(380px, 92vw); z-index: 40; box-shadow: -20px 0 60px #000; }
  .shell.no-settings .panel { display: none; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell, .shell.no-settings { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); overflow-x: hidden; }
  /* Téléphone : une barre compacte (logo, espace courant, « ☰ Menu ») qui déroule toute la navigation. */
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; padding: .45rem .6rem; gap: .4rem .6rem;
    min-width: 0; position: relative; z-index: 40; }
  .brand { border: none; padding: 0; } .brand div { display: none; } .mark { width: 30px; height: 30px; }
  .menu-current { display: block; flex: 1 1 auto; min-width: 0; font-weight: 600; color: #e9fdff; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; }
  .menu-toggle { display: inline-flex; flex: 0 0 auto; padding: .4rem .7rem; }
  .sidebar .nav, .side-title, .conversations, .status, .user-box { display: none; }
  .sidebar.open { max-height: 100vh; overflow-y: auto; padding-bottom: .8rem;
    box-shadow: 0 18px 40px rgba(0,0,0,.6); }
  .sidebar.open .nav { display: grid; flex: 1 1 100%; gap: .25rem; }
  .sidebar.open .nav button { padding: .6rem .7rem; }
  .sidebar.open .side-title { display: flex; flex: 1 1 100%; margin-top: .4rem; }
  .sidebar.open .conversations { display: grid; flex: 1 1 100%; max-height: 30vh; overflow-y: auto; }
  .sidebar.open .user-box { display: flex; flex: 1 1 100%; }
  .topbar { padding: .5rem .6rem; gap: .5rem; }
  .search-wrap { min-width: 0; }
  #settings-toggle .label { display: none; }
  .chat-head { flex-wrap: wrap; padding: .6rem .8rem; }
  .messages, .composer { padding-left: .8rem; padding-right: .8rem; }
  .composer { gap: .4rem; align-items: stretch; }
  .composer textarea { flex: 1 1 auto; min-width: 0; width: auto; }
  .composer button { flex: 0 0 auto; padding: .5rem .65rem; }
  .page { padding: 1rem; } .page::before { display: none; }
  .board { grid-template-columns: 1fr; }
  .msg { max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) { .mark::before, .reactor::before { animation: none; } }

.draft-bar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.draft-title { font-weight: 600; }
.draft-bar input { flex: 1 1 220px; min-width: 0; }

.pj { color: var(--accent); font-size: 12px; }
.attachments { display: grid; gap: .4rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 8px; }
.attachments h4 { margin: 0; font: 600 11px/1.4 "Segoe UI", Arial, sans-serif; letter-spacing: .12em; color: var(--muted); }
.attachment { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.attachment .name { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.attachment.blocked .name { color: var(--red); }
.attachment button, .file-result button { padding: .25rem .55rem; font-size: 12px; }
.file-result { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; padding: .35rem .5rem; }
.file-result .name { flex: 1 1 200px; min-width: 0; display: grid; overflow-wrap: anywhere; }
.print-dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink);
  box-shadow: var(--shadow); width: min(420px, calc(100vw - 32px)); padding: 1.1rem; }
.print-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.print-dialog h3 { font-family: var(--serif); margin: .2rem 0 .8rem; overflow-wrap: anywhere; }
.print-dialog form { display: grid; gap: .7rem; }

/* -- activation d'une invitation ------------------------------------------------------------- */
.activation-card { max-width: 440px; }
.activation-card img { display: block; margin: .3rem auto; border-radius: 8px; background: #fff; padding: 6px;
  width: 200px; height: 200px; }
.act-steps { margin: .2rem 0; padding-left: 1.2rem; text-align: left; color: var(--muted); font-size: 13px; }
.activation-card code { overflow-wrap: anywhere; color: var(--accent); }

/* -- liste de tâches -------------------------------------------------------------------------- */
.task-form { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0 1rem; }
.task-form select, .task-form input, .task-form button { width: auto; flex: 0 1 auto; }
.task-form #task-title { flex: 1 1 260px; min-width: 0; }
.tasks-list { display: grid; gap: .45rem; }
.task-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .55rem .7rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.task-row .task-main { flex: 1 1 220px; min-width: 0; display: grid; overflow-wrap: anywhere; }
.task-row select, .task-row input[type="date"] { font-size: 12px; padding: .25rem .4rem; width: auto; flex: 0 0 auto; }
.task-row.done .task-main b { text-decoration: line-through; color: var(--muted); }
.task-row.overdue { border-color: rgba(255,107,122,.55); }
.task-check { font-size: 18px; line-height: 1; padding: .2rem .4rem; background: transparent; border-color: var(--line); }
.prio { font-size: 11px; }
.prio-urgent { color: var(--red); }
.prio-normale { color: var(--accent); }
.prio-pas-urgent { color: var(--muted); }

/* -- utilisateurs ----------------------------------------------------------------------------- */
.module-checks { display: flex; flex-wrap: wrap; gap: .3rem .8rem; }
.module-checks .check { font-size: 12px; }
.user-card { display: grid; gap: .45rem; }
.user-card.inactive { opacity: .6; }
.user-card input[type="number"], #user-budget-input { width: 6rem; flex: 0 0 auto; }
.module-checks input { width: auto; }
#invite-result { display: grid; gap: .5rem; margin-top: .6rem; }
#invite-result input { width: 100%; font-size: 12px; }
.user-box small { display: block; }

@media (max-width: 760px) {
  .task-row select, .task-row input[type="date"] { flex: 1 1 30%; }
}

/* -- Feel You : consultations, idées, projets, contenus, archives ----------------------------------- */
.fy-heading { margin-bottom: 1rem; gap: 1rem; }
.fy-heading h1 { margin: .1rem 0; }
.fy-heading p.muted { margin: 0; }
.pill { display: inline-flex; align-items: center; padding: .12rem .55rem; border-radius: 999px; font-size: 11px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap; width: fit-content; }
.pill.green { color: var(--green); border-color: rgba(70,244,177,.45); }
.pill.orange { color: var(--amber); border-color: rgba(255,200,97,.45); }
.pill.red { color: var(--red); border-color: rgba(255,107,122,.45); }
.pill.cyan { color: var(--accent); border-color: rgba(40,229,240,.5); }
.pill.purple { color: #c9a7ff; border-color: rgba(201,167,255,.45); }
.pill.coral { color: #ff9f86; border-color: rgba(255,159,134,.45); }
.fy-tabs { display: flex; gap: .4rem; margin-bottom: .8rem; flex-wrap: wrap; }
.fy-tabs button.active { border-color: var(--accent); color: var(--accent); }
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; margin-bottom: .9rem; }
.pipeline div { display: grid; text-align: center; padding: .6rem; border: 1px solid var(--line); border-radius: var(--radius); }
.pipeline b { font: 600 22px/1.2 var(--serif); color: var(--accent); }
.pipeline span { font-size: 12px; color: var(--muted); }
.fy-list { display: grid; gap: .6rem; }
.fy-card { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem .9rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--card); flex-wrap: wrap; }
.fy-card .grow { flex: 1 1 260px; min-width: 0; display: grid; gap: .25rem; overflow-wrap: anywhere; }
.fy-card h3 { margin: 0; font-family: var(--serif); }
.fy-card p { margin: 0; color: #cfeff2; font-size: 13px; }
.fy-side { display: grid; gap: .4rem; justify-items: end; flex: 0 1 auto; max-width: 100%; }
.row.end { justify-content: flex-end; }
.fy-side select { width: auto; font-size: 12px; padding: .25rem .4rem; }
.fy-card button, .fy-tile button { padding: .3rem .6rem; font-size: 12px; }
.avatar { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; flex: 0 0 42px;
  color: #001116; background: linear-gradient(135deg, #74f8ff, #15c7dc); }
.avatar.a1 { background: linear-gradient(135deg, #c9a7ff, #7d5cff); }
.avatar.a2 { background: linear-gradient(135deg, #ffc861, #ff8a5c); }
.saved-audio { width: 100%; max-width: 420px; height: 34px; margin-top: .3rem; }
.fy-board { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: .7rem; align-items: start; overflow-x: auto; }
.fy-column { display: grid; gap: .55rem; align-content: start; }
.fy-column h3 { display: flex; justify-content: space-between; margin: 0; padding-bottom: .35rem; border-bottom: 1px solid var(--line); }
@media (max-width: 1100px) { .fy-board { grid-template-columns: repeat(5, minmax(220px, 80vw)); } }
.fy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .7rem; }
.fy-tile { display: grid; gap: .45rem; align-content: start; padding: .9rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--card); overflow-wrap: anywhere; }
.fy-tile h3 { margin: 0; font-family: var(--serif); }
.fy-tile p { margin: 0; font-size: 13px; color: #cfeff2; }
.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.project-icon { color: var(--accent); font-size: 20px; }
.cover { height: 70px; border-radius: 8px; display: grid; place-items: center; font: 700 20px/1 var(--serif); color: #001116;
  background: linear-gradient(135deg, #74f8ff, #15c7dc); }
.cover.c1 { background: linear-gradient(135deg, #c9a7ff, #7d5cff); }
.cover.c2 { background: linear-gradient(135deg, #ffc861, #ff8a5c); }
.cover.c3 { background: linear-gradient(135deg, #46f4b1, #10a37f); }
.fy-modal-body { display: grid; gap: .7rem; }
.fy-modal-body h2 { margin: 0; font-family: var(--serif); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.wide { width: 100%; }
.recorder { display: grid; gap: .6rem; padding: .8rem; border: 1px dashed rgba(40,229,240,.45); border-radius: var(--radius); }
.recorder.recording { border-color: var(--red); }
.recorder audio { width: 100%; }
.rec-clock { font: 600 20px/1 var(--serif); color: var(--accent); }
.recorder.recording .rec-clock { color: var(--red); }
.record-start { color: #fff; background: linear-gradient(135deg, #ff6b7a, #d93a52); border-color: transparent; }
.recorder-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; display: flex; gap: .6rem;
  align-items: center; padding: .55rem .9rem; border: 1px solid var(--red); border-radius: 999px; background: #120a10;
  box-shadow: var(--shadow); flex-wrap: wrap; max-width: calc(100vw - 32px); }
.recorder-bar button { padding: .25rem .6rem; font-size: 12px; }
.pulse { color: var(--red); animation: fy-pulse 1.2s infinite; }
@keyframes fy-pulse { 50% { opacity: .25; } }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 70; padding: .6rem .9rem; border-radius: var(--radius);
  background: #062019; border: 1px solid var(--green); color: var(--green); box-shadow: var(--shadow); max-width: calc(100vw - 36px); }
.ai-orb { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: #001116;
  background: radial-gradient(circle, #b9fdff, #15c7dc); box-shadow: 0 0 30px rgba(40,229,240,.45); }
.analysis-box { display: grid; gap: .3rem; padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius); }
.analysis-box p, .analysis-box ul { margin: 0 0 .4rem; }
.analysis-choices { display: grid; gap: .3rem; }
.score-card { display: flex; gap: 1rem; align-items: center; }
.score-card strong { font: 700 40px/1 var(--serif); color: var(--accent); }
.score-card small { font-size: 14px; color: var(--muted); }
.storage { display: grid; gap: .5rem; margin-bottom: 1rem; padding: 1rem; }
.storage h2 { margin: 0; }
@media (max-width: 760px) {
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
  .fy-side { justify-items: start; }
  .row.end { justify-content: flex-start; }
}

/* Bureau : pas de bouton de menu (la navigation est toujours visible à gauche). */
@media (min-width: 761px) { .menu-toggle, .menu-current { display: none; } }

.home-brief { display: grid; gap: .5rem; padding: 1rem 1.1rem; margin-bottom: 1rem; border-color: rgba(255,200,97,.45); }
.home-brief h2 { margin: 0; }
.home-brief p { margin: 0; }
.brief-text { white-space: pre-wrap; line-height: 1.6; }

/* Conversations : menu « ⋯ » (renommer, archiver, supprimer) */
.conv-item { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem; border: 1px solid transparent; border-radius: 8px; }
.conv-item.active { border-color: var(--line); background: rgba(40,229,240,.08); }
.conv-item .conv-open { flex: 1 1 0; min-width: 0; text-align: left; background: none; border: none; box-shadow: none;
  font-size: 13px; line-height: 1.35; color: #9fc3c8; padding: .35rem .5rem; overflow: hidden; white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.conv-item.active .conv-open { color: var(--ink); }
.conv-more { flex: 0 0 auto; background: none; border: 1px solid transparent; box-shadow: none; color: var(--accent);
  padding: .15rem .5rem; font-size: 18px; font-weight: 700; line-height: 1; border-radius: 6px; }
.conv-more:hover { border-color: var(--line); }
.conv-menu { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: .2rem; padding: .2rem .3rem .35rem;
  border-top: 1px solid var(--line); }
.conv-menu button { text-align: left; background: none; border: 1px solid var(--line); box-shadow: none; padding: .3rem .55rem;
  font-size: 12px; border-radius: 6px; }
.conv-menu button:hover { background: rgba(40,229,240,.08); }
.conv-menu .danger-text { color: #ff9ca8; }
.conv-switch { justify-self: start; font-size: 12px; margin-top: .3rem; }

/* Conversation ouverte : titre + actions en tête */
.chat-title-row { display: flex; align-items: center; gap: .6rem; min-width: 0; flex: 1 1 auto; flex-wrap: wrap; }
.chat-title-row h2 { min-width: 0; flex: 0 1 auto; cursor: default; }
.chat-actions { display: flex; gap: .3rem; flex-wrap: wrap; }
.chat-actions button { padding: .25rem .55rem; font-size: 12px; }

/* Documents joints à la conversation */
.doc-chips { display: flex; flex-wrap: wrap; gap: .35rem; padding: .5rem 1.4rem 0; }
.doc-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem; border: 1px solid var(--line);
  border-radius: 999px; font-size: 12px; color: #cfeff2; background: rgba(40,229,240,.06); max-width: 100%;
  overflow-wrap: anywhere; }
.doc-chip button { padding: 0 .2rem; font-size: 12px; }
.msg-docs { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
#view-conversation.dropping { outline: 2px dashed var(--accent); outline-offset: -8px; }
@media (max-width: 760px) { .doc-chips { padding: .4rem .8rem 0; } }

/* Liens dans les mails : site de destination visible, ouverture dans un nouvel onglet */
.mail-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }

/* Missions planifiées */
.missions-list { display: grid; gap: .8rem; }
.mission.paused { opacity: .65; }
.mission-instruction { color: #cfeff2; white-space: pre-wrap; margin: 0; }
.mission-result { overflow-wrap: anywhere; font-size: 13px; color: #cfeff2; max-height: 45vh;
  overflow-y: auto; padding: .7rem .8rem; border: 1px solid rgba(40,229,240,.12); border-radius: 8px; background: rgba(3,14,21,.6); }
.mission-form textarea { min-height: 7rem; }
#missions-form { margin-bottom: .8rem; }
.tag.expired { color: var(--amber); }
.rich a { color: var(--accent); }
#push-box { margin-bottom: .8rem; }
.mission .meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: 12px; color: var(--muted); }
.mission-form select, .mission-form input[type=number], .mission-form input[type=time] { width: auto; min-width: 5rem; }
/* En-tête du chat : titre et options passent à la ligne plutôt que de s'écraser ou déborder */
.chat-head { flex-wrap: wrap; gap: .4rem 1rem; }
.chat-head .chat-title-row { flex: 1 1 24rem; max-width: 100%; }
.chat-head .chat-title-row h2 { flex: 1 1 10rem; }
.chat-head > .row { flex-wrap: wrap; gap: .3rem .9rem; }

/* Dépenses IA */
.usage-bar { height: 8px; border-radius: 999px; background: rgba(40,229,240,.1); overflow: hidden; }
.usage-bar span { display: block; height: 100%; background: var(--accent); }
.usage-bar.warn span { background: var(--amber); }
.usage-bar.over span { background: var(--red); }
.usage-line { display: grid; grid-template-columns: 1fr 5rem auto; gap: .6rem; align-items: center; font-size: 13px; }
.usage-line:not(:has(.usage-mini)) { grid-template-columns: 1fr auto; }
.usage-mini { height: 6px; border-radius: 999px; background: rgba(40,229,240,.08); overflow: hidden; }
.usage-mini span { display: block; height: 100%; background: var(--accent); }

/* Paramètres : en-tête avec « Fermer », visible quand le panneau passe par-dessus la page (téléphone, tablette) */
.settings-head { display: none; }
@media (max-width: 1250px) {
  .shell .panel { z-index: 100; background: var(--bg); overflow-y: auto; }
  .settings-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem;
    padding: calc(.6rem + env(safe-area-inset-top)) .9rem .6rem; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; background: var(--bg); z-index: 1; }
}
@media (max-width: 760px) {
  .shell .panel { width: 100vw; }
}

/* Outils PDF */
.pdf-cols { align-items: start; }
.pdf-drop { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: .8rem; border: 1px dashed var(--line); border-radius: var(--radius); }
.pdf-drop.dropping { border-color: var(--accent); background: rgba(40,229,240,.06); }
.pdf-file, .pdf-export { gap: .6rem; padding: .4rem 0; border-bottom: 1px solid rgba(40,229,240,.08); font-size: 13px; flex-wrap: wrap; }
.pdf-export > span:first-child { min-width: 0; overflow-wrap: anywhere; }
a.button-link { display: inline-block; padding: .3rem .7rem; border: 1px solid rgba(40,229,240,.45); border-radius: var(--radius);
  color: var(--accent); text-decoration: none; font-size: 12px; }
a.button-link.secondary { border-color: var(--line); color: inherit; }
#pdf-pages-row input { flex: 1 1 auto; }
#pdf-pages-row select { width: auto; }

/* Compétences (ex. Gousse d'ail) */
.skill-select { width: auto; padding: .25rem .5rem; font-size: 13px; }
.skill-badge { font-size: 12px; padding: .15rem .6rem; border: 1px solid rgba(40,229,240,.4); border-radius: 999px; color: var(--accent); }

/* Tableaux dans les réponses (comparatifs de Jeanne Baré…) */
.table-wrap { overflow-x: auto; margin: .4rem 0 .6rem; }
.md-table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.md-table th, .md-table td { border: 1px solid rgba(40,229,240,.18); padding: .35rem .55rem; text-align: left; vertical-align: top; }
.md-table th { background: rgba(40,229,240,.08); color: var(--accent); font-weight: 600; }
/* PC : la liste des conversations garde toujours de la place (elle était écrasée à zéro quand le menu s'allonge) ;
   la colonne de gauche défile si l'écran est trop petit. */
@media (min-width: 761px) {
  .sidebar { overflow-y: auto; }
  .conversations { flex: 1 0 12rem; min-height: 12rem; }
}

/* Ma santé : cockpit */
.hs-body { gap: 1rem; }
.hs-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .7rem; }
.hs-tile { display: grid; gap: .25rem; align-content: start; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(3,14,21,.6); }
.hs-tile b { font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.hs-tile .pill { justify-self: start; }
.hs-start { border-color: rgba(40,229,240,.45); }
.hs-habit { padding: .3rem 0; }
.hs-periods { gap: .4rem; }
.hs-periods .active { color: var(--accent); }
.hs-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: .8rem; }
.hs-chart h3 { font-size: .95rem; }
.hs-plot { position: relative; }
.hs-svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.hs-grid { stroke: rgba(40,229,240,.10); stroke-width: 1; }
.hs-axis { fill: var(--muted); font-size: 11px; }
.hs-target { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.hs-band { fill: rgba(42,164,174,.12); }
.hs-cross { stroke: var(--muted); stroke-width: 1; }
.hs-dot { stroke: #071219; stroke-width: 2; }
.hs-tip { position: absolute; top: 0; transform: translateX(-50%); pointer-events: none; padding: .35rem .55rem; font-size: 12px;
  background: #0b1a22; border: 1px solid var(--line); border-radius: 8px; white-space: nowrap; z-index: 2; }
.hs-key { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: .35rem; vertical-align: middle; }
.hs-key.k0 { background: #2aa4ae; }
.hs-key.k1 { background: #cf7d3d; }
.hs-legend { display: flex; gap: 1rem; font-size: 12px; color: var(--muted); }
.hs-table { margin-top: .4rem; }
.hs-checkin { margin-bottom: .8rem; }
.hs-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
.hs-prev { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; align-items: center; padding: .4rem 0;
  border-bottom: 1px solid rgba(40,229,240,.08); font-size: 13px; }
.hs-prev input[type=date] { width: auto; }

/* Ma santé : tuiles cliquables pour noter */
.hs-click { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.hs-click:hover, .hs-click:focus-visible { border-color: var(--accent); box-shadow: 0 0 18px rgba(40,229,240,.14); outline: none; }
.hs-edit { color: var(--accent); }
.hs-hint { font-size: 10px; color: var(--muted); opacity: .7; }
@media (hover: hover) { .hs-hint { display: none; } }
@media (max-width: 760px) {
  .hs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .hs-tile { padding: .65rem .7rem; }
  .hs-tile b { font-size: 1.2rem; }
}

.hs-key-box { padding: .6rem .7rem; border: 1px dashed var(--accent); border-radius: var(--radius); }
.hs-key-box code, .hs-body code { overflow-wrap: anywhere; font-size: 12px; }

/* Coach : fil épinglé, objectifs, carnet */
.conversations button.conv-pinned { color: var(--ink); font-weight: 600; }
.hs-goal { display: grid; gap: .3rem; padding: .35rem 0; }
.hs-journal { padding: .35rem 0; border-bottom: 1px solid rgba(40,229,240,.08); }
.hs-journal p { margin: .15rem 0 0; color: #cfeff2; }

/* Business & Ventes */
.bz-tabs { display: flex; flex-wrap: wrap; gap: .3rem; border-bottom: 1px solid var(--line); margin: .8rem 0; }
.bz-tabs button { border: none; border-radius: 0; background: none; box-shadow: none; padding: .6rem .8rem; color: var(--muted); }
.bz-tabs button.active { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.bz-body { gap: 1rem; }
.bz-notice { padding: .6rem .9rem; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: .6rem; font-size: 13px; }
.bz-notice.green { border-color: rgba(70,244,177,.45); color: var(--green); }
.bz-notice.red { border-color: rgba(255,107,122,.45); color: var(--red); }
.bz-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.bz-stat { display: grid; gap: .15rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(3,14,21,.6); }
.bz-stat b { font-size: 1.25rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bz-periods { gap: .3rem; }
.bz-periods .active { color: var(--accent); }
.bz-goal { display: grid; gap: .45rem; }
.bz-goal-meta { gap: .3rem 1rem; }
.bz-bar { position: relative; height: 12px; border-radius: 999px; background: rgba(40,229,240,.1); margin: 1.1rem 0 .2rem; }
.bz-goal.compact .bz-bar { margin-top: 1.1rem; }
.bz-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--accent); }
.bz-fill.done { background: var(--green); }
.bz-tier { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--muted); transform: translateX(-1px); }
.bz-tier.ok { background: var(--green); }
.bz-tier small { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 10px;
  color: var(--muted); padding-bottom: 2px; }
.bz-tier:last-child small { transform: translateX(-90%); }
.bz-form input, .bz-form select { width: 100%; }
.bz-sale-form { max-width: 560px; }
.bz-sale-form input, .bz-sale-form select { font-size: 16px; padding: .6rem .7rem; }
.bz-confirm { max-width: 560px; border-color: rgba(70,244,177,.45); }
.bz-strong { border-top: 1px solid var(--line); padding-top: .35rem; }
.bz-product { gap: .5rem; padding: .3rem 0; border-bottom: 1px solid rgba(40,229,240,.08); align-items: center; }
.bz-product > span { flex: 1 1 12rem; }
.bz-price, .bz-pct { width: 7rem !important; }
.bz-envelopes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: .8rem; }
.bz-stats.small3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bz-stats.small3 b { font-size: 1rem; }
.bz-bad { color: var(--red); }
.bz-cancelled { opacity: .5; text-decoration: line-through; }
.bz-archived { opacity: .7; }
.bz-filters input, .bz-filters select { width: auto; min-width: 9rem; }
.bz-sort { cursor: pointer; white-space: nowrap; }
.bz-actions { gap: .2rem; flex-wrap: nowrap; }
.bz-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: .8rem; }
.bz-cols { display: flex; align-items: flex-end; gap: 2px; height: 140px; }
.bz-col { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; }
.bz-col span { display: block; width: 100%; min-height: 1px; background: var(--accent); border-radius: 3px 3px 0 0; }
.bz-hrow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .2rem 0; }
.bz-hbar { height: 8px; border-radius: 999px; background: rgba(40,229,240,.08); overflow: hidden; }
.bz-hbar span { display: block; height: 100%; background: var(--accent); }
.bz-tier-row input:first-child { flex: 2 1 auto; }
@media (max-width: 760px) {
  .bz-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .bz-tabs button { white-space: nowrap; }
  .bz-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Historique en cartes lisibles plutôt qu'un tableau trop large */
  .bz-table table, .bz-table tbody, .bz-table tr, .bz-table td { display: block; width: 100%; }
  .bz-table thead { display: none; }
  .bz-table tr { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .6rem; padding: .4rem .6rem; }
  .bz-table td { border: none; display: flex; justify-content: space-between; gap: .6rem; padding: .15rem 0; }
  .bz-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
  .bz-table td:last-child::before { content: ""; }
}
.bz-tier.below small { bottom: auto; top: 100%; padding: 2px 0 0; }
.bz-goal.tiered .bz-bar { margin-bottom: 1.2rem; }
.bz-filters input[type=checkbox] { min-width: 0; width: auto; }
.bz-table td:last-child { white-space: nowrap; }

/* Panneau HUD */
.hud { display: grid; gap: 1rem; align-content: start; }
.hud:fullscreen { background: var(--bg, #020b10); padding: 1.5rem; overflow: auto; }
.hud-top { display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; align-items: center; justify-content: space-between;
  padding: 1rem 1.2rem; border: 1px solid rgba(40,229,240,.28); border-radius: 12px; background: rgba(3,14,21,.6); }
.hud-clock { font-size: clamp(2.6rem, 7vw, 4.5rem); font-weight: 300; letter-spacing: .04em; color: var(--accent);
  font-variant-numeric: tabular-nums; line-height: 1; }
.hud-date { color: var(--muted); text-transform: capitalize; margin-top: .3rem; }
.hud-weather { display: flex; gap: .9rem; align-items: center; }
.hud-weather small { display: block; color: var(--muted); }
.hud-temp { font-size: 2.6rem; font-weight: 300; }
.hud-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.hud-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .9rem; }
.hud-panel { display: grid; gap: .45rem; align-content: start; padding: .9rem 1rem; border: 1px solid rgba(40,229,240,.18);
  border-radius: 12px; background: rgba(3,14,21,.5); min-height: 140px; }
.hud-panel h3 { margin: 0 0 .2rem; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.hud-line { display: flex; gap: .6rem; align-items: baseline; font-size: 14px; }
.hud-line small { color: var(--muted); }
.hud-tag { flex: none; min-width: 3.4rem; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hud-tag.hot { color: #ff8a7a; }
.hud-dot { flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: #5b6b73; align-self: center; }
.hud-dot.on { background: #34d399; box-shadow: 0 0 8px #34d39988; }
.hud-dot.warn { background: #f5b74a; box-shadow: 0 0 8px #f5b74a88; }
@media (max-width: 760px) { .hud-grid { grid-template-columns: 1fr; } }

/* -- Dettes ------------------------------------------------------------------------------------------------------- */
.dt-card { gap: .55rem; }
.dt-card.dt-closed { opacity: .75; }
.dt-amount b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.dt-bar { margin: .2rem 0; height: 8px; }
.dt-ok { color: var(--green); }
.dt-due { color: var(--accent); }
.dt-pay { gap: .4rem; align-items: center; }
.dt-pay input[type="number"] { width: 9rem; }
.dt-pay input[type="text"] { flex: 1 1 12rem; }
.dt-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: .6rem; }
.dt-form textarea { width: 100%; }
.dt-field { gap: .2rem; }
.dt-actions { grid-column: 1 / -1; }
.dt-details { gap: 1rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.dt-row { border-bottom: 1px solid var(--line); padding: .3rem 0; }
.dt-pick { gap: .4rem; align-items: center; padding: .5rem .6rem; border: 1px dashed var(--line); border-radius: var(--radius); }
.dt-pick .dt-day { width: 5.5rem; }
.dt-pick .dt-amount-in { width: 12rem; }

/* Dettes en petits carrés (comme Ma santé) */
.dt-layout { gap: .4rem; }
.dt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .7rem; }
.dt-tile { display: grid; gap: .3rem; align-content: start; text-align: left; padding: .8rem .9rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: rgba(3,14,21,.6); color: inherit; font: inherit; cursor: pointer; }
.dt-tile:hover, .dt-tile:focus-visible { border-color: var(--accent); }
.dt-tile b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.dt-tile-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-focus { grid-column: 1 / -1; }
.sub-item { cursor: pointer; }
.sub-item.open { border-color: var(--accent); }
@media (max-width: 760px) {
  .dt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .dt-tile { padding: .65rem .7rem; }
  .dt-tile b { font-size: 1.1rem; }
}

/* Bouton de déconnexion visible sur l'Accueil */
.hero { position: relative; }
.hero-logout { position: absolute; top: 0; right: 0; font-size: .85rem; }
@media (max-width: 760px) { .hero-logout { position: static; float: right; } }


/* KRYPTO (lecture seule) */
.kr-prices { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.kr-price { gap: .3rem; }
.kr-last { font-size: 1.5rem; font-weight: 700; }
.kr-up { color: var(--green); } .kr-down { color: var(--red); }
.kr-spark { width: 100%; height: 40px; } .kr-spark.small { width: 110px; height: 28px; }
.kr-spark polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.kr-spark polyline.up { stroke: var(--green); } .kr-spark polyline.down { stroke: var(--red); }
.kr-lab { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.kr-strat { gap: .4rem; } .kr-strat.ref { opacity: .85; border-style: dashed; }
.kr-big { font-size: 1.25rem; font-weight: 700; }
.kr-facts { display: flex; flex-wrap: wrap; gap: .2rem .8rem; color: var(--muted); }
.kr-tag { font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; background: rgba(255,255,255,.08); }
.kr-tag.good { background: rgba(70,244,177,.15); color: var(--green); } .kr-tag.bad { background: rgba(255,107,122,.12); color: var(--red); }

/* Travail de fond en cours (ligne discrète dans la conversation) */
.work-pending { margin: .4rem 0; padding: .5rem .8rem; border-radius: 10px; border: 1px dashed rgba(255,255,255,.18); color: var(--muted); font-size: .9rem; display: grid; gap: .3rem; }

/* KRYPTO · portefeuille réel (lecture seule) */
.kr-wallet-head { display: grid; grid-template-columns: minmax(180px, auto) 1fr; gap: 1rem; align-items: center; }
.kr-total { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.kr-spark.kr-wallet-spark { height: 64px; }
.kr-lines { display: flex; flex-direction: column; gap: .5rem; }
.kr-line { display: grid; grid-template-columns: 4.5rem 1fr auto; grid-template-areas: "a q v" "b b p"; gap: .15rem .8rem; align-items: center; }
.kr-line > b { grid-area: a; } .kr-line > .muted.small:not(.kr-line-part) { grid-area: q; } .kr-line-value { grid-area: v; font-weight: 700; text-align: right; }
.kr-bar { grid-area: b; height: 6px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.kr-bar span { display: block; height: 100%; background: var(--accent, var(--green)); border-radius: inherit; }
.kr-line-part { grid-area: p; text-align: right; }
.kr-trades { display: flex; flex-direction: column; gap: .3rem; }
.kr-trade { display: grid; grid-template-columns: 8.5rem 4rem 1fr auto; gap: .6rem; }
@media (max-width: 640px) { .kr-wallet-head { grid-template-columns: 1fr; } .kr-trade { grid-template-columns: 1fr 1fr; } }

/* Accueil · encadrés du jour */
.day-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; margin: 1rem 0 .8rem; }
.day-box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.day-label { font-size: .75rem; letter-spacing: .04em; color: var(--muted); }
.day-weather { display: flex; align-items: center; gap: .6rem; }
.day-icon { font-size: 1.8rem; line-height: 1; } .day-temp { font-size: 1.8rem; font-weight: 700; }
.day-title { font-weight: 600; line-height: 1.3; } .day-line { font-size: .92rem; }
.day-dicton { font-size: .85rem; font-style: italic; margin-top: .2rem; } .day-dicton .muted { font-style: normal; font-size: .75rem; }
.day-fuel { display: flex; justify-content: space-between; gap: .5rem; font-size: .92rem; }
.day-fuel span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; } .day-fuel.best span:last-child { color: var(--green); }
.day-quote { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1.2rem; margin-bottom: 1rem; }
.day-quote blockquote { margin: .35rem 0 .25rem; font-family: var(--serif); font-size: 1.15rem; line-height: 1.45; }

/* Ce que JARVIS sait de vous */
.portrait { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; margin-bottom: 1rem; }
.portrait-text p { margin: .2rem 0 .5rem; line-height: 1.55; }
.portrait textarea { width: 100%; font: inherit; line-height: 1.5; }
.portrait-sub { margin: .4rem 0 .6rem; font-size: 1rem; }
.memory-line { display: grid; grid-template-columns: 1fr auto auto; gap: .8rem; align-items: baseline; padding: .45rem 0; border-bottom: 1px solid var(--line); }

.kr-talk { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--card); border: 1px solid var(--accent); border-radius: 14px; padding: .9rem 1.1rem; }

.kr-group { margin: .4rem 0 0; font-size: 1.05rem; }
.kr-notes { display: flex; flex-direction: column; gap: .5rem; }
.kr-note { gap: .3rem; }
.kr-note-head { all: unset; cursor: pointer; display: block; }
.kr-note-head:hover b { text-decoration: underline; }
.kr-note-body { border-top: 1px solid rgba(255,255,255,.08); padding-top: .5rem; margin-top: .3rem; }
.kr-sources { margin-top: .5rem; color: var(--muted); }
.kr-search { flex: 1; min-width: 220px; }
.kr-sources a { color: var(--accent); }
/* Discussion KRYPTO dans sa zone : panneau fixe à droite des graphiques ; bulle plein écran sur téléphone */
.kr-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 1.2rem; align-items: start; }
.kr-chat { position: sticky; top: 1rem; height: calc(100vh - 7rem); /* sous la barre du haut de JARVIS : la saisie reste visible */ display: flex; flex-direction: column; gap: .6rem; background: var(--card); border: 1px solid var(--accent); border-radius: 14px; padding: .8rem; min-height: 0; }
.kr-chat-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.kr-chat-head .row { gap: .3rem; }
.kr-chat-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .6rem; padding-right: .2rem; }
.kr-chat-log .msg { max-width: 92%; }
.kr-chat-hello { padding: .4rem 0; }
.kr-chat-suggest { display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
.kr-chat-suggest button { text-align: left; }
.kr-chat-form { display: flex; gap: .4rem; align-items: flex-end; }
.kr-chat-form textarea { flex: 1; resize: none; min-height: 2.6rem; max-height: 8rem; }
.kr-chat-close, .kr-chat-fab { display: none; }
#view-krypto.kr-wide .kr-layout { grid-template-columns: 0 minmax(0, 1fr); gap: 0; }
#view-krypto.kr-wide #kr-body { visibility: hidden; height: 0; overflow: hidden; }
@media (max-width: 1100px) {
  .kr-layout { grid-template-columns: minmax(0, 1fr); }
  .kr-chat { display: none; position: fixed; inset: 0; top: 0; height: auto; z-index: 60; border-radius: 0; background: var(--bg); padding-top: max(.8rem, env(safe-area-inset-top)); }
  .kr-chat-head button[title="Agrandir la discussion"] { display: none; }
  .kr-chat.open { display: flex; }
  .kr-chat-close { display: inline-block; }
  .kr-chat-fab { display: flex; align-items: center; justify-content: center; position: fixed; right: 1rem; bottom: 1rem; width: 3.2rem; height: 3.2rem; border-radius: 50%; font-size: 1.4rem; z-index: 55; background: var(--accent); color: #001; border: none; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
  #view-krypto[hidden] .kr-chat-fab { display: none; }
}
/* À regarder plus tard */
.pt-add input { flex: 1; min-width: 220px; }
.pt-tabs { gap: .4rem; margin: .6rem 0; }
.pt-list { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.pt-card { display: grid; gap: .35rem; }
.pt-card select { max-width: 13rem; font-size: 12px; }
.pt-title { font-weight: 600; word-break: break-word; color: #e8fbff; text-decoration: none; }
.pt-title:hover { color: var(--cyan, #28e5f0); text-decoration: underline; }
.pt-note { color: var(--amber); font-size: 13px; margin: 0; }
.pt-drafts { border-top: 1px dashed rgba(40,229,240,.25); padding-top: .4rem; display: grid; gap: .5rem; }
.pt-draft .pre { white-space: pre-wrap; font-size: 13px; margin: .2rem 0; }
.pt-setup { margin-top: 1.2rem; }
@media (max-width: 600px) { .pt-list { grid-template-columns: 1fr; } }
.pt-key code { word-break: break-all; user-select: all; }
/* « Conseil » */
#view-conseil textarea { width: 100%; resize: vertical; }
.cs-q { font-size: 1.1rem; color: #e8fbff; margin: .8rem 0 0; }
.cs-reco { border-color: rgba(40,229,240,.45); }
.cs-big { font-size: 15px; line-height: 1.55; white-space: pre-wrap; margin: .3rem 0; }
.cs-first { color: var(--amber); margin: .4rem 0 0; }
.cs-grid { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cs-grid h3 { margin: 0 0 .4rem; font-size: 14px; }
.cs-points { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; font-size: 13px; }
.cs-clash { border-left: 2px solid rgba(255,190,90,.5); padding-left: .5rem; }
.cs-clash p { margin: .15rem 0; }
.cs-advisors { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: .5rem; }
.cs-advisor .pre { white-space: pre-wrap; margin: .3rem 0 0; }
.cs-steps { margin: .4rem 0 0; padding-left: 1.2rem; font-size: 13px; }
.cs-steps li { color: var(--muted, #8aa); }
.cs-steps li.done { color: var(--green); }
.cs-steps li.now { color: #e8fbff; font-weight: 600; }
.cs-history { display: grid; gap: .4rem; }
.cs-past { display: grid; gap: .1rem; text-align: left; background: transparent; border: 1px solid var(--line); padding: .5rem .7rem; border-radius: var(--radius); color: inherit; }
.cs-past.active { border-color: rgba(40,229,240,.6); }
