/* Jarvis — « Executive Concierge · Premium Minimalism ».
   Teal #0B626B (accent, bulles de l'utilisateur) · ivoire #F6F5F1 (fond) · anthracite #172633 (texte)
   or #C3A16B (filets et détails décoratifs seulement) · or foncé #8A6A2F (petit texte doré) · gris #5C6670 (secondaire)
   Tailles en em : 15 px sur téléphone, puis de 16 à 18 px selon la largeur sur ordinateur (18 px à 1400 px de large). */
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); }

:root {
  --teal: #0B626B; --teal-dark: #084E56; --ivory: #F6F5F1; --ink: #172633; --gold: #C3A16B; --gold-text: #8A6A2F; --grey: #5C6670;
  --paper: #FFFFFF; --edge: #ECE7DB; --bubble: #FFFFFF; --ok-bg: #E4F1E6; --ok: #1F6B34; --warn-bg: #F6EBD6; --err: #8F2D2D; --err-bg: #F8E6E3;
  --grad: radial-gradient(ellipse at 18% 12%, #19777B 0%, transparent 62%), linear-gradient(125deg, #0B626B, #07534F);
  --shadow: 0 2px 3px rgba(62, 43, 26, .07), 0 8px 22px rgba(62, 43, 26, .045);
  --shadow-soft: 0 2px 3px rgba(62, 43, 26, .07), 0 5px 12px rgba(62, 43, 26, .035);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --gutter: 16px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font-family: var(--serif); font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
button, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled, button[aria-disabled="true"] { cursor: not-allowed; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--teal); color: #fff; padding: 10px 14px; border-radius: 12px; z-index: 50; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 10px; }
.ic { width: 1.4em; height: 1.4em; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.small-ic { width: 1.2em; height: 1.2em; color: var(--gold-text); }
.muted { color: var(--grey); } .small { font-size: .85em; }

/* monogramme : la largeur vaut 1,75 fois la taille du J */
.mono { display: inline-grid; place-items: center; width: 1.75em; height: 1.75em; border-radius: 50%; background: radial-gradient(circle at 28% 20%, #187F82, var(--teal) 45%, #06433F 94%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); color: var(--gold); font-family: var(--serif); font-weight: 600; line-height: 1; flex: none; }
.mono.big { font-size: 2.15em; }
.mono.tiny { font-size: 1.05em; }

/* mise en page : téléphone = une colonne, volets en tiroirs */
.app { display: grid; grid-template-columns: minmax(0, 1fr); height: 100dvh; overflow: hidden; }
.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100dvh; }
.history, .activities { background: var(--ivory); padding: 20px 18px; overflow-y: auto; position: fixed; top: 0; bottom: 0; width: min(88vw, 340px); z-index: 30; box-shadow: var(--shadow); transition: transform .22s ease; visibility: hidden; }
.history { left: 0; transform: translateX(-102%); border-right: 1px solid var(--edge); }
.activities { right: 0; transform: translateX(102%); border-left: 1px solid var(--edge); }
.history[data-open="true"], .activities[data-open="true"] { transform: none; visibility: visible; }
.scrim { position: fixed; inset: 0; background: rgba(23, 38, 51, .35); z-index: 20; }
.only-drawer, .only-narrow, .only-panel { display: inline-grid; }
.act-head.only-drawer { display: flex; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* colonne gauche */
.history-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4em; }
@media (min-width: 900px) { .history-head { margin-bottom: 2.6em; } .history { border-right-color: #E4DFD2; } }
.brand-mini { display: flex; align-items: center; gap: .8em; min-width: 0; }
.brand-text { display: grid; line-height: 1.15; } .brand-text strong { font-size: 1.7em; font-weight: 600; } .brand-text small { color: var(--grey); font-size: .93em; }
.btn-primary { display: flex; align-items: center; justify-content: center; gap: .55em; width: 100%; min-height: 3em; border: 0; border-radius: .85em; background: var(--grad); color: #fff; font-weight: 600; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--teal-dark); }
.rule-title { display: flex; align-items: center; gap: .65em; margin: 1.9em 0 1.15em; padding-top: 1.9em; border-top: 1px solid rgba(195, 161, 107, .35); font-size: .86em; font-weight: 400; color: var(--gold-text); }
.rule-title::before, .rule-title::after { content: ""; flex: 1; height: 1px; background: var(--gold); opacity: .7; }
.conv-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
.conv-list li { min-width: 0; }
.conv-item { display: flex; align-items: center; gap: .75em; width: 100%; min-height: 2.7em; padding: .3em .85em; border: 0; background: transparent; border-radius: .85em; text-align: left; color: var(--ink); font-size: 1.05em; }
.conv-item:hover { background: rgba(11, 98, 107, .06); }
.conv-item[aria-current="true"] { background: rgba(11, 98, 107, .11); }
.conv-item .ic { color: var(--grey); stroke-width: 1.3; width: 1.3em; height: 1.3em; }
.conv-item b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* en-tête de discussion (téléphone : marque + état ; ordinateur : titre de la conversation + modèle + état) */
.chat-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: .8em; padding: 14px 16px 10px; }
.chat-head .mono { grid-column: 1; font-size: 1.8em; }
.who { grid-column: 2; min-width: 0; } .brand-name { font-size: 1.75em; font-weight: 600; line-height: 1.1; } .who .sub { color: var(--grey); font-size: .85em; line-height: 1.25; }
.chat-head .pill { grid-column: 3; grid-row: 1; }
.chat-head .conv-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* sélecteurs « Modèle » et « Effort » (JARVIS-1C) : vrais <select> étiquetés ; téléphone : deuxième ligne de l'en-tête ; ordinateur : à côté de l'état */
.settings { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; margin-top: 10px; min-width: 0; }
.sel { display: grid; gap: 2px; min-width: 0; flex: 1 1 9em; }
.sel-effort { flex: 0 1 10.5em; }
.sel-label { font-size: .78em; color: var(--grey); letter-spacing: .02em; padding-left: .2em; }
.sel-box { position: relative; display: block; min-width: 0; }
.sel select { appearance: none; -webkit-appearance: none; width: 100%; min-height: 44px; padding: .25em 2.1em .25em .9em; border: 1px solid var(--edge); border-radius: 999px; background: var(--paper); color: var(--ink); font: inherit; font-size: .92em; font-weight: 600; box-shadow: var(--shadow-soft); text-overflow: ellipsis; cursor: pointer; }
.sel select:hover:not(:disabled) { background: #fbfaf6; border-color: var(--gold); }
.sel select:disabled { color: var(--grey); background: #F1EFE9; cursor: not-allowed; font-weight: 400; box-shadow: none; }
.sel .ic { position: absolute; right: .75em; top: 50%; width: 1.1em; height: 1.1em; transform: translateY(-50%); color: var(--grey); pointer-events: none; }
.sel option:disabled { color: #8A9099; }
.reset { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: .45em; min-height: 44px; padding: .2em .9em; border: 1px solid var(--edge); border-radius: 999px; background: transparent; color: var(--teal-dark); font-size: .88em; font-weight: 600; }
.reset .ic { width: 1.15em; height: 1.15em; }
.reset:hover { background: rgba(11, 98, 107, .06); }
.reset[hidden], .setting-note[hidden] { display: none; }
.setting-note { flex-basis: 100%; margin: 0; font-size: .85em; color: var(--gold-text); }
.setting-note.bad { color: var(--err); }
.settings[data-state="indisponible"] .sel { opacity: .9; }
.icon-btn { width: 44px; height: 44px; place-items: center; border: 1px solid var(--edge); background: var(--paper); border-radius: 50%; color: var(--ink); flex: none; box-shadow: var(--shadow-soft); }
.icon-btn .ic { width: 22px; height: 22px; }
.icon-btn:hover { background: #fbfaf6; }
.pill { display: inline-flex; align-items: center; gap: .5em; min-height: 2.2em; padding: .1em .85em; border-radius: 999px; font-size: .88em; background: var(--ok-bg); color: var(--ink); white-space: nowrap; }
.pill .dot, .tag .dot { width: .6em; height: .6em; border-radius: 50%; background: #2E9C4C; }
.pill[data-state="non_connecte"] { background: var(--warn-bg); } .pill[data-state="non_connecte"] .dot { background: #B98021; }
.pill[data-state="verification"] { background: #ECEBE6; } .pill[data-state="verification"] .dot { background: #8A9099; }
.tabs-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 16px 0; }
#open-history { grid-column: 1; } .tabs { grid-column: 2; } #toggle-activities { grid-column: 3; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; background: rgba(235, 230, 222, .44); border-radius: 999px; border: 1px solid #EAE6DB; }
.tab { display: flex; align-items: center; justify-content: center; gap: .6em; min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font-weight: 600; font-size: 1.05em; }
.tab .ic { width: 1.3em; height: 1.3em; }
.tab.is-on { background: var(--grad); color: #fff; box-shadow: var(--shadow); }
.tab[aria-disabled="true"] { color: var(--grey); cursor: not-allowed; font-weight: 400; }
.note { text-align: center; font-size: .9em; color: var(--gold-text); padding: 6px 16px 0; }
.company { display: flex; align-items: center; gap: .65em; min-height: 44px; margin: 12px 16px 0; padding: .25em 1em .25em .9em; border: 1px solid var(--edge); border-radius: 999px; background: rgba(255, 255, 255, .55); box-shadow: var(--shadow-soft); color: var(--grey); font-weight: 600; text-align: left; opacity: .85; }
.company .lead { color: #B9A57E; width: 1.5em; height: 1.5em; } .company .tail { margin-left: auto; width: 1.2em; height: 1.2em; color: #9AA1A8; }
.banner { margin: 10px 16px 0; padding: 10px 14px; border-radius: 14px; background: var(--warn-bg); border: 1px solid #E8D3A8; font-size: .95em; }

/* flux de messages */
.stream { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 12px; overscroll-behavior: contain; line-height: 1.38; }
.welcome { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 28px 12px 12px; color: var(--grey); }
.welcome h2 { color: var(--ink); font-size: 1.6em; font-weight: 600; } .welcome p { max-width: 460px; }
.messages { display: grid; gap: 1em; padding-top: .8em; }
.day { display: flex; align-items: center; gap: .8em; color: var(--gold-text); font-size: .88em; }
.day::before, .day::after { content: ""; flex: 1; height: 1px; background: var(--gold); opacity: .7; }
.row { display: flex; gap: .8em; align-items: flex-end; }
.row.user { justify-content: flex-end; }
.bubble { max-width: min(78%, 640px); padding: .6em 1em; border-radius: 1.15em; box-shadow: var(--shadow-soft); overflow-wrap: anywhere; }
.row.user .bubble { display: block; max-width: min(80%, 640px); background: var(--grad); color: #fff; padding: .55em 1.15em .4em 1.2em; border-radius: 1.15em; font-weight: 400; }
.row.user .bubble .meta { margin: 0 0 .1em; }
.row.jarvis { align-items: flex-start; }
.row.jarvis .bubble { background: var(--bubble); border: 1px solid #ECE7DB; padding: .65em 1.2em .35em; }
.bubble .body > * + * { margin-top: .5em; } .bubble ul, .bubble ol { margin: 0; padding-left: 1.3em; } .bubble li::marker { color: var(--gold); }
.bubble .body p { white-space: pre-wrap; }
.meta { display: flex; justify-content: flex-end; align-items: center; gap: .4em; margin-top: .1em; font-size: .78em; color: var(--grey); white-space: nowrap; }
.meta .ic { width: 1.3em; height: 1.3em; stroke-width: 1.7; }
.row.user .meta { color: #CFE3E5; }
.row.user .meta .ic { color: var(--gold); }
.meta .bad { color: var(--err); font-weight: 600; }
.row.user .meta .bad { color: #FFE3DE; }
.fail { margin: 2px 4px 0 auto; max-width: min(80%, 640px); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; padding: 8px 12px; background: var(--err-bg); border-radius: 14px; font-size: .95em; color: var(--err); }
.retry { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px; border: 1px solid var(--err); background: var(--paper); color: var(--err); border-radius: 999px; font-weight: 600; }
.retry .ic { width: 18px; height: 18px; }

/* Validation demandée par Hermes (JARVIS-1D) */
.approval { margin: 0 var(--gutter) 10px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--gold); border-radius: 16px; box-shadow: var(--shadow-soft); color: var(--ink); }
.approval[hidden] { display: none; }
.approval h3 { margin: 0 0 4px; font-size: 1.05em; color: var(--teal-dark); }
.approval p { margin: 0 0 8px; }
.approval-label { font-size: .85em; color: var(--gold-text); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.approval-cmd { margin: 0 0 10px; padding: 10px 12px; max-height: 8.5em; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--ivory); border: 1px solid var(--edge); border-radius: 10px; font: .9em/1.4 ui-monospace, Consolas, monospace; }
.approval-more, .approval-note { font-size: .9em; color: var(--grey); }
.approval-error { color: var(--err); background: var(--err-bg); padding: 6px 10px; border-radius: 10px; }
.approval-actions { display: flex; gap: 10px; justify-content: flex-end; }
.approval-actions button { min-height: 44px; padding: 6px 22px; border-radius: 999px; font-weight: 600; border: 1px solid var(--teal); }
.approval-accept { background: var(--teal); color: #fff; }
.approval-refuse { background: var(--paper); color: var(--teal-dark); }
.approval-actions button:disabled { opacity: .55; }
.thinking { color: var(--grey); font-style: italic; }
.thinking .dots span { display: inline-block; animation: blink 1.2s infinite both; } .thinking .dots span:nth-child(2) { animation-delay: .2s; } .thinking .dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* saisie */
.composer-wrap { padding: 8px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--ivory) 80%, rgba(246, 245, 241, 0)); }
.composer { display: flex; align-items: flex-end; gap: .6em; }
.composer textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 160px; resize: none; padding: .62em 1.2em; border: 1px solid var(--edge); border-radius: 1.6em; background: var(--paper); box-shadow: var(--shadow-soft); line-height: 1.4; }
.composer textarea::placeholder { color: var(--grey); }
.mic, .send { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.mic { border: 1px solid var(--edge); background: var(--paper); color: #A5ABB1; box-shadow: var(--shadow-soft); }
.send { border: 0; background: var(--grad); color: #fff; box-shadow: var(--shadow); }
.send:hover { background: var(--teal-dark); } .send:disabled { background: #9DB9BC; cursor: not-allowed; }
.mic .ic, .send .ic { width: 22px; height: 22px; }
.telegram-line { display: flex; align-items: center; justify-content: center; gap: .6em; margin-top: .6em; font-size: .85em; color: var(--grey); }
.telegram-line::before, .telegram-line::after { content: ""; flex: 1; height: 1px; background: var(--gold); opacity: .6; }
.telegram-line span { white-space: nowrap; }

/* panneau de droite */
.act-head { align-items: center; justify-content: space-between; margin-bottom: 14px; }
.act-head h2 { font-size: 1.3em; font-weight: 600; }
.panel-card { background: rgba(255, 255, 255, .28); border: 1px solid var(--edge); border-radius: 1.05em; padding: 1.15em 1.15em 1.2em; box-shadow: var(--shadow); display: grid; gap: .8em; align-content: start; }
.panel-card + .panel-card { margin-top: 1.5em; }
.card-title { display: flex; align-items: center; gap: .6em; padding-bottom: .75em; border-bottom: 1px solid rgba(195, 161, 107, .7); font-size: 1.17em; font-weight: 600; }
.card-title .ic { width: 1.6em; height: 1.6em; color: var(--gold-text); stroke-width: 1.2; }
.act-list { display: grid; gap: 12px; }
.act-list:empty { display: none; }
.card { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--paper); border: 1px solid var(--edge); border-radius: 18px; box-shadow: var(--shadow-soft); }
.card .badge { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #F6EBD6; color: var(--gold-text); flex: none; }
.card b { font-weight: 600; } .card small { display: block; color: var(--grey); font-size: .88em; }
.chip { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--gold-text); font-size: .88em; }
.card-empty { display: grid; gap: .3em; padding: .9em 1em; background: var(--paper); border: 1px solid rgba(195, 161, 107, .35); border-radius: 1em; font-size: .95em; }
.panel-card > p { font-size: .92em; }
.tag { display: inline-flex; align-items: center; gap: .5em; padding: .15em .85em; border-radius: 999px; background: #ECEBE6; color: var(--grey); font-size: .92em; white-space: nowrap; }
.tag .dot { background: #8A9099; }

@media (max-width: 420px) { .brand-name { font-size: 1.65em; } .pill { padding-inline: .7em; } }
@media (max-width: 899px) {
  body { font-size: 14.5px; }
  .row.user .bubble { display: block; max-width: 80%; }          /* téléphone : l'heure passe sous le texte, comme sur la planche */
  .row.user .bubble .meta { margin: .15em 0 0; }
  .row.jarvis .bubble { max-width: 82%; }
  .row { gap: .6em; }
}

/* tablette et ordinateur : colonne des conversations fixe, contenu centré */
@media (min-width: 900px) {
  body { font-size: clamp(16px, 1.28vw, 18px); }
  :root { --gutter: max(16px, calc(50% - 330px)); }
  .app { grid-template-columns: clamp(270px, 22.7vw, 320px) minmax(0, 1fr); }
  .history { position: static; width: auto; transform: none; visibility: visible; box-shadow: none; padding: 2.6em 1.05em 1.5em 1.05em; }
  .only-narrow, #history-close { display: none; }
  .chat-head { grid-template-columns: minmax(0, 1fr) auto auto; padding: 1.2em var(--gutter) 0; column-gap: .6em; }
  .chat-head .mono, .chat-head .who { display: none; }
  .chat-head .conv-title { position: static; width: auto; height: auto; overflow: hidden; clip: auto; grid-column: 1; font-size: 1.6em; font-weight: 600; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
  .chat-head .pill { grid-column: 3; grid-row: 1; }
  .settings { grid-column: 1 / -1; grid-row: 2; margin-top: .8em; flex-wrap: nowrap; }
  .sel { flex: 0 1 13em; } .sel-effort { flex: 0 1 10em; }
  .setting-note { flex-basis: auto; align-self: center; }
  .tabs-row { grid-template-columns: minmax(0, 1fr) auto; padding: 1.25em var(--gutter) 0; }
  .tabs { grid-column: 1; padding: 5px; }
  #toggle-activities { grid-column: 2; }
  .tab { min-height: 46px; font-size: 1.05em; }
  .note { padding-inline: var(--gutter); }
  .company { margin: .95em var(--gutter) 0; min-height: 2.55em; }
  .banner { margin-inline: var(--gutter); }
  .stream { padding: 4px var(--gutter) 12px; }
  .composer-wrap { padding: 8px var(--gutter) 1.1em; }
  .messages { gap: 1.05em; }
  .composer textarea { min-height: 3.1em; }
  .mic, .send { width: 3.1em; height: 3.1em; }
  .send { width: 3.2em; height: 3.2em; }
  .mic .ic, .send .ic { width: 1.4em; height: 1.4em; }
  .bubble { max-width: 74%; }
  .row.user .bubble { max-width: 73%; }
  .mono.tiny { font-size: 1.33em; }
  .row.jarvis { gap: .85em; }
  .history .conv-item { min-height: 2.55em; }
  .activities { border-left-color: #E4DFD2; }
  .activities { padding: 2.1em 1em 1em 1.05em; }
}
@media (min-width: 1180px) {
  .app { grid-template-columns: clamp(270px, 22.7vw, 320px) minmax(0, 1fr) clamp(300px, 26.7vw, 376px); }
  .activities { position: static; width: auto; transform: none; box-shadow: none; transition: none; visibility: visible; }
  .only-panel, .only-drawer, .act-head.only-drawer, .scrim { display: none; }
  .tabs-row { grid-template-columns: minmax(0, 1fr); }
  .activities { padding-left: 1.05em; overflow-y: auto; }
}


/* Finition JARVIS-DESIGN : lumière diffuse, filets fins, proportions des maquettes.
   Le décor ne dépend d'aucune image distante et les états restent ceux du serveur. */
.app {
  background: radial-gradient(ellipse at 45% 0%, rgba(255,255,255,.66), transparent 70%),
    repeating-linear-gradient(138deg, transparent 0 340px, rgba(255,255,255,.16) 340px 470px, transparent 470px 830px),
    var(--ivory);
}
.history, .activities {
  background: radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.55), transparent 72%), var(--ivory);
}
.conv-item[aria-current="true"] b { font-weight: 600; }
.conv-item[aria-current="true"] .ic { color: var(--teal-dark); }
.rule-title::before, .rule-title::after, .day::before, .day::after,
.telegram-line::before, .telegram-line::after {
  background: linear-gradient(90deg, transparent, var(--gold));
}
.rule-title::after, .day::after, .telegram-line::after {
  background: linear-gradient(90deg, var(--gold), transparent);
}
.day { justify-content: center; margin: .15em 0 .1em; }
.day::before, .day::after { flex: 0 1 7.5em; }
.row.user .bubble .meta { margin: .15em 0 0; }
.composer textarea { background: rgba(255,255,255,.72); }
.panel-card { gap: 1em; }
.card-empty { background: rgba(255,255,255,.48); }
.card-empty strong { font-weight: 600; }
.tag { white-space: normal; }
.note {
  margin: 10px 16px 0; padding: 12px 16px;
  border: 1px solid var(--edge); border-radius: 16px;
  background: rgba(255,255,255,.68); color: var(--grey);
  box-shadow: var(--shadow-soft);
}
@media (max-width: 899px) {
  .chat-head { padding-top: max(18px, env(safe-area-inset-top)); }
  .chat-head .mono { font-size: 1.9em; }
  .brand-name { font-size: 1.8em; }
  .tabs-row { padding-top: 12px; }
  .company { margin-top: 10px; }
  .stream { padding-top: 10px; }
  .messages { gap: 1.05em; }
  .row.jarvis .bubble { padding: .65em 1em .35em; }
  .mono.tiny { font-size: 1.2em; }
  .telegram-line { font-size: .82em; margin-top: 1em; gap: .45em; }
  .composer-wrap { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}
@media (max-width: 1179px) {
  /* Vue Activités pleine largeur ; le panneau d'historique reste un tiroir. */
  .activities { width: 100%; border: 0; padding: max(20px, env(safe-area-inset-top)) max(16px, calc((100% - 620px) / 2)) max(24px, env(safe-area-inset-bottom)); }
  .activities[data-open="true"] { box-shadow: none; }
  .activities .panel-card { max-width: 620px; margin-inline: auto; }
  .activities .panel-card + .panel-card { margin-top: 18px; }
}
@media (min-width: 900px) {
  .history-head { margin-bottom: 2.6em; }
  .rule-title { font-size: .95em; margin-top: 1.8em; padding-top: 1.65em; margin-bottom: 1.25em; }
  .history .conv-item { min-height: 2.55em; }
  .settings { align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: .65em; }
  .sel { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; flex: 1 1 14em; }
  .sel-effort { flex: 0 1 12em; }
  .sel-label { font-size: .78em; }
  .sel select { font-size: .88em; min-height: 44px; }
  .setting-note { flex-basis: 100%; }
  .tabs-row { padding-top: .9em; }
  .tabs { padding: 3px; }
  .company { margin-top: .8em; }
  .stream { font-size: 1.1em; padding-top: 8px; }
  .mono.tiny { font-size: 24px; }
  .row.jarvis { gap: .65em; }
  .messages { gap: .9em; }
  .row.jarvis .bubble { padding: .5em 1.1em .3em; }
  .row.user .bubble { max-width: 73%; }
  .panel-card > p, .card-empty { font-size: 1em; line-height: 1.3; }
  .card-title { font-size: 1.22em; }
  .panel-card + .panel-card { margin-top: 1.4em; }
  .note { margin-inline: var(--gutter); }
}

/* Passe 2 : rythme des messages et lisibilité des états vides. */
.mono { font-weight: 400; }
.meta { line-height: 1.15; }
.row.user .body { line-height: 1.25; }
.row.user .bubble { padding-block: .5em .4em; }
@media (max-width: 899px) {
  .btn-primary { min-height: 44px; }
  .conv-item { min-height: 44px; }
  .panel-card > p, .card-empty { font-size: 1em; }
}
@media (min-width: 900px) {
  .stream { line-height: 1.3; }
  .rule-title { margin-bottom: 1.55em; }
}

/* Lien vers la page Capacités (JARVIS-1E) : seul ajout à l'interface de conversation. */
.side-link { display: flex; align-items: center; gap: .65em; margin-top: 1.6em; padding: .3em .85em; min-height: 44px; border-radius: .85em; color: var(--teal-dark); text-decoration: none; font-size: 1.02em; }
.side-link:hover { background: rgba(11, 98, 107, .06); }
.side-link .ic { width: 1.3em; height: 1.3em; color: var(--gold-text); }
.side-link { position: sticky; bottom: -20px; margin-bottom: -20px; padding-block: .6em; background: var(--ivory); border-top: 1px solid rgba(195, 161, 107, .35); border-radius: 0; }
