/* Vue Journal — toutes les classes préfixées jr- ; uniquement les variables du thème. */
.jr { padding: 12px; margin: 0 auto; }
.jr-top { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.jr-notes-btn { flex: 1; min-height: 56px; font-size: 1.1rem; position: relative; }
.jr-draft-dot { position: absolute; top: 8px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--brand); }

.jr-quests { padding: 10px 12px; margin-bottom: 12px; background: var(--surface); }
.jr-quests-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.jr-quests-head h3 { margin: 0; font-size: 1.05rem; }
.jr-quests .empty { padding: 4px 0 0; margin: 0; font-size: .9rem; }
.jr-qlist { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.jr-qlist button { border: 1px solid var(--line); background: var(--warn-soft); color: var(--ink); border-radius: 10px; padding: 6px 10px; font-weight: 600; font-size: .92rem; text-align: left; min-height: 36px; }
.jr-qlist button:hover { border-color: var(--warn); }

.jr-filters { display: grid; gap: 8px; margin-bottom: 12px; }
.jr-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.jr-chips::-webkit-scrollbar { display: none; }
.jr-chips .chip { white-space: nowrap; min-height: 34px; color: var(--ink); }
.jr-chips .chip.on { color: var(--brand-ink); }
.jr-chips .chip small { opacity: .7; font-weight: 500; }

.jr-split { display: grid; gap: 14px; }
.jr-group { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 12px 0 6px; font-family: var(--font); }
.jr-group:first-child { margin-top: 0; }
.jr-items { display: grid; gap: 6px; }
.jr-item { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; color: var(--ink); }
.jr-item:hover, .jr-ses-card:hover { border-color: var(--gold); }
.jr-sel { border-color: var(--brand) !important; box-shadow: inset 3px 0 0 var(--brand); }
.jr-ico { font-size: 1.4rem; line-height: 1.2; }
.jr-item-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.jr-item-main b { overflow-wrap: anywhere; }
.jr-item-main small, .jr-ses-card small { color: var(--muted); font-size: .8rem; }
.jr-prev { color: var(--muted); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jr-pin { font-size: .9rem; }
.jr-welcome p { margin: .3em 0; }

/* Frise des sessions */
.jr-frise { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.jr-frise::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.jr-ses { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; position: relative; }
.jr-dot { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: .9rem; border: 3px solid var(--bg); margin-top: 4px; }
.jr-ses-card { flex: 1; min-width: 0; display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; color: var(--ink); }
.jr-ses-card b { font-family: var(--font-title); font-size: 1.05rem; }

/* Lecture */
.jr-pane[hidden] { display: none; }
.jr-pane-empty { text-align: center; padding: 40px 10px; }
.jr-big { font-size: 3rem; }
.jr-read h2 { margin: 6px 0 2px; font-size: 1.45rem; overflow-wrap: anywhere; }
.jr-read-badges { gap: 6px; }
.jr-meta { color: var(--muted); font-size: .85rem; margin: 4px 0 8px; }
.jr-tags { gap: 6px; margin-bottom: 6px; }
.jr-tags .chip { color: var(--info); background: var(--info-soft); border-color: transparent; }
.jr-body { margin: 8px 0 12px; }
.jr-link { color: var(--brand); font-weight: 700; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; cursor: pointer; }
button.jr-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; }
.jr-missing { color: var(--muted); }
.jr-missing::after { content: " ＋"; font-size: .8em; }
.jr-raw { margin-top: 12px; border: 1px dashed var(--line); border-radius: 10px; padding: 6px 10px; background: var(--surface-2); }
.jr-raw summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.jr-back { font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; margin-bottom: 8px; }
.jr-actions { gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }

/* Formulaire */
.jr-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.jr-kind { cursor: pointer; min-height: 36px; color: var(--ink); }
.jr-kind.on { color: var(--brand-ink); }
.jr-kind input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.jr-kind:focus-within { outline: 2px solid var(--gold); outline-offset: 1px; }
.jr-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.jr-form-row [hidden] { display: none; }
.jr-body-label { text-transform: none !important; letter-spacing: 0 !important; font-size: .85rem !important; }
.jr-body-label small { font-weight: 400; }
.jr-form textarea { min-height: 180px; }
.jr-tpl { justify-self: start; margin-top: 6px !important; }
.jr-tpl[hidden] { display: none; }
.jr-check { gap: 8px; font-weight: 600; color: var(--ink); }
.jr-check > input { flex: none; min-width: 0; }
.jr-form-actions { gap: 8px; }
.jr-spacer { flex: 1; }

/* Notes de session plein écran */
body.jr-noscroll { overflow: hidden; }
.jr-full { position: fixed; inset: 0; z-index: 45; background: var(--bg); display: flex; flex-direction: column; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.jr-full-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.jr-full-head b { flex: 1; font-family: var(--font-title); font-size: 1.15rem; }
.jr-saved { font-size: .78rem; }
.jr-quick { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; scrollbar-width: none; }
.jr-quick .chip { white-space: nowrap; min-height: 36px; color: var(--ink); }
.jr-full-text { flex: 1; margin: 0 12px; width: auto; min-height: 0; resize: none; font-size: 1.05rem; line-height: 1.55; }
.jr-full-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.jr-full-foot .btn { flex: 1 1 auto; }
.jr-full-foot .btn.primary { flex: 2 1 auto; }
.jr-final { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 12px 0; overflow: auto; }
.jr-final .jr-full-foot { margin: auto -12px 0; }
.jr-final .jr-no { max-width: 100%; }
.jr-grow { flex: 1; display: flex; flex-direction: column; min-height: 240px; }
.jr-grow textarea { flex: 1; resize: none; }
.jr-ai-state { padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.jr-ai-state[hidden] { display: none; }
.jr-loading { background: var(--info-soft); color: var(--info); }
.jr-error { background: var(--bad-soft); color: var(--bad); }
.jr-spin { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: jr-spin .8s linear infinite; vertical-align: -2px; }
@keyframes jr-spin { to { transform: rotate(360deg); } }

/* Extraction IA */
.jr-exlist { display: grid; gap: 6px; }
.jr-ex { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.jr-ex > span { display: grid; gap: 2px; min-width: 0; }
.jr-ex input { margin-top: 2px; flex: none; }
.jr-ex-off { opacity: .55; cursor: default; }
.jr-rawreply { max-height: 50vh; overflow: auto; }

@media (min-width: 900px) {
  .jr { padding: 16px; }
  .jr-top .jr-notes-btn { flex: 0 1 340px; }
  .jr-filters { grid-template-columns: 1fr minmax(220px, 300px); align-items: center; }
  .jr-chips { flex-wrap: wrap; }
  .jr-split { grid-template-columns: minmax(300px, 400px) 1fr; align-items: start; }
  .jr-pane { position: sticky; top: 120px; max-height: calc(100dvh - 136px); overflow: auto; padding: 18px 22px; }
  .jr-full { padding-left: max(0px, calc(50% - 450px)); padding-right: max(0px, calc(50% - 450px)); }
}

/* Formulaire de fin de session : n° étroit, date sur sa propre ligne (téléphone) */
label.field.jr-grow { display: flex; flex-direction: column; gap: 4px; }
.jr-grow > span { flex: none; }
.jr-final .jr-form-row { grid-template-columns: 76px 1fr; }
.jr-final .jr-form-row > :last-child { grid-column: 1 / -1; }
@media (min-width: 600px) {
  .jr-final .jr-form-row { grid-template-columns: 76px 2fr 1fr; }
  .jr-final .jr-form-row > :last-child { grid-column: auto; }
}
