/* Scoped companion UI. The site's pages and visual identity are unchanged. */
.memory-chat-launcher { position:fixed; z-index:25; right:22px; bottom:24px; display:flex; align-items:center; justify-content:center; gap:10px; height:56px; padding:12px; border:1px solid #b5c7b0; border-radius:30px; color:#fff8eb; background:#173f35; box-shadow:0 4px 16px #082b2f55; cursor:pointer; }
.memory-chat-launcher[hidden] { display:none; }
.memory-chat-launcher svg { width:28px; height:28px; }
.memory-chat-launcher span { overflow:hidden; max-width:0; opacity:0; transition:max-width .25s,opacity .25s; }
.memory-chat-launcher.is-introduced span { max-width:90px; opacity:1; }
.memory-chat-launcher i { position:absolute; top:2px; right:1px; width:9px; height:9px; background:#d99457; border:2px solid #fff8eb; border-radius:50%; }
.memory-chat-launcher.has-reply { outline:2px solid #d99457; outline-offset:3px; }
.memory-chat-dialog { position:fixed; inset:auto 20px 20px auto; margin:0; width:460px; max-width:calc(100vw - 32px); height:min(700px,85dvh); max-height:calc(100dvh - 32px); padding:0; border:1px solid #e1d1b5; border-radius:24px; background:#fbf5e9; color:#173b37; overflow:hidden; box-shadow:0 20px 70px #071e2850; }
.memory-chat-dialog::backdrop { background:rgba(7,28,33,.3); }
.memory-chat-dialog[data-size="full"] { inset:16px; margin:auto; width:min(760px,calc(100vw - 32px)); height:calc(100dvh - 32px); }
.memory-chat-shell { position:relative; display:flex; flex-direction:column; height:100%; min-height:0; background:radial-gradient(ellipse at top,#fffdf5,#fbf5e9 65%); }
.memory-chat-dialog button { font:inherit; cursor:pointer; }
.memory-chat-dialog button:focus-visible,.memory-chat-launcher:focus-visible { outline:3px solid #b36d42; outline-offset:3px; }
.memory-chat-handle { display:flex; flex:0 0 44px; justify-content:center; align-items:center; border:0; background:none; }
.memory-chat-handle span { width:38px; height:4px; border-radius:4px; background:#aaa89e; }
.memory-chat-header { display:flex; flex:0 0 auto; gap:6px; align-items:center; padding:0 18px 10px; }
.memory-chat-header > div { flex:1; min-width:0; }
.memory-chat-header h2 { margin:0; font:600 25px/1.2 Georgia,serif; color:#123c38; }
.memory-chat-header p { margin:4px 0 0; font-size:13px; line-height:1.4; color:#58635b; }
.memory-chat-header > button,.memory-chat-subview header button { width:44px; height:44px; flex:0 0 44px; border:0; border-radius:50%; background:transparent; color:#123c38; font-size:26px; }
.memory-chat-header > button:hover { background:#ede5d6; }
.memory-chat-context-bar { display:flex; align-items:center; gap:4px; padding:0 18px 10px; }
#memory-chat-context-button { display:flex; align-items:center; gap:10px; min-height:52px; max-width:100%; padding:8px 12px; text-align:left; border:1px solid #e4d7bf; border-radius:20px; color:#173b37; background:#f3ebda; }
#memory-chat-context-button > span:nth-child(2) { display:grid; min-width:0; gap:3px; }
#memory-chat-context-icon { display:grid; place-items:center; flex:0 0 32px; width:32px; height:32px; overflow:hidden; border-radius:50%; color:#173f35; background:#e1e8d6; font-size:20px; }
#memory-chat-context-icon img { width:100%; height:100%; object-fit:cover; }
#memory-chat-context-label { font-size:13px; overflow-wrap:anywhere; }
#memory-chat-context-button small { color:#58635b; font-size:12px; }
#memory-chat-context-reset { width:44px; height:44px; border:0; color:#173b37; background:none; font-size:22px; }
.memory-chat-scroll { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; padding:4px 18px 18px; scroll-behavior:smooth; }
.memory-chat-empty { text-align:center; padding:10px 0 4px; }
.memory-chat-empty > span { font:38px Georgia,serif; color:#557b61; }
.memory-chat-empty h3 { margin:6px 0 10px; font:600 24px/1.2 Georgia,serif; color:#173b37; }
.memory-chat-empty > p { font-size:13px; color:#58635b; margin:0 0 16px; }
.memory-chat-prompts { display:grid; gap:9px; }
.memory-chat-prompts button { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; padding:11px 13px; border:1px solid #ded0b4; border-radius:16px; text-align:left; color:#173b37; background:#fffaf0; font-size:14px; line-height:1.4; }
.memory-chat-prompts button > span { font-size:22px; }
.memory-chat-dialog .memory-chat-user { width:fit-content; max-width:90%; margin:10px 0 12px auto; padding:13px 15px; border-radius:18px 18px 3px 18px; background:#1d5147; color:#fff8eb; font-size:14px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }
.memory-chat-reply,.memory-chat-turn .memory-chat-answer-bubble { margin:0 0 14px; padding:15px; border:1px solid #e6dcc8; border-radius:18px; background:#fffcf5; color:#34473e; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
#memory-chat-answer { white-space:pre-wrap; }
.memory-chat-dialog time { display:block; text-align:right; color:#68736b; font-size:11px; margin-top:8px; }
.memory-chat-source-link { display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; min-height:44px; margin-top:12px; padding:9px 12px; border:0; border-radius:12px; color:#173b37; background:#f2ebdd; font-size:13px; text-align:left; }
.memory-chat-dialog #memory-chat-next:empty { display:none; }
.memory-chat-dialog #memory-chat-next p { font-size:13px; }
.memory-chat-dialog #memory-chat-next .heritage-note { padding:10px; border:1px solid #e4d9c3; border-radius:12px; }
.memory-chat-dialog .button { min-height:44px; max-width:100%; white-space:normal; font-size:14px; }
.memory-chat-dialog #memory-collect-panel { margin-top:12px; }
.memory-chat-dialog #memory-collect-panel > summary { min-height:44px; padding:10px 0; cursor:pointer; font-size:14px; }
.memory-chat-composer { position:relative; flex:0 0 auto; display:flex; align-items:flex-end; gap:4px; margin:0 12px max(12px,env(safe-area-inset-bottom)); padding:6px; border:1px solid #e4dac7; border-radius:28px; background:#fffdf8; box-shadow:0 4px 12px #78644412; }
.memory-chat-composer button { display:grid; place-items:center; width:44px; height:44px; flex:0 0 44px; padding:0; border:0; border-radius:50%; color:#173b37; background:none; font-size:24px; }
.memory-chat-composer #memory-chat-send,.memory-chat-composer #memory-chat-voice { color:#fff8eb; background:#1d5147; }
.memory-chat-composer button:disabled { opacity:.5; cursor:wait; }
.memory-chat-composer textarea { flex:1; width:0; min-width:0; min-height:44px; max-height:120px; padding:12px 4px; border:0; border-radius:0; box-shadow:none; outline:none; background:transparent; resize:none; font:16px/1.4 Manrope,sans-serif; color:#173b37; }
.memory-chat-composer svg { width:23px; height:23px; }
.memory-chat-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.memory-chat-menu { flex:0 0 auto; padding:6px 16px 12px; }
.memory-chat-menu button { display:block; min-height:44px; width:100%; padding:10px 12px; border:1px solid #e1d1b5; border-radius:12px; text-align:left; background:#fffcf5; color:#173b37; margin-bottom:6px; font-size:14px; }
.memory-chat-menu p,.memory-chat-feedback { font-size:13px; line-height:1.4; color:#58635b; margin:6px 18px; }
.memory-chat-subview { position:absolute; inset:44px 0 0; z-index:4; overflow:auto; overscroll-behavior:contain; padding:0 18px 18px; background:#fbf5e9; }
.memory-chat-subview > header { display:flex; align-items:center; justify-content:space-between; gap:12px; position:sticky; top:0; z-index:1; padding:10px 0; background:#fbf5e9; }
.memory-chat-subview h3 { margin:0; font:600 21px/1.3 Georgia,serif; }
.memory-chat-subview ul { list-style:none; padding:0; margin:10px 0; }
.memory-chat-source-card,#memory-chat-context-list button { display:flex; gap:12px; align-items:center; min-height:64px; width:100%; margin-bottom:10px; padding:13px; border:1px solid #e4d7bf; border-radius:16px; background:#fffcf5; color:#173b37; text-align:left; }
.memory-chat-source-card > span:first-child,#memory-chat-context-list button > span:first-child { display:grid; flex:0 0 34px; place-items:center; width:34px; height:34px; border-radius:12px; color:#1d5147; background:#e8eadc; font-size:20px; }
.memory-chat-source-card > div,#memory-chat-context-list button > div { display:grid; gap:5px; min-width:0; flex:1; }
.memory-chat-source-card strong,#memory-chat-context-list strong { font-size:14px; overflow-wrap:anywhere; }
.memory-chat-source-card small,#memory-chat-context-list small { font-size:12px; line-height:1.4; color:#58635b; }
.memory-chat-source-card em { font-style:normal; width:fit-content; font-size:12px; color:#365e44; background:#e7ecdf; padding:3px 7px; border-radius:9px; }
.memory-chat-source-card em.is-uncertain { color:#92502e; background:#f5e5d1; }
.memory-chat-privacy { font-size:12px; line-height:1.5; color:#58635b; }
#memory-chat-source-detail:not(:empty) { border:1px solid #e4d7bf; border-radius:16px; padding:14px; font-size:14px; line-height:1.6; white-space:pre-wrap; }
.memory-chat-dialog [hidden] { display:none!important; }
@media(max-width:760px) {
 .memory-chat-launcher { right:16px; bottom:calc(88px + env(safe-area-inset-bottom)); }
 .memory-chat-dialog { inset:auto 0 0; width:100%; max-width:100%; height:72dvh; max-height:100dvh; border-radius:24px 24px 0 0; border-bottom:0; }
 .memory-chat-dialog[data-size="full"] { inset:0; width:100%; height:100dvh; max-width:100%; border-radius:0; }
 .memory-chat-composer { gap:0; margin-left:10px; margin-right:10px; }
 .memory-chat-composer #memory-chat-send { width:38px; flex-basis:38px; }
}
@media(prefers-reduced-motion:reduce) { .memory-chat-scroll { scroll-behavior:auto; } .memory-chat-launcher span { transition:none; } }

.memory-chat-dialog #memory-chat-history:empty { display:none; }

/* Ma mémoire — hierarchy and reading comfort, scoped to this page only. */
html body #application #page-memory#page-memory#page-memory{padding-bottom:120px!important}
html body #application #page-memory#page-memory#page-memory .page-heading{padding:28px 24px!important;border-radius:28px!important;gap:20px!important}
html body #application #page-memory#page-memory#page-memory .page-heading h1{font-size:clamp(36px,7vw,48px)!important;line-height:1.12!important}
html body #application #page-memory#page-memory#page-memory .page-heading .page-intro{font-size:17px!important;line-height:1.55!important;max-width:36ch}
html body #application #page-memory#page-memory#page-memory .section-heading{align-items:flex-start!important;gap:12px!important;margin:28px 0 16px!important}
html body #application #page-memory#page-memory#page-memory .section-heading h2{color:#fff8eb!important;font:600 28px/1.2 Georgia,serif!important;margin:6px 0 0!important}
html body #application #page-memory#page-memory#page-memory .section-heading .eyebrow{color:#dac9a6!important;font-size:12px!important;letter-spacing:.13em}
html body #application #page-memory#page-memory#page-memory .section-heading :is(.helper,.muted){color:#d4dfd7!important;font-size:15px!important;line-height:1.6!important}
html body #application #page-memory#page-memory#page-memory #memory-chat-entry{padding:24px!important;border:1px solid #deceb0!important;border-radius:26px!important;background:#fffaf0!important;display:grid;gap:12px}
html body #application #page-memory#page-memory#page-memory #memory-chat-entry h2{margin:0!important;font:600 28px/1.2 Georgia,serif!important;color:#163b30!important}
html body #application #page-memory#page-memory#page-memory #memory-chat-entry p{margin:0!important;color:#536258!important;font-size:15px!important;line-height:1.5!important}
html body #application #page-memory#page-memory#page-memory .knowledge-entry{padding:26px 24px!important;border:1px solid #456754!important;border-radius:26px!important;gap:20px!important}
html body #application #page-memory#page-memory#page-memory .knowledge-entry h2{font:600 30px/1.2 Georgia,serif!important;margin:8px 0 12px!important}
html body #application #page-memory#page-memory#page-memory .knowledge-entry p{font-size:16px!important;line-height:1.55!important}
html body #application #page-memory#page-memory#page-memory .testimony-list{display:grid!important;gap:16px!important}
html body #application #page-memory#page-memory#page-memory .testimony-card{padding:22px 20px!important;border:1px solid #dfd4bf!important;border-radius:26px!important;background:#fffcf4!important;box-shadow:0 8px 24px #071a2014!important;gap:14px!important;align-items:flex-start!important;margin:0!important}
html body #application #page-memory#page-memory#page-memory .testimony-mark{width:36px!important;height:36px!important;min-width:36px!important;border-radius:50%!important;border:1px solid #ccb98d!important;background:#ecede0!important;color:#214d3d!important;font-size:22px!important}
html body #application #page-memory#page-memory#page-memory .testimony-body{min-width:0;flex:1}
html body #application #page-memory#page-memory#page-memory .testimony-meta{gap:8px!important;align-items:center!important;flex-wrap:wrap!important;line-height:1.4}
html body #application #page-memory#page-memory#page-memory .testimony-meta strong{width:100%;font-size:17px!important;color:#1c4033!important;overflow-wrap:anywhere}
html body #application #page-memory#page-memory#page-memory .testimony-meta>span{font-size:13px!important;color:#526359!important}
html body #application #page-memory#page-memory#page-memory .private-tag{padding:4px 9px!important;background:#e9eee2!important;border-radius:18px!important;color:#385441!important}
html body #application #page-memory#page-memory#page-memory .testimony-question{font-size:16px!important;line-height:1.55!important;font-weight:600!important;color:#263e32!important;margin:16px 0 10px!important}
html body #application #page-memory#page-memory#page-memory .testimony-context{font-size:14px!important;line-height:1.55!important;color:#566357!important;background:#f1eee3!important;border-left:2px solid #bfab7d!important;padding:10px 12px!important;margin:12px 0!important;border-radius:0 12px 12px 0}
html body #application #page-memory#page-memory#page-memory .testimony-source{font-size:14px!important;line-height:1.55!important;color:#61705f!important;margin:12px 0!important}
html body #application #page-memory#page-memory#page-memory :is(.testimony-excerpt,.testimony-quote){font-size:18px!important;line-height:1.65!important;color:#253d31!important;overflow-wrap:anywhere;margin:16px 0!important}
html body #application #page-memory#page-memory#page-memory :is(.testimony-original,.reflection)>summary{min-height:48px!important;display:flex;align-items:center;gap:8px;padding:12px 14px!important;border:1px solid #d8d3bd!important;border-radius:14px!important;background:#f3f1e6!important;color:#214d3d!important;font-size:15px!important;line-height:1.4!important;cursor:pointer;box-sizing:border-box}
html body #application #page-memory#page-memory#page-memory :is(.testimony-original,.reflection)>summary::before{content:'＋';font-size:20px}
html body #application #page-memory#page-memory#page-memory :is(.testimony-original,.reflection)[open]>summary::before{content:'−'}
html body #application #page-memory#page-memory#page-memory [data-scan-testimony]{min-height:48px!important;padding:12px 0!important;margin:8px 0!important;font-size:15px!important;line-height:1.5!important;color:#87503a!important;text-align:left!important}
html body #application #page-memory#page-memory#page-memory .testimony-evidence{font-size:13px!important;line-height:1.5!important;color:#68705f!important;padding:14px 0!important;margin:10px 0!important;border-top:1px solid #e3dccb!important;display:grid!important;gap:6px!important}
html body #application #page-memory#page-memory#page-memory .reflection-form{padding:16px 0 0!important;display:grid;gap:14px}
html body #application #page-memory#page-memory#page-memory .reflection-form :is(input,select,textarea){font-size:16px!important}
html body #application #page-memory#page-memory#page-memory .button{min-height:48px!important;border-radius:18px!important;white-space:normal!important}
html body #application #page-memory#page-memory#page-memory :is(.testimony-original,.reflection)>summary:focus-visible{outline:3px solid #bfab7d;outline-offset:3px}
@media(min-width:900px){html body #application #page-memory#page-memory#page-memory #testimony-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){html body #application #page-memory#page-memory#page-memory .testimony-card{gap:10px!important;padding:20px 16px!important}html body #application #page-memory#page-memory#page-memory .testimony-mark{width:30px!important;height:30px!important;min-width:30px!important}}
html body #application #page-memory#page-memory#page-memory [hidden]{display:none!important}

.memory-chat-dialog [data-application-action] {display:block;width:100%;min-height:44px;margin:10px 0;text-align:left;white-space:normal;}


/* Lieux et cultures remains inside the chat options, without a home redesign. */
.memory-chat-menu a{display:block;padding:12px 16px;min-height:46px;text-decoration:none;color:inherit;font:inherit;border-radius:10px}
.memory-chat-menu a:hover,.memory-chat-menu a:focus-visible{background:#e9efe4;outline:2px solid #426650}
